diff options
author | Tim Keller <tjk@tjkeller.xyz> | 2025-08-30 12:31:28 -0500 |
---|---|---|
committer | Tim Keller <tjk@tjkeller.xyz> | 2025-08-30 12:31:28 -0500 |
commit | 9da942ba47d34210e86a1a709e802eda5c3b95db (patch) | |
tree | f7434c4b4c9b8e5271220c11f9b802815c3519c7 /archetypes/profiles/desktop | |
parent | c3c3d6f1fd19a5da015c9a9d3ae5c54f2d177be0 (diff) | |
download | nixos-9da942ba47d34210e86a1a709e802eda5c3b95db.tar.xz nixos-9da942ba47d34210e86a1a709e802eda5c3b95db.zip |
refactor users activation. refactor home manager config to match nixos conf and move tjkeller archetypes to users/timmy. update many of the exising home manager configs to be nicer and better organized. profile archetypes now include homeconfigs which can be enabled per user, and are setup using a new mkProfileArchetype function.
Diffstat (limited to 'archetypes/profiles/desktop')
-rw-r--r-- | archetypes/profiles/desktop/default.nix | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/archetypes/profiles/desktop/default.nix b/archetypes/profiles/desktop/default.nix index d9a7dc7..7ca1e7c 100644 --- a/archetypes/profiles/desktop/default.nix +++ b/archetypes/profiles/desktop/default.nix @@ -1,12 +1,7 @@ { lib, config, pkgs, ... }: let mkDesktop = lib.mkOverride 920; - cfg = config._archetypes.profiles.desktop; -in { - options._archetypes.profiles.desktop = { - enable = lib.mkEnableOption "enable desktop profile"; - }; - config = lib.mkIf cfg.enable { + nixosConfig = { _archetypes.collections = { desktop = { utilities.enable = mkDesktop true; @@ -22,10 +17,6 @@ in { fonts.enable = mkDesktop true; }; - _archetypes.users.primary = { - enable = mkDesktop true; - }; - security = { _doas.enable = mkDesktop true; }; @@ -45,9 +36,42 @@ in { tlp.enable = mkDesktop true; # Ensure video group can change backlight - udev.extraRules = '' + udev.extraRules = mkDesktop '' SUBSYSTEM=="backlight", ACTION=="add", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness" ''; }; }; + + homeConfig = { + gtk = { + enable = mkDesktop true; + _mintTheme.enable = mkDesktop true; + font.name = mkDesktop "sans-serif"; + cursorTheme.name = mkDesktop "Adwaita"; + }; + + qt._gtkPlatformTheme.enable = mkDesktop true; + + fonts.fontconfig = { + enable = mkDesktop true; + defaultFonts = { + # These fonts are added above in fonts collection + sansSerif = mkDesktop [ "Inter" ]; + monospace = mkDesktop [ "CommitMono" ]; + }; + }; + + programs = { + _pcmanfm.openAsRootOption.enable = mkDesktop true; + firefox._configure = mkDesktop true; + htop._configure = mkDesktop true; + }; + + home._repos = { + enable = mkDesktop true; + desktop = mkDesktop true; + }; + }; +in { + imports = [ (lib._mkProfileArchetype "desktop" nixosConfig homeConfig) ]; } |