split out home-manager
This commit is contained in:
1 parent
2d956525cc
commit
0b34a3cf11
12 files changed
+159
-124
No files matched your search
@@ -13,5 +13,7 @@
|
||||
];
|
||||
config = {
|
||||
environment.sessionVariables.EDITOR = "vi";
|
||||
environment.sessionVariables.NIXPKGS_ALLOW_UNFREE = 1;
|
||||
environment.localBinInPath = true;
|
||||
};
|
||||
}
|
||||
@@ -1,15 +1,27 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.skyg.user;
|
||||
in
|
||||
{
|
||||
users.users.root = {
|
||||
shell = pkgs.zsh;
|
||||
options.skyg.user.createSystemUser = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Whether to create the system user (separate from home-manager configuration)";
|
||||
};
|
||||
users.users.${config.skyg.user.name} = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
description = config.skyg.user.name;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
|
||||
config = lib.mkIf (cfg.name != "" && cfg.createSystemUser) {
|
||||
users.users.root = {
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
users.users.${cfg.name} = {
|
||||
shell = pkgs.zsh;
|
||||
isNormalUser = true;
|
||||
description = cfg.fullName;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user