users: enable users per-host
This commit is contained in:
parent
80fcd62ba4
commit
d69e1dcc16
10 changed files with 72 additions and 30 deletions
23
common/users/trungle.nix
Normal file
23
common/users/trungle.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
keys = import ../../keys.nix;
|
||||
cfg = config.fountain.users.trungle;
|
||||
in
|
||||
{
|
||||
options.fountain.users.trungle = {
|
||||
enable = mkEnableOption "user trungle";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.users.trungle = {
|
||||
uid = 1002;
|
||||
isNormalUser = true;
|
||||
group = "trungle";
|
||||
openssh.authorizedKeys.keys = keys.users.trungle;
|
||||
};
|
||||
|
||||
users.groups.trungle.gid = config.users.users.trungle.uid;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue