fix nextcloud restic premissions

This commit is contained in:
glenn 2024-11-26 12:39:03 +01:00
parent 151fc7a8ab
commit 5207af59d0
3 changed files with 38 additions and 1 deletions

View file

@ -31,6 +31,8 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users.sondell = import ./home/sondell.nix; users.sondell = import ./home/sondell.nix;
# users.restic = import ./home/restic.nix;
users.root = import ./home/root.nix;
}; };
}; };
homeModules = [ homeModules = [
@ -54,6 +56,7 @@
./jellyfin.nix ./jellyfin.nix
./filebrowser.nix ./filebrowser.nix
./tail.nix ./tail.nix
./restic.nix
# ./ai.nix # ./ai.nix
./ebooks.nix ./ebooks.nix
# ./matrix.nix TODO does not work atm, fixit # ./matrix.nix TODO does not work atm, fixit

33
home/root.nix Normal file
View file

@ -0,0 +1,33 @@
{
# pkgs,
# config,
# lib,
...
}: {
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "root";
home.homeDirectory = "/root";
programs = {
ssh = {
addKeysToAgent = "yes";
enable = true;
matchBlocks."*".identityFile = [
"/root/.ssh/tulpan"
];
};
# Let Home Manager install and manage itself.
home-manager.enable = true;
};
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "24.05";
}

View file

@ -41,6 +41,7 @@ in {
User = "nextcloud"; User = "nextcloud";
}; };
}; };
users.users.nextcloud.extraGroups = ["backup"];
services = { services = {
restic.backups = { restic.backups = {
@ -50,7 +51,7 @@ in {
paths = [ paths = [
"/pool/var/lib/nextcloud" "/pool/var/lib/nextcloud"
]; ];
user = "sondell"; user = "root";
timerConfig.OnCalendar = "02:05"; timerConfig.OnCalendar = "02:05";
pruneOpts = [ pruneOpts = [
"--keep-daily 10" "--keep-daily 10"