This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
nil/hosts/nil.nix

74 lines
2.2 KiB
Nix
Raw Normal View History

2021-11-28 01:10:36 +00: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 = [
../modules/profiles/laptop.nix
(modulesPath + "/installer/scan/not-detected.nix")
];
2021-12-15 05:12:00 +00:00
this.systems.zfs.enable = true;
# This is required for the zfs module as well. Must be unique. Run the following head -c4 /dev/urandom | od -A none -t x4
2021-11-28 01:10:36 +00:00
networking.hostId = "a7a1c3f5";
networking.hostName = "nil"; # Define your hostname.
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.enp2s0f0.useDHCP = true;
networking.interfaces.enp5s0.useDHCP = true;
networking.interfaces.wlp3s0.useDHCP = true;
boot.initrd.availableKernelModules = [
"nvme"
"vfat"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
"sdhci_pci"
"cryptd"
];
2021-11-28 22:20:10 +00:00
hardware.firmware = [ pkgs.rtw89-firmware ];
2021-11-28 01:10:36 +00:00
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ config.boot.kernelPackages.rtw89 ];
2021-11-28 22:20:10 +00:00
boot.supportedFilesystems = [ "zfs" ];
2021-11-28 01:10:36 +00:00
2021-11-28 22:20:10 +00:00
boot.initrd.luks.devices."crypt" = {
device = "/dev/disk/by-partlabel/crypt";
preLVM = true;
};
2021-11-28 01:10:36 +00:00
2021-11-28 22:20:10 +00:00
fileSystems."/" = {
device = "rpool/root/nixos";
fsType = "zfs";
};
2021-11-28 01:10:36 +00:00
2021-11-28 22:20:10 +00:00
fileSystems."/home" = {
device = "rpool/home";
fsType = "zfs";
};
2021-11-28 01:10:36 +00:00
2021-11-28 22:20:10 +00:00
fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/boot";
fsType = "vfat";
};
2021-11-28 01:10:36 +00:00
2021-11-28 22:20:10 +00:00
swapDevices = [{ device = "/dev/partitions/swap"; }];
2021-11-28 01:10:36 +00:00
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.05"; # Did you read the comment?
}