Compare commits

..

No commits in common. "56ca8bd17a1739cdd1f8199898b13750bdc5921a" and "cd48d040a47105b352c14a14ec78e201fb998db5" have entirely different histories.

4 changed files with 34 additions and 59 deletions

View file

@ -1,38 +1,32 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
services.restic.backups.system = { services.restic.backups.home = {
paths = [ paths = [ "/home/.zfs/snapshot/restic" ];
"/home/.zfs/snapshot/restic"
"/var/.zfs/snapshot/restic"
];
repository = "s3:s3.us-west-001.backblazeb2.com/nolans-nixos-backups/${config.networking.hostName}"; repository = "s3:s3.us-west-001.backblazeb2.com/nolans-nixos-backups/${config.networking.hostName}";
environmentFile = config.age.secrets."restic_b2_${config.networking.hostName}".path; environmentFile = config.age.secrets."restic_b2_${config.networking.hostName}".path;
passwordFile = config.age.secrets."restic_password_${config.networking.hostName}".path; passwordFile = config.age.secrets."restic_password_${config.networking.hostName}".path;
initialize = true; initialize = true;
backupPrepareCommand = '' backupPrepareCommand = "${pkgs.zfs}/bin/zfs snapshot zpool/home@restic";
#!${pkgs.bash}/bin/sh backupCleanupCommand = "${pkgs.zfs}/bin/zfs destroy zpool/home@restic";
${pkgs.zfs}/bin/zfs snapshot zpool/home@restic timerConfig = {
${pkgs.zfs}/bin/zfs snapshot zpool/var@restic OnCalendar = "hourly";
''; Persistent = true;
backupCleanupCommand = '' };
#!${pkgs.bash}/bin/sh };
${pkgs.zfs}/bin/zfs destroy zpool/home@restic services.restic.backups.var = {
${pkgs.zfs}/bin/zfs destroy zpool/var@restic paths = [ "/var/.zfs/snapshot/restic" ];
''; repository = "s3:s3.us-west-001.backblazeb2.com/nolans-nixos-backups/${config.networking.hostName}";
timerConfig.OnCalendar = "hourly"; environmentFile = config.age.secrets."restic_b2_${config.networking.hostName}".path;
pruneOpts = [ passwordFile = config.age.secrets."restic_password_${config.networking.hostName}".path;
"--keep-daily 7" initialize = true;
"--keep-weekly 5" backupPrepareCommand = "${pkgs.zfs}/bin/zfs snapshot zpool/var@restic";
"--keep-monthly 12" backupCleanupCommand = "${pkgs.zfs}/bin/zfs destroy zpool/var@restic";
"--keep-yearly 2" timerConfig = {
]; OnCalendar = "hourly";
Persistent = true;
};
}; };
systemd.tmpfiles.rules = [
"d /mnt/restic 0700 root root"
];
age.secrets."restic_b2_${config.networking.hostName}".file = age.secrets."restic_b2_${config.networking.hostName}".file =
../secrets/restic_b2_${config.networking.hostName}.age; ../secrets/restic_b2_${config.networking.hostName}.age;
age.secrets."restic_password_${config.networking.hostName}".file = age.secrets."restic_password_${config.networking.hostName}".file =

View file

@ -10,8 +10,6 @@
packages = with pkgs; [ unstable.firefoxpwa ]; packages = with pkgs; [ unstable.firefoxpwa ];
}; };
programs.localsend.enable = true;
home-manager.users.nolan = { home-manager.users.nolan = {
programs = { programs = {
firefox = { firefox = {

View file

@ -44,15 +44,15 @@
credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret"; credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret";
}; };
}; };
# jujutsu = { jujutsu = {
# enable = true; enable = true;
# settings = { settings = {
# user = { user = {
# name = "Nolan Darilek"; name = "Nolan Darilek";
# email = "nolan@thewordnerd.info"; email = "nolan@thewordnerd.info";
# }; };
# }; };
# }; };
obs-studio = { obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [
@ -65,8 +65,4 @@
}; };
}; };
}; };
environment.sessionVariables = {
PATH = [ "$HOME/.local/bin" ];
};
} }

View file

@ -1,20 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
users.users.root = { users.users.root.openssh.authorizedKeys.keys = [
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPk6C4eOYzTZ8XOuUA2tErGnSTLS/l9kRDl9+5Ql+m7VtaH/KRFbu6x+C0QAIKOrRcQOjpGYUjL1aIn0HCcoEW2PSihDmOHC+W8cy8ucScy4fPI5KpFFqTZU336Fje+NS4n587gcoaa5LjKcr2KZy/ljgzl4eNSRIqy85khfH4puxsj7LwTIqsZoqDhtD/jSqaKP1C2wuYSsijLF85UnRcT9jErnL757yUv/4xb4Is+gB0zan9GiBXRca4lzb0mY8rmMXmKhc2lm/mu8ogZRdYX5R2JP1AukzYGSdOFs4iUauihgvakuou9AugD2CC+ygYIEbWkUjwKfT9nRN93Qi9 id_rsa" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPk6C4eOYzTZ8XOuUA2tErGnSTLS/l9kRDl9+5Ql+m7VtaH/KRFbu6x+C0QAIKOrRcQOjpGYUjL1aIn0HCcoEW2PSihDmOHC+W8cy8ucScy4fPI5KpFFqTZU336Fje+NS4n587gcoaa5LjKcr2KZy/ljgzl4eNSRIqy85khfH4puxsj7LwTIqsZoqDhtD/jSqaKP1C2wuYSsijLF85UnRcT9jErnL757yUv/4xb4Is+gB0zan9GiBXRca4lzb0mY8rmMXmKhc2lm/mu8ogZRdYX5R2JP1AukzYGSdOFs4iUauihgvakuou9AugD2CC+ygYIEbWkUjwKfT9nRN93Qi9 id_rsa"
]; ];
shell = pkgs.fish;
};
programs.fish.enable = true;
home-manager.users.root.home = {
shellAliases = {
"systemctl" = "systemctl --no-ager -l";
"journalctl" = "journalctl --no-pager -l";
};
stateVersion = "24.11";
};
} }