Delete and merge files

This commit is contained in:
Jimbo 2025-02-28 14:21:00 -05:00
parent 9a8e7d8a9e
commit a7526caec2
4 changed files with 13 additions and 32 deletions

View file

@ -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" ];

View file

@ -1,10 +0,0 @@
{ ... }:
{
services.fail2ban = {
enable = true;
maxretry = 5;
bantime = "10m";
};
environment.persistence."/persist".directories = [ "/var/lib/fail2ban" ];
}

View file

@ -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;
};
}

View file

@ -1,8 +0,0 @@
{ ... }:
{
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
}