restructured project to split out home manager
This commit is contained in:
parent
c8e7944da5
commit
18f51a65c2
24 changed files with 421 additions and 254 deletions
36
enviroments/common/users/ester/default.nix
Normal file
36
enviroments/common/users/ester/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.nixos.users.ester;
|
||||
in {
|
||||
options.nixos.users.ester = {
|
||||
isDesktopUser = lib.mkEnableOption "install applications intended for desktop use";
|
||||
};
|
||||
|
||||
config = {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
sops.secrets = lib.mkIf cfg.isDesktopUser {
|
||||
"passwords/ester" = {
|
||||
neededForUsers = true;
|
||||
sopsFile = "${inputs.secrets}/user-passwords.yaml";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.ester = (
|
||||
if cfg.isDesktopUser
|
||||
then {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["networkmanager"];
|
||||
|
||||
hashedPasswordFile = config.sops.secrets."passwords/ester".path;
|
||||
}
|
||||
else {
|
||||
isSystemUser = true;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue