small cleanup

This commit is contained in:
2023-07-20 11:56:08 +03:00
parent 0f1d12cb34
commit 16a8eff543
3 changed files with 54 additions and 110 deletions

View File

@@ -42,7 +42,17 @@
];
};
nix.settings.experimental-features = ["nix-command" "flakes"];
nix = {
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 14d";
};
settings = {
experimental-features = ["nix-command" "flakes"];
trusted-users = ["motiejus"];
};
};
system.stateVersion = config.mj.stateVersion;
@@ -87,18 +97,23 @@
pv # pipe viewer for progressbars in pipes
bat # "bat - cat with wings", cat|less with language highlight
duf # nice disk usage output
git
tmux
htop
file # file duh
host # look up host info
tree # tree duh
lsof # lsof yay
rage # encrypt-decrypt
#ncdu # disk usage navigator
ncdu # disk usage navigator
pwgen
parted
sqlite
direnv
ripgrep
vimv-rs
nix-top # nix-top is a top for what nix is doing
bsdgames
binutils
moreutils
unixtools.xxd
@@ -106,10 +121,13 @@
# networking
dig
nmap
ngrep
wget
curl
whois
ipset
openssl
tcpdump
testssl
dnsutils
speedtest-cli

View File

@@ -59,36 +59,35 @@ in {
in
assert fs.fsType == "zfs";
assert lib.assertMsg
config.mj.base.unitstatus.enable
"config.mj.base.unitstatus.enable must be true";
{
name = lib.strings.sanitizeDerivationName mountpoint;
value =
{
doInit = true;
repo = config.mj.base.zfsborg.repo;
encryption = {
mode = "repokey-blake2";
passCommand = "cat ${config.mj.base.zfsborg.passwdPath}";
};
paths = attrs.paths;
extraArgs = "--remote-path=borg1";
compression = "auto,lzma";
startAt = attrs.backup_at;
readWritePaths = let p = mountpoint + "/.snapshot-latest"; in [p];
preHook = mountLatest mountpoint fs.device;
postHook = umountLatest mountpoint;
prune.keep = {
within = "1d";
daily = 7;
weekly = 4;
monthly = 3;
};
}
// lib.optionalAttrs (attrs ? patterns) {
patterns = attrs.patterns;
config.mj.base.unitstatus.enable
"config.mj.base.unitstatus.enable must be true"; {
name = lib.strings.sanitizeDerivationName mountpoint;
value =
{
doInit = true;
repo = config.mj.base.zfsborg.repo;
encryption = {
mode = "repokey-blake2";
passCommand = "cat ${config.mj.base.zfsborg.passwdPath}";
};
})
paths = attrs.paths;
extraArgs = "--remote-path=borg1";
compression = "auto,lzma";
startAt = attrs.backup_at;
readWritePaths = let p = mountpoint + "/.snapshot-latest"; in [p];
preHook = mountLatest mountpoint fs.device;
postHook = umountLatest mountpoint;
prune.keep = {
within = "1d";
daily = 7;
weekly = 4;
monthly = 3;
};
}
// lib.optionalAttrs (attrs ? patterns) {
patterns = attrs.patterns;
};
})
config.mj.base.zfsborg.mountpoints;
mj.base.unitstatus.units = let