sys: create defaultDesktopPack for sys and move settings into it

This commit is contained in:
Fabian Montero 2025-09-15 04:04:08 -06:00
parent 2c4d24a33b
commit 87e96b52c3
6 changed files with 87 additions and 91 deletions

View file

@ -18,5 +18,6 @@
./gtklock.nix
./borgsync.nix
./dufs.nix
./defaultDesktopPack.nix
];
}

View file

@ -0,0 +1,45 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.local.sys.defaultDesktopPack;
in {
options.local.sys.defaultDesktopPack = {
enable = mkEnableOption "common desktop programs and services";
};
config = mkIf cfg.enable {
local.sys = {
baseline.enable = true;
audio.enable = true;
graphics.enable = true;
gtklock.enable = true;
steam.enable = true;
users = {
fabian = {
enable = true;
unixId = 1002; #TODO !!!!!!
};
};
};
# trivionomicon
local = {
sway.enable = true;
trivionomiconMotd.enable = true;
};
networking = {
networkmanager.enable = true;
#TODO
useDHCP = false; # The global useDHCP flag is deprecated, therefore explicitly set to false here.
interfaces.enp7s0.useDHCP = true; # Per-interface useDHCP will be mandatory in the future, so this generated config
interfaces.wlp6s0.useDHCP = true; # replicates the default behaviour.
};
};
}

View file

@ -35,18 +35,6 @@ in {
unixId = mkDefault 1000;
admin = true;
};
vanessa = {
unixId = mkDefault 1001;
admin = false;
};
soto = {
unixId = mkDefault 1010;
admin = false;
};
diaz = {
unixId = mkDefault 1011;
admin = false;
};
};
users = let
@ -66,7 +54,7 @@ in {
shell = pkgs.zsh;
extraGroups =
["users" "networkmanager"]
++ optionals (v.admin) ["wheel" "libvirtd" "dialout" "adbusers"];
++ optionals (v.admin) ["wheel" "libvirtd" "dialout" "adbusers" "video"];
openssh.authorizedKeys.keyFiles = v.sshKeyPublicFile;
})
enabledUsers;