major refactor
This commit is contained in:
parent
20472f8d1b
commit
d778875a1b
32 changed files with 495 additions and 428 deletions
36
mod/common/users.nix
Normal file
36
mod/common/users.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
pkgs,
|
||||
secrets,
|
||||
var,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
config = mkIf config.hd.common.users.enable {
|
||||
age.secrets.hd-password = {
|
||||
file = secrets."hd-password.age";
|
||||
};
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users."hd" = {
|
||||
description = "Henri";
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
home = "/home/hd";
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
packages = [ ];
|
||||
openssh.authorizedKeys.keys = var.ssh-keys.trusted;
|
||||
hashedPasswordFile = config.age.secrets.hd-password.path;
|
||||
};
|
||||
users.root = {
|
||||
hashedPassword = "!";
|
||||
openssh.authorizedKeys.keys = var.ssh-keys.root;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue