sync sops and users

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-04-06 13:38:15 +03:00
parent d5521a468d
commit 1f0bbc9daf
4 changed files with 60 additions and 70 deletions

View File

@ -4,27 +4,22 @@
pkgs,
...
}: let
sopSec = config.sops.secrets;
secrets = inputs.mysecrets;
inherit (config.sops) secrets;
inherit (inputs) mysecrets;
in {
nix.settings.trusted-users = ["user"];
users.mutableUsers = false;
users.users = {
user = {
hashedPasswordFile = sopSec."user-password-hashed".path;
# passwordFile = config.sops.secrets.user-password.path;
isNormalUser = true;
hashedPasswordFile = secrets."user-password-hashed".path;
extraGroups = ["wheel" "video" "libvirtd" "dialout"];
isNormalUser = true;
shell = pkgs.fish;
openssh.authorizedKeys.keyFiles = [
"${secrets}/ssh/id_ed25519_sarien_user.pub"
"${secrets}/ssh/id_ed25519_eldrid_user.pub"
openssh.authorizedKeys.keyFiles = map (f: "${mysecrets}/ssh/user/${f}") [
"id_dunamis_ed25519.pub"
"id_eldrid_ed25519.pub"
"id_sarien_ed25519.pub"
];
};
# work = {
# isNormalUser = true;
# extraGroups = ["video"];
# shell = pkgs.nushell;
# };
};
}