ame: init restic, nas, etc

This commit is contained in:
notohh 2023-06-11 00:04:15 -04:00
parent 9fa338eca5
commit e1c6f1e99c
Signed by: notohh
GPG key ID: BD47506D475EE86D
5 changed files with 53 additions and 6 deletions

View file

@ -1,10 +1,7 @@
{
config,
pkgs,
...
}: {
{...}: {
imports = [
./hardware-configuration.nix
./services
../../modules
../../modules/fonts.nix
];

View file

@ -19,6 +19,11 @@
fsType = "ext4";
};
fileSystems."/nas" = {
device = "192.168.1.71:/volume1/ame";
fsType = "nfs";
};
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/4D09-1D57";
fsType = "vfat";

View file

@ -1,7 +1,6 @@
{pkgs, ...}: {
imports = [
../../home
../../home/librewolf
../../home/wezterm
../../home/zathura
../../home/lf
@ -19,6 +18,7 @@
username = "notoh";
homeDirectory = "/home/notoh";
packages = with pkgs; [
brave
webcord
discord
spotify-player

View file

@ -0,0 +1,5 @@
{...}: {
imports = [
./restic.nix
];
}

View file

@ -0,0 +1,40 @@
{
pkgs,
config,
...
}: {
sops.secrets.restic-repo-pwd = {};
environment.systemPackages = [pkgs.restic];
services.restic = {
backups = {
ame = {
paths = [
"/home"
];
exclude = [
"*.qcow2"
"*.iso"
"/home/*/Downloads"
"/home/*/Videos"
"/home/*/.cache"
"/home/*/.rustup"
"/home/*/.cargo"
"/home/*/.mplayer"
"/home/*/.local/share/Trash"
"/home/*/.local/share/.var"
];
pruneOpts = [
"--keep-daily=4"
"--keep-weekly=3"
"--keep-monthly=2"
];
initialize = true;
repository = "/nas/home";
passwordFile = config.sops.secrets.restic-repo-pwd.path;
timerConfig = {
OnCalendar = "daily";
};
};
};
};
}