diff options
author | ene <ene@sils.li> | 2023-02-04 11:54:55 +0100 |
---|---|---|
committer | ene <ene@sils.li> | 2023-02-04 11:55:56 +0100 |
commit | 75b442acb64bac70294681ae6d318a470afeac3c (patch) | |
tree | f05216df9e251e826188d4e8bfa6024af14078a4 /hosts | |
parent | Fix(packages): Removed already by nixos managed ones (diff) | |
download | nixos-config-75b442acb64bac70294681ae6d318a470afeac3c.tar.gz nixos-config-75b442acb64bac70294681ae6d318a470afeac3c.zip |
Feat: Made more configuration host independent
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/IDOHVE/hardware/boot.nix | 32 | ||||
-rwxr-xr-x | hosts/IDOHVE/hardware/boot_pictures/gnu.png | bin | 327518 -> 0 bytes | |||
-rwxr-xr-x | hosts/IDOHVE/hardware/boot_pictures/gnulin_emb_1.png | bin | 207444 -> 0 bytes | |||
-rwxr-xr-x | hosts/IDOHVE/hardware/boot_pictures/gnulin_emb_2.png | bin | 208347 -> 0 bytes | |||
-rw-r--r-- | hosts/IDOHVE/hardware/filesystems.nix | 41 | ||||
-rw-r--r-- | hosts/IDOHVE/hardware/hardware.nix | 15 |
6 files changed, 13 insertions, 75 deletions
diff --git a/hosts/IDOHVE/hardware/boot.nix b/hosts/IDOHVE/hardware/boot.nix deleted file mode 100644 index 4cd94191..00000000 --- a/hosts/IDOHVE/hardware/boot.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - pkgs, - ... -}: { - boot = { - initrd = { - compressor = "lz4"; - compressorArgs = ["-9"]; - - # TODO check this: - availableKernelModules = ["xhci_pci" "nvme" "rtsx_pci_sdmmc"]; - }; - - kernelModules = ["kvm-amd"]; - kernelPackages = pkgs.linuxPackages_latest; - loader = { - grub = { - enable = true; - version = 2; - theme = pkgs.nixos-grub2-theme; - splashImage = ./boot_pictures/gnu.png; - efiSupport = true; - device = "nodev"; # only for efi - }; - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot"; - }; - }; - }; -} diff --git a/hosts/IDOHVE/hardware/boot_pictures/gnu.png b/hosts/IDOHVE/hardware/boot_pictures/gnu.png deleted file mode 100755 index d07dee3e..00000000 --- a/hosts/IDOHVE/hardware/boot_pictures/gnu.png +++ /dev/null Binary files differdiff --git a/hosts/IDOHVE/hardware/boot_pictures/gnulin_emb_1.png b/hosts/IDOHVE/hardware/boot_pictures/gnulin_emb_1.png deleted file mode 100755 index 483f2681..00000000 --- a/hosts/IDOHVE/hardware/boot_pictures/gnulin_emb_1.png +++ /dev/null Binary files differdiff --git a/hosts/IDOHVE/hardware/boot_pictures/gnulin_emb_2.png b/hosts/IDOHVE/hardware/boot_pictures/gnulin_emb_2.png deleted file mode 100755 index 48cd6ad7..00000000 --- a/hosts/IDOHVE/hardware/boot_pictures/gnulin_emb_2.png +++ /dev/null Binary files differdiff --git a/hosts/IDOHVE/hardware/filesystems.nix b/hosts/IDOHVE/hardware/filesystems.nix deleted file mode 100644 index a188df18..00000000 --- a/hosts/IDOHVE/hardware/filesystems.nix +++ /dev/null @@ -1,41 +0,0 @@ -{config, ...}: let - main_disk = "/dev/disk/by-uuid/<uuid>"; -in { - fileSystems = { - "/" = { - device = "none"; - fsType = "tmpfs"; - options = ["defaults" "size=2G" "mode=755"]; - }; - "/nix" = { - device = main_disk; - fsType = "btrfs"; - options = ["subvol=@nix" "compress-force=zstd:9"]; - }; - "/boot" = { - device = "/dev/disk/by-uuid/<uuid>"; - fsType = "vfat"; - }; - - "/srv/home" = { - device = main_disk; - fsType = "btrfs"; - options = ["subvol=@home" "compress-force=zstd:9"]; - }; - "/srv/nixos-config" = { - device = main_disk; - fsType = "btrfs"; - options = ["subvol=@nixos-config" "compress-force=zstd:9"]; - }; - - "/etc/nixos" = { - device = "/srv/nix-config"; - options = ["bind"]; - }; - "/home" = { - device = "/srv/home"; - options = ["bind"]; - }; - }; - swapDevices = []; -} diff --git a/hosts/IDOHVE/hardware/hardware.nix b/hosts/IDOHVE/hardware/hardware.nix index 2d21ce8a..c36b7062 100644 --- a/hosts/IDOHVE/hardware/hardware.nix +++ b/hosts/IDOHVE/hardware/hardware.nix @@ -9,9 +9,20 @@ (modulesPath + "/installer/scan/not-detected.nix") # TODO is this necessary? ./cpu.nix ./gpu.nix - ./boot.nix - ./filesystems.nix ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + system.filesystemLayouts = { + enable = true; + mainDisk = "/dev/disk/by-uuid/<uuid>"; + efiDisk = "/dev/disk/by-uuid/<uuid>"; + }; + + boot = { + kernelModules = ["kvm-amd"]; + + # TODO check this: + initrd.availableKernelModules = ["xhci_pci" "nvme" "rtsx_pci_sdmmc"]; + }; } |