ame: init restic, nas, etc
This commit is contained in:
parent
9fa338eca5
commit
e1c6f1e99c
5 changed files with 53 additions and 6 deletions
|
@ -1,10 +1,7 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{...}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./services
|
||||
../../modules
|
||||
../../modules/fonts.nix
|
||||
];
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
5
hosts/ame/services/default.nix
Normal file
5
hosts/ame/services/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./restic.nix
|
||||
];
|
||||
}
|
40
hosts/ame/services/restic.nix
Normal file
40
hosts/ame/services/restic.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue