112 lines
3.6 KiB
Nix
112 lines
3.6 KiB
Nix
# 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 =
|
||
[
|
||
(modulesPath + "/installer/scan/not-detected.nix")
|
||
];
|
||
|
||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" "r8169" ];
|
||
boot.initrd.kernelModules = [ "r8169" ];
|
||
boot.kernelModules = [ "kvm-intel" "r8169" ];
|
||
boot.extraModulePackages = [ ];
|
||
|
||
fileSystems."/" =
|
||
{
|
||
device = "rpool/nixos";
|
||
fsType = "zfs";
|
||
options = [ "zfsutil" ];
|
||
};
|
||
|
||
fileSystems."/nix" =
|
||
{
|
||
device = "rpool/nixos/nix";
|
||
fsType = "zfs";
|
||
options = [ "zfsutil" ];
|
||
};
|
||
|
||
fileSystems."/home" =
|
||
{
|
||
device = "rpool/userdata/home";
|
||
fsType = "zfs";
|
||
options = [ "zfsutil" ];
|
||
};
|
||
|
||
fileSystems."/var/lib" =
|
||
{
|
||
device = "rpool/userdata/var-lib";
|
||
fsType = "zfs";
|
||
options = [ "zfsutil" ];
|
||
};
|
||
|
||
fileSystems."/boot" =
|
||
{
|
||
device = "/dev/disk/by-uuid/A8AA-1CC4";
|
||
fsType = "vfat";
|
||
options = [ "X-mount.mkdir" ];
|
||
};
|
||
|
||
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;
|
||
|
||
# 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";
|
||
}
|