refactor: Fully modularize the working system components to be more

reuasable
This commit is contained in:
2025-12-09 17:38:41 -05:00
committed by Hunter Halloran
parent 0e5c993a26
commit ebb70eca07
31 changed files with 923 additions and 754 deletions

5
sw/desktop/default.nix Normal file
View File

@@ -0,0 +1,5 @@
{ config, lib, pkgs, inputs, ... }:
lib.mkMerge [
(import ./programs.nix { inherit config lib pkgs inputs; })
(import ./services.nix { inherit config lib pkgs inputs; })
]

29
sw/desktop/programs.nix Normal file
View File

@@ -0,0 +1,29 @@
{ config, lib, pkgs, inputs, ... }:
with lib;
let
cfg = config.modules.sw;
basePackages = with pkgs; [
tmux
man
(chromium.override {
commandLineArgs = [ "--enable-features=TouchpadOverscrollHistoryNavigation" ];
})
lm_sensors
zoom-us
teams-for-linux
wpsoffice
];
in {
environment.systemPackages = subtractLists cfg.excludePackages (basePackages ++ cfg.extraPackages);
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.firefox.enable = true;
programs.virt-manager.enable = true;
}

51
sw/desktop/services.nix Normal file
View File

@@ -0,0 +1,51 @@
{ config, lib, pkgs, ... }:
{
modules.sw.python.enable = lib.mkDefault true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.printing.enable = true;
networking.networkmanager.enable = true;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
fonts.packages = with pkgs; [
nerd-fonts.fira-code
corefonts
noto-fonts
];
fonts.fontconfig = {
enable = true;
defaultFonts.monospace = [ "FiraCode Nerd Font Mono" ];
};
hardware.bluetooth.enable = true;
services.blueman.enable = true;
networking.firewall.enable = true;
services.flatpak.enable = true;
xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ];
virtualisation.libvirtd.enable = true;
services.thermald.enable = true;
services.fwupd.enable = true;
services.openssh = {
enable = true;
settings.PermitRootLogin = "no";
};
}