Avoid packages rebuilds and decrease ZFS ARC cache

This commit is contained in:
coolneng 2020-03-29 06:21:19 +02:00
parent 5bcda20414
commit 7927cc183f
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
5 changed files with 25 additions and 12 deletions

View File

@ -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

View File

@ -53,6 +53,7 @@
id = "cjhmu-avy9v";
type = "receiveonly";
path = "/vault/syncthing/Projects";
watch = false;
};
};
};

View File

@ -1,6 +1,11 @@
# Software development configuration
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
gitea
];
# Gitea setup with daily backup
services.gitea = {
enable = true;

View File

@ -6,6 +6,8 @@
{
environment.systemPackages = with pkgs; [
avahi
ddclient
wireguard
wireguard-tools
];

View File

@ -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" ];
}