diff --git a/devices/ellaca/default.nix b/devices/ellaca/default.nix index a891d19..03fe0ea 100644 --- a/devices/ellaca/default.nix +++ b/devices/ellaca/default.nix @@ -1,39 +1,69 @@ { pkgs, ... }: { imports = [ - ./hardware-config.nix ./options.nix ]; - networking.hostName = "ellaca"; + nixpkgs.hostPlatform = "x86_64-linux"; - # Select kernel version - boot.kernelPackages = pkgs.linuxPackages_zen; + networking = { + hostName = "ellaca"; + useDHCP = true; + }; - # Bootloader. - boot.loader = { - efi.canTouchEfiVariables = true; - grub = { - enable = true; - efiSupport = true; - device = "nodev"; - useOSProber = true; - font = null; - splashImage = null; + boot = { + initrd = { + availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + }; + + kernelModules = [ "kvm-amd" ]; + kernelPackages = pkgs.linuxPackages_zen; + + loader = { + efi.canTouchEfiVariables = true; + grub = { + enable = true; + efiSupport = true; + device = "nodev"; + useOSProber = true; + font = null; + splashImage = null; + }; }; }; - # Enable OpenGL - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; + fileSystems = { + "/boot" = { + device = "/dev/disk/by-uuid/7ABC-9C12"; + fsType = "vfat"; + }; + "/" = { + device = "/dev/disk/by-uuid/b6e6bca7-1435-4b41-b174-8550eace7c32"; + fsType = "btrfs"; + options = [ "subvol=rootfs" "compress=zstd" "noatime" ]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/b6e6bca7-1435-4b41-b174-8550eace7c32"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" "noatime" ]; + }; + "/ext" = { + device = "/dev/disk/by-uuid/3ed92a26-775a-4e39-ac1c-84b2822cd3dd"; + fsType = "btrfs"; + options = [ "subvol=ext" "compress=zstd" "noatime" ]; + }; }; - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # 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? + hardware = { + enableRedistributableFirmware = true; + enableAllFirmware = true; + cpu.amd.updateMicrocode = true; + + opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + }; + + system.stateVersion = "23.05"; } diff --git a/devices/ellaca/hardware-config.nix b/devices/ellaca/hardware-config.nix deleted file mode 100644 index 854af52..0000000 --- a/devices/ellaca/hardware-config.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, ... }: { - boot = { - initrd = { - availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - kernelModules = [ ]; - }; - kernelModules = [ "kvm-amd" ]; - extraModulePackages = [ ]; - }; - - fileSystems = { - "/boot" = { - device = "/dev/disk/by-uuid/7ABC-9C12"; - fsType = "vfat"; - }; - "/" = { - device = "/dev/disk/by-uuid/b6e6bca7-1435-4b41-b174-8550eace7c32"; - fsType = "btrfs"; - options = [ "subvol=rootfs" "compress=zstd" "noatime" ]; - }; - "/nix" = { - device = "/dev/disk/by-uuid/b6e6bca7-1435-4b41-b174-8550eace7c32"; - fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" "noatime" ]; - }; - "/ext" = { - device = "/dev/disk/by-uuid/3ed92a26-775a-4e39-ac1c-84b2822cd3dd"; - fsType = "btrfs"; - options = [ "subvol=ext" "compress=zstd" "noatime" ]; - }; - }; - - # 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.enp7s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/devices/pleniscenta/default.nix b/devices/pleniscenta/default.nix index 7b438be..35e34cb 100644 --- a/devices/pleniscenta/default.nix +++ b/devices/pleniscenta/default.nix @@ -1,28 +1,74 @@ { pkgs, ... }: { imports = [ - ./hardware-config.nix ./options.nix ]; - networking.hostName = "pleniscenta"; + nixpkgs.hostPlatform = "x86_64-linux"; - boot.kernelPackages = pkgs.linuxPackages_latest; + networking = { + hostName = "pleniscenta"; + useDHCP = true; + }; - boot.loader = { - systemd-boot = { - enable = true; + boot = { + initrd = { + availableKernelModules = [ "ahci" "xhci_pci" "ums_realtek" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; + luks.devices."root".device = "/dev/disk/by-uuid/470a6d23-9f08-4c4d-afbb-63d6df1ab6a6"; + }; + + kernelModules = [ "kvm-intel" ]; + kernelPackages = pkgs.linuxPackages_latest; + + loader = { + systemd-boot = { + enable = true; + }; + efi.canTouchEfiVariables = true; }; - efi.canTouchEfiVariables = true; }; - hardware.opengl = { - enable = true; - driSupport = true; - driSupport32Bit = true; + fileSystems = { + "/boot" = { + device = "/dev/disk/by-uuid/4A39-D0DF"; + fsType = "vfat"; + }; + "/" = { + device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; + fsType = "btrfs"; + options = [ "subvol=root" "compress=zstd" "noatime" ]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; + fsType = "btrfs"; + options = [ "subvol=nix" "compress=zstd" "noatime" ]; + }; + "/persist" = { + device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; + fsType = "btrfs"; + options = [ "subvol=persist" "compress=zstd" "noatime" ]; + }; + "/swap" = { + device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; + fsType = "btrfs"; + options = [ "subvol=swap" "noatime" ]; + }; }; + swapDevices = [ { device = "/swap/swapfile"; } ]; services.thermald.enable = true; + hardware = { + enableRedistributableFirmware = true; + enableAllFirmware = true; + cpu.intel.updateMicrocode = true; + + opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + }; + system.stateVersion = "24.05"; } diff --git a/devices/pleniscenta/hardware-config.nix b/devices/pleniscenta/hardware-config.nix deleted file mode 100644 index 0486b1a..0000000 --- a/devices/pleniscenta/hardware-config.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ config, lib, ... }: { - boot = { - initrd = { - availableKernelModules = [ "ahci" "xhci_pci" "ums_realtek" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; - luks.devices."root".device = "/dev/disk/by-uuid/470a6d23-9f08-4c4d-afbb-63d6df1ab6a6"; - }; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; - }; - - hardware.enableRedistributableFirmware = true; - hardware.enableAllFirmware = true; - - fileSystems = { - "/boot" = { - device = "/dev/disk/by-uuid/4A39-D0DF"; - fsType = "vfat"; - }; - "/" = { - device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; - fsType = "btrfs"; - options = [ "subvol=root" "compress=zstd" "noatime" ]; - }; - "/nix" = { - device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; - fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" "noatime" ]; - }; - "/persist" = { - device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; - fsType = "btrfs"; - options = [ "subvol=persist" "compress=zstd" "noatime" ]; - }; - "/swap" = { - device = "/dev/disk/by-uuid/75e6536a-4836-4f50-86b3-f9250edca3c0"; - fsType = "btrfs"; - options = [ "subvol=swap" "noatime" ]; - }; - }; - - swapDevices = [ { device = "/swap/swapfile"; } ]; - - networking.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -}