diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/underworld/default.nix | 14 | ||||
| -rw-r--r-- | hosts/underworld/disko.nix | 45 | ||||
| -rw-r--r-- | hosts/underworld/hardware.nix | 25 | ||||
| -rw-r--r-- | hosts/underworld/home.nix | 7 |
4 files changed, 64 insertions, 27 deletions
diff --git a/hosts/underworld/default.nix b/hosts/underworld/default.nix index bcdc5a6..d900560 100644 --- a/hosts/underworld/default.nix +++ b/hosts/underworld/default.nix @@ -2,6 +2,8 @@ imports = [ # Include the results of the hardware scan. ./hardware.nix + ./disko.nix + ./home.nix (flakeRoot + /share/system/steam.nix) (flakeRoot + /share/system/hyprland.nix) @@ -17,10 +19,14 @@ randomizedDelaySec = "15min"; }; - # Use the systemd-boot EFI boot loader. + # Using grub because the disko docs tell me to use it boot = { - loader.systemd-boot.enable = true; - loader.efi.canTouchEfiVariables = true; + supportedFilesystems = [ "bacachefs" ]; + loader.grub = { + enable = true; + efiSupport = true; + efiInstallAsRemovable = true; + }; }; networking = { @@ -85,5 +91,5 @@ # this value at the release version of the first install of this system. # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "23.05"; # Did you read the comment? + system.stateVersion = "23.11"; # Did you read the comment? } diff --git a/hosts/underworld/disko.nix b/hosts/underworld/disko.nix new file mode 100644 index 0000000..e713323 --- /dev/null +++ b/hosts/underworld/disko.nix @@ -0,0 +1,45 @@ +{ + disko.devices = { + disk = { + main = { + type = "disk"; + device = "/dev/disk/by-id/ata-WDC_WDS240G2G0B-00EPW0_194176803299"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; # for grub MBR + }; + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + name = "root"; + end = "-20G"; + content = { + type = "filesystem"; + format = "bcachefs"; + mountpoint = "/"; + }; + }; + encryptedSwap = { + size = "100%"; + content = { + type = "swap"; + randomEncryption = true; + resumeDevice = true; # resume from hibernation from this device + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/underworld/hardware.nix b/hosts/underworld/hardware.nix index a99d2a3..305d6ce 100644 --- a/hosts/underworld/hardware.nix +++ b/hosts/underworld/hardware.nix @@ -1,39 +1,26 @@ # 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, ... }: +{ config, lib, modulesPath, ... }: { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ + (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/fc1a2a05-efb0-45e7-83f2-2b9dae515b0a"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/FEB7-A352"; - fsType = "vfat"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/f16d9af0-4043-4d39-a8d6-e788451f8e9e"; } - ]; - # 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.<interface>.useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp9s0.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/underworld/home.nix b/hosts/underworld/home.nix index c7cdb1b..42061ef 100644 --- a/hosts/underworld/home.nix +++ b/hosts/underworld/home.nix @@ -1,5 +1,4 @@ -{ pkgs -, flakeRoot +{ flakeRoot , inputs , ... }: { @@ -15,10 +14,10 @@ (flakeRoot + /share/home/gallery-dl.nix) ]; - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; }; home-manager.users.root = { - home.stateVersion = "23.05"; + home.stateVersion = "23.11"; }; } |
