hosts/ni: modularize more parts of hardware config

This commit is contained in:
Gabriel Arazas 2023-11-06 16:13:04 +08:00
parent 3f291fe665
commit d8c7033a48
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC
2 changed files with 17 additions and 15 deletions

View File

@ -67,26 +67,12 @@
# The keyfile required for the secrets to be decrypted.
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
# Get the latest kernel for the desktop experience.
boot.kernelPackages = pkgs.linuxPackages_latest;
# Adding a bunch of emulated systems for cross-system building.
boot.binfmt.emulatedSystems = [
"aarch64-linux"
"riscv64-linux"
];
# We're using some better filesystems so we're using it.
boot.initrd.supportedFilesystems = [ "btrfs" ];
boot.supportedFilesystems = [ "btrfs" ];
services.btrfs.autoScrub = {
enable = true;
fileSystems = [
"/mnt/archives"
];
};
# My custom configuration with my custom modules starts here.
profiles = {
i18n.enable = true;
@ -170,6 +156,5 @@
longitude = 121.0;
};
services.auto-cpufreq.enable = true;
system.stateVersion = "23.11"; # Yes! I read the comment!
}

View File

@ -6,6 +6,9 @@
./modules/hardware/traditional-networking.nix
];
# Get the latest kernel for the desktop experience.
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usb_storage" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ ];
@ -45,6 +48,17 @@
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault true;
# We're using some better filesystems so we're using it.
boot.initrd.supportedFilesystems = [ "btrfs" ];
boot.supportedFilesystems = [ "btrfs" ];
services.btrfs.autoScrub = {
enable = true;
fileSystems = [
"/mnt/archives"
];
};
# Set up printers.
services.printing = {
enable = true;
@ -56,6 +70,9 @@
];
};
# Make your CPU more useful.
services.auto-cpufreq.enable = true;
# Extend the life of an SSD.
services.fstrim.enable = true;
}