1
0
Fork 0
nix-configuration/modules/nixos/users/gremlin/default.nix

51 lines
959 B
Nix
Raw Normal View History

{
lib,
config,
2024-12-06 18:04:47 +00:00
namespace,
...
}:
2024-02-29 14:53:34 +00:00
# Define 'gremlin' user
let
2024-12-06 18:04:47 +00:00
cfg = config.${namespace}.users.gremlin;
2024-02-29 14:53:34 +00:00
in
{
options = {
2024-12-06 18:04:47 +00:00
${namespace}.users.gremlin = {
2024-08-02 21:55:48 +00:00
enable = lib.mkEnableOption "Enables gremlin user account";
};
};
config = lib.mkIf cfg.enable {
# Add Gremlin account
users = {
users.gremlin = {
isNormalUser = true;
description = "Gremlin";
uid = 1001;
hashedPassword = config.${namespace}.secrets.users.gremlin.hashedPassword;
group = "gremlin";
extraGroups = [
"networkmanager"
"input"
2024-12-18 14:18:33 +00:00
"users"
];
# Allow systemd services to keep running even while gremlin is logged out
linger = true;
};
groups."gremlin" = {
gid = 1001;
};
};
# Install gremlin-specific flatpaks
${namespace}.ui.flatpak.packages = [
"com.google.Chrome"
"com.slack.Slack"
];
2024-11-08 14:38:25 +00:00
};
2024-02-29 14:53:34 +00:00
}