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;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui.floorp.enable = lib.mkEnableOption "Floorp Browser";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
|
||||
config = lib.mkIf (config.features.applications.gui.floorp.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.gui.floorp.enable = lib.mkDefault true;
|
||||
|
||||
@@ -64,6 +64,13 @@
|
||||
};
|
||||
};
|
||||
in {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui = {
|
||||
fluxer.enable = lib.mkEnableOption "Fluxer";
|
||||
fluxer-canary.enable = lib.mkEnableOption "Fluxer Canary";
|
||||
};
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.applications.gui.fluxer.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.gui.fluxer.enable = lib.mkDefault true;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui.kitty.enable = lib.mkEnableOption "Kitty Terminal";
|
||||
}))];
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||
config = let
|
||||
in lib.mkIf (config.features.applications.gui.kitty.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui.nautilus.enable = lib.mkEnableOption "Nautilus";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.applications.gui.nautilus.enable) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui.remmina.enable = lib.mkEnableOption "Remmina";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.applications.gui.remmina.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.gui.remmina.enable = lib.mkDefault true;
|
||||
|
||||
@@ -1,4 +1,27 @@
|
||||
{ inputs, self, ... }: {
|
||||
{ inputs, self, ... }: let
|
||||
spicetifyEnableOptionAttrs = { lib }: {
|
||||
type = lib.types.bool;
|
||||
description = "Whether to enable Spicetify, a modified version of Spotify that supports plugins and themes.";
|
||||
default = false;
|
||||
};
|
||||
|
||||
spicetifyThemeOptionAttrs = { pkgs, lib }: {
|
||||
type = inputs.nixpkgs.lib.types.nullOr (inputs.nixpkgs.lib.types.enum (builtins.attrNames inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system}.themes));
|
||||
description = "This option is used to select a theme for Spicetify to use, from the list of available packages themes.";
|
||||
default = null;
|
||||
};
|
||||
in {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui.spotify.enable = lib.mkEnableOption "Spotify";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.graphicsOptions = { lib, pkgs, ... }: {
|
||||
options.features.applications.gui.spotify.spicetify = {
|
||||
enable = inputs.helpers.mkRedundantOption "features.nixos.home-manager.enable" "true" (spicetifyEnableOptionAttrs { inherit lib; });
|
||||
theme = inputs.helpers.mkRedundantOption "features.nixos.home-manager.enable" "true" (spicetifyThemeOptionAttrs { inherit pkgs lib; });
|
||||
};
|
||||
};
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: let
|
||||
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||
in {
|
||||
@@ -12,6 +35,13 @@
|
||||
});
|
||||
};
|
||||
|
||||
flake.homeModules.graphicsOptions = { lib, pkgs, ... }: {
|
||||
options.features.applications.gui.spotify.spicetify = {
|
||||
enable = lib.mkOption (spicetifyEnableOptionAttrs { inherit lib; });
|
||||
theme = lib.mkOption (spicetifyThemeOptionAttrs { inherit pkgs lib; });
|
||||
};
|
||||
};
|
||||
|
||||
flake.homeModules.graphics = { pkgs, config, lib, ... }: let
|
||||
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
|
||||
in {
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.applications.gui.vscode.enable = lib.mkEnableOption "VS Code";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
||||
config = lib.mkIf (config.features.applications.gui.vscode.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.gui.vscode.enable = lib.mkDefault true;
|
||||
|
||||
Reference in new issue
Block a user