From aa3f6ada931dfb01e78795bf2b53c177879d7e59 Mon Sep 17 00:00:00 2001 From: twoneis Date: Sun, 21 Jul 2024 01:47:39 +0200 Subject: [PATCH] some more fixing --- devices/ellaca/options.nix | 2 +- devices/pleniscenta/options.nix | 2 +- devices/tunyon/default.nix | 23 ++++++++--------------- devices/tunyon/impermanence.nix | 27 --------------------------- devices/tunyon/options.nix | 4 +++- 5 files changed, 13 insertions(+), 45 deletions(-) delete mode 100644 devices/tunyon/impermanence.nix diff --git a/devices/ellaca/options.nix b/devices/ellaca/options.nix index 21699af..71e38b9 100644 --- a/devices/ellaca/options.nix +++ b/devices/ellaca/options.nix @@ -1,5 +1,5 @@ { ... }: { - user = true; + full = true; withNiri = true; withGnome = false; diff --git a/devices/pleniscenta/options.nix b/devices/pleniscenta/options.nix index d5936aa..c8b9eed 100644 --- a/devices/pleniscenta/options.nix +++ b/devices/pleniscenta/options.nix @@ -1,5 +1,5 @@ { ... }: { - user = false; + full = false; withNiri = false; withGnome = false; diff --git a/devices/tunyon/default.nix b/devices/tunyon/default.nix index 0c4de16..11b1855 100644 --- a/devices/tunyon/default.nix +++ b/devices/tunyon/default.nix @@ -1,13 +1,6 @@ -{ lib, pkgs, ... }: let - disks = { - boot = ""; - crypt = ""; - root = ""; - }; -in{ +{ lib, config, pkgs, ... }: { imports = [ ./options.nix - ./impermanence.nix ]; nixpkgs = { @@ -21,10 +14,10 @@ in{ boot = { initrd = { availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" ]; - luks.devices.root.device = "/dev/disk/by-uuid/${disks.crypt}"; + luks.devices.root.device = "/dev/disk/by-uuid/${config.disks.crypt}"; postDeviceCommands = lib.mkAfter '' mkdir /btrfs_tmp - mount /dev/disk/by-uuid/${disks.root} /btrfs_tmp + mount /dev/disk/by-uuid/${config.disks.root} /btrfs_tmp if [[ -e /btrfs_tmp/root ]]; then mkdir -p /btrfs_tmp/old_roots timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S") @@ -61,28 +54,28 @@ in{ fileSystems = { "/boot" = { - device = "/dev/disk/by-uuid/${disks.boot}"; + device = "/dev/disk/by-uuid/${config.disks.boot}"; fsType = "vfat"; }; "/" = { - device = "/dev/disk/by-uuid/${disks.root}"; + device = "/dev/disk/by-uuid/${config.disks.root}"; fsType = "btrfs"; options = [ "subvol=root" "compress=zstd" "noatime" ]; }; "/nix" = { - device = "/dev/disk/by-uuid/${disks.root}"; + device = "/dev/disk/by-uuid/${config.disks.root}"; fsType = "btrfs"; options = [ "subvol=nix" "compress=zstd" "noatime" ]; neededForBoot = true; }; "/persist" = { - device = "/dev/disk/by-uuid/${disks.root}"; + device = "/dev/disk/by-uuid/${config.disks.root}"; fsType = "btrfs"; options = [ "subvol=persist" "compress=zstd" "noatime" ]; neededForBoot = true; }; "/swap" = { - device = "/dev/disk/by-uuid/${disks.root}"; + device = "/dev/disk/by-uuid/${config.disks.root}"; fsType = "btrfs"; options = [ "subvol=swap" "noatime" ]; }; diff --git a/devices/tunyon/impermanence.nix b/devices/tunyon/impermanence.nix deleted file mode 100644 index 2c29b9b..0000000 --- a/devices/tunyon/impermanence.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, ... }: { - environment.persistence."/persist" = { - enable = true; - directories = [ - "/var/log" - "/var/lib/bluetooth" - "/var/lib/nixos" - "/var/lib/iwd" - ]; - files = [ - "/etc/machine-id" - "/etc/passwd" - "/etc/shadow" - ]; - - users.${config.username}= { - directories = [ - "Documents" - "Pictures" - "Videos" - "code" - { directory = ".local/share/keyrings"; mode = "0700"; } - ".local/share/direnv" - ]; - }; - }; -} diff --git a/devices/tunyon/options.nix b/devices/tunyon/options.nix index eca5e31..cdebb9b 100644 --- a/devices/tunyon/options.nix +++ b/devices/tunyon/options.nix @@ -1,5 +1,5 @@ { ... }: { - user = true; + full = true; withNiri = true; withGnome = false; @@ -9,6 +9,8 @@ withGames = true; + withImpermanence = true; + hwmonPath = "/sys/class/hwmon/hwmon1/temp1_input"; stateVersion = "24.05";