diff --git a/configuration.nix b/configuration.nix index 74cd437..06381b5 100644 --- a/configuration.nix +++ b/configuration.nix @@ -5,12 +5,7 @@ { config, pkgs, inputs, ... }: { - imports = - [ - # Include the results of the hardware scan. - ./hardware-configuration.nix - inputs.home-manager.nixosModules.default - ]; + imports = [ inputs.home-manager.nixosModules.default ]; # Bootloader. boot.loader.systemd-boot.enable = true; diff --git a/flake.nix b/flake.nix index 6d4e3e6..71cf8a2 100644 --- a/flake.nix +++ b/flake.nix @@ -16,12 +16,23 @@ pkgs = nixpkgs.legacyPackages.${system}; in { - nixosConfigurations.snowhawk = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - modules = [ - ./configuration.nix - inputs.home-manager.nixosModules.default - ]; + nixosConfigurations = { + snowhawk = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/snowhawk/hardware-configuration.nix + ./configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; + sprite = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/sprite/hardware-configuration.nix + ./configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; }; }; } diff --git a/hardware-configuration.nix b/hosts/snowhawk/hardware-configuration.nix similarity index 74% rename from hardware-configuration.nix rename to hosts/snowhawk/hardware-configuration.nix index 2267f4e..dae1d9b 100644 --- a/hardware-configuration.nix +++ b/hosts/snowhawk/hardware-configuration.nix @@ -1,12 +1,7 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; boot.initrd.kernelModules = [ ]; @@ -14,12 +9,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/8c377115-06bb-488e-a531-c668dac127f6"; + { + device = "/dev/disk/by-uuid/8c377115-06bb-488e-a531-c668dac127f6"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/1A0A-CEB2"; + { + device = "/dev/disk/by-uuid/1A0A-CEB2"; fsType = "vfat"; }; diff --git a/hosts/sprite/hardware-configuration.nix b/hosts/sprite/hardware-configuration.nix new file mode 100644 index 0000000..93e6cdf --- /dev/null +++ b/hosts/sprite/hardware-configuration.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" "usb_storage" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/fa4ed906-f26b-40ec-859c-81813151c33a"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/31B8-8850"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +}