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, ... }: { config, ... }:
{ {
boot.initrd.systemd.services.root-reset = { boot.initrd.systemd.services.root-reset = {
enable = config.environment.persistence."/persist".enable; enable = true;
description = "Create new and snapshot previous root"; description = "Create new and snapshot previous root";
wantedBy = [ "initrd.target" ]; wantedBy = [ "initrd.target" ];
before = [ "sysroot.mount" ]; 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 ]; nix = {
settings = {
options.nixpkgs.allowUnfreePackages = lib.mkOption {
type = with lib.types; listOf str;
};
config = {
nix.settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
"flakes" "flakes"
]; ];
auto-optimise-store = true; auto-optimise-store = true;
}; };
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
_module.args.pkgsUnstable = import unstable { _module.args.pkgsUnstable = import unstable {
inherit (pkgs.stdenv.hostPlatform) system; inherit (pkgs.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config; inherit (config.nixpkgs) config;
}; };
};
} }

View file

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