From f8492fc9e93f228781cef8d996ae18d09b66a8c2 Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Thu, 3 Oct 2024 01:32:42 +0200 Subject: [PATCH] desktop adjustments --- .../monosodium-glutamate-g/configuration.nix | 20 ++---------- .../hardware-configuration.nix | 32 +++++++++---------- .../modules/default.nix | 2 +- 3 files changed, 19 insertions(+), 35 deletions(-) diff --git a/hosts/monosodium-glutamate-g/configuration.nix b/hosts/monosodium-glutamate-g/configuration.nix index 97881a3..5c20795 100644 --- a/hosts/monosodium-glutamate-g/configuration.nix +++ b/hosts/monosodium-glutamate-g/configuration.nix @@ -82,23 +82,7 @@ # networking.firewall.allowedTCPPorts = [ 4713 ]; systemd.services."NetworkManager-wait-online".enable = false; - systemd.services = { - create-swapfile = { - serviceConfig.Type = "oneshot"; - wantedBy = ["swap-swapfile.swap"]; - script = '' - swapfile="/swap/swapfile" - if [[ -f "$swapfile" ]]; then - echo "Swap file $swapfile already exists, taking no action" - else - echo "Setting up swap file $swapfile" - ${pkgs.coreutils}/bin/truncate -s 0 "$swapfile" - ${pkgs.e2fsprogs}/bin/chattr +C "$swapfile" - fi - ''; - }; - }; + swapDevices = [{device = "/swap/swapfile";}]; - # release channel - system.stateVersion = "22.05"; # Did you read the comment? + system.stateVersion = "24.05"; # Did you read the comment? } diff --git a/hosts/monosodium-glutamate-g/hardware-configuration.nix b/hosts/monosodium-glutamate-g/hardware-configuration.nix index b04b33c..c414f70 100644 --- a/hosts/monosodium-glutamate-g/hardware-configuration.nix +++ b/hosts/monosodium-glutamate-g/hardware-configuration.nix @@ -12,34 +12,32 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "uas" "usbhid" "sd_mod"]; boot.initrd.kernelModules = []; boot.kernelModules = ["kvm-amd"]; boot.extraModulePackages = []; fileSystems."/" = { - device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db"; + device = "/dev/disk/by-uuid/efb8f256-5b14-4b52-a2d9-ae4b91ecb711"; fsType = "btrfs"; - options = ["subvol=@root" "compress=zstd:3"]; + options = ["subvol=@"]; }; - fileSystems."/home" = { - device = "/dev/disk/by-uuid/72ffbc9d-a319-42d7-8d26-13c921a679db"; - fsType = "btrfs"; - options = ["subvol=@home" "compress=zstd:3"]; - }; + boot.initrd.luks.devices."luks-919f9b8b-2804-447a-97e0-f7f515d0be56".device = "/dev/disk/by-uuid/919f9b8b-2804-447a-97e0-f7f515d0be56"; fileSystems."/boot" = { - device = "/dev/disk/by-uuid/D63E-18C9"; + device = "/dev/disk/by-uuid/3FAD-A6B4"; fsType = "vfat"; + options = ["fmask=0077" "dmask=0077"]; }; - swapDevices = [ - { - device = "/swap/swapfile"; - size = (1024 * 64) + (1024 * 8); # 72G - } - ]; + fileSystems."/swap" = { + device = "/dev/disk/by-uuid/efb8f256-5b14-4b52-a2d9-ae4b91ecb711"; + fsType = "btrfs"; + options = ["subvol=swap"]; + }; + + 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 @@ -47,7 +45,9 @@ # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp9s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wg0-mullvad.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/monosodium-glutamate-g/modules/default.nix b/hosts/monosodium-glutamate-g/modules/default.nix index 213189f..fb1c643 100644 --- a/hosts/monosodium-glutamate-g/modules/default.nix +++ b/hosts/monosodium-glutamate-g/modules/default.nix @@ -1,4 +1,4 @@ -{}: { +{...}: { imports = [ ./graphics.nix ];