users: enable users per-host
This commit is contained in:
parent
80fcd62ba4
commit
d69e1dcc16
10 changed files with 72 additions and 30 deletions
|
@ -1,16 +1,28 @@
|
|||
{ config, lib, pkgs, self, ... }:
|
||||
|
||||
let keys = import ../../keys.nix;
|
||||
in {
|
||||
users.users.qenya = {
|
||||
isNormalUser = true;
|
||||
home = "/home/qenya";
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = keys.users.qenya;
|
||||
uid = 1001;
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
keys = import ../../keys.nix;
|
||||
cfg = config.fountain.users.qenya;
|
||||
in
|
||||
{
|
||||
options.fountain.users.qenya = {
|
||||
enable = mkEnableOption "user qenya";
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
config = mkIf cfg.enable {
|
||||
users.users.qenya = {
|
||||
uid = 1001;
|
||||
isNormalUser = true;
|
||||
group = "qenya";
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = keys.users.qenya;
|
||||
};
|
||||
|
||||
home-manager.users."qenya" = self.homeManagerModules."qenya";
|
||||
users.groups.qenya.gid = config.users.users.qenya.uid;
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager.users."qenya" = self.homeManagerModules."qenya";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue