feat: add colorscheme toggle and make bar shorter

This commit is contained in:
Youwen Wu 2025-04-19 20:30:19 -07:00
parent 473ddfbc8f
commit 0dcb37dab7
Signed by: youwen
GPG key ID: 865658ED1FE61EC3
3 changed files with 91 additions and 22 deletions

View file

@ -88,6 +88,23 @@
};
};
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units") {
var unit = action.lookup("unit");
if (unit == "colorscheme-dawn.service" || unit == "colorscheme-dusk.service") {
if (subject.active && subject.local) {
return polkit.Result.YES;
} else {
return polkit.Result.AUTH_ADMIN_KEEP;
}
}
}
return polkit.Result.NOT_HANDLED;
});
'';
nix.extraOptions = ''
!include ${config.age.secrets.nix_config_github_pat.path}
'';
@ -119,7 +136,7 @@
polarity = lib.mkDefault "dark";
};
environment.etc.polarity.text = "dusk";
environment.etc.polarity.text = lib.mkDefault "dusk";
specialisation = {
dawn.configuration = {