nixos/clan: rename setDefaults to enableRecommendedDefaults
This commit is contained in:
@@ -8,5 +8,5 @@
|
||||
(modulesPath + "/profiles/minimal.nix")
|
||||
];
|
||||
|
||||
clan.core.setDefaults = false;
|
||||
clan.core.enableRecommendedDefaults = false;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user