mirror of
https://github.com/nix-community/home-manager
synced 2024-12-02 16:09:46 +01:00
cosmic: tidy up options
This commit is contained in:
parent
c88b8ebf61
commit
a12755f889
1 changed files with 3 additions and 5 deletions
|
@ -85,6 +85,7 @@ let
|
||||||
|
|
||||||
cfg = config.programs.cosmic;
|
cfg = config.programs.cosmic;
|
||||||
in {
|
in {
|
||||||
|
meta.maintainers = [ hm.maintainers.atagen ];
|
||||||
options.programs.cosmic = {
|
options.programs.cosmic = {
|
||||||
enable = with lib; mkEnableOption "COSMIC DE";
|
enable = with lib; mkEnableOption "COSMIC DE";
|
||||||
|
|
||||||
|
@ -181,18 +182,15 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions =
|
|
||||||
[ (hm.assertions.assertPlatform "programs.cosmic" pkgs platforms.linux) ];
|
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"cosmic/com.system76.CosmicSettings.Shortcuts/v1/custom".text =
|
"cosmic/com.system76.CosmicSettings.Shortcuts/v1/custom".text =
|
||||||
mapBindings cfg.keybindings;
|
(lib.mkIf cfg.keybindings != [ ]) mapBindings cfg.keybindings;
|
||||||
"cosmic/com.system76.CosmicSettings.Shortcuts/v1/defaults" = {
|
"cosmic/com.system76.CosmicSettings.Shortcuts/v1/defaults" = {
|
||||||
text = "{}";
|
text = "{}";
|
||||||
enable = !cfg.defaultKeybindings;
|
enable = !cfg.defaultKeybindings;
|
||||||
};
|
};
|
||||||
} // concatMapAttrs
|
} // concatMapAttrs
|
||||||
(application: options: mapCosmicSettings application options)
|
(application: options: mapCosmicSettings application options)
|
||||||
config.programs.cosmic.settings;
|
cfg.settings;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue