diff --git a/config/nitro.nix b/config/nitro.nix new file mode 100644 index 0000000..8dfb816 --- /dev/null +++ b/config/nitro.nix @@ -0,0 +1,30 @@ +{ config, pkgs, lib, ... }: + +{ + nix.buildCores = 4; + nix.maxJobs = 4; + + nixpkgs.config.allowUnfree = true; + + boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages; + + boot.loader = { + efi.efiSysMountPoint = "/boot/efi"; + grub.efiSupport = true; + grub.device = "nodev"; + }; + boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/3b7f1053-adb0-4ab3-be45-e4570eb867e2"; + + networking = { + hostName = "nitro"; + + # useDHCP is deprecated, disable explicitly. + useDHCP = false; + interfaces.enp3s0.useDHCP = true; + }; + + services.xserver.libinput.enable = true; + + system.stateVersion = "22.05"; +} + diff --git a/config/nitro_hardware.nix b/config/nitro_hardware.nix new file mode 100644 index 0000000..8808103 --- /dev/null +++ b/config/nitro_hardware.nix @@ -0,0 +1,49 @@ +# 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" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f7853517-9c5c-497f-a749-17171320d45f"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/persist" = + { device = "/dev/disk/by-uuid/f7853517-9c5c-497f-a749-17171320d45f"; + fsType = "btrfs"; + options = [ "subvol=@persist" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/c6d4b892-09fd-48ee-97ee-3509af5cd873"; + fsType = "ext4"; + }; + + fileSystems."/boot/efi" = + { device = "/dev/disk/by-uuid/627E-7033"; + fsType = "vfat"; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/f7853517-9c5c-497f-a749-17171320d45f"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/3430af3a-484c-40b6-a278-d38b042abd21"; } + ]; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/flake.nix b/flake.nix index 6b4136a..8daefbc 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,14 @@ ./config/aspire_hardware.nix ]; }; + nitro = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + (import ./config/common.nix inputs) + ./config/nitro.nix + ./config/nitro_hardware.nix + ]; + }; installationMedia = nixpkgs.lib.nixosSystem { system = "x86_64-linux";