mirror of
https://github.com/Misterio77/Foundry.git
synced 2026-08-24 02:14:13 -05:00
The tree is heavily Ubuntu-coupled: masking netplan's generator and Ubuntu's own wpa_supplicant units, apt packages in cloud-init, /etc/dbus-1 policy. Assisted-by: pi (claude-opus-5)
55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
systemManagerHostName,
|
|
...
|
|
}: let
|
|
inherit (config.users.users.gabriel) home;
|
|
in {
|
|
# Ubuntu's logind exec's the per-user `systemd --user` without the nix
|
|
# profiles in XDG_DATA_DIRS. The user-unit search path is fixed when the
|
|
# manager starts, so package-shipped units (home-manager's xdg-desktop-portal
|
|
# services under share/systemd/user) are never found, and environment.d is
|
|
# applied too late to change it. Set XDG_DATA_DIRS on the manager process
|
|
# itself, which also feeds its user D-Bus and services. Missing dirs are
|
|
# ignored; takes effect on the next login.
|
|
environment.etc."systemd/system/user@.service.d/10-nix-xdg-data-dirs.conf".text = ''
|
|
[Service]
|
|
Environment=XDG_DATA_DIRS=${home}/.nix-profile/share:/run/system-manager/sw/share:/usr/local/share:/usr/share
|
|
'';
|
|
|
|
users = {
|
|
mutableUsers = true;
|
|
groups.gabriel = {};
|
|
users.gabriel = {
|
|
isNormalUser = true;
|
|
group = "gabriel";
|
|
home = "/home/gabriel";
|
|
createHome = false;
|
|
shell = pkgs.fish;
|
|
ignoreShellProgramCheck = true;
|
|
extraGroups = [
|
|
"audio"
|
|
"netdev"
|
|
"render"
|
|
"sudo"
|
|
"video"
|
|
"wpa_supplicant"
|
|
];
|
|
};
|
|
};
|
|
|
|
sops.secrets = {
|
|
brave_api_key = {
|
|
sopsFile = ../../../../common/secrets.yaml;
|
|
owner = "gabriel";
|
|
};
|
|
kagi_session_token = {
|
|
sopsFile = ../../../../common/secrets.yaml;
|
|
owner = "gabriel";
|
|
};
|
|
};
|
|
|
|
home-manager.users.gabriel = import ../../../../../home/gabriel/${systemManagerHostName}.nix;
|
|
}
|