From d62084eb03d6d3367dfa16caf8cd7b9c225e078e Mon Sep 17 00:00:00 2001 From: RGBCube Date: Fri, 28 Feb 2025 18:58:15 +0300 Subject: [PATCH] chore: rename password age files --- hosts/best/default.nix | 15 +++++++++------ hosts/best/{password.the.age => password.age} | Bin hosts/disk/default.nix | 13 ++++++++----- hosts/disk/{password.floppy.age => password.age} | Bin hosts/nine/default.nix | 13 ++++++++----- hosts/nine/{password.seven.age => password.age} | 0 secrets.nix | 6 +++--- 7 files changed, 28 insertions(+), 19 deletions(-) rename hosts/best/{password.the.age => password.age} (100%) rename hosts/disk/{password.floppy.age => password.age} (100%) rename hosts/nine/{password.seven.age => password.age} (100%) diff --git a/hosts/best/default.nix b/hosts/best/default.nix index 5997359..e4e73df 100644 --- a/hosts/best/default.nix +++ b/hosts/best/default.nix @@ -9,14 +9,17 @@ in { path = config.secrets.id.path; }]; - secrets.thePassword.file = ./password.the.age; - users.users = { - root.hashedPasswordFile = config.secrets.thePassword.path; + secrets.password.file = ./password.age; + users.users = { + root = { + openssh.authorizedKeys.keys = keys.admins; + hashedPasswordFile = config.secrets.password.path; + }; the = { description = "The"; openssh.authorizedKeys.keys = keys.admins; - hashedPasswordFile = config.secrets.thePassword.path; + hashedPasswordFile = config.secrets.password.path; isNormalUser = true; extraGroups = [ "wheel" ]; }; @@ -24,14 +27,14 @@ in { backup = { description = "Backup"; openssh.authorizedKeys.keys = keys.all; - hashedPasswordFile = config.secrets.thePassword.path; + hashedPasswordFile = config.secrets.password.path; isNormalUser = true; }; build = { description = "Build"; openssh.authorizedKeys.keys = keys.all; - hashedPasswordFile = config.secrets.thePassword.path; + hashedPasswordFile = config.secrets.password.path; isNormalUser = true; extraGroups = [ "build" ]; }; diff --git a/hosts/best/password.the.age b/hosts/best/password.age similarity index 100% rename from hosts/best/password.the.age rename to hosts/best/password.age diff --git a/hosts/disk/default.nix b/hosts/disk/default.nix index 6466d67..38b9d0d 100644 --- a/hosts/disk/default.nix +++ b/hosts/disk/default.nix @@ -9,14 +9,17 @@ in { path = config.secrets.id.path; }]; - secrets.floppyPassword.file = ./password.floppy.age; - users.users = { - root.hashedPasswordFile = config.secrets.floppyPassword.path; + secrets.password.file = ./password.age; + users.users = { + root = { + openssh.authorizedKeys.keys = keys.admins; + hashedPasswordFile = config.secrets.password.path; + }; floppy = { description = "Floppy"; openssh.authorizedKeys.keys = keys.admins; - hashedPasswordFile = config.secrets.floppyPassword.path; + hashedPasswordFile = config.secrets.password.path; isNormalUser = true; extraGroups = [ "wheel" ]; }; @@ -24,7 +27,7 @@ in { backup = { description = "Backup"; openssh.authorizedKeys.keys = keys.all; - hashedPasswordFile = config.secrets.floppyPassword.path; + hashedPasswordFile = config.secrets.password.path; isNormalUser = true; }; }; diff --git a/hosts/disk/password.floppy.age b/hosts/disk/password.age similarity index 100% rename from hosts/disk/password.floppy.age rename to hosts/disk/password.age diff --git a/hosts/nine/default.nix b/hosts/nine/default.nix index 97a58db..51b814c 100644 --- a/hosts/nine/default.nix +++ b/hosts/nine/default.nix @@ -9,14 +9,17 @@ in { path = config.secrets.id.path; }]; - secrets.sevenPassword.file = ./password.seven.age; - users.users = { - root.hashedPasswordFile = config.secrets.sevenPassword.path; + secrets.password.file = ./password.age; + users.users = { + root = { + openssh.authorizedKeys.keys = keys.admins; + hashedPasswordFile = config.secrets.password.path; + }; seven = { description = "Hungry Seven"; openssh.authorizedKeys.keys = keys.admins; - hashedPasswordFile = config.secrets.sevenPassword.path; + hashedPasswordFile = config.secrets.password.path; isNormalUser = true; extraGroups = [ "wheel" ]; }; @@ -24,7 +27,7 @@ in { backup = { description = "Backup"; openssh.authorizedKeys.keys = keys.all; - hashedPasswordFile = config.secrets.sevenPassword.path; + hashedPasswordFile = config.secrets.password.path; isNormalUser = true; }; }; diff --git a/hosts/nine/password.seven.age b/hosts/nine/password.age similarity index 100% rename from hosts/nine/password.seven.age rename to hosts/nine/password.age diff --git a/secrets.nix b/secrets.nix index ba7218c..71e66af 100644 --- a/secrets.nix +++ b/secrets.nix @@ -3,7 +3,7 @@ let in { # best "hosts/best/id.age".publicKeys = [ best ] ++ admins; - "hosts/best/password.the.age".publicKeys = [ best ] ++ admins; + "hosts/best/password.age".publicKeys = [ best ] ++ admins; "hosts/best/cache/key.age".publicKeys = [ best ] ++ admins; @@ -22,11 +22,11 @@ in { # disk "hosts/disk/id.age".publicKeys = [ disk ] ++ admins; - "hosts/disk/password.floppy.age".publicKeys = [ disk ] ++ admins; + "hosts/disk/password.age".publicKeys = [ disk ] ++ admins; # nine "hosts/nine/id.age".publicKeys = [ nine ] ++ admins; - "hosts/nine/password.seven.age".publicKeys = [ nine ] ++ admins; + "hosts/nine/password.age".publicKeys = [ nine ] ++ admins; "hosts/nine/github2forgejo/environment.age".publicKeys = [ nine ] ++ admins;