From 5313bae8ac20eca555eaf86d96c1bd42e6b9fd14 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Fri, 20 Sep 2024 22:57:15 +0200 Subject: [PATCH] impermanence/module.nix: working --- modules/system/os/impermanence/module.nix | 43 +++++++++++------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/modules/system/os/impermanence/module.nix b/modules/system/os/impermanence/module.nix index edfbef6..1b82296 100644 --- a/modules/system/os/impermanence/module.nix +++ b/modules/system/os/impermanence/module.nix @@ -14,16 +14,16 @@ in { ]; users = { mutableUsers = true; - # users = { - # cr = { - # initialHashedPassword = ""; - # hashedPasswordFile = "/persist/passwords/cr"; - # }; - # root.hashedPasswordFile = "/persist/passwords/root"; - # }; + users = { + cr = { + hashedPasswordFile = "/persist/passwords/cr"; + }; + root.hashedPasswordFile = "/persist/passwords/root"; + }; }; environment.persistence."/persist" = { + hideMounts = true; directories = [ "/etc/nixos" "/etc/nix" @@ -44,17 +44,16 @@ in { [ "cloud" "repos" - ".config/nicotine" ] ++ map ( dir: ".config/${dir}" - ) ["nicotine" "Signal"] + ) ["nicotine" "Signal" "Nextcloud"] ++ map ( dir: ".cache/${dir}" ) ["tealdeer" "keepassxc" "nix" "starship" "nix-index" "mozilla" "zsh" "nvim"] ++ map ( dir: ".local/share/${dir}" - ) ["direnv" "TelegramDesktop" "PrismLauncher" "nicotine" "zoxide"]; + ) ["direnv" "Steam" "TelegramDesktop" "PrismLauncher" "nicotine" "zoxide" ".ssh" ".keepass"]; }; }; @@ -65,16 +64,16 @@ in { "L /var/lib/NetworkManager/timestamps - - - - /persist/var/lib/NetworkManager/timestamps" ]; - # services.openssh.hostKeys = mkForce [ - # { - # bits = 4096; - # path = "/persist/etc/ssh/ssh_host_rsa_key"; - # type = "rsa"; - # } - # { - # bits = 4096; - # path = "/persist/etc/ssh/ssh_host_ed25519_key"; - # type = "ed25519"; - # } - # ]; + services.openssh.hostKeys = mkForce [ + { + bits = 4096; + path = "/persist/etc/ssh/ssh_host_rsa_key"; + type = "rsa"; + } + { + bits = 4096; + path = "/persist/etc/ssh/ssh_host_ed25519_key"; + type = "ed25519"; + } + ]; }