diff --git a/' b/' deleted file mode 100644 index 67f9ed2..0000000 --- a/' +++ /dev/null @@ -1,50 +0,0 @@ -{ - description = '' - A collection of custom NixOS modules and packages I use. - ''; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - }; - - outputs = - { - nixpkgs, - ... - }: - let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - modules = [ - ./homemanager/default_apps.nix - ./homemanager/editorconfig.nix - ./homemanager/fish.nix - ./homemanager/hyprland.nix - ./homemanager/hyprpanel.nix - ./homemanager/neovim.nix - ./homemanager/nushell.nix - ./homemanager/starship.nix - ./homemanager/theme.nix - ./homemanager/tmux.nix - ./homemanager/utilities.nix - ./homemanager/walker.nix - ./homemanager/terminal_emulators/ghostty.nix - ./homemanager/terminal_emulators/kitty.nix - ./homemanager/terminal_emulators/wezterm.nix - ]; - in - { - homeManager = { - imports = modules; - }; - - packages.${system}.docs = - (pkgs.nixosOptionsDoc { - options = pkgs.lib.evalModules { - modules = modules; - }; - documentType = "markdown"; - }).optionsCommonMark; - - }; -} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b2be92b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/docs.nix b/docs.nix new file mode 100644 index 0000000..f927723 --- /dev/null +++ b/docs.nix @@ -0,0 +1,27 @@ +{ + buildDocs = + { + pkgs, + inputs, + modules, + }: + let + eval = pkgs.lib.evalModules { + specialArgs = { + inherit inputs pkgs; + }; + modules = [ + ( + { ... }: + { + imports = modules; + _module.check = false; + } + ) + ]; + }; + in + pkgs.nixosOptionsDoc { + inherit (eval) options; + }; +} diff --git a/docs/options.md b/docs/options.md new file mode 100644 index 0000000..6bf111a --- /dev/null +++ b/docs/options.md @@ -0,0 +1,494 @@ +## _module\.args + +Additional arguments passed to each module in addition to ones +like ` lib `, ` config `, +and ` pkgs `, ` modulesPath `\. + +This option is also available to all submodules\. Submodules do not +inherit args from their parent module, nor do they provide args to +their parent module or sibling submodules\. The sole exception to +this is the argument ` name ` which is provided by +parent modules to a submodule and contains the attribute name +the submodule is bound to, or a unique generated name if it is +not bound to an attribute\. + +Some arguments are already passed by default, of which the +following *cannot* be changed with this option: + + - ` lib `: The nixpkgs library\. + + - ` config `: The results of all options after merging the values from all modules together\. + + - ` options `: The options declared in all modules\. + + - ` specialArgs `: The ` specialArgs ` argument passed to ` evalModules `\. + + - All attributes of ` specialArgs ` + + Whereas option values can generally depend on other option values + thanks to laziness, this does not apply to ` imports `, which + must be computed statically before anything else\. + + For this reason, callers of the module system can provide ` specialArgs ` + which are available during import resolution\. + + For NixOS, ` specialArgs ` includes + ` modulesPath `, which allows you to import + extra modules from the nixpkgs package tree without having to + somehow make the module aware of the location of the + ` nixpkgs ` or NixOS directories\. + + ``` + { modulesPath, ... }: { + imports = [ + (modulesPath + "/profiles/minimal.nix") + ]; + } + ``` + +For NixOS, the default value for this option includes at least this argument: + + - ` pkgs `: The nixpkgs package set according to + the ` nixpkgs.pkgs ` option\. + + + +*Type:* +lazy attribute set of raw value + +*Declared by:* + - [\](https://github.com/NixOS/nixpkgs/blob//lib/modules.nix) + + + +## modules\.default_apps\.enable + + + +Whether to enable default_apps\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/default_apps\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/default_apps.nix) + + + +## modules\.editorconfig\.enable + + + +Whether to enable enables editorconfig\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/editorconfig\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/editorconfig.nix) + + + +## modules\.fish\.enable + + + +Whether to enable fish\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/fish\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/fish.nix) + + + +## modules\.hyprland\.enable + + + +Whether to enable hyprland\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/hyprland\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/hyprland.nix) + + + +## modules\.hyprpanel\.enable + + + +Whether to enable hyprpanel\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/hyprpanel\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/hyprpanel.nix) + + + +## modules\.hyprpanel\.avatar\.image + + + +avatar image + + + +*Type:* +absolute path + + + +*Default:* +` "" ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/hyprpanel\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/hyprpanel.nix) + + + +## modules\.hyprpanel\.avatar\.name + + + +Username to be displayed + + + +*Type:* +string + + + +*Default:* +` "John Doe" ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/hyprpanel\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/hyprpanel.nix) + + + +## modules\.neovim\.enable + + + +Whether to enable neovim\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/neovim\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/neovim.nix) + + + +## modules\.nushell\.enable + + + +Whether to enable nushell\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/nushell\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/nushell.nix) + + + +## modules\.starship\.enable + + + +Whether to enable enables starship\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/starship\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/starship.nix) + + + +## modules\.terminalEmulators\.ghostty\.enable + + + +Whether to enable ghostty\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/terminal_emulators/ghostty\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/terminal_emulators/ghostty.nix) + + + +## modules\.terminalEmulators\.kitty\.enable + + + +Whether to enable kitty\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/terminal_emulators/kitty\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/terminal_emulators/kitty.nix) + + + +## modules\.terminalEmulators\.wezterm\.enable + + + +Whether to enable kitty\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/terminal_emulators/wezterm\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/terminal_emulators/wezterm.nix) + + + +## modules\.theme\.enable + + + +Whether to enable theme\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/theme\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/theme.nix) + + + +## modules\.tmux\.enable + + + +Whether to enable tmux\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/tmux\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/tmux.nix) + + + +## modules\.utilities\.enable + + + +Whether to enable utilities\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/utilities\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/utilities.nix) + + + +## modules\.walker\.enable + + + +Whether to enable walker\. + + + +*Type:* +boolean + + + +*Default:* +` false ` + + + +*Example:* +` true ` + +*Declared by:* + - [/nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/walker\.nix](file:///nix/store/a661xl77ba24lv1j80jyijjvk1h6h1vz-source/homemanager/walker.nix) + + diff --git a/flake.nix b/flake.nix index 3995907..850a0ee 100644 --- a/flake.nix +++ b/flake.nix @@ -49,23 +49,22 @@ ./homemanager/terminal_emulators/wezterm.nix ]; - options = pkgs.lib.evalModules { - specialArgs = { - inherit inputs pkgs; - }; - modules = modules; + externalModules = [ + inputs.walker.homeModules.default + inputs.zen-browser.homeModules.beta + ]; + + docsUtil = import ./docs.nix; + + docs = docsUtil.buildDocs { + inherit pkgs inputs modules; }; in { homeManager = { - imports = modules; + imports = modules ++ externalModules; }; - packages.${system}.docs = - (pkgs.nixosOptionsDoc { - options = options; - documentType = "markdown"; - }).optionsCommonMark; - + docs = docs.optionsCommonMark; }; } diff --git a/homemanager/utilities.nix b/homemanager/utilities.nix index 0d1fc9d..d159e3f 100644 --- a/homemanager/utilities.nix +++ b/homemanager/utilities.nix @@ -2,14 +2,9 @@ lib, config, pkgs, - inputs, ... }: { - imports = [ - inputs.zen-browser.homeModules.beta - ]; - options = { modules.utilities.enable = lib.mkEnableOption "utilities"; }; diff --git a/homemanager/walker.nix b/homemanager/walker.nix index d9eb950..172e7ab 100644 --- a/homemanager/walker.nix +++ b/homemanager/walker.nix @@ -2,32 +2,9 @@ lib, config, pkgs, - inputs, - system, ... }: -let - configHome = "${config.home.homeDirectory}/.config/dotfiles/homes/quirinecker"; - providerOptions = { - desktopapplications = "Desktop application launcher"; - files = "File search and management"; - clipboard = "Clipboard history management"; - runner = "Command runner"; - symbols = "Symbols and emojis"; - calc = "Calculator and unit conversion"; - menus = "Custom menu system"; - providerlist = "Provider listing and management"; - websearch = "Web search integration"; - todo = "Todo list"; - unicode = "Unicode symbol search"; - bluetooth = "Basic Bluetooth management"; - }; -in { - imports = [ - inputs.walker.homeManagerModules.walker - - ]; options = { modules.walker.enable = lib.mkEnableOption "walker"; };