74 lines
2.0 KiB
Nix
74 lines
2.0 KiB
Nix
{
|
|
flake.nixosModules.lily-desktop = { config, lib, modulesPath, pkgs, self, ... }: {
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
|
|
boot = {
|
|
initrd = {
|
|
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
|
kernelModules = [ "nvidia" ];
|
|
luks.devices = {
|
|
"root".device = "/dev/disk/by-uuid/8573b24b-461f-40bf-b16b-9de1207c0696";
|
|
"8tb".device = "/dev/disk/by-uuid/140a35ca-67f9-41df-8414-51dcccc1a620";
|
|
"12tb".device = "/dev/disk/by-uuid/c6c23b31-a8d7-4b96-8caa-b2bdbcd49e72";
|
|
};
|
|
};
|
|
kernelModules = [ "kvm-amd" ];
|
|
extraModulePackages = [ config.boot.kernelPackages.nvidiaPackages.stable ];
|
|
};
|
|
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "/dev/mapper/root";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@nixroot" "compress=zstd" ];
|
|
};
|
|
"/boot" = {
|
|
device = "/dev/disk/by-uuid/5598-7465";
|
|
fsType = "vfat";
|
|
options = [ "fmask=0077" "dmask=0077" ];
|
|
};
|
|
"/home" = {
|
|
device = "/dev/mapper/root";
|
|
fsType = "btrfs";
|
|
options = [ "subvol=@home" "compress=zstd" ];
|
|
};
|
|
"/media/8tb" = {
|
|
device = "/dev/disk/by-uuid/a484bd77-f454-44f9-b356-e5d9781583bc";
|
|
fsType = "btrfs";
|
|
options = [ "compress=zstd" ];
|
|
};
|
|
"/media/12tb" = {
|
|
device = "/dev/disk/by-uuid/c28abd09-22a1-46d7-8a61-4212143baafc";
|
|
fsType = "btrfs";
|
|
options = [ "compress=zstd" ];
|
|
};
|
|
|
|
};
|
|
|
|
services.btrfs.autoScrub.enable = true;
|
|
|
|
swapDevices = [
|
|
{ device = "/media/8tb/swapfile"; }
|
|
];
|
|
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
hardware = {
|
|
graphics = {
|
|
enable = true;
|
|
enable32Bit = true;
|
|
};
|
|
nvidia = {
|
|
modesetting.enable = true;
|
|
powerManagement.enable = false;
|
|
open = false;
|
|
nvidiaSettings = true;
|
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
};
|
|
};
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
};
|
|
}
|