diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..a5c0092 Binary files /dev/null and b/.DS_Store differ diff --git a/flake.nix b/flake.nix index 6b4ad9c..8148580 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,12 @@ }; outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } { - systems = [ "x86_64-linux" ]; + systems = [ + "x86_64-linux" + "aarch64-darwin" + "x86_64-darwin" + ]; + imports = [ inputs.wrapper-modules.flakeModules.default (inputs.import-tree ./modules) diff --git a/modules/hosts/robin/configuration.nix b/modules/hosts/robin/configuration.nix new file mode 100644 index 0000000..740e47e --- /dev/null +++ b/modules/hosts/robin/configuration.nix @@ -0,0 +1,54 @@ +{ self, inputs, ... }: { + flake.nixosModules.robinConfiguration = { pkgs, ... }: { + imports = [ + self.nixosModules.robinHardware + self.nixosModules.nest + + self.nixosModules.git + self.nixosModules.zsh + ]; + + environment.systemPackages = with pkgs; [ + kubectl + htop + zip + unzip + dig + traceroute + neovim + wget + ]; + + networking.networkmanager.enable = true; + networking.hostName = "robin"; + + services = { + openssh.enable = true; + }; + + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + timeout = 1; + }; + + kernelPackages = pkgs.linuxPackages_latest; + }; + + time.timeZone = "America/New_York"; + time.hardwareClockInLocalTime = false; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings.auto-optimise-store = true; + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + + nixpkgs.config.allowUnfree = true; + + system.stateVersion = "26.05"; + }; +} diff --git a/modules/hosts/robin/default.nix b/modules/hosts/robin/default.nix new file mode 100644 index 0000000..38b5dc2 --- /dev/null +++ b/modules/hosts/robin/default.nix @@ -0,0 +1,5 @@ +{ self, inputs, ... }: { + flake.nixosConfigurations.robin = inputs.nixpkgs.lib.nixosSystem { + modules = [ self.nixosModules.robinConfiguration ]; + }; +} diff --git a/modules/hosts/robin/hardware-configuration.nix b/modules/hosts/robin/hardware-configuration.nix new file mode 100644 index 0000000..58df424 --- /dev/null +++ b/modules/hosts/robin/hardware-configuration.nix @@ -0,0 +1,30 @@ +{ self, inputs, ... }: { + flake.nixosModules.robinHardware = { config, lib, pkgs, modulesPath, ... }: { + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f2961551-7226-435d-ac61-f163fd501cd0"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/4F83-826C"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/8a40ed87-4797-4a4c-aa8c-e7faa6ec6d57"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; +}