diff --git a/configuration.nix b/configuration.nix index 64a93d2..c96045a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -6,7 +6,7 @@ boot.loader.generic-extlinux-compatible.enable = true; # A bunch of boot parameters needed for optimal runtime on RPi 3B - boot.kernelParams = ["cma=32M"]; + boot.kernelParams = ["cma=32M" "zfs.zfs_arc_max=12884901888"]; boot.loader.raspberryPi = { enable = true; version = 3; @@ -54,10 +54,12 @@ time.timeZone = "Europe/Brussels"; services.timesyncd.enable = true; - # Enable zfs support + # Enable ZFS support networking.hostId = "bb26c304"; - boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.extraPools = [ "vault" ]; + boot = { + supportedFilesystems = [ "zfs" ]; + zfs.extraPools = [ "vault" ]; + }; # Scrub zpool monthly services.zfs.autoScrub = { @@ -71,11 +73,16 @@ allowReboot = true; }; - # Run Nix garbage collector daily - nix.gc = { - automatic = true; - dates = "03:15"; - options = "--delete-older-than 14d"; + # Run Nix garbage collector, while avoiding compiling + nix = { + gc = { + automatic = true; + options = "--delete-older-than 30d"; + }; + extraOptions = '' + keep-outputs = true + gc-keep-outputs = true + ''; }; # Configure fish shell diff --git a/modules/datasync.nix b/modules/datasync.nix index 1714028..127e7a5 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -53,6 +53,7 @@ id = "cjhmu-avy9v"; type = "receiveonly"; path = "/vault/syncthing/Projects"; + watch = false; }; }; }; diff --git a/modules/devops.nix b/modules/devops.nix index e030ed6..c930cb9 100644 --- a/modules/devops.nix +++ b/modules/devops.nix @@ -1,6 +1,11 @@ # Software development configuration { config, pkgs, lib, ... }: { + + environment.systemPackages = with pkgs; [ + gitea + ]; + # Gitea setup with daily backup services.gitea = { enable = true; diff --git a/modules/networking.nix b/modules/networking.nix index 14f19fa..8bef1e8 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -6,6 +6,8 @@ { environment.systemPackages = with pkgs; [ + avahi + ddclient wireguard wireguard-tools ]; diff --git a/modules/webstack.nix b/modules/webstack.nix index 3edbf39..2936eb8 100644 --- a/modules/webstack.nix +++ b/modules/webstack.nix @@ -133,8 +133,6 @@ }; }; - # Restart nginx after - systemd.services.nginx.after = [ "gitea.service" "syncthing.service" "miniflux.service" ]; - + systemd.services.nginx.after = [ "gitea.service" "syncthing.service" "miniflux.service" "radicale.service" ]; }