From b7e2bba8f0ec405cd18513395fce658791d2b633 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 18 Jan 2026 15:47:51 +0100 Subject: [PATCH] Update systemmodules/homemodules paths to allow nixd to differentiate between the two --- README.md | 4 +- .../modules-options-doc/default.nix | 2 +- home/christoph/default.nix | 40 +++++++------------ home/christoph/nixinator/default.nix | 6 +-- home/christoph/nixtop/default.nix | 6 +-- home/christoph/servenix/default.nix | 6 +-- home/christoph/thinknix/default.nix | 4 -- home/homemodules/0_template/default.nix | 4 +- home/homemodules/1_deprecated/ags/default.nix | 6 +-- .../1_deprecated/alacritty/default.nix | 4 +- .../1_deprecated/audio/default.nix | 6 +-- .../1_deprecated/emacs/default.nix | 4 +- .../1_deprecated/email/default.nix | 4 +- .../1_deprecated/flatpak/default.nix | 4 +- .../1_deprecated/gaming/default.nix | 8 ++-- .../1_deprecated/helix/default.nix | 4 +- .../homemodules/1_deprecated/misc/default.nix | 4 +- .../1_deprecated/nextcloud/default.nix | 4 +- .../1_deprecated/ranger/default.nix | 4 +- .../1_deprecated/vscode/default.nix | 4 +- home/homemodules/beets/default.nix | 4 +- home/homemodules/btop/default.nix | 4 +- home/homemodules/chromium/default.nix | 4 +- home/homemodules/color/default.nix | 6 +-- home/homemodules/docs/default.nix | 4 +- home/homemodules/fcitx/default.nix | 4 +- home/homemodules/firefox/default.nix | 4 +- home/homemodules/fish/default.nix | 18 ++++----- home/homemodules/git/default.nix | 4 +- home/homemodules/hyprland/default.nix | 6 +-- home/homemodules/hyprland/dunst.nix | 2 +- home/homemodules/hyprpanel/default.nix | 4 +- home/homemodules/kitty/default.nix | 6 +-- home/homemodules/lazygit/default.nix | 4 +- home/homemodules/mpd/default.nix | 4 +- home/homemodules/neovim/default.nix | 4 +- home/homemodules/niri/default.nix | 4 +- home/homemodules/nnn/default.nix | 4 +- home/homemodules/qutebrowser/default.nix | 4 +- home/homemodules/rmpc/default.nix | 4 +- home/homemodules/rofi/default.nix | 12 +++--- home/homemodules/waybar/default.nix | 4 +- home/homemodules/yazi/default.nix | 6 +-- home/homemodules/yazi/specialFiletypes.nix | 8 ++-- home/homemodules/zathura/default.nix | 4 +- lib/nixos.nix | 25 +++++++++++- system/default.nix | 14 +------ system/nixinator/default.nix | 4 +- system/nixtop/default.nix | 3 +- system/servenix/default.nix | 4 +- system/systemmodules/0_template/default.nix | 4 +- .../1_deprecated/agenix/default.nix | 8 ++-- .../1_deprecated/containers/default.nix | 4 +- system/systemmodules/bootloader/default.nix | 4 +- .../systemmodules/desktopportal/default.nix | 4 +- system/systemmodules/docker/default.nix | 4 +- system/systemmodules/fonts/default.nix | 4 +- system/systemmodules/impermanence/default.nix | 4 +- system/systemmodules/mime/default.nix | 4 +- system/systemmodules/network/default.nix | 6 +-- system/systemmodules/polkit/default.nix | 4 +- system/systemmodules/sops-nix/default.nix | 4 +- system/thinknix/default.nix | 4 +- 63 files changed, 173 insertions(+), 195 deletions(-) diff --git a/README.md b/README.md index 5928a0b6..ebbfc4ec 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Contains all the system configurations. - There is a common configuration used for all systems: `NixFlake/system/default.nix` - Every system has its own special configuration: `NixFlake/system//default.nix` -- System modules are located in `NixFlake/system/modules` +- System modules are located in `NixFlake/system/systemmodules` - Hosted services are located in `NixFlake/system/services` When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported. @@ -33,7 +33,7 @@ Contains all the home-manager configurations. - There is a common configuration for each user: `NixFlake/home//default.nix` - There is a configuration for a single system of this user: `NixFlake/home///default.nix` -- Home-Manager modules are located in `NixFlake/home/modules` +- Home-Manager modules are located in `NixFlake/home/homemodules` When creating a NixOS configuration inside the `NixFlake/flake.nix` the common configuration is imported. Because the hostname is propagated to the common configuration, it can import the host-specific config by itself. diff --git a/derivations/1_deprecated/modules-options-doc/default.nix b/derivations/1_deprecated/modules-options-doc/default.nix index f752d643..46d3f542 100644 --- a/derivations/1_deprecated/modules-options-doc/default.nix +++ b/derivations/1_deprecated/modules-options-doc/default.nix @@ -7,7 +7,7 @@ ... }: let # create a module that only contains the options, type can be home or system - toModule = type: name: {options.modules.${name} = import ../../${type}/modules/${name}/options.nix {inherit lib mylib;};}; + toModule = type: name: {options.systemmodules.${name} = import ../../${type}/modules/${name}/options.nix {inherit lib mylib;};}; # evaluate a single module evalModule = type: name: (lib.evalModules {modules = [(toModule type name)];}); diff --git a/home/christoph/default.nix b/home/christoph/default.nix index 1a76d42c..b9011075 100644 --- a/home/christoph/default.nix +++ b/home/christoph/default.nix @@ -15,7 +15,7 @@ headless, ... }: let - inherit (config.modules) color; + inherit (config.homemodules) color; in # This is a HM module. # Because no imports/options/config is defined explicitly, everything is treated as config: @@ -25,16 +25,6 @@ in # Every module (/function) is called with the same arguments as this module. # Arguments with matching names are "plugged in" into the right slots, # the case of different arity is handled by always providing ellipses (...) in module definitions. - imports = [ - # Import the host-specific HM config. - # It will be merged with the main config (like all different modules). - # Settings regarding a specific host (e.g. desktop or laptop) - # should only be made in the host-specific config. - ./${hostname} - - # Import all of my custom HM modules. - ../modules - ]; # Enable and configure my custom HM modules. paths = rec { @@ -42,7 +32,7 @@ in dotfiles = "${nixflake}/config"; }; - modules = { + homemodules = { beets.enable = !headless; btop.enable = true; @@ -99,7 +89,7 @@ in hyprland = { enable = nixosConfig.programs.hyprland.enable; - dunst.enable = !config.modules.hyprpanel.enable; # Disable for hyprpanel + dunst.enable = !config.homemodules.hyprpanel.enable; # Disable for hyprpanel bars.enable = false; dynamicCursor.enable = false; trails.enable = true; @@ -112,14 +102,14 @@ in bindings = lib.mergeAttrsList [ # Use Rofi if we don't have caelestia - (lib.optionalAttrs (!config.modules.hyprland.caelestia.enable) { + (lib.optionalAttrs (!config.homemodules.hyprland.caelestia.enable) { "$mainMod, a" = ["exec, rofi -drun-show-actions -show drun"]; "$mainMod, c" = ["exec, clipman pick --tool=rofi"]; "$mainMod SHIFT, l" = ["exec, loginctl lock-session"]; }) # Caelestia - (lib.optionalAttrs (config.modules.hyprland.caelestia.enable) { + (lib.optionalAttrs (config.homemodules.hyprland.caelestia.enable) { "$mainMod, a" = ["exec, caelestia shell drawers toggle launcher"]; # "$mainMod, c" = ["exec, caelestia clipboard"]; "$mainMod SHIFT, l" = ["exec, caelestia shell lock lock"]; @@ -318,10 +308,10 @@ in # as nixosConfig won't be available otherwise. xdg = { enable = true; # This only does xdg path management - mime.enable = nixosConfig.modules.mime.enable; + mime.enable = nixosConfig.systemmodules.mime.enable; mimeApps = { - enable = nixosConfig.modules.mime.enable; + enable = nixosConfig.systemmodules.mime.enable; associations.added = nixosConfig.xdg.mime.addedAssociations; associations.removed = nixosConfig.xdg.mime.removedAssociations; @@ -392,7 +382,7 @@ in config.lib.file.mkOutOfStoreSymlink nixosConfig.sops.templates."nix.conf".path; } - (lib.mkIf nixosConfig.modules.desktopportal.termfilechooser.enable { + (lib.mkIf nixosConfig.systemmodules.desktopportal.termfilechooser.enable { ".config/xdg-desktop-portal-termfilechooser/config".text = '' [filechooser] cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh @@ -402,7 +392,7 @@ in save_mode = last ''; }) - (lib.mkIf config.modules.git.enable { + (lib.mkIf config.homemodules.git.enable { ".ssh/allowed_signers".text = "* ${publicKeys.${username}.ssh}"; }) (lib.mkIf config.programs.navi.enable { @@ -649,7 +639,7 @@ in eza = { enable = true; - enableFishIntegration = config.modules.fish.enable; + enableFishIntegration = config.homemodules.fish.enable; }; # TODO: Module @@ -806,7 +796,7 @@ in fzf = { enable = true; - enableFishIntegration = config.modules.fish.enable; + enableFishIntegration = config.homemodules.fish.enable; }; imv = { @@ -824,7 +814,7 @@ in keychain = { enable = true; - enableFishIntegration = config.modules.fish.enable; + enableFishIntegration = config.homemodules.fish.enable; enableXsessionIntegration = !headless; keys = ["id_ed25519"]; }; @@ -838,12 +828,12 @@ in navi = { enable = true; - enableFishIntegration = config.modules.fish.enable; + enableFishIntegration = config.homemodules.fish.enable; }; nix-index = { enable = true; - enableFishIntegration = config.modules.fish.enable; + enableFishIntegration = config.homemodules.fish.enable; }; nushell.enable = false; @@ -935,7 +925,7 @@ in zoxide = { enable = true; - enableFishIntegration = config.modules.fish.enable; + enableFishIntegration = config.homemodules.fish.enable; }; }; diff --git a/home/christoph/nixinator/default.nix b/home/christoph/nixinator/default.nix index 33e6f46f..46695203 100644 --- a/home/christoph/nixinator/default.nix +++ b/home/christoph/nixinator/default.nix @@ -8,12 +8,8 @@ username, ... }: { - imports = [ - ../../modules - ]; - config = { - modules = { + homemodules = { btop.cuda = true; # This has been relocated here from the default config, diff --git a/home/christoph/nixtop/default.nix b/home/christoph/nixtop/default.nix index f4662b81..9057b6a8 100644 --- a/home/christoph/nixtop/default.nix +++ b/home/christoph/nixtop/default.nix @@ -1,11 +1,7 @@ # Here goes the stuff that will only be enabled on the laptop {...}: { - imports = [ - ../../modules - ]; - config = { - modules = { + homemodules = { hyprland = { keyboard = { layout = "us"; diff --git a/home/christoph/servenix/default.nix b/home/christoph/servenix/default.nix index 99f4a6fc..aa7cbeda 100644 --- a/home/christoph/servenix/default.nix +++ b/home/christoph/servenix/default.nix @@ -6,12 +6,8 @@ username, ... }: { - imports = [ - ../../modules - ]; - config = { - modules = { + homemodules = { btop.cuda = true; }; diff --git a/home/christoph/thinknix/default.nix b/home/christoph/thinknix/default.nix index 42750a44..2bb04215 100644 --- a/home/christoph/thinknix/default.nix +++ b/home/christoph/thinknix/default.nix @@ -6,10 +6,6 @@ username, ... }: { - imports = [ - ../../modules - ]; - config = { home.packages = with pkgs; [ docker-compose diff --git a/home/homemodules/0_template/default.nix b/home/homemodules/0_template/default.nix index 8b27a6a7..9a1f1bd8 100644 --- a/home/homemodules/0_template/default.nix +++ b/home/homemodules/0_template/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) TEMPLATE color; + inherit (config.homemodules) TEMPLATE color; in { - options.modules.TEMPLATE = import ./options.nix {inherit lib mylib;}; + options.homemodules.TEMPLATE = import ./options.nix {inherit lib mylib;}; config = lib.mkIf TEMPLATE.enable {}; } diff --git a/home/homemodules/1_deprecated/ags/default.nix b/home/homemodules/1_deprecated/ags/default.nix index 65963bc8..fb471daa 100644 --- a/home/homemodules/1_deprecated/ags/default.nix +++ b/home/homemodules/1_deprecated/ags/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) ags; + inherit (config.homemodules) ags; in { - options.modules.ags = import ./options.nix {inherit lib mylib;}; + options.homemodules.ags = import ./options.nix {inherit lib mylib;}; config = lib.mkIf ags.enable { programs.ags = { @@ -68,7 +68,7 @@ in { # ".config/ags".source = config.lib.file.mkOutOfStoreSymlink "${config.paths.nixflake}/home/modules/ags/config"; # NOTE: Don't symlink to ~/.config/ags/colors.scss, since that is already used by configDir - ".config/_colors.scss".text = with config.modules.color.hex; '' + ".config/_colors.scss".text = with config.homemodules.color.hex; '' $dark-rosewater: #${dark.rosewater}; $dark-flamingo: #${dark.flamingo}; $dark-pink: #${dark.pink}; diff --git a/home/homemodules/1_deprecated/alacritty/default.nix b/home/homemodules/1_deprecated/alacritty/default.nix index d247b7d4..184c0a69 100644 --- a/home/homemodules/1_deprecated/alacritty/default.nix +++ b/home/homemodules/1_deprecated/alacritty/default.nix @@ -5,9 +5,9 @@ ... }: with mylib.modules; let - cfg = config.modules.alacritty; + cfg = config.homemodules.alacritty; in { - options.modules.alacritty = import ./options.nix {inherit lib mylib;}; + options.homemodules.alacritty = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { programs.alacritty = { diff --git a/home/homemodules/1_deprecated/audio/default.nix b/home/homemodules/1_deprecated/audio/default.nix index 58d58828..b81b08d4 100644 --- a/home/homemodules/1_deprecated/audio/default.nix +++ b/home/homemodules/1_deprecated/audio/default.nix @@ -8,14 +8,14 @@ }: with lib; with mylib.modules; let - cfg = config.modules.audio; - cfgfp = config.modules.flatpak; + cfg = config.homemodules.audio; + cfgfp = config.homemodules.flatpak; in { imports = [ ../flatpak ]; - options.modules.audio = import ./options.nix {inherit lib mylib;}; + options.homemodules.audio = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { assertions = [ diff --git a/home/homemodules/1_deprecated/emacs/default.nix b/home/homemodules/1_deprecated/emacs/default.nix index 2bf65f2c..9ea3f936 100644 --- a/home/homemodules/1_deprecated/emacs/default.nix +++ b/home/homemodules/1_deprecated/emacs/default.nix @@ -12,13 +12,13 @@ with lib; with mylib.modules; let # This is the current state of the option that this module defines # We use it to determine if the config should be changed below - cfg = config.modules.emacs; + cfg = config.homemodules.emacs; in { imports = []; # Options is a vector of options this module defines # This module defines only the "emacs" option and suboptions "enable" and "doom" - options.modules.emacs = import ./options.nix {inherit lib mylib;}; + options.homemodules.emacs = import ./options.nix {inherit lib mylib;}; # Config is the merged set of all module configurations # Here we define what happens to the config if the module is active (but only if the module is active) diff --git a/home/homemodules/1_deprecated/email/default.nix b/home/homemodules/1_deprecated/email/default.nix index bbaf69b2..c72ff5cb 100644 --- a/home/homemodules/1_deprecated/email/default.nix +++ b/home/homemodules/1_deprecated/email/default.nix @@ -13,9 +13,9 @@ }: with lib; with mylib.modules; let - cfg = config.modules.email; + cfg = config.homemodules.email; in { - options.modules.email = import ./options.nix {inherit lib mylib;}; + options.homemodules.email = import ./options.nix {inherit lib mylib;}; # TODO: Add Maildir to nextcloud sync config = mkIf cfg.enable { diff --git a/home/homemodules/1_deprecated/flatpak/default.nix b/home/homemodules/1_deprecated/flatpak/default.nix index fcc04680..dfa2f71a 100644 --- a/home/homemodules/1_deprecated/flatpak/default.nix +++ b/home/homemodules/1_deprecated/flatpak/default.nix @@ -12,9 +12,9 @@ with mylib.modules; # It is important that every flatpak interaction is handled through this module # to prevent that anything is removed by a module although it is required by another one let - cfg = config.modules.flatpak; + cfg = config.homemodules.flatpak; in { - options.modules.flatpak = import ./options.nix {inherit lib mylib;}; + options.homemodules.flatpak = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { assertions = [ diff --git a/home/homemodules/1_deprecated/gaming/default.nix b/home/homemodules/1_deprecated/gaming/default.nix index 1aa738b2..d40f2e24 100644 --- a/home/homemodules/1_deprecated/gaming/default.nix +++ b/home/homemodules/1_deprecated/gaming/default.nix @@ -7,11 +7,11 @@ }: with lib; with mylib.modules; let - cfg = config.modules.gaming; - cfgfp = config.modules.flatpak; + cfg = config.homemodules.gaming; + cfgfp = config.homemodules.flatpak; in { imports = [ - # NOTE: I don't know if this is the right approach or if I should use config.modules.flatpak + # NOTE: I don't know if this is the right approach or if I should use config.homemodules.flatpak ../flatpak ]; @@ -19,7 +19,7 @@ in { # TODO: SteamTinkerLaunch option # TODO: Dolphin + SteamRomManager option - options.modules.gaming = import ./options.nix {inherit lib mylib;}; + options.homemodules.gaming = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { assertions = [ diff --git a/home/homemodules/1_deprecated/helix/default.nix b/home/homemodules/1_deprecated/helix/default.nix index cd98702c..339fc1a6 100644 --- a/home/homemodules/1_deprecated/helix/default.nix +++ b/home/homemodules/1_deprecated/helix/default.nix @@ -10,9 +10,9 @@ }: with lib; with mylib.modules; let - cfg = config.modules.helix; + cfg = config.homemodules.helix; in { - options.modules.helix = import ./options.nix {inherit lib mylib;}; + options.homemodules.helix = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { home.sessionVariables = { diff --git a/home/homemodules/1_deprecated/misc/default.nix b/home/homemodules/1_deprecated/misc/default.nix index 494c55b8..70740468 100644 --- a/home/homemodules/1_deprecated/misc/default.nix +++ b/home/homemodules/1_deprecated/misc/default.nix @@ -9,9 +9,9 @@ # TODO: Remove this module, put protonmail into the email module with lib; with mylib.modules; let - cfg = config.modules.misc; + cfg = config.homemodules.misc; in { - options.modules.misc = import ./options.nix {inherit lib mylib;}; + options.homemodules.misc = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { home.packages = with pkgs; diff --git a/home/homemodules/1_deprecated/nextcloud/default.nix b/home/homemodules/1_deprecated/nextcloud/default.nix index 1bbeea6b..9292b926 100644 --- a/home/homemodules/1_deprecated/nextcloud/default.nix +++ b/home/homemodules/1_deprecated/nextcloud/default.nix @@ -12,9 +12,9 @@ }: with lib; with mylib.modules; let - cfg = config.modules.nextcloud; + cfg = config.homemodules.nextcloud; in { - options.modules.nextcloud = import ./options.nix {inherit lib mylib;}; + options.homemodules.nextcloud = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { assertions = [ diff --git a/home/homemodules/1_deprecated/ranger/default.nix b/home/homemodules/1_deprecated/ranger/default.nix index abf05f6b..a4119818 100644 --- a/home/homemodules/1_deprecated/ranger/default.nix +++ b/home/homemodules/1_deprecated/ranger/default.nix @@ -8,9 +8,9 @@ }: with lib; with mylib.modules; let - cfg = config.modules.ranger; + cfg = config.homemodules.ranger; in { - options.modules.ranger = import ./options.nix {inherit lib mylib;}; + options.homemodules.ranger = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { home.packages = with pkgs; diff --git a/home/homemodules/1_deprecated/vscode/default.nix b/home/homemodules/1_deprecated/vscode/default.nix index 18459045..7de4a674 100644 --- a/home/homemodules/1_deprecated/vscode/default.nix +++ b/home/homemodules/1_deprecated/vscode/default.nix @@ -9,9 +9,9 @@ }: with lib; with mylib.modules; let - cfg = config.modules.vscode; + cfg = config.homemodules.vscode; in { - options.modules.vscode = import ./options.nix {inherit lib mylib;}; + options.homemodules.vscode = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { programs.vscode = { diff --git a/home/homemodules/beets/default.nix b/home/homemodules/beets/default.nix index 4f07bb99..9be51f80 100644 --- a/home/homemodules/beets/default.nix +++ b/home/homemodules/beets/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) beets; + inherit (config.homemodules) beets; in { - options.modules.beets = import ./options.nix {inherit lib mylib;}; + options.homemodules.beets = import ./options.nix {inherit lib mylib;}; config = lib.mkIf beets.enable { programs.beets = { diff --git a/home/homemodules/btop/default.nix b/home/homemodules/btop/default.nix index 0000ba3c..fc97d1f8 100644 --- a/home/homemodules/btop/default.nix +++ b/home/homemodules/btop/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) btop color; + inherit (config.homemodules) btop color; in { - options.modules.btop = import ./options.nix {inherit lib mylib;}; + options.homemodules.btop = import ./options.nix {inherit lib mylib;}; config = lib.mkIf btop.enable { programs.btop = { diff --git a/home/homemodules/chromium/default.nix b/home/homemodules/chromium/default.nix index 5f89779d..383eccfa 100644 --- a/home/homemodules/chromium/default.nix +++ b/home/homemodules/chromium/default.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - inherit (config.modules) chromium; + inherit (config.homemodules) chromium; in { - options.modules.chromium = import ./options.nix {inherit lib mylib;}; + options.homemodules.chromium = import ./options.nix {inherit lib mylib;}; config = lib.mkIf chromium.enable { home.packages = with pkgs; diff --git a/home/homemodules/color/default.nix b/home/homemodules/color/default.nix index 1aedd3aa..85d4cfd9 100644 --- a/home/homemodules/color/default.nix +++ b/home/homemodules/color/default.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - inherit (config.modules) color; + inherit (config.homemodules) color; in { - options.modules.color = import ./options.nix {inherit lib mylib pkgs;}; + options.homemodules.color = import ./options.nix {inherit lib mylib pkgs;}; config = { home.packages = let @@ -59,7 +59,7 @@ in { ++ (lib.optionals color.installPackages color.extraPackages); # This module sets its own options to the values specified in a colorscheme file. - modules.color = let + homemodules.color = let scheme = import ./schemes/${color.scheme}.nix; # Add the aliases diff --git a/home/homemodules/docs/default.nix b/home/homemodules/docs/default.nix index a8834f2b..d7636829 100644 --- a/home/homemodules/docs/default.nix +++ b/home/homemodules/docs/default.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - inherit (config.modules) docs; + inherit (config.homemodules) docs; in { - options.modules.docs = import ./options.nix {inherit lib mylib;}; + options.homemodules.docs = import ./options.nix {inherit lib mylib;}; config = lib.mkIf docs.enable { home = { diff --git a/home/homemodules/fcitx/default.nix b/home/homemodules/fcitx/default.nix index 7236851b..93946e80 100644 --- a/home/homemodules/fcitx/default.nix +++ b/home/homemodules/fcitx/default.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - inherit (config.modules) fcitx; + inherit (config.homemodules) fcitx; in { - options.modules.fcitx = import ./options.nix {inherit lib mylib;}; + options.homemodules.fcitx = import ./options.nix {inherit lib mylib;}; config = lib.mkIf fcitx.enable { i18n.inputMethod = { diff --git a/home/homemodules/firefox/default.nix b/home/homemodules/firefox/default.nix index 111feb9b..fc61aa6e 100644 --- a/home/homemodules/firefox/default.nix +++ b/home/homemodules/firefox/default.nix @@ -6,9 +6,9 @@ hostname, ... }: let - inherit (config.modules) firefox color; + inherit (config.homemodules) firefox color; in { - options.modules.firefox = import ./options.nix {inherit lib mylib;}; + options.homemodules.firefox = import ./options.nix {inherit lib mylib;}; config = lib.mkIf firefox.enable { textfox = { diff --git a/home/homemodules/fish/default.nix b/home/homemodules/fish/default.nix index ae980bd6..94140bf8 100644 --- a/home/homemodules/fish/default.nix +++ b/home/homemodules/fish/default.nix @@ -7,9 +7,9 @@ nixosConfig, ... }: let - inherit (config.modules) fish color; + inherit (config.homemodules) fish color; in { - options.modules.fish = import ./options.nix {inherit lib mylib;}; + options.homemodules.fish = import ./options.nix {inherit lib mylib;}; config = lib.mkIf fish.enable { # https://github.com/catppuccin/fish/blob/main/themes/Catppuccin%20Mocha.theme @@ -47,7 +47,7 @@ in { generateCompletions = nixosConfig.programs.fish.generateCompletions; functions = lib.mergeAttrsList [ - (lib.optionalAttrs config.modules.nnn.enable { + (lib.optionalAttrs config.homemodules.nnn.enable { nnncd = { wraps = "nnn"; description = "support nnn quit and change directory"; @@ -101,7 +101,7 @@ in { # Same as above but with args for bat batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args)); - # These can be used for my config.modules and for HM config.programs, + # These can be used for my config.homemodules and for HM config.programs, # as both of these add the package to home.packages hasHomePackage = package: (mylib.modules.contains config.home.packages package); @@ -167,15 +167,15 @@ in { gcl = "git clone"; }) - (lib.optionalAttrs config.modules.kitty.enable {ssh = "kitty +kitten ssh";}) + (lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";}) (abbrify pkgs.lazygit {lg = "lazygit";}) (abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";}) # Doesn't work with abbrify because I have nnn.override... - (lib.optionalAttrs config.modules.nnn.enable {n = "nnncd -a";}) - (lib.optionalAttrs config.modules.nnn.enable {np = "nnncd -a -P p";}) + (lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";}) + (lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";}) (abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";}) @@ -184,7 +184,7 @@ in { # grep = rg; }) - (lib.optionalAttrs config.modules.rmpc.enable {r = "rcmp";}) + (lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";}) (abbrify pkgs.rsync rec { rsync = "rsync -ahv --inplace --partial --info=progress2"; @@ -197,7 +197,7 @@ in { programs.starship = { enable = true; - enableFishIntegration = config.modules.fish.enable; + enableFishIntegration = config.homemodules.fish.enable; settings = { # Other config here format = "$all"; # Remove this line to disable the default prompt format diff --git a/home/homemodules/git/default.nix b/home/homemodules/git/default.nix index b8b36e16..70c168eb 100644 --- a/home/homemodules/git/default.nix +++ b/home/homemodules/git/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) git; + inherit (config.homemodules) git; in { - options.modules.git = import ./options.nix {inherit lib mylib;}; + options.homemodules.git = import ./options.nix {inherit lib mylib;}; config = lib.mkIf git.enable { programs.diff-so-fancy = { diff --git a/home/homemodules/hyprland/default.nix b/home/homemodules/hyprland/default.nix index 2809f653..e61d2a01 100644 --- a/home/homemodules/hyprland/default.nix +++ b/home/homemodules/hyprland/default.nix @@ -8,7 +8,7 @@ username, ... }: let - inherit (config.modules) hyprland color; + inherit (config.homemodules) hyprland color; # Autostart programs always-exec = import ./autostart.nix {inherit lib pkgs config hyprland;}; @@ -22,7 +22,7 @@ "$mainMod, mouse:273" = ["resizewindow"]; }; in { - options.modules.hyprland = import ./options.nix {inherit lib mylib;}; + options.homemodules.hyprland = import ./options.nix {inherit lib mylib;}; config = lib.mkIf hyprland.enable { assertions = [ @@ -46,7 +46,7 @@ in { iconTheme.name = color.iconTheme; }; - modules = { + homemodules = { hyprpanel.enable = hyprland.hyprpanel.enable; }; diff --git a/home/homemodules/hyprland/dunst.nix b/home/homemodules/hyprland/dunst.nix index ec5021ab..2bd9656c 100644 --- a/home/homemodules/hyprland/dunst.nix +++ b/home/homemodules/hyprland/dunst.nix @@ -11,7 +11,7 @@ settings = { global = { - monitor = config.modules.waybar.monitor; + monitor = config.homemodules.waybar.monitor; font = "${color.font} 11"; offset = "10x10"; background = color.hexS.base; diff --git a/home/homemodules/hyprpanel/default.nix b/home/homemodules/hyprpanel/default.nix index c2e976b3..821db704 100644 --- a/home/homemodules/hyprpanel/default.nix +++ b/home/homemodules/hyprpanel/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) hyprpanel color; + inherit (config.homemodules) hyprpanel color; in { - options.modules.hyprpanel = import ./options.nix {inherit lib mylib;}; + options.homemodules.hyprpanel = import ./options.nix {inherit lib mylib;}; config = lib.mkIf hyprpanel.enable { programs.hyprpanel = { diff --git a/home/homemodules/kitty/default.nix b/home/homemodules/kitty/default.nix index cff0ad29..688bdb2c 100644 --- a/home/homemodules/kitty/default.nix +++ b/home/homemodules/kitty/default.nix @@ -5,9 +5,9 @@ mylib, ... }: let - inherit (config.modules) kitty color; + inherit (config.homemodules) kitty color; in { - options.modules.kitty = import ./options.nix {inherit lib mylib;}; + options.homemodules.kitty = import ./options.nix {inherit lib mylib;}; config = lib.mkIf kitty.enable { programs.kitty = { @@ -15,7 +15,7 @@ in { shellIntegration.enableFishIntegration = true; font = { - name = "${config.modules.color.font}"; + name = "${config.homemodules.color.font}"; size = 12; }; diff --git a/home/homemodules/lazygit/default.nix b/home/homemodules/lazygit/default.nix index 516c6df6..2ad888d9 100644 --- a/home/homemodules/lazygit/default.nix +++ b/home/homemodules/lazygit/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) lazygit color; + inherit (config.homemodules) lazygit color; in { - options.modules.lazygit = import ./options.nix {inherit lib mylib;}; + options.homemodules.lazygit = import ./options.nix {inherit lib mylib;}; config = lib.mkIf lazygit.enable { programs.lazygit = { diff --git a/home/homemodules/mpd/default.nix b/home/homemodules/mpd/default.nix index c64b89bd..c8b7577f 100644 --- a/home/homemodules/mpd/default.nix +++ b/home/homemodules/mpd/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) mpd; + inherit (config.homemodules) mpd; in { - options.modules.mpd = import ./options.nix {inherit lib mylib;}; + options.homemodules.mpd = import ./options.nix {inherit lib mylib;}; config = lib.mkIf mpd.enable { services = { diff --git a/home/homemodules/neovim/default.nix b/home/homemodules/neovim/default.nix index f8a3e7f8..d2a22eb0 100644 --- a/home/homemodules/neovim/default.nix +++ b/home/homemodules/neovim/default.nix @@ -10,9 +10,9 @@ pkgs, ... }: let - inherit (config.modules) neovim color; + inherit (config.homemodules) neovim color; in { - options.modules.neovim = import ./options.nix {inherit lib mylib;}; + options.homemodules.neovim = import ./options.nix {inherit lib mylib;}; config = lib.mkIf neovim.enable { home = { diff --git a/home/homemodules/niri/default.nix b/home/homemodules/niri/default.nix index f632cb18..7e6d8043 100644 --- a/home/homemodules/niri/default.nix +++ b/home/homemodules/niri/default.nix @@ -7,9 +7,9 @@ pkgs, ... }: let - inherit (config.modules) niri color; + inherit (config.homemodules) niri color; in { - options.modules.niri = import ./options.nix {inherit lib mylib;}; + options.homemodules.niri = import ./options.nix {inherit lib mylib;}; config = lib.mkIf niri.enable rec { assertions = [ diff --git a/home/homemodules/nnn/default.nix b/home/homemodules/nnn/default.nix index 6045ac2b..c4e79f8f 100644 --- a/home/homemodules/nnn/default.nix +++ b/home/homemodules/nnn/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) nnn; + inherit (config.homemodules) nnn; in { - options.modules.nnn = import ./options.nix {inherit lib mylib;}; + options.homemodules.nnn = import ./options.nix {inherit lib mylib;}; config = lib.mkIf nnn.enable { home.sessionVariables = { diff --git a/home/homemodules/qutebrowser/default.nix b/home/homemodules/qutebrowser/default.nix index 237f94b6..d361ff41 100644 --- a/home/homemodules/qutebrowser/default.nix +++ b/home/homemodules/qutebrowser/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) qutebrowser color; + inherit (config.homemodules) qutebrowser color; in { - options.modules.qutebrowser = import ./options.nix {inherit lib mylib;}; + options.homemodules.qutebrowser = import ./options.nix {inherit lib mylib;}; config = lib.mkIf qutebrowser.enable { programs.qutebrowser = { diff --git a/home/homemodules/rmpc/default.nix b/home/homemodules/rmpc/default.nix index be0cd34d..7d86f3be 100644 --- a/home/homemodules/rmpc/default.nix +++ b/home/homemodules/rmpc/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) rmpc color; + inherit (config.homemodules) rmpc color; in { - options.modules.rmpc = import ./options.nix {inherit lib mylib;}; + options.homemodules.rmpc = import ./options.nix {inherit lib mylib;}; config = lib.mkIf rmpc.enable { assertions = [ diff --git a/home/homemodules/rofi/default.nix b/home/homemodules/rofi/default.nix index 3eb027aa..631dd468 100644 --- a/home/homemodules/rofi/default.nix +++ b/home/homemodules/rofi/default.nix @@ -8,9 +8,9 @@ pkgs, ... }: let - inherit (config.modules) rofi color; + inherit (config.homemodules) rofi color; in { - options.modules.rofi = import ./options.nix {inherit lib mylib;}; + options.homemodules.rofi = import ./options.nix {inherit lib mylib;}; config = lib.mkIf rofi.enable { programs.rofi = { @@ -137,7 +137,7 @@ in { }; }; - modules.hyprland.keybindings = let + homemodules.hyprland.keybindings = let vpn-menu = pkgs.writeScriptBin "rofi-menu-vpn" @@ -177,7 +177,7 @@ in { |> builtins.concatStringsSep " && "; }; - monitors = builtins.attrNames config.modules.hyprland.monitors; + monitors = builtins.attrNames config.homemodules.hyprland.monitors; in mylib.rofi.mkSimpleMenu "wall" @@ -185,7 +185,7 @@ in { |> builtins.map (setWallpaperOnMonitors monitors) |> lib.mergeAttrsList); in - lib.mkIf (!config.modules.hyprland.caelestia.enable) { + lib.mkIf (!config.homemodules.hyprland.caelestia.enable) { bindings = lib.mergeAttrsList [ { "$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""]; @@ -193,7 +193,7 @@ in { "$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""]; # "$mainMod, o" = ["exec, \"${lectures-menu}\""]; } - (lib.optionalAttrs (!nixosConfig.modules.network.useNetworkManager) { + (lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) { "$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""]; }) ]; diff --git a/home/homemodules/waybar/default.nix b/home/homemodules/waybar/default.nix index 9fcfc6f6..afd33e2f 100644 --- a/home/homemodules/waybar/default.nix +++ b/home/homemodules/waybar/default.nix @@ -4,9 +4,9 @@ mylib, ... }: let - inherit (config.modules) color waybar; + inherit (config.homemodules) color waybar; in { - options.modules.waybar = import ./options.nix {inherit lib mylib;}; + options.homemodules.waybar = import ./options.nix {inherit lib mylib;}; config = lib.mkIf waybar.enable { programs.waybar = { diff --git a/home/homemodules/yazi/default.nix b/home/homemodules/yazi/default.nix index ada197d4..abe3e177 100644 --- a/home/homemodules/yazi/default.nix +++ b/home/homemodules/yazi/default.nix @@ -6,14 +6,14 @@ pkgs, ... }: let - inherit (config.modules) yazi color; + inherit (config.homemodules) yazi color; in { - options.modules.yazi = import ./options.nix {inherit lib mylib;}; + options.homemodules.yazi = import ./options.nix {inherit lib mylib;}; config = lib.mkIf yazi.enable { programs.yazi = { enable = true; - enableFishIntegration = config.modules.fish.enable; + enableFishIntegration = config.homemodules.fish.enable; shellWrapperName = "y"; plugins = { diff --git a/home/homemodules/yazi/specialFiletypes.nix b/home/homemodules/yazi/specialFiletypes.nix index 3d4d8ffb..f7980ff3 100644 --- a/home/homemodules/yazi/specialFiletypes.nix +++ b/home/homemodules/yazi/specialFiletypes.nix @@ -20,8 +20,8 @@ in (mkMime color.hexS.green "application/pdf") ] - (mkMimes color.hexS.text nixosConfig.modules.mime.textTypes) - (mkMimes color.hexS.teal nixosConfig.modules.mime.imageTypes) - (mkMimes color.hexS.yellow nixosConfig.modules.mime.videoTypes) - (mkMimes color.hexS.sky nixosConfig.modules.mime.audioTypes) + (mkMimes color.hexS.text nixosconfig.homemodules.mime.textTypes) + (mkMimes color.hexS.teal nixosconfig.homemodules.mime.imageTypes) + (mkMimes color.hexS.yellow nixosconfig.homemodules.mime.videoTypes) + (mkMimes color.hexS.sky nixosconfig.homemodules.mime.audioTypes) ] diff --git a/home/homemodules/zathura/default.nix b/home/homemodules/zathura/default.nix index 409d6d64..c025952b 100644 --- a/home/homemodules/zathura/default.nix +++ b/home/homemodules/zathura/default.nix @@ -4,9 +4,9 @@ mylib, ... }: let - inherit (config.modules) zathura color; + inherit (config.homemodules) zathura color; in { - options.modules.zathura = import ./options.nix {inherit lib mylib;}; + options.homemodules.zathura = import ./options.nix {inherit lib mylib;}; config = lib.mkIf zathura.enable { programs.zathura = { diff --git a/lib/nixos.nix b/lib/nixos.nix index 7a27d9a8..4bb8e484 100644 --- a/lib/nixos.nix +++ b/lib/nixos.nix @@ -29,6 +29,13 @@ # Import the toplevel system configuration module. ../system + ../system/cachix.nix + + # Host specific configuration + ../system/${hostname} + + # Import all of my custom system modules + ../system/systemmodules ] extraModules @@ -51,8 +58,22 @@ # to /etc/profiles instead of ~/.nix-profile. useUserPackages = true; - # Import the user-specific HM toplevel module. - users.${username}.imports = [../home/${username}]; + users.${username}.imports = [ + # Import the user-specific HM toplevel module. + # It will be merged with the main config (like all different modules). + # Settings regarding a specific host (e.g. desktop or laptop) + # should only be made in the host-specific config. + ../home/${username} + + # Host specific configuration + ../home/${username}/${hostname} + ]; + + sharedModules = [ + # Import all of my custom HM modules. + # Putting them into sharedModules enables correct nixd completions. + ../home/homemodules + ]; }; } ] diff --git a/system/default.nix b/system/default.nix index fcd951c7..a1422be2 100644 --- a/system/default.nix +++ b/system/default.nix @@ -11,17 +11,7 @@ ... }: with mylib.networking; { - imports = [ - # Import my system modules - ./modules - - # Import the host-specific system config - ./${hostname} - - ./cachix.nix - ]; - - modules = { + systemmodules = { bootloader = { enable = true; @@ -234,7 +224,7 @@ with mylib.networking; { # 6 Cyan 14 Cyan # 7 White 15 White colors = let - color = config.home-manager.users.${username}.modules.color; + color = config.home-manager.users.${username}.homemodules.color; in [ # 0 - 7 "000000" # Dark black diff --git a/system/nixinator/default.nix b/system/nixinator/default.nix index 50b98543..501e459c 100644 --- a/system/nixinator/default.nix +++ b/system/nixinator/default.nix @@ -11,13 +11,11 @@ ./hardware-configuration.nix ./disks.nix - ../modules - # General services ../services/fileflows-node.nix ]; - modules = { + systemmodules = { bootloader = { # Secure boot loader = "lanzaboote"; diff --git a/system/nixtop/default.nix b/system/nixtop/default.nix index 53594c91..39f9ca4a 100644 --- a/system/nixtop/default.nix +++ b/system/nixtop/default.nix @@ -2,10 +2,9 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - ../modules ]; - modules = { + systemmodules = { network = { useNetworkManager = true; diff --git a/system/servenix/default.nix b/system/servenix/default.nix index 4d6fb3f5..e7f8b4ab 100644 --- a/system/servenix/default.nix +++ b/system/servenix/default.nix @@ -14,8 +14,6 @@ # Include the results of the hardware scan. ./hardware-configuration.nix - ../modules - # My own services ../services/heidi.nix ../services/formula10.nix @@ -47,7 +45,7 @@ ../services/whats-up-docker.nix ]; - modules = { + systemmodules = { docker.networks = [ { name = "behind-nginx"; diff --git a/system/systemmodules/0_template/default.nix b/system/systemmodules/0_template/default.nix index 2029fece..b3acee87 100644 --- a/system/systemmodules/0_template/default.nix +++ b/system/systemmodules/0_template/default.nix @@ -4,9 +4,9 @@ mylib, ... }: let - inherit (config.modules) TEMPLATE; + inherit (config.systemmodules) TEMPLATE; in { - options.modules.TEMPLATE = import ./options.nix {inherit lib mylib;}; + options.systemmodules.TEMPLATE = import ./options.nix {inherit lib mylib;}; config = lib.mkIf TEMPLATE.enable { diff --git a/system/systemmodules/1_deprecated/agenix/default.nix b/system/systemmodules/1_deprecated/agenix/default.nix index d2d547b6..d3e9adf6 100644 --- a/system/systemmodules/1_deprecated/agenix/default.nix +++ b/system/systemmodules/1_deprecated/agenix/default.nix @@ -7,9 +7,9 @@ publicKeys, ... }: let - inherit (config.modules) agenix; + inherit (config.systemmodules) agenix; in { - options.modules.agenix = import ./options.nix {inherit lib mylib;}; + options.systemmodules.agenix = import ./options.nix {inherit lib mylib;}; config = { # NOTE: Add below snippet to home/christoph/default.nix to generate the secrets.nix file @@ -23,13 +23,13 @@ in { # { # ${lib.optionalString # # If this user defined any secrets... - # (builtins.hasAttr "${username}" nixosConfig.modules.agenix.secrets) + # (builtins.hasAttr "${username}" nixosconfig.systemmodules.agenix.secrets) # # ...we will add them to the current secrets.nix, # # s.t. agenix can be used to encrypt/access them. # (builtins.concatStringsSep "\n" # (builtins.map # (mkSecret publicKeys.${username}.ssh) - # nixosConfig.modules.agenix.secrets.${username}))} + # nixosconfig.systemmodules.agenix.secrets.${username}))} # } # ''; diff --git a/system/systemmodules/1_deprecated/containers/default.nix b/system/systemmodules/1_deprecated/containers/default.nix index 7e32eb57..5acd50dc 100644 --- a/system/systemmodules/1_deprecated/containers/default.nix +++ b/system/systemmodules/1_deprecated/containers/default.nix @@ -10,9 +10,9 @@ with lib; with mylib.virtualisation; with mylib.modules; let - cfg = config.modules.containers; + cfg = config.systemmodules.containers; in { - options.modules.containers = import ./options.nix {inherit lib mylib;}; + options.systemmodules.containers = import ./options.nix {inherit lib mylib;}; # TODO: These need config options exposed through the module, # e.g. to set paths/volumes/binds differently per system... diff --git a/system/systemmodules/bootloader/default.nix b/system/systemmodules/bootloader/default.nix index 5e7ac3fa..7686b222 100644 --- a/system/systemmodules/bootloader/default.nix +++ b/system/systemmodules/bootloader/default.nix @@ -5,9 +5,9 @@ mylib, ... }: let - inherit (config.modules) bootloader; + inherit (config.systemmodules) bootloader; in { - options.modules.bootloader = import ./options.nix {inherit lib mylib;}; + options.systemmodules.bootloader = import ./options.nix {inherit lib mylib;}; config = lib.mkIf bootloader.enable (lib.mkMerge [ { diff --git a/system/systemmodules/desktopportal/default.nix b/system/systemmodules/desktopportal/default.nix index 6780d959..efb572e1 100644 --- a/system/systemmodules/desktopportal/default.nix +++ b/system/systemmodules/desktopportal/default.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - inherit (config.modules) desktopportal; + inherit (config.systemmodules) desktopportal; in { - options.modules.desktopportal = import ./options.nix {inherit lib mylib;}; + options.systemmodules.desktopportal = import ./options.nix {inherit lib mylib;}; config = lib.mkIf desktopportal.enable { xdg = { diff --git a/system/systemmodules/docker/default.nix b/system/systemmodules/docker/default.nix index 0806ae21..2eee0736 100644 --- a/system/systemmodules/docker/default.nix +++ b/system/systemmodules/docker/default.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - inherit (config.modules) docker; + inherit (config.systemmodules) docker; in { - options.modules.docker = import ./options.nix {inherit lib mylib;}; + options.systemmodules.docker = import ./options.nix {inherit lib mylib;}; config = lib.mkIf docker.enable { environment.variables = lib.mkMerge [ diff --git a/system/systemmodules/fonts/default.nix b/system/systemmodules/fonts/default.nix index 46ef4794..ef295225 100644 --- a/system/systemmodules/fonts/default.nix +++ b/system/systemmodules/fonts/default.nix @@ -5,9 +5,9 @@ pkgs, ... }: let - inherit (config.modules) fonts; + inherit (config.systemmodules) fonts; in { - options.modules.fonts = import ./options.nix {inherit lib mylib;}; + options.systemmodules.fonts = import ./options.nix {inherit lib mylib;}; config = lib.mkIf fonts.enable { fonts = { diff --git a/system/systemmodules/impermanence/default.nix b/system/systemmodules/impermanence/default.nix index 438d9dce..c1c9f704 100644 --- a/system/systemmodules/impermanence/default.nix +++ b/system/systemmodules/impermanence/default.nix @@ -6,9 +6,9 @@ pkgs, ... }: let - inherit (config.modules) impermanence; + inherit (config.systemmodules) impermanence; in { - options.modules.impermanence = import ./options.nix {inherit lib mylib;}; + options.systemmodules.impermanence = import ./options.nix {inherit lib mylib;}; config = let # NOTE: Setting user/group/mode only has an effect if the diff --git a/system/systemmodules/mime/default.nix b/system/systemmodules/mime/default.nix index d7c4df71..0a5a24a4 100644 --- a/system/systemmodules/mime/default.nix +++ b/system/systemmodules/mime/default.nix @@ -4,9 +4,9 @@ mylib, ... }: let - inherit (config.modules) mime; + inherit (config.systemmodules) mime; in { - options.modules.mime = import ./options.nix {inherit lib mylib;}; + options.systemmodules.mime = import ./options.nix {inherit lib mylib;}; config = lib.mkIf mime.enable { xdg = { diff --git a/system/systemmodules/network/default.nix b/system/systemmodules/network/default.nix index 519a4d14..cd1f0b2c 100644 --- a/system/systemmodules/network/default.nix +++ b/system/systemmodules/network/default.nix @@ -8,9 +8,9 @@ with lib; with mylib.networking; with mylib.modules; let - cfg = config.modules.network; + cfg = config.systemmodules.network; in { - options.modules.network = import ./options.nix {inherit lib mylib;}; + options.systemmodules.network = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { services.resolved = { @@ -59,7 +59,7 @@ in { inherit (cfg) networks; }; - modules.polkit.allowedActions = mkIf cfg.useNetworkManager [ + systemmodules.polkit.allowedActions = mkIf cfg.useNetworkManager [ # List NM permissions by running "nmcli general permissions" "org.freedesktop.NetworkManager.settings.modify.system" ]; diff --git a/system/systemmodules/polkit/default.nix b/system/systemmodules/polkit/default.nix index 808fc8b0..a81dc2d0 100644 --- a/system/systemmodules/polkit/default.nix +++ b/system/systemmodules/polkit/default.nix @@ -7,9 +7,9 @@ }: with lib; with mylib.modules; let - cfg = config.modules.polkit; + cfg = config.systemmodules.polkit; in { - options.modules.polkit = import ./options.nix {inherit lib mylib;}; + options.systemmodules.polkit = import ./options.nix {inherit lib mylib;}; config = mkIf cfg.enable { security.polkit.enable = true; diff --git a/system/systemmodules/sops-nix/default.nix b/system/systemmodules/sops-nix/default.nix index a5da1745..b98c504c 100644 --- a/system/systemmodules/sops-nix/default.nix +++ b/system/systemmodules/sops-nix/default.nix @@ -6,9 +6,9 @@ username, ... }: let - inherit (config.modules) sops-nix; + inherit (config.systemmodules) sops-nix; in { - options.modules.sops-nix = import ./options.nix {inherit lib mylib;}; + options.systemmodules.sops-nix = import ./options.nix {inherit lib mylib;}; config = { environment.systemPackages = with pkgs; [ diff --git a/system/thinknix/default.nix b/system/thinknix/default.nix index 82783468..8394edab 100644 --- a/system/thinknix/default.nix +++ b/system/thinknix/default.nix @@ -14,8 +14,6 @@ # Include the results of the hardware scan. ./hardware-configuration.nix - ../modules - # General services ../services/adguard.nix ../services/nginx-proxy-manager.nix @@ -25,7 +23,7 @@ ../services/whats-up-docker.nix ]; - modules = { + systemmodules = { docker.networks = [ { name = "behind-nginx";