refactor(repo): reformat to nixfmt; relicense to 0BSD
This commit is contained in:
parent
035fb24038
commit
db2564d828
39 changed files with 451 additions and 318 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue