From e29491762dd85aa49c3849a324e2e787e25f3206 Mon Sep 17 00:00:00 2001
From: Jens Nolte <jens@nightmarestudio.de>
Date: Wed, 22 Jan 2020 03:24:41 +0100
Subject: [PATCH] Move /secrets to /etc/secrets

---
 bin/install            | 6 +++---
 bin/install-mounted    | 6 +++---
 nixos/layers/base.nix  | 4 ++--
 nixos/layers/steam.nix | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bin/install b/bin/install
index 1de1bd7..94dc4f5 100755
--- a/bin/install
+++ b/bin/install
@@ -90,11 +90,11 @@ nix copy --file "$nixos_system_file" --argstr hostname "$hostname" --to ssh://ro
 nixos_config_path=$(realpath "$local_temp_dir/nixos-config-$hostname")
 
 ssh root@$via_host "nixos-install --system $nixos_config_path && sync"
-ssh root@$via_host mkdir --mode u=rwx,g=,o= --parents /mnt/secrets/passwords
+ssh root@$via_host mkdir --mode u=rwx,g=,o= --parents /mnt/etc/secrets/passwords
 
 # TODO: get host-specific password
-#scp -r notThePassword root@$via_host:/mnt/secrets/passwords/root
-#scp -r notThePassword root@$via_host:/mnt/secrets/passwords/jens
+#scp -r notThePassword root@$via_host:/mnt/etc/secrets/passwords/root
+#scp -r notThePassword root@$via_host:/mnt/etc/secrets/passwords/jens
 
 ssh root@$via_host sync
 
diff --git a/bin/install-mounted b/bin/install-mounted
index 75339be..8496e97 100755
--- a/bin/install-mounted
+++ b/bin/install-mounted
@@ -45,11 +45,11 @@ nix copy --file "$nixos_system_file" --argstr hostname "$hostname" --to ssh://ro
 nixos_config_path=$(realpath "$local_temp_dir/nixos-config-$hostname")
 
 ssh root@$via_host "nixos-install --system $nixos_config_path && sync"
-ssh root@$via_host mkdir --mode u=rwx,g=,o= --parents /mnt/secrets/passwords
+ssh root@$via_host mkdir --mode u=rwx,g=,o= --parents /mnt/etc/secrets/passwords
 
 # TODO: get host-specific password
-#scp -r notThePassword root@$via_host:/mnt/secrets/passwords/root
-#scp -r notThePassword root@$via_host:/mnt/secrets/passwords/jens
+#scp -r notThePassword root@$via_host:/mnt/etc/secrets/passwords/root
+#scp -r notThePassword root@$via_host:/mnt/etc/secrets/passwords/jens
 
 ssh root@$via_host sync
 
diff --git a/nixos/layers/base.nix b/nixos/layers/base.nix
index 5318435..0e70f21 100644
--- a/nixos/layers/base.nix
+++ b/nixos/layers/base.nix
@@ -77,12 +77,12 @@
     mutableUsers = false;
     defaultUserShell = pkgs.zsh;
     users.root = {
-      passwordFile = "/secrets/passwords/root";
+      passwordFile = "/etc/secrets/passwords/root";
     };
     users.jens = {
       uid = 1000;
       isNormalUser = true;
-      passwordFile = "/secrets/passwords/jens";
+      passwordFile = "/etc/secrets/passwords/jens";
       extraGroups = [ "wheel" "audio" "dialout" ];
     };
   };
diff --git a/nixos/layers/steam.nix b/nixos/layers/steam.nix
index 78160cb..6e7efcf 100644
--- a/nixos/layers/steam.nix
+++ b/nixos/layers/steam.nix
@@ -16,7 +16,7 @@ in
   users.users.steam = {
     isNormalUser = true;
     uid = 1100;
-    passwordFile = "/secrets/passwords/steam";
+    passwordFile = "/etc/secrets/passwords/steam";
     extraGroups = [ "audio" "input" ];
     packages = [
       customSteam
-- 
GitLab