nixos-config/machines/AMD-Workstation/hardware-configuration.nix

109 lines
3.5 KiB
Nix
Raw Normal View History

2020-02-12 02:34:44 +04:00
# 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.
2024-02-08 23:21:10 +03:00
{ config, lib, modulesPath, ... }:
2020-02-12 02:34:44 +04:00
{
imports =
2021-06-29 22:27:50 +03:00
[ (modulesPath + "/installer/scan/not-detected.nix")
];
2020-02-12 02:34:44 +04:00
2023-03-26 19:24:28 +03:00
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
2020-02-12 02:34:44 +04:00
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
2023-04-08 17:57:02 +03:00
# fileSystems."/" =
# { device = "rpool/nixos/root";
# fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
# };
2020-02-12 02:34:44 +04:00
2023-03-26 19:24:28 +03:00
fileSystems."/home" =
{ device = "rpool/user/home";
2022-10-08 04:32:18 +03:00
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2020-02-12 02:34:44 +04:00
};
2023-03-26 19:24:28 +03:00
fileSystems."/persist" =
{ device = "rpool/persistent/impermanence";
2022-10-08 04:32:18 +03:00
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2020-02-12 02:34:44 +04:00
};
2023-03-26 19:24:28 +03:00
fileSystems."/srv" =
{ device = "rpool/persistent/servers";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
};
fileSystems."/etc/secrets" =
{ device = "rpool/persistent/secrets";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
};
fileSystems."/nix" =
{ device = "rpool/persistent/nix";
2022-10-08 04:32:18 +03:00
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
};
fileSystems."/var/log" =
2023-03-26 19:24:28 +03:00
{ device = "rpool/persistent/log";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
};
fileSystems."/var/lib/docker" =
{ device = "rpool/persistent/docker";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
};
fileSystems."/var/lib/containers" =
{ device = "rpool/persistent/containers";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
};
fileSystems."/var/lib/nixos-containers" =
{ device = "rpool/persistent/nixos-containers";
2022-10-08 04:32:18 +03:00
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2021-06-29 22:27:50 +03:00
};
fileSystems."/media/bittorrent" =
2023-03-26 19:24:28 +03:00
{ device = "rpool/persistent/bittorrent";
2022-10-08 04:32:18 +03:00
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2020-02-12 02:34:44 +04:00
};
2021-09-15 18:40:13 +03:00
fileSystems."/media/libvirt" =
2023-03-26 19:24:28 +03:00
{ device = "rpool/persistent/libvirt";
2022-10-08 04:32:18 +03:00
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
2021-09-15 18:40:13 +03:00
};
2020-02-12 02:34:44 +04:00
fileSystems."/boot" =
2023-03-26 19:24:28 +03:00
{ device = "bpool/nixos/boot";
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
};
fileSystems."/efi" =
{ device = "/dev/disk/by-uuid/A556-CD19";
2020-02-12 02:34:44 +04:00
fsType = "vfat";
};
2021-06-29 22:27:50 +03:00
swapDevices = [
{
2023-03-26 19:24:28 +03:00
device = "/dev/disk/by-partuuid/5305d817-d4ef-41a7-a51b-dc1fb8638227";
randomEncryption.enable = true;
randomEncryption.allowDiscards = true;
2021-06-29 22:27:50 +03:00
}
];
2022-10-08 04:32:18 +03:00
# 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;
2023-03-26 19:24:28 +03:00
# networking.interfaces.enp8s0.useDHCP = lib.mkDefault true;
2022-10-08 04:32:18 +03:00
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
2021-06-29 22:27:50 +03:00
# high-resolution display
2023-03-26 19:24:28 +03:00
networking.hostId = "0c00ab80";
boot.zfs.devNodes = "/dev/disk/by-id";
2022-10-08 04:32:18 +03:00
boot.supportedFilesystems = [ "zfs" ];
2023-03-26 19:24:28 +03:00
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-partuuid/67e044d7-1a06-4a59-826a-bf24994934a7";
2020-02-12 02:34:44 +04:00
}