From fc4ee40323648ed69816e4452d7ca4cb0dbb6080 Mon Sep 17 00:00:00 2001 From: twoneis Date: Tue, 23 Jul 2024 00:16:58 +0200 Subject: [PATCH] rename tunyon to inkvine and free tunyon name --- devices/inkvine/default.nix | 28 ++++++++----- devices/inkvine/disks.nix | 6 +-- devices/inkvine/options.nix | 4 +- devices/tunyon/default.nix | 80 ------------------------------------- devices/tunyon/disks.nix | 7 ---- devices/tunyon/options.nix | 14 ------- outputs.nix | 22 +++------- 7 files changed, 31 insertions(+), 130 deletions(-) delete mode 100644 devices/tunyon/default.nix delete mode 100644 devices/tunyon/disks.nix delete mode 100644 devices/tunyon/options.nix diff --git a/devices/inkvine/default.nix b/devices/inkvine/default.nix index 018c7a1..56cc912 100644 --- a/devices/inkvine/default.nix +++ b/devices/inkvine/default.nix @@ -1,7 +1,9 @@ -{ pkgs, config, ... }: { +{ lib, config, pkgs, ... }: let + inherit (lib) mkDefault; +in { imports = [ - ./options.nix ./disks.nix + ./options.nix ]; nixpkgs = { @@ -14,17 +16,18 @@ boot = { initrd = { - availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" "rtsx_pci_sdmmc" ]; + availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; luks.devices.root.device = "/dev/disk/by-uuid/${config.disks.crypt}"; }; - - kernelModules = [ "kvm-intel" ]; + kernelModules = [ "kvm-amd" ]; kernelPackages = pkgs.linuxPackages_zen; loader = { systemd-boot = { - enable = true; + enable = mkDefault true; + editor = false; }; + timeout = 1; efi.canTouchEfiVariables = true; }; }; @@ -43,6 +46,13 @@ device = "/dev/disk/by-uuid/${config.disks.root}"; fsType = "btrfs"; options = [ "subvol=nix" "compress=zstd" "noatime" ]; + neededForBoot = true; + }; + "/persist" = { + device = "/dev/disk/by-uuid/${config.disks.root}"; + fsType = "btrfs"; + options = [ "subvol=persist" "compress=zstd" "noatime" ]; + neededForBoot = true; }; "/swap" = { device = "/dev/disk/by-uuid/${config.disks.root}"; @@ -53,14 +63,14 @@ swapDevices = [ { device = "/swap/swapfile"; } ]; services = { - thermald.enable = true; - upower.enable = true; + fwupd.enable = true; + power-profiles-daemon.enable = true; }; hardware = { enableRedistributableFirmware = true; enableAllFirmware = true; - cpu.intel.updateMicrocode = true; + cpu.amd.updateMicrocode = true; graphics = { enable = true; diff --git a/devices/inkvine/disks.nix b/devices/inkvine/disks.nix index 8e45d54..056cf34 100644 --- a/devices/inkvine/disks.nix +++ b/devices/inkvine/disks.nix @@ -1,7 +1,7 @@ { ... }: { disks = { - crypt = "747ae319-f189-44f5-9737-a42672e2c02d"; - boot = "4672-C1A9"; - root = "04255623-c061-4cf0-89fa-b3d8eb239d59"; + boot = "BC3B-2104"; + crypt = "8c2e23a2-301a-483d-9331-afc982082c8a"; + root = "aae3c9f7-579a-48b8-bf20-5c4ae84a7a4a"; }; } diff --git a/devices/inkvine/options.nix b/devices/inkvine/options.nix index 033992c..69801ae 100644 --- a/devices/inkvine/options.nix +++ b/devices/inkvine/options.nix @@ -5,7 +5,9 @@ withGames = true; - hwmonPath = "/sys/class/hwmon/hwmon4/temp1_input"; + withVM = true; + + hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input"; stateVersion = "24.05"; hmStateVersion = "24.11"; diff --git a/devices/tunyon/default.nix b/devices/tunyon/default.nix deleted file mode 100644 index 40f9b67..0000000 --- a/devices/tunyon/default.nix +++ /dev/null @@ -1,80 +0,0 @@ -{ lib, config, pkgs, ... }: let - inherit (lib) mkDefault; -in { - imports = [ - ./disks.nix - ./options.nix - ]; - - nixpkgs = { - hostPlatform = "x86_64-linux"; - }; - - networking = { - hostName = "tunyon"; - }; - - boot = { - initrd = { - availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; - luks.devices.root.device = "/dev/disk/by-uuid/${config.disks.crypt}"; - }; - kernelModules = [ "kvm-amd" ]; - kernelPackages = pkgs.linuxPackages_zen; - - loader = { - systemd-boot = { - enable = mkDefault true; - editor = false; - }; - timeout = 1; - efi.canTouchEfiVariables = true; - }; - }; - - fileSystems = { - "/boot" = { - device = "/dev/disk/by-uuid/${config.disks.boot}"; - fsType = "vfat"; - }; - "/" = { - device = "/dev/disk/by-uuid/${config.disks.root}"; - fsType = "btrfs"; - options = [ "subvol=root" "compress=zstd" "noatime" ]; - }; - "/nix" = { - device = "/dev/disk/by-uuid/${config.disks.root}"; - fsType = "btrfs"; - options = [ "subvol=nix" "compress=zstd" "noatime" ]; - neededForBoot = true; - }; - "/persist" = { - device = "/dev/disk/by-uuid/${config.disks.root}"; - fsType = "btrfs"; - options = [ "subvol=persist" "compress=zstd" "noatime" ]; - neededForBoot = true; - }; - "/swap" = { - device = "/dev/disk/by-uuid/${config.disks.root}"; - fsType = "btrfs"; - options = [ "subvol=swap" "noatime" ]; - }; - }; - swapDevices = [ { device = "/swap/swapfile"; } ]; - - services = { - fwupd.enable = true; - power-profiles-daemon.enable = true; - }; - - hardware = { - enableRedistributableFirmware = true; - enableAllFirmware = true; - cpu.amd.updateMicrocode = true; - - graphics = { - enable = true; - enable32Bit = true; - }; - }; -} diff --git a/devices/tunyon/disks.nix b/devices/tunyon/disks.nix deleted file mode 100644 index 056cf34..0000000 --- a/devices/tunyon/disks.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: { - disks = { - boot = "BC3B-2104"; - crypt = "8c2e23a2-301a-483d-9331-afc982082c8a"; - root = "aae3c9f7-579a-48b8-bf20-5c4ae84a7a4a"; - }; -} diff --git a/devices/tunyon/options.nix b/devices/tunyon/options.nix deleted file mode 100644 index 69801ae..0000000 --- a/devices/tunyon/options.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: { - full = true; - - withNiri = true; - - withGames = true; - - withVM = true; - - hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input"; - - stateVersion = "24.05"; - hmStateVersion = "24.11"; -} diff --git a/outputs.nix b/outputs.nix index 90c08fd..c044581 100644 --- a/outputs.nix +++ b/outputs.nix @@ -38,9 +38,10 @@ in { ] ++ modules; }; - # Lenovo Thinkpad T540p - # Intel i7-4710MQ - # 8GB RAM + # Framework Laptop 13 + # AMD Ryzen 5 7640U + # AMD Radeon 760M + # 16GB RAM inkvine = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { @@ -51,18 +52,7 @@ in { ] ++ modules; }; - # Framework Laptop 13 - # AMD Ryzen 5 7640U - # AMD Radeon 760M - # 16GB RAM - tunyon = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { - inherit inputs; - }; - modules = [ - ./devices/tunyon - ] ++ modules; - }; + # VM for luks-on-sleep + }; }