forked from jan-leila/nix-config
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
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.nixos.users.eve;
|
||||
in {
|
||||
options.nixos.users.eve = {
|
||||
isDesktopUser = lib.mkEnableOption "install applications intended for desktop use";
|
||||
};
|
||||
|
||||
config = {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
sops.secrets = lib.mkIf cfg.isDesktopUser {
|
||||
"passwords/eve" = {
|
||||
neededForUsers = true;
|
||||
sopsFile = "${inputs.secrets}/user-passwords.yaml";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.eve = (
|
||||
if cfg.isDesktopUser
|
||||
then {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["networkmanager"];
|
||||
|
||||
hashedPasswordFile = config.sops.secrets."passwords/eve".path;
|
||||
}
|
||||
else {
|
||||
isSystemUser = true;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue