Move locutus to root and schedule it

This commit is contained in:
Alexander Wainwright
2025-06-24 21:30:12 +10:00
parent 9739c06ecb
commit 9b2e182a17
3 changed files with 73 additions and 2 deletions

View File

@@ -40,8 +40,6 @@
home.packages = with pkgs; [
inputs.locutus.packages.${pkgs.system}.default
atuin
tmux
wezterm

View File

@@ -79,6 +79,15 @@
#media-session.enable = true;
};
# run locutus every hour
services.cron = {
enable = true;
systemCronJobs = [
"27 * * * * root locutus backup 2>&1 | logger -t locutus-backup"
];
};
services.avahi = {
enable = true;
nssmdns4 = true; # Enables Avahi for name service lookups (e.g., in /etc/nsswitch.conf)
@@ -159,8 +168,12 @@
clang
gnumake
libtool
inputs.locutus.packages.${pkgs.system}.default
];
environment.etc."locutus/locutus.toml".source = ./locutus.toml;
environment.variables.EDITOR = "nvim";
# Some programs need SUID wrappers, can be configured further or are

60
locutus.toml Normal file
View File

@@ -0,0 +1,60 @@
[includes]
paths = [
"/etc",
"/root",
"/srv",
"/var/spool",
"/home"
]
[excludes]
paths = [
"*.bak",
"*.venv",
"*.mypy_cache",
"*/.cache",
"*.config/*Cache/",
"*.config/*cache/",
"*.config/borg/security/",
"*.config/Signal",
"*.config/discord",
"*.config/microsoft-edge",
"*/Cache*",
"*/mnt",
"/home/*/.cache",
"/home/*/.cargo",
"/home/*/.local/*/Trash",
"/home/*/.local/lib",
"/home/*/.local/pipx",
"/home/*/.local/share/atuin",
"/home/*/.local/share/nvim",
"/home/*/.local/share/uv",
"/home/*/.mozilla",
"/home/*/.npm",
"/home/*/CMakeFiles",
"/home/*/Downloads",
"/home/*/downloads",
"/home/*/nextcloud",
"/home/*/snap",
"/home/*/software",
"/home/*/venv",
"/home/*/workspace/*.obj",
"/home/*/workspace/*.obj.d",
"/home/*/workspace/_*",
"/home/*/.rustup",
"/nix",
"/dev",
"/proc",
"/sys",
"/tmp",
"/run"
]
[prune]
keep_last = 7
keep_daily = 7
keep_weekly = 4
keep_monthly = 6
[compact]
enabled = true