From ba52540f6c29a2ba5658043db51568115ab472bd Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Tue, 26 Sep 2023 18:21:57 +0200 Subject: [PATCH] add yodaNas [WIP] --- hosts/yodaNas/configuration.nix | 6 ++-- hosts/yodaNas/hardware-configuration.nix | 41 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 hosts/yodaNas/hardware-configuration.nix diff --git a/hosts/yodaNas/configuration.nix b/hosts/yodaNas/configuration.nix index 4881939..5bc277e 100644 --- a/hosts/yodaNas/configuration.nix +++ b/hosts/yodaNas/configuration.nix @@ -23,7 +23,7 @@ in # NUR. ../../modules/nur.nix # Device specific. - ../../modules/yodaNas.nix + #../../modules/yodaNas.nix ../../modules/base.nix #../../modules/base-gnome.nix @@ -32,7 +32,7 @@ in #../../modules/wallpaper.nix #../../modules/fwupd-gnome.nix #../../modules/print-and-scan.nix - ../../modules/fde-ssh-unlock.nix + #../../modules/fde-ssh-unlock.nix #../../modules/nextcloud-integration.nix #../../modules/gnome-config.nix @@ -59,7 +59,7 @@ in ]; networking.hostName = "yodaNas"; - #boot.initrd.luks.devices."luks-XXX".allowDiscards = true; + boot.initrd.luks.devices."luks-3d974bd0-f373-469b-8e9c-2d5516e9f0f5".allowDiscards = true; boot.kernelParams = []; diff --git a/hosts/yodaNas/hardware-configuration.nix b/hosts/yodaNas/hardware-configuration.nix new file mode 100644 index 0000000..cbb05f6 --- /dev/null +++ b/hosts/yodaNas/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/b02e7bc6-62e0-46b5-8d5f-869b464c4491"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + boot.initrd.luks.devices."luks-3d974bd0-f373-469b-8e9c-2d5516e9f0f5".device = "/dev/disk/by-uuid/3d974bd0-f373-469b-8e9c-2d5516e9f0f5"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/072E-897D"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}