1

Compare commits

...

2 Commits

4 changed files with 62 additions and 60 deletions

View File

@ -46,12 +46,9 @@ with mylib.networking; {
docker = { docker = {
enable = true; enable = true;
podman = false;
# Use podman on the desktops, the servers are docker.rootless = false;
# already configured using docker though... docker.buildkit = true;
# TODO: Use podman on the servers
podman = !headless;
docker.rootless = true;
}; };
fonts = { fonts = {

View File

@ -18,6 +18,10 @@ in {
networking.firewall.trustedInterfaces = ["docker0" "podman0"]; networking.firewall.trustedInterfaces = ["docker0" "podman0"];
# Needed for default bridge network to automatically work
# boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
# boot.kernel.sysctl."net.ipv6.ip_forward" = 1;
virtualisation = { virtualisation = {
docker = { docker = {
enable = !docker.podman; enable = !docker.podman;
@ -25,6 +29,7 @@ in {
extraPackages = with pkgs; [docker-compose]; extraPackages = with pkgs; [docker-compose];
# TODO: Rootless docker has no internet?
rootless = { rootless = {
enable = docker.docker.rootless; enable = docker.docker.rootless;
setSocketVariable = true; setSocketVariable = true;

View File

@ -162,7 +162,7 @@ in {
(mkUDir ".config/Zeal" m755) (mkUDir ".config/Zeal" m755)
# Share # Share
(mkUDir ".local/share/containers" m755) # (mkUDir ".local/share/containers" m755) # Rootless docker
(mkUDir ".local/share/direnv" m755) (mkUDir ".local/share/direnv" m755)
(mkUDir ".local/share/docker" m755) (mkUDir ".local/share/docker" m755)
(mkUDir ".local/share/fish" m755) (mkUDir ".local/share/fish" m755)

View File

@ -132,59 +132,59 @@
# Keep this as a system service because we're backing up /persist as root # Keep this as a system service because we're backing up /persist as root
# TODO: The repository gets corrupted all the time, maybe because the service runs before the repository is mounted? # TODO: The repository gets corrupted all the time, maybe because the service runs before the repository is mounted?
restic.backups."synology" = { # restic.backups."synology" = {
# user = "${username}"; # Keep default (root), so restic can read everything # # user = "${username}"; # Keep default (root), so restic can read everything
#
repository = "/home/${username}/Restic"; # repository = "/home/${username}/Restic";
initialize = true; # initialize = true;
passwordFile = config.sops.secrets.restic-repo-key.path; # passwordFile = config.sops.secrets.restic-repo-key.path;
createWrapper = true; # createWrapper = true;
#
timerConfig = { # timerConfig = {
OnCalendar = "daily"; # OnCalendar = "daily";
Persistent = true; # Persistent = true;
RandomizedDelaySec = "5h"; # RandomizedDelaySec = "5h";
}; # };
#
runCheck = true; # runCheck = true;
checkOpts = [ # checkOpts = [
"--with-cache" # "--with-cache"
]; # ];
#
pruneOpts = [ # pruneOpts = [
"--keep-daily 3" # "--keep-daily 3"
"--keep-weekly 2" # "--keep-weekly 2"
# "--keep-monthly 0" # # "--keep-monthly 0"
# "--keep-yearly 0" # # "--keep-yearly 0"
#
"--prune" # Automatically remove dangling files not referenced by any snapshot # "--prune" # Automatically remove dangling files not referenced by any snapshot
"--repack-uncompressed" # "--repack-uncompressed"
]; # ];
#
paths = ["/persist"]; # paths = ["/persist"];
exclude = [ # exclude = [
# The backup is just supposed to allow a system restore # # The backup is just supposed to allow a system restore
"/persist/old_homes" # "/persist/old_homes"
"/persist/old_roots" # "/persist/old_roots"
#
# Those are synced by nextcloud, no need to backup them 50 times # # Those are synced by nextcloud, no need to backup them 50 times
"/persist/home/${username}/Documents" # "/persist/home/${username}/Documents"
"/persist/home/${username}/NixFlake" # "/persist/home/${username}/NixFlake"
"/persist/home/${username}/Notes" # "/persist/home/${username}/Notes"
"/persist/home/${username}/Projects" # "/persist/home/${username}/Projects"
"/persist/home/${username}/Public" # "/persist/home/${username}/Public"
#
# Some more caches # # Some more caches
".cache" # ".cache"
"cache2" # firefox # "cache2" # firefox
"Cache" # "Cache"
]; # ];
extraBackupArgs = [ # extraBackupArgs = [
"--exclude-caches" # Excludes marked cache directories # "--exclude-caches" # Excludes marked cache directories
"--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere) # "--one-file-system" # Only stay on /persist (in case symlinks lead elsewhere)
"--cleanup-cache" # Auto remove old cache directories # "--cleanup-cache" # Auto remove old cache directories
]; # ];
}; # };
xserver = { xserver = {
# Configure keymap in X11 # Configure keymap in X11