diff --git a/system/devices/boot/root-reset/default.nix b/system/devices/boot/root-reset/default.nix index 44d2a1b..c7ac461 100644 --- a/system/devices/boot/root-reset/default.nix +++ b/system/devices/boot/root-reset/default.nix @@ -1,7 +1,7 @@ { config, ... }: { boot.initrd.systemd.services.root-reset = { - enable = config.environment.persistence."/persist".enable; + enable = true; description = "Create new and snapshot previous root"; wantedBy = [ "initrd.target" ]; before = [ "sysroot.mount" ]; diff --git a/system/services/general/ssh/fail2ban/default.nix b/system/services/general/ssh/fail2ban/default.nix deleted file mode 100644 index acc00f8..0000000 --- a/system/services/general/ssh/fail2ban/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: -{ - services.fail2ban = { - enable = true; - maxretry = 5; - bantime = "10m"; - }; - - environment.persistence."/persist".directories = [ "/var/lib/fail2ban" ]; -} diff --git a/system/settings/nix/default.nix b/system/settings/nix/default.nix index 54b369f..797b821 100644 --- a/system/settings/nix/default.nix +++ b/system/settings/nix/default.nix @@ -1,23 +1,22 @@ -{ config, lib, pkgs, unstable, ... }: +{ config, pkgs, unstable, ... }: { - imports = [ ./gc ]; - - options.nixpkgs.allowUnfreePackages = lib.mkOption { - type = with lib.types; listOf str; - }; - - config = { - nix.settings = { + nix = { + settings = { experimental-features = [ "nix-command" "flakes" ]; auto-optimise-store = true; }; - - _module.args.pkgsUnstable = import unstable { - inherit (pkgs.stdenv.hostPlatform) system; - inherit (config.nixpkgs) config; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 7d"; }; }; + + _module.args.pkgsUnstable = import unstable { + inherit (pkgs.stdenv.hostPlatform) system; + inherit (config.nixpkgs) config; + }; } diff --git a/system/settings/nix/gc/default.nix b/system/settings/nix/gc/default.nix deleted file mode 100644 index 0ec262a..0000000 --- a/system/settings/nix/gc/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: -{ - nix.gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 7d"; - }; -}