2024-05-07 22:02:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
2024-12-06 18:04:47 +00:00
|
|
|
namespace,
|
2024-05-07 22:02:59 +00:00
|
|
|
...
|
|
|
|
}:
|
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
|
|
|
|
{
|
2024-05-07 22:02:59 +00:00
|
|
|
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";
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2025-01-04 20:33:37 +00:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
# Add Gremlin account
|
|
|
|
users = {
|
|
|
|
users.gremlin = {
|
2024-05-07 22:02:59 +00:00
|
|
|
isNormalUser = true;
|
|
|
|
description = "Gremlin";
|
|
|
|
uid = 1001;
|
2024-12-09 18:30:39 +00:00
|
|
|
hashedPassword = config.${namespace}.secrets.users.gremlin.hashedPassword;
|
2025-01-04 20:33:37 +00:00
|
|
|
group = "gremlin";
|
2024-05-07 22:02:59 +00:00
|
|
|
extraGroups = [
|
|
|
|
"networkmanager"
|
|
|
|
"input"
|
2024-12-18 14:18:33 +00:00
|
|
|
"users"
|
2024-05-07 22:02:59 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Allow systemd services to keep running even while gremlin is logged out
|
|
|
|
linger = true;
|
|
|
|
};
|
|
|
|
|
2025-01-04 20:33:37 +00:00
|
|
|
groups."gremlin" = {
|
|
|
|
gid = 1001;
|
|
|
|
};
|
|
|
|
};
|
2024-05-07 22:02:59 +00:00
|
|
|
|
2025-01-04 20:33:37 +00:00
|
|
|
# Install gremlin-specific flatpaks
|
|
|
|
${namespace}.ui.flatpak.packages = [
|
|
|
|
"com.google.Chrome"
|
|
|
|
"com.slack.Slack"
|
|
|
|
];
|
2024-11-08 14:38:25 +00:00
|
|
|
|
2025-01-04 20:33:37 +00:00
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
}
|