admin: initialPassword -> initialHashedPassword

This commit is contained in:
ooks-io 2024-10-29 16:45:59 +11:00
parent 7d683e712f
commit 301132e17e
2 changed files with 11 additions and 7 deletions

View file

@ -0,0 +1,9 @@
{
ooknet.host = {
admin = {
name = "ooks";
shell = "fish";
homeManager = true;
};
};
}

View file

@ -2,15 +2,10 @@
lib, lib,
config, config,
pkgs, pkgs,
inputs,
inputs',
self',
self,
keys, keys,
... ...
}: let }: let
inherit (lib) mkIf; inherit (config.ooknet.host) admin;
inherit (config.ooknet.host) role admin;
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
in { in {
@ -18,7 +13,7 @@ in {
users.users.${admin.name} = { users.users.${admin.name} = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.${admin.shell}; shell = pkgs.${admin.shell};
initialPassword = "password"; initialHashedPassword = "$y$j9T$l4Wje1zgcrPIM5G4BRAT6.$AKHmE2MvJLLiipYnwGsljxbD0QmqYtHGlKht0kLLI87";
openssh.authorizedKeys.keys = [keys.users."${admin.name}"]; openssh.authorizedKeys.keys = [keys.users."${admin.name}"];
createHome = true; createHome = true;
home = "/home/${admin.name}"; home = "/home/${admin.name}";