move options back out to their config files, improve documentation
This commit is contained in:
30 files changed
+344
-233
No files matched your search
@@ -1,4 +1,26 @@
|
||||
{ inputs, self, ... }: {
|
||||
{ inputs, self, ... }: let
|
||||
autostartOptionAttrs = { lib }: {
|
||||
type = lib.types.bool;
|
||||
description = "Controls whether an `equibop.desktop` file is generated and placed into `$XDG_CONFIG_HOME/autostart`.";
|
||||
default = false;
|
||||
};
|
||||
in {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui.equibop.enable = lib.mkEnableOption "Equibop";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.graphicsOption = { lib, ... }: {
|
||||
options.features.applications.gui.equibop.autostart = let
|
||||
attrs = autostartOptionAttrs { inherit lib; };
|
||||
in lib.mkOption {
|
||||
inherit (attrs) type default;
|
||||
description = ''
|
||||
${attrs.description}
|
||||
${inputs.helpers.mkRedundantOptionDescription "features.nixos.home-manager.enable" "true"}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, lib, config, ...}: {
|
||||
config = inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.gui.equibop = lib.mkDefault config.features.applications.gui.equibop;
|
||||
@@ -7,6 +29,10 @@
|
||||
};
|
||||
};
|
||||
|
||||
flake.homeModules.graphicsOptions = { lib, ... }: {
|
||||
options.features.applications.gui.equibop.autostart = lib.mkOption (autostartOptionAttrs { inherit lib; });
|
||||
};
|
||||
|
||||
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
||||
config = lib.mkIf (config.features.applications.gui.equibop.enable) {
|
||||
programs.equibop.enable = true;
|
||||
|
||||
Reference in new issue
Block a user