2022-12-07 22:16:09 +03: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 =
|
|
|
|
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
|
|
|
|
];
|
|
|
|
|
|
2022-12-08 23:11:08 +03:00
|
|
|
|
boot.initrd.availableKernelModules = [ "ahci" "virtio_pci" "xhci_pci" "sd_mod" "sr_mod" ];
|
2022-12-07 22:16:09 +03:00
|
|
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
|
boot.kernelModules = [ "kvm-amd" ];
|
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
|
|
|
|
|
fileSystems."/" =
|
2022-12-08 23:11:08 +03:00
|
|
|
|
{ device = "rpool/nixos/root";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-08 23:11:08 +03:00
|
|
|
|
fileSystems."/home" =
|
|
|
|
|
{ device = "rpool/user/home";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-08 23:11:08 +03:00
|
|
|
|
fileSystems."/persistent" =
|
|
|
|
|
{ device = "rpool/persistent/impermanence";
|
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-14 23:53:18 +03:00
|
|
|
|
fileSystems."/srv" =
|
|
|
|
|
{ device = "rpool/persistent/servers";
|
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-08 23:11:08 +03:00
|
|
|
|
fileSystems."/etc/secrets" =
|
|
|
|
|
{ device = "rpool/persistent/secrets";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-08 23:11:08 +03:00
|
|
|
|
fileSystems."/nix" =
|
|
|
|
|
{ device = "rpool/persistent/nix";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/var/log" =
|
2022-12-08 23:11:08 +03:00
|
|
|
|
{ device = "rpool/persistent/log";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/var/lib/docker" =
|
2022-12-08 23:11:08 +03:00
|
|
|
|
{ device = "rpool/persistent/docker";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/media/bittorrent" =
|
2022-12-08 23:11:08 +03:00
|
|
|
|
{ device = "rpool/persistent/bittorrent";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/media/libvirt" =
|
2022-12-08 23:11:08 +03:00
|
|
|
|
{ device = "rpool/persistent/libvirt";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/boot" =
|
2022-12-08 23:11:08 +03:00
|
|
|
|
{ device = "bpool/nixos/boot";
|
|
|
|
|
fsType = "zfs"; options = [ "zfsutil" "X-mount.mkdir" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
fileSystems."/boot/efi" =
|
2022-12-14 23:53:18 +03:00
|
|
|
|
{ device = "/dev/disk/by-uuid/AFFE-0DF3";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
fsType = "vfat";
|
|
|
|
|
};
|
|
|
|
|
|
2022-12-08 23:11:08 +03:00
|
|
|
|
swapDevices = [
|
|
|
|
|
{
|
2022-12-14 23:53:18 +03:00
|
|
|
|
device = "/dev/disk/by-partuuid/7e8f2ee1-0f2e-4b77-9c4d-916804573ef7";
|
2022-12-08 23:11:08 +03:00
|
|
|
|
randomEncryption.enable = true;
|
|
|
|
|
randomEncryption.allowDiscards = true;
|
|
|
|
|
}
|
|
|
|
|
];
|
2022-12-07 22:16:09 +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;
|
|
|
|
|
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
|
|
|
|
|
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
|
|
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
|
networking.hostId = "41d97526";
|
2022-12-08 23:11:08 +03:00
|
|
|
|
boot.zfs.devNodes = "/dev/disk/by-id";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
boot.supportedFilesystems = [ "zfs" ];
|
2022-12-14 23:53:18 +03:00
|
|
|
|
boot.initrd.luks.devices."cryptboot".device = "/dev/disk/by-partuuid/7df4b6a7-13a1-4600-806e-34d3aa1bfd93";
|
|
|
|
|
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-partuuid/4c8631b2-c925-49ea-8861-84e3071e0557";
|
2022-12-07 22:16:09 +03:00
|
|
|
|
}
|