2022-06-17 19:29:47 +02: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.
|
|
|
|
|
{ config, lib, pkgs, modulesPath, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
2022-06-26 21:19:15 +02:00
|
|
|
|
[
|
|
|
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
2022-06-17 19:29:47 +02:00
|
|
|
|
];
|
|
|
|
|
|
2023-07-11 22:24:27 +02:00
|
|
|
|
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "r8169" ];
|
|
|
|
|
boot.initrd.kernelModules = [ "r8169" ];
|
|
|
|
|
boot.kernelModules = [ "kvm-intel" "r8169" ];
|
2022-06-17 19:29:47 +02:00
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
|
|
|
|
|
fileSystems."/" =
|
2022-06-26 21:19:15 +02:00
|
|
|
|
{
|
2023-07-11 21:55:21 +02:00
|
|
|
|
device = "rpool/nixos";
|
|
|
|
|
fsType = "zfs";
|
|
|
|
|
options = [ "zfsutil" ];
|
2022-06-17 19:29:47 +02:00
|
|
|
|
};
|
|
|
|
|
|
2023-07-11 21:55:21 +02:00
|
|
|
|
fileSystems."/nix" =
|
2022-06-26 21:19:15 +02:00
|
|
|
|
{
|
2023-07-11 21:55:21 +02:00
|
|
|
|
device = "rpool/nixos/nix";
|
|
|
|
|
fsType = "zfs";
|
|
|
|
|
options = [ "zfsutil" ];
|
2022-06-26 21:17:20 +02:00
|
|
|
|
};
|
|
|
|
|
|
2023-07-11 21:55:21 +02:00
|
|
|
|
fileSystems."/home" =
|
2022-06-26 21:19:15 +02:00
|
|
|
|
{
|
2023-07-11 21:55:21 +02:00
|
|
|
|
device = "rpool/userdata/home";
|
|
|
|
|
fsType = "zfs";
|
|
|
|
|
options = [ "zfsutil" ];
|
2022-06-17 19:29:47 +02:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/boot" =
|
2022-06-26 21:19:15 +02:00
|
|
|
|
{
|
2023-07-11 21:55:21 +02:00
|
|
|
|
device = "/dev/disk/by-uuid/A8AA-1CC4";
|
2022-06-17 19:29:47 +02:00
|
|
|
|
fsType = "vfat";
|
2023-07-11 21:55:21 +02:00
|
|
|
|
options = [ "X-mount.mkdir" ];
|
2022-06-17 19:29:47 +02:00
|
|
|
|
};
|
|
|
|
|
|
2023-07-11 21:55:21 +02:00
|
|
|
|
swapDevices =
|
|
|
|
|
[{
|
|
|
|
|
device = "/dev/disk/by-partuuid/f9712640-96a5-46e1-b07d-53b0cba19057";
|
|
|
|
|
randomEncryption = true;
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
networking.interfaces.enp53s0.useDHCP = lib.mkDefault true;
|
|
|
|
|
networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
|
|
|
|
|
2023-07-11 22:24:27 +02:00
|
|
|
|
# hostId for zfs
|
|
|
|
|
networking.hostId = "7da4f1e6";
|
|
|
|
|
|
|
|
|
|
# extra zfs settings
|
|
|
|
|
boot = {
|
|
|
|
|
loader = {
|
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
|
};
|
|
|
|
|
supportedFilesystems = [ "zfs" ];
|
|
|
|
|
kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
|
|
|
|
|
kernelParams = [ "nohibernate" ];
|
|
|
|
|
zfs.devNodes = "/dev/";
|
|
|
|
|
plymouth.enable = false;
|
|
|
|
|
tmp.useTmpfs = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# remote unlock
|
|
|
|
|
boot.initrd.network = {
|
|
|
|
|
enable = true;
|
|
|
|
|
ssh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
port = 2222;
|
|
|
|
|
hostKeys = [ "/etc/initrd-ssh/key" ];
|
|
|
|
|
authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDP6xE2ey0C8XXfvniiiHiqXsCC277jKI9RXEA+s2LQLUI5zl7v350i3Oa8H3NCcPj39lfMreqE6ncxcOhqYyzahPrrMkOqgbPAoRvq8H3ophLK+56O3xdHoKwLBwRD1yoGACjqG4UTiTrmnN2ateENgYcnTEY1e4vDw1qMj1drUXCsZ/6mkBBmHJiFfCaR4yCMt1r4gGi/dAC7ifnBP3oSyV/lJEwPxYYkGlbOBIvX/7Ar98pJS6xYPB3jHs9gwyNNON63d0fNYrwBojXPPCnGGaRZNOkBTzex3zZYp12ThINQ2xl8tRp9D8qpZ7vrLjhTD6AXkOBRzmDj+NsCeEaeTuWajqUM93iKncYUI+JxR1t7q8gA2pBMFzLesMXnx7R+5Kw7QDtSJM7a4GMIfsocPwf64BH6rzxEz68rXFE3P+J77PPM9CuaYw90JXHo3z220zYw2nMQ/1qjATVZw/hiVrLmQMVfmFJIufnGjTBs2sy3IoNyzvYm/oDeNNg1cdSV9gyyRKZhK08fxjXN5GSf9vZkfZa9tHtqaZ99HI40GQBHUVx1K2/NQJY8TVTSA+v16SFnJK8BIbmp/WFCuvDcMkgLIbqiYtDASe7P2mKIib86uOENT+P820egeLiTQ06kFw/gfUa8t69d5qEcjiQZ+lxCeYIs/E9KrEXHvRUWew== cardno:16 811 34" ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.zfs = {
|
|
|
|
|
trim.enable = true;
|
|
|
|
|
autoScrub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
pools = [ "rpool" ];
|
|
|
|
|
};
|
|
|
|
|
autoSnapshot.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# update the microcode
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
hardware.enableAllFirmware = true;
|
|
|
|
|
|
|
|
|
|
services.logind.lidSwitch = "ignore";
|
|
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
|
|
|
|
}
|