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

98 lines
2.2 KiB
Nix
Raw Normal View History

{
pkgs,
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";
};
};
2024-08-02 21:55:48 +00:00
config = lib.mkMerge [
(lib.mkIf cfg.enable {
# Add Gremlin account
users.users.gremlin = {
isNormalUser = true;
description = "Gremlin";
uid = 1001;
hashedPassword = config.${namespace}.secrets.users.gremlin.hashedPassword;
extraGroups = [
"networkmanager"
"input"
2024-12-18 14:18:33 +00:00
"users"
2024-12-19 20:57:35 +00:00
(lib.mkIf config.programs.adb.enable "adbusers")
];
# Allow systemd services to keep running even while gremlin is logged out
linger = true;
};
# Install gremlin-specific flatpaks
2024-12-06 18:04:47 +00:00
${namespace}.ui.flatpak.packages = [
"com.google.Chrome"
"com.slack.Slack"
];
home-manager.users.gremlin = {
imports = [
../common/home-manager/gnome.nix
../common/home-manager/zsh.nix
];
home = {
# Basic setup
username = "gremlin";
homeDirectory = "/home/gremlin";
# The state version is required and should stay at the version you originally installed.
stateVersion = "24.05";
# Set environment variables
sessionVariables = {
KUBECONFIG = "/home/gremlin/.kube/config";
};
# Install packages specific to Gremlin
packages = [
pkgs.awscli2
pkgs.unstable.figma-linux
];
2024-05-27 00:23:42 +00:00
# Create .face file
file.".face".source = ./face.png;
};
programs = {
# Let home Manager install and manage itself.
home-manager.enable = true;
2024-06-27 19:14:49 +00:00
# Set up git to match Aires' configuration
git = config.home-manager.users.aires.programs.git;
2024-05-17 00:08:57 +00:00
# Set up SSH
ssh = {
enable = true;
matchBlocks = config.${namespace}.secrets.users.gremlin.sshConfig;
2024-05-17 00:08:57 +00:00
};
2024-11-08 14:38:25 +00:00
# Set up Zsh
zsh = {
oh-my-zsh = {
theme = "gnzh";
};
};
};
};
})
];
2024-02-29 14:53:34 +00:00
}