diff --git a/.gitignore b/.gitignore index c08f3f8..ac4d513 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ !derivations/ !hosts/ +!hosts/enka/ !modules/ !modules/bat/ diff --git a/flake.nix b/flake.nix index 39e9987..c20d7e9 100644 --- a/flake.nix +++ b/flake.nix @@ -131,7 +131,7 @@ modules = [ homeManager.nixosModules.default defaultConfiguration - ./hosts/${host}.nix + ./hosts/${host} ]; }; diff --git a/hosts/enka.nix b/hosts/enka/default.nix similarity index 93% rename from hosts/enka.nix rename to hosts/enka/default.nix index 2895f71..168cdd7 100644 --- a/hosts/enka.nix +++ b/hosts/enka/default.nix @@ -14,6 +14,8 @@ }) (importModules [ + ./hardware.nix + "bat" "blueman" "boot" @@ -44,6 +46,4 @@ "steam" "steck" "waybar" - - /etc/nixos/hardware-configuration.nix ]) diff --git a/hosts/enka/hardware.nix b/hosts/enka/hardware.nix new file mode 100644 index 0000000..61950dd --- /dev/null +++ b/hosts/enka/hardware.nix @@ -0,0 +1,25 @@ +{ + boot.initrd.availableKernelModules = [ + "ahci" + "rtsx_pci_sdmmc" + "sd_mod" + "sr_mod" + "xhci_pci" + ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/cc473c12-94a9-4399-a0ab-f080f9e786f6"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D1F5-D862"; + fsType = "vfat"; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/f3a15cd2-9897-4867-9414-d4a8c3e71caf"; } + ]; + + hardware.cpu.intel.updateMicrocode = true; +} diff --git a/rebuild.nu b/rebuild.nu index e30f5ed..7a90afa 100755 --- a/rebuild.nu +++ b/rebuild.nu @@ -8,11 +8,11 @@ def main --wrapped [ machine: string@complete = "" # The machine to build. ...arguments # The arguments to pass to `nix system apply`. ] { - let flags = $arguments | append [ + let flags = [ + $"--flake ('.#' + $machine)" "--option accept-flake-config true" "--log-format internal-json" - "--impure" - ] + ] | append $arguments - sudo sh -c $"nix system apply ('.#' + $machine) ($flags | str join ' ') |& nom --json" + sudo sh -c $"nixos-rebuild switch ($flags | str join ' ') |& nom --json" }