mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +01:00
xresources: add option extraConfig
This commit is contained in:
parent
4205c91609
commit
7c9278bd92
1 changed files with 28 additions and 5 deletions
|
@ -28,17 +28,40 @@ in
|
||||||
"Emacs*toolBar" = 0;
|
"Emacs*toolBar" = 0;
|
||||||
};
|
};
|
||||||
description = ''
|
description = ''
|
||||||
X server resources that should be set. If <code>null</code>,
|
X server resources that should be set.
|
||||||
then this feature is disabled and no
|
If this and all other xresources options are
|
||||||
|
<code>null</code>, then this feature is disabled and no
|
||||||
|
<filename>~/.Xresources</filename> link is produced.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
xresources.extraConfig = mkOption {
|
||||||
|
type = types.lines;
|
||||||
|
default = "";
|
||||||
|
example = literalExample ''
|
||||||
|
builtins.readFile (
|
||||||
|
pkgs.fetchFromGitHub {
|
||||||
|
owner = "solarized";
|
||||||
|
repo = "xresources";
|
||||||
|
rev = "025ceddbddf55f2eb4ab40b05889148aab9699fc";
|
||||||
|
sha256 = "0lxv37gmh38y9d3l8nbnsm1mskcv10g3i83j0kac0a2qmypv1k9f";
|
||||||
|
} + "/Xresources.dark"
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Additional X server resources contents.
|
||||||
|
If this and all other xresources options are
|
||||||
|
<code>null</code>, then this feature is disabled and no
|
||||||
<filename>~/.Xresources</filename> link is produced.
|
<filename>~/.Xresources</filename> link is produced.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (cfg.properties != null) {
|
config = mkIf (cfg.properties != null || cfg.extraConfig != "") {
|
||||||
home.file.".Xresources".text =
|
home.file.".Xresources".text =
|
||||||
concatStringsSep "\n" (
|
concatStringsSep "\n" ([]
|
||||||
mapAttrsToList formatLine cfg.properties
|
++ (optional (cfg.extraConfig != "") cfg.extraConfig)
|
||||||
|
++ (optionals (cfg.properties != null) (mapAttrsToList formatLine cfg.properties))
|
||||||
) + "\n";
|
) + "\n";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue