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
@@ -29,6 +29,10 @@
|
||||
};
|
||||
};
|
||||
in {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: {
|
||||
options.features.applications.cli.color-converter.enable = lib.mkEnableOption "`color-converter`";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||
config = lib.mkIf (config.features.applications.cli.color-converter.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.cli.color-converter.enable = lib.mkDefault true;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: {
|
||||
options.features.applications.cli.fastfetch.enable = lib.mkEnableOption "`fastfetch`";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||
config = lib.mkIf (config.features.applications.cli.fastfetch.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.cli.fastfetch.enable = lib.mkDefault true;
|
||||
|
||||
@@ -1,27 +1,43 @@
|
||||
{ inputs, self, ... }: let
|
||||
mkNhAttrs = flake: {
|
||||
mkNhAttrs = config: {
|
||||
enable = true;
|
||||
inherit flake;
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "Sun 05:00";
|
||||
extraArgs = "--keep 5 --keep-since 3d";
|
||||
};
|
||||
flake = config.info.rootPath;
|
||||
clean = config.features.applications.cli.nh.clean;
|
||||
};
|
||||
in {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: {
|
||||
options.features.applications.cli.nh = {
|
||||
enable = lib.mkEnableOption "NH: Yet another Nix CLI helper";
|
||||
clean = {
|
||||
enable = lib.mkEnableOption "automatic cleaning of the system with `nh clean`";
|
||||
dates = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "This option defines when the cleaning job should run, in the format of [`systemd.time` calendar events](https://www.man7.org/linux/man-pages/man7/systemd.time.7.html#CALENDAR_EVENTS).";
|
||||
default = "daily";
|
||||
example = "Sun 05:00";
|
||||
};
|
||||
extraArgs = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "This option sets any extra arguments that should be passed to the `nh clean` command when it is called by this automated service.";
|
||||
default = "--keep 10 --keep-since 7d";
|
||||
};
|
||||
};
|
||||
};
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.applications.cli.nh.enable) {
|
||||
programs.nh = mkNhAttrs config.info.rootPath;
|
||||
programs.nh = mkNhAttrs config;
|
||||
|
||||
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||
features.applications.cli.nh.enable = lib.mkDefault true;
|
||||
features.applications.cli.nh = lib.mkDefault config.features.applications.cli.nh;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.applications.cli.nh.enable && config.info.isStandalone) {
|
||||
programs.nh = mkNhAttrs config.info.rootPath;
|
||||
programs.nh = mkNhAttrs config;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "gamingOptions" ({ lib, ... }: {
|
||||
options.features.hardware.steam-controller.enable = lib.mkEnableOption "tweaks and configurations that assist when using Valve's Steam Controller";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.gaming = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.hardware.steam-controller.enable) {
|
||||
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
inputs.home-manager.flakeModules.home-manager
|
||||
];
|
||||
|
||||
flake.nixosModules.globalOptions = { lib, ... }: {
|
||||
options.features.nixos.home-manager.enable = lib.mkEnableOption "Home Manager (as a NixOS module)";
|
||||
};
|
||||
|
||||
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "graphicsOptions" ({ lib, ... }: {
|
||||
options.features.nixos.stylix.enable = lib.mkEnableOption "Stylix";
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.graphics = { pkgs, lib, config, ... }: {
|
||||
imports = [
|
||||
inputs.stylix.nixosModules.stylix
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{ inputs, self, ... }: {
|
||||
flake.homeModules.audioOptions = { lib, ...}: {
|
||||
options.features.services.easyeffects.enable = lib.mkEnableOption "Easy Effects";
|
||||
};
|
||||
|
||||
flake.homeModules.audio = { pkgs, config, lib, ...}: {
|
||||
config = lib.mkIf (config.features.services.easyeffects.enable) {
|
||||
services.easyeffects.enable = true;
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: {
|
||||
options.features.shells.defaultShell = lib.mkOption {
|
||||
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/features/shells";
|
||||
description = "This option controls the shell that should be used as the default, enabling that shell in the process.";
|
||||
default = "zsh";
|
||||
};
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.global = { config, pkgs, lib, ... }: {
|
||||
programs.${config.features.shells.defaultShell}.enable = true;
|
||||
|
||||
users.defaultUserShell = pkgs.${config.features.shells.defaultShell};
|
||||
users.users."grey".shell = pkgs.${config.features.shells.defaultShell};
|
||||
|
||||
features.shells.${config.features.shells.defaultShell}.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,13 @@
|
||||
{ inputs, self, ... }: {
|
||||
imports = [ (inputs.helpers.mkMirroredModulesFlakeModule "globalOptions" ({ lib, ... }: {
|
||||
options.features.shells.zsh = {
|
||||
enable = lib.mkEnableOption "`zsh`";
|
||||
antidote.enable = lib.mkEnableOption "Antidote, a plugin manager for `zsh`";
|
||||
};
|
||||
})) ];
|
||||
|
||||
flake.nixosModules.global = { config, pkgs, lib, ... }: {
|
||||
config = lib.mkIf (config.features.shells.zsh.enable) {
|
||||
config = lib.mkIf (config.features.shells.zsh.enable || config.features.shells.defaultShell == "zsh") {
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||
@@ -11,7 +18,7 @@
|
||||
};
|
||||
|
||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
||||
config = lib.mkIf (config.features.shells.zsh.enable) {
|
||||
config = lib.mkIf (config.features.shells.zsh.enable || config.features.shells.defaultShell == "zsh") {
|
||||
home.shell.enableZshIntegration = true;
|
||||
|
||||
programs.kitty.shellIntegration.enableZshIntegration = true;
|
||||
|
||||
Reference in new issue
Block a user