Compare commits

..

1 commit

Author SHA1 Message Date
5358188ad1
refactor(hm/gui): reorganize modules
All checks were successful
/ check (push) Successful in 9s
/ check-renovaterc (push) Successful in 3s
/ build-packages (push) Successful in 13s
/ build-vm (push) Successful in 2s
/ report-size (push) Successful in 5s
This way we are not `import`ing stuff which is slow.

It also makes it easier to turn off the sway module.
2025-04-21 19:04:52 +02:00
2 changed files with 20 additions and 22 deletions

View file

@ -3,10 +3,10 @@ default:
# Update a specific flake input
update input:
nix flake lock --update-input {{input}} --commit-lock-file
nix flake lock --update-input "{{input}}" --commit-lock-file
build-vm:
nixos-rebuild build-vm --flake .#vm --print-build-logs
nixos-rebuild build-vm --fallback --flake .#vm --print-build-logs
run-vm: build-vm
QEMU_OPTS="$QEMU_OPTS_WL" result/bin/run-nixos-vm

View file

@ -11,7 +11,7 @@ in
config = lib.mkIf (config.jhome.enable && config.jhome.gui.enable && cfg.enable) {
# Window Manager
wayland.windowManager.sway = {
inherit (cfg.sway) enable;
inherit (cfg) enable;
config =
let
inherit (config.jhome.gui) terminal;
@ -30,7 +30,7 @@ in
};
in
{
modifier = "Mod 4";
modifier = "Mod4";
inherit terminal menu;
# Appearance
bars = [ ]; # Waybar is started as a systemd service
@ -73,8 +73,7 @@ in
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
in
[
(cmdAlways (
pkgs.writers.writeDash "configure-gtk" ''
(cmdAlways "${pkgs.writers.writeDash "configure-gtk" ''
export XDG_DATA_DIRS="${datadir}:$XDG_DATA_DIRS"
gnome_schema=org.gnome.desktop.interface
@ -90,8 +89,7 @@ in
${pkgs.glib}/bin/gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name"
${pkgs.glib}/bin/gsettings set "$gnome_schema" color-scheme prefer-dark
''
))
''}")
]
++ (builtins.map cmdAlways cfg.exec.always)
++ (builtins.map cmdOnce cfg.exec.once);