refactor(repo): reformat to nixfmt; relicense to 0BSD

This commit is contained in:
Artur Manuel 2025-03-06 20:45:49 +00:00
commit db2564d828
Signed by: amadaluzia
SSH key fingerprint: SHA256:Zwg7gBuZyaG48ucAZneJwltiXu0+tJb7c3lYt9AYlLg
39 changed files with 451 additions and 318 deletions

View file

@ -2,20 +2,23 @@
config,
lib,
...
}: let
}:
let
cfg = config.alqueva.system.dconf;
inherit (lib) types;
in {
in
{
options.alqueva.system.dconf = {
enable = lib.mkEnableOption "configuration with DConf";
luminosity = lib.mkOption {
type = types.enum ["dark" "light" "default"];
type = types.enum [
"dark"
"light"
"default"
];
default = "dark";
description = "The luminosity you want to use for GTK.";
apply = lum:
if lum == "default"
then lum
else "prefer-${lum}";
apply = lum: if lum == "default" then lum else "prefer-${lum}";
};
theme = lib.mkOption {
type = types.str;
@ -43,29 +46,27 @@ in {
extraDconfPackages = lib.mkOption {
type = types.listOf types.package;
description = "Extra packages to install for DConf.";
default = [];
default = [ ];
};
extraDconfSettings = lib.mkOption {
type = types.attrsOf types.anything;
description = "Extra settings you want to apply to DConf.";
default = {};
default = { };
};
};
config = lib.mkIf cfg.enable {
programs.dconf = {
profiles.user.databases = [
{
settings =
{
"org/gnome/desktop/interface" = {
color-scheme = cfg.luminosity;
cursor-size = cfg.cursor.size;
cursor-theme = cfg.cursor.theme;
icon-theme = cfg.icon.theme;
gtk-theme = cfg.theme;
};
}
// cfg.extraDconfSettings;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = cfg.luminosity;
cursor-size = cfg.cursor.size;
cursor-theme = cfg.cursor.theme;
icon-theme = cfg.icon.theme;
gtk-theme = cfg.theme;
};
} // cfg.extraDconfSettings;
}
];
packages = cfg.extraDconfPackages;