Files
nix-config/users/guest/default.nix
Jordan Holt c5bfed5a84
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m42s
users/guest: adjust jellyfin-media-player
2025-09-28 22:55:26 +01:00

77 lines
1.4 KiB
Nix

{
config,
pkgs,
lib,
...
}:
let
inherit (lib)
optional
;
name = "guest";
hostFile = ./. + "/${config.networking.hostName}.nix";
in
{
users.users.${name} = {
description = "Guest";
extraGroups = [
"audio"
"input"
"render"
"video"
];
group = "users";
isNormalUser = true;
shell = pkgs.zsh;
};
home-manager.users.${name} = {
imports = [
./common/optional/graphical/jellyfin.nix
./common/optional/graphical/steam.nix
{
home.persistence."/state" = {
directories = [
".local/state/wireplumber"
];
};
home.persistence."/persist" = {
directories = [
".local/share/icons"
];
};
}
]
++ optional (builtins.pathExists hostFile) hostFile;
home = {
packages = with pkgs; [
adwaita-fonts
];
username = name;
sessionVariables = {
ZDOTDIR = "~/.config/zsh";
};
};
fonts.fontconfig.enable = true;
programs.zsh = {
enable = true;
enableCompletion = true;
};
xdg.enable = true;
};
services.getty = {
autologinOnce = true;
autologinUser = "guest";
};
# Workaround: https://github.com/nix-community/home-manager/issues/7166
systemd.services."home-manager-${name}".serviceConfig = {
RemainAfterExit = "yes";
};
}