From 63605568c643b3e7ebd0c3011717ea6bc7c4e41d Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Tue, 30 May 2023 20:36:52 +0200 Subject: [PATCH] configured impermanence for the nuc --- flake.nix | 1 + hosts/nuc/default.nix | 9 +++++++++ hosts/nuc/hardware-configuration.nix | 10 +++++----- hosts/thinkpad/hardware-configuration.nix | 2 +- users/rouven/modules/hyprland/default.nix | 1 + users/rouven/modules/ssh/default.nix | 4 ---- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index 222781a..3d2bd61 100644 --- a/flake.nix +++ b/flake.nix @@ -90,6 +90,7 @@ modules = [ nixos-hardware.nixosModules.intel-nuc-8i7beh nix-index-database.nixosModules.nix-index + impermanence.nixosModules.impermanence ./hosts/nuc ./shared sops-nix.nixosModules.sops diff --git a/hosts/nuc/default.nix b/hosts/nuc/default.nix index ae51eef..ac6d0b5 100644 --- a/hosts/nuc/default.nix +++ b/hosts/nuc/default.nix @@ -26,6 +26,15 @@ cores = 3; auto-optimise-store = true; }; + environment.persistence."/nix/persist/system" = { + directories = [ + "/etc/nixos" + "/etc/ssh" + ]; + files = [ + "/etc/machine-id" + ]; + }; time.timeZone = "Europe/Berlin"; diff --git a/hosts/nuc/hardware-configuration.nix b/hosts/nuc/hardware-configuration.nix index 605aa5d..dd1fc33 100644 --- a/hosts/nuc/hardware-configuration.nix +++ b/hosts/nuc/hardware-configuration.nix @@ -16,9 +16,9 @@ fileSystems."/" = { - device = "/dev/disk/by-uuid/16b0bd14-1b07-477d-a20d-982f9467f6df"; - fsType = "btrfs"; - options = [ "subvol=root" "compress=zstd" "discard=async" "noatime" ]; + device = "tmpfs"; + fsType = "tmpfs"; + options = [ "mode=755" ]; }; fileSystems."/var/lib" = @@ -35,11 +35,11 @@ options = [ "subvol=log" "compress=zstd" "discard=async" "noatime" ]; }; - fileSystems."/nix/store" = + fileSystems."/nix" = { device = "/dev/disk/by-uuid/16b0bd14-1b07-477d-a20d-982f9467f6df"; fsType = "btrfs"; - options = [ "subvol=store" "compress=zstd" "discard=async" "noatime" ]; + options = [ "subvol=nix" "compress=zstd" "discard=async" "noatime" ]; }; fileSystems."/boot" = diff --git a/hosts/thinkpad/hardware-configuration.nix b/hosts/thinkpad/hardware-configuration.nix index 1c79930..d87923b 100644 --- a/hosts/thinkpad/hardware-configuration.nix +++ b/hosts/thinkpad/hardware-configuration.nix @@ -26,7 +26,7 @@ { device = "tmpfs"; fsType = "tmpfs"; - options = [ "size=3G" "mode=755" ]; + options = [ "mode=755" ]; }; diff --git a/users/rouven/modules/hyprland/default.nix b/users/rouven/modules/hyprland/default.nix index 13310da..680a1f7 100644 --- a/users/rouven/modules/hyprland/default.nix +++ b/users/rouven/modules/hyprland/default.nix @@ -8,6 +8,7 @@ wayland.windowManager.hyprland = { enable = true; extraConfig = builtins.readFile ./hyprland.conf; # todo nix config when available + recommendedEnvironment = true; }; home.sessionVariables = { diff --git a/users/rouven/modules/ssh/default.nix b/users/rouven/modules/ssh/default.nix index 40e33f9..1ab40bd 100644 --- a/users/rouven/modules/ssh/default.nix +++ b/users/rouven/modules/ssh/default.nix @@ -35,10 +35,6 @@ in hostname = "192.168.10.2"; user = "root"; }; - "git@rfive.de" = { - match = "Host rfive.de User git"; - identityFile = git; - }; "git@raspi" = { match = "Host raspi User git"; identityFile = git;