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 ./gtklock.nix
./borgsync.nix ./borgsync.nix
./dufs.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; unixId = mkDefault 1000;
admin = true; admin = true;
}; };
vanessa = {
unixId = mkDefault 1001;
admin = false;
};
soto = {
unixId = mkDefault 1010;
admin = false;
};
diaz = {
unixId = mkDefault 1011;
admin = false;
};
}; };
users = let users = let
@ -66,7 +54,7 @@ in {
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = extraGroups =
["users" "networkmanager"] ["users" "networkmanager"]
++ optionals (v.admin) ["wheel" "libvirtd" "dialout" "adbusers"]; ++ optionals (v.admin) ["wheel" "libvirtd" "dialout" "adbusers" "video"];
openssh.authorizedKeys.keyFiles = v.sshKeyPublicFile; openssh.authorizedKeys.keyFiles = v.sshKeyPublicFile;
}) })
enabledUsers; enabledUsers;

View file

@ -12,15 +12,11 @@
]; ];
local.sys = { local.sys = {
baseline.enable = true; defaultDesktopPack.enable = true;
yubikey.enable = true; yubikey.enable = true;
audio.enable = true;
graphics.enable = true;
virtualisation.enable = true; virtualisation.enable = true;
androidSupport.enable = true; androidSupport.enable = true;
steam.enable = true;
gtklock.enable = true;
borgsync = { borgsync = {
enable = true; enable = true;
paths = [ paths = [
@ -30,27 +26,11 @@
]; ];
repoName = "posixlycorrect"; repoName = "posixlycorrect";
}; };
users = {
fabian = {
enable = true;
unixId = 1002;
};
vanessa.enable = true;
};
}; };
local.sway.enable = true;
local.trivionomiconMotd.enable = true;
networking = { networking = {
hostName = "posixlycorrect"; hostName = "posixlycorrect";
networkmanager.enable = true;
hostId = "0414a727"; hostId = "0414a727";
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.
}; };
boot = { boot = {

View file

@ -12,39 +12,27 @@
]; ];
local.sys = { local.sys = {
baseline.enable = true; defaultDesktopPack.enable = true;
yubikey.enable = true; yubikey.enable = true;
audio.enable = true;
graphics.enable = true;
steam.enable = true;
gtklock.enable = true;
bluetooth.enable = true; bluetooth.enable = true;
users = {
fabian = {
enable = true;
unixId = 1002;
};
};
}; };
# trivionomicon
local = { local = {
sway.enable = true;
trivionomiconMotd.enable = true;
laptop.enable = true; laptop.enable = true;
thinkpad.enable = true; thinkpad.enable = true;
}; };
networking = { services = {
hostName = "t14"; fwupd.enable = true; #TODO
networkmanager.enable = true; pcscd.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.
}; };
hardware.acpilight.enable = true;
networking.hostName = "t14";
boot = { boot = {
loader = { loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
@ -55,10 +43,4 @@
}; };
time.timeZone = "America/Costa_Rica"; time.timeZone = "America/Costa_Rica";
services = {
fwupd.enable = true; #TODO
pcscd.enable = true; #TODO
};
hardware.acpilight.enable = true;
} }

View file

@ -17,11 +17,6 @@ with lib; {
./networkMap.nix ./networkMap.nix
]; ];
local.soju = {
enable = true;
fullyQualifiedDomain = "soju.posixlycorrect.com";
};
local.sys = { local.sys = {
baseline.enable = true; baseline.enable = true;
@ -42,9 +37,10 @@ with lib; {
}; };
}; };
networking = { # trivionomicon
hostName = "vps"; local.soju = {
domain = "posixlycorrect.com"; enable = true;
fullyQualifiedDomain = "soju.posixlycorrect.com";
}; };
services.openssh = { services.openssh = {
@ -53,29 +49,13 @@ with lib; {
programs.mosh.enable = true; programs.mosh.enable = true;
home-manager = { networking = {
useGlobalPkgs = true; hostName = "vps";
useUserPackages = true; domain = "posixlycorrect.com";
firewall.allowedUDPPorts = [51820]; #TODO
extraSpecialArgs = {
inherit flakes;
doctrine = flakes.trivionomicon.lib.mkDoctrine {
inherit pkgs;
inherit (doctrine) prefix;
namespace = "home";
};
};
users.fabian = {
imports = [
flakes.impermanence.nixosModules.home-manager.impermanence
"${flakes.self}/home/platforms/fabian@vps"
"${flakes.self}/home"
];
};
}; };
networking.firewall.allowedUDPPorts = [51820]; #TODO time.timeZone = "Europe/Amsterdam";
systemd = { systemd = {
extraConfig = '' extraConfig = ''
@ -137,5 +117,25 @@ with lib; {
}; };
}; };
time.timeZone = "Europe/Amsterdam"; home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit flakes;
doctrine = flakes.trivionomicon.lib.mkDoctrine {
inherit pkgs;
inherit (doctrine) prefix;
namespace = "home";
};
};
users.fabian = {
imports = [
flakes.impermanence.nixosModules.home-manager.impermanence
"${flakes.self}/home/platforms/fabian@vps"
"${flakes.self}/home"
];
};
};
} }