diff --git a/checks/morph/template/configuration.nix b/checks/morph/template/configuration.nix index 561385a3f..133705497 100644 --- a/checks/morph/template/configuration.nix +++ b/checks/morph/template/configuration.nix @@ -8,5 +8,5 @@ (modulesPath + "/profiles/minimal.nix") ]; - clan.core.setDefaults = false; + clan.core.enableRecommendedDefaults = false; } diff --git a/nixosModules/clanCore/defaults.nix b/nixosModules/clanCore/defaults.nix index 97781d729..3472200ea 100644 --- a/nixosModules/clanCore/defaults.nix +++ b/nixosModules/clanCore/defaults.nix @@ -5,12 +5,21 @@ ... }: { - options.clan.core.setDefaults = (lib.mkEnableOption "Clan defaults") // { + options.clan.core.enableRecommendedDefaults = lib.mkOption { + type = lib.types.bool; + description = '' + Whether to enable recommended default settings for NixOS by Clan. + + These settings are entirely optional and are not necessary for using Clan. + + This enables the new systemd in stage-1, disables some options that increase the closure size + and adds some extra packages for debugging like `tcpdump` and `dnsutils`. + ''; default = true; example = false; }; - config = lib.mkIf config.clan.core.setDefaults { + config = lib.mkIf config.clan.core.enableRecommendedDefaults { # Use systemd during boot as well except: # - systems with raids as this currently require manual configuration: https://github.com/NixOS/nixpkgs/issues/210210 # - for containers we currently rely on the `stage-2` init script that sets up our /etc diff --git a/nixosModules/clanCore/networking.nix b/nixosModules/clanCore/networking.nix index dcfb84b66..390e6e9e1 100644 --- a/nixosModules/clanCore/networking.nix +++ b/nixosModules/clanCore/networking.nix @@ -91,7 +91,7 @@ ] ) ]; - config = lib.mkIf config.clan.core.setDefaults { + config = lib.mkIf config.clan.core.enableRecommendedDefaults { # conflicts with systemd-resolved networking.useHostResolvConf = false; diff --git a/nixosModules/clanCore/nix-settings.nix b/nixosModules/clanCore/nix-settings.nix index 2fc906ad3..2cab5e8d3 100644 --- a/nixosModules/clanCore/nix-settings.nix +++ b/nixosModules/clanCore/nix-settings.nix @@ -1,7 +1,7 @@ { lib, config, ... }: # Taken from: # https://github.com/nix-community/srvos/blob/main/nixos/common/nix.nix -lib.mkIf config.clan.core.setDefaults { +lib.mkIf config.clan.core.enableRecommendedDefaults { # Fallback quickly if substituters are not available. nix.settings.connect-timeout = 5;