massicot,fix: fix missing module
This commit is contained in:
parent
5104c5943e
commit
6b375fea91
5 changed files with 33 additions and 12 deletions
|
@ -13,5 +13,6 @@
|
|||
./forgejo-actions-runner.nix
|
||||
./oidc-agent.nix
|
||||
./miniflux.nix
|
||||
./immich.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ in
|
|||
"/etc/immich" = {
|
||||
d = {
|
||||
inherit user group;
|
||||
mode = "0600";
|
||||
mode = "0700";
|
||||
};
|
||||
};
|
||||
"/etc/immich/config.json" = {
|
||||
|
@ -53,5 +53,8 @@ in
|
|||
Environment = "IMMICH_CONFIG_FILE=%d/config";
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/324127/files#r1723763510
|
||||
services.immich.redis.host = "/run/redis-immich/redis.sock";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# TODO: https://github.com/lilyinstarlight/foosteros/blob/dfe1ab3eb68bfebfaa709482d52fa04ebdde81c8/config/restic.nix#L23 <- this is better
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
@ -11,6 +11,14 @@ in
|
|||
options = {
|
||||
custom.restic = {
|
||||
enable = lib.mkEnableOption "restic";
|
||||
paths = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [
|
||||
"/home"
|
||||
"/var/lib"
|
||||
];
|
||||
};
|
||||
prune = lib.mkEnableOption "auto prune remote restic repo";
|
||||
repositoryFile = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
|
@ -22,14 +30,10 @@ in
|
|||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.restic.backups = {
|
||||
remotebackup = {
|
||||
services.restic.backups.${config.networking.hostName} = lib.mkMerge [
|
||||
{
|
||||
repositoryFile = cfg.repositoryFile;
|
||||
passwordFile = cfg.passwordFile;
|
||||
paths = [
|
||||
"/home"
|
||||
"/var/lib"
|
||||
];
|
||||
exclude = [
|
||||
"/home/*/.cache"
|
||||
"/home/*/.cargo"
|
||||
|
@ -40,13 +44,24 @@ in
|
|||
OnCalendar = "00:05";
|
||||
RandomizedDelaySec = "5h";
|
||||
};
|
||||
pruneOpts = [
|
||||
pruneOpts = lib.mkIf cfg.prune [
|
||||
"--keep-daily 7"
|
||||
"--keep-weekly 5"
|
||||
"--keep-monthly 12"
|
||||
"--keep-yearly 75"
|
||||
];
|
||||
};
|
||||
};
|
||||
paths = lib.mkDefault cfg.paths;
|
||||
initialize = true;
|
||||
}
|
||||
(lib.mkIf (config.fileSystems."/".fsType == "btrfs") {
|
||||
backupPrepareCommand = ''
|
||||
btrfs subvolume snapshot -r / backup
|
||||
'';
|
||||
backupCleanupCommand = ''
|
||||
btrfs subvolume delete /backup
|
||||
'';
|
||||
paths = map (p: "/backup" + p) cfg.paths;
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -33,7 +33,8 @@ in
|
|||
|
||||
stylix.targets = {
|
||||
console.enable = true;
|
||||
gnome.enable = if config.services.xserver.desktopManager.gnome.enable then true else false;
|
||||
# gnome.enable = if config.services.xserver.desktopManager.gnome.enable then true else false;
|
||||
gnome.enable = false;
|
||||
gtk.enable = true;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -43,6 +43,7 @@ in
|
|||
};
|
||||
services.caddy = mkIf cfg.caddy {
|
||||
enable = true;
|
||||
|
||||
virtualHosts."https://${cfg.domain}".extraConfig = ''
|
||||
reverse_proxy ${config.services.vaultwarden.config.ROCKET_ADDRESS}:${toString config.services.vaultwarden.config.ROCKET_PORT}
|
||||
'';
|
||||
|
|
Loading…
Add table
Reference in a new issue