diff options
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/tahoe/default.nix | 41 | ||||
-rw-r--r-- | hosts/tahoe/hardware-configuration.nix | 70 |
2 files changed, 111 insertions, 0 deletions
diff --git a/hosts/tahoe/default.nix b/hosts/tahoe/default.nix new file mode 100644 index 0000000..22daf5d --- /dev/null +++ b/hosts/tahoe/default.nix @@ -0,0 +1,41 @@ +{ config, pkgs, hostname, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + boot = { + initrd = { + luks.devices."system".allowDiscards = true; + }; + }; + + # Use systemd-networkd for networking + systemd.network = { + enable = true; + networks = { + enp42s0 = { + matchConfig.Name = "enp42s0"; + networkConfig = { + DHCP = "yes"; + }; + extraConfig = '' + [DHCPv4] + UseDNS=yes + UseDomains=yes + ''; + }; + }; + }; + + # 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. It‘s 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.11"; # Did you read the comment? +} + diff --git a/hosts/tahoe/hardware-configuration.nix b/hosts/tahoe/hardware-configuration.nix new file mode 100644 index 0000000..64b1dfc --- /dev/null +++ b/hosts/tahoe/hardware-configuration.nix @@ -0,0 +1,70 @@ +# 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" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/0ac21391-139e-4fc8-997c-082abe1a828d"; + fsType = "btrfs"; + options = [ "subvol=nixos" ]; + }; + + boot.initrd.luks.devices."system".device = "/dev/disk/by-uuid/52cf8e9b-3b61-4d4a-af07-8939ce4688e9"; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/0ac21391-139e-4fc8-997c-082abe1a828d"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/.snapshots" = + { device = "/dev/disk/by-uuid/0ac21391-139e-4fc8-997c-082abe1a828d"; + fsType = "btrfs"; + options = [ "subvol=snapshots" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/73CA-2941"; + fsType = "vfat"; + }; + + fileSystems."/data/media" = + { device = "/dev/disk/by-uuid/4058be93-d37b-4d1e-93b2-9b5a2380fb74"; + fsType = "btrfs"; + options = [ "subvol=media" ]; + }; + + boot.initrd.luks.devices."raid-fast".device = "/dev/disk/by-uuid/6faff2ec-429a-4d39-8b22-ac5e31780567"; + + fileSystems."/data/containers" = + { device = "/dev/disk/by-uuid/4058be93-d37b-4d1e-93b2-9b5a2380fb74"; + fsType = "btrfs"; + options = [ "subvol=containers" ]; + }; + + fileSystems."/data/backups" = + { device = "/dev/disk/by-uuid/0bd9fbf4-e3d7-4e69-a21b-57d804a8a454"; + fsType = "btrfs"; + options = [ "subvol=backups" ]; + }; + + boot.initrd.luks.devices."raid-slow".device = "/dev/disk/by-uuid/aa8c3bae-d39c-44bd-a14b-e5f5d610a57d"; + + swapDevices = + [ { device = "/dev/disk/by-uuid/f39642e3-d506-418d-93c3-482f1376b7f0"; } + ]; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + # high-resolution display + hardware.video.hidpi.enable = lib.mkDefault true; +} |