nix-config/users/eve/default.nix

46 lines
805 B
Nix

{
lib,
config,
pkgs,
inputs,
...
}: let
cfg = config.users.eve;
in {
options.users.eve = {
isFullUser = lib.mkEnableOption "eve";
};
config = {
nixpkgs.config.allowUnfree = true;
sops.secrets = lib.mkIf cfg.isFullUser {
"passwords/eve" = {
neededForUsers = true;
sopsFile = "${inputs.secrets}/user-passwords.yaml";
};
};
users.users.eve = (
if cfg.isFullUser
then {
isNormalUser = true;
extraGroups = ["networkmanager"];
hashedPasswordFile = config.sops.secrets."passwords/eve".path;
packages = with pkgs; [
firefox
bitwarden
discord
makemkv
signal-desktop
];
}
else {
isSystemUser = true;
}
);
};
}