diff --git a/flake.nix b/flake.nix index 17eb3c1..0a4e1b4 100644 --- a/flake.nix +++ b/flake.nix @@ -25,6 +25,27 @@ specialArgs = { inherit unstablePkgs updatePkgs nixos-hardware; }; modules = [ ./configuration.nix + ./sandy-hardware.nix + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.nshields = import ./home.nix; + extraSpecialArgs = { + inherit unstablePkgs; + }; + }; + } + ]; + }; + + minis = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit unstablePkgs ; }; + modules = [ + ./configuration.nix + ./minis-hardware.nix home-manager.nixosModules.home-manager { home-manager = { diff --git a/minis-hardware.nix b/minis-hardware.nix new file mode 100644 index 0000000..f3b652e --- /dev/null +++ b/minis-hardware.nix @@ -0,0 +1,59 @@ +# 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") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "zpool/root"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + + fileSystems."/nix" = + { device = "zpool/nix"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + + fileSystems."/var" = + { device = "zpool/var"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + + fileSystems."/home" = + { device = "zpool/home"; + fsType = "zfs"; + options = [ "zfsutil" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2882-CD45"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/6469740d-a7fb-4f97-8e96-fb3469a54b64"; } + ]; + + # 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.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hardware-configuration.nix b/sandy-hardware.nix similarity index 100% rename from hardware-configuration.nix rename to sandy-hardware.nix