From 214aadd33dbeaf48ac931d58db00badcfd3da5b6 Mon Sep 17 00:00:00 2001 From: fruchti Date: Sun, 26 Feb 2023 19:59:32 +0100 Subject: [PATCH] =?UTF-8?q?Move=20several=20options=20to=20a=20=E2=80=98de?= =?UTF-8?q?faults=E2=80=99=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base/default.nix | 1 + base/defaults.nix | 14 ++++++++++++++ base/locale.nix | 2 -- hosts/Rupert.nix | 6 ------ 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 base/defaults.nix diff --git a/base/default.nix b/base/default.nix index 18d8171..82802a5 100644 --- a/base/default.nix +++ b/base/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./defaults.nix ./xkb ./neovim.nix ./packages.nix diff --git a/base/defaults.nix b/base/defaults.nix new file mode 100644 index 0000000..cf70305 --- /dev/null +++ b/base/defaults.nix @@ -0,0 +1,14 @@ +{ lib, ... }: +with lib; +{ + i18n.defaultLocale = mkDefault "en_GB.UTF-8"; + console.keyMap = mkDefault "de"; + services.openssh.enable = mkDefault true; + services.openssh.passwordAuthentication = mkDefault false; + + nix.gc = mkDefault { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; +} diff --git a/base/locale.nix b/base/locale.nix index bd4736d..e90b069 100644 --- a/base/locale.nix +++ b/base/locale.nix @@ -2,9 +2,7 @@ { time.timeZone = "Europe/Berlin"; - i18n.defaultLocale = "en_GB.UTF-8"; console = { font = "Lat2-Terminus16"; - keyMap = "de"; }; } diff --git a/hosts/Rupert.nix b/hosts/Rupert.nix index c223689..04f7885 100644 --- a/hosts/Rupert.nix +++ b/hosts/Rupert.nix @@ -88,12 +88,6 @@ in system.autoUpgrade.sendEmail = true; # systemd.services.nixos-upgrade.onFailure = lib.mkIf config.system.autoUpgrade.enable [ "status-email@%n.service" ]; - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 30d"; - }; - services.btrfsScrub = { enable = true; paths = {