modules/shared: add nix-daemon

This commit is contained in:
zowoq 2023-07-29 17:37:07 +10:00
parent 9fe659f34a
commit b553120a3c
3 changed files with 17 additions and 32 deletions
modules/darwin/common

View file

@ -1,11 +1,9 @@
{ pkgs, ... }:
let
asGB = size: toString (size * 1024 * 1024);
in
{
imports = [
./flake-inputs.nix
./telegraf.nix
../../shared/nix-daemon.nix
];
# use the same version as srvos
@ -24,29 +22,15 @@ in
"@admin"
];
# srvos
nix.settings.builders-use-substitutes = true;
nix.settings.substituters = [ "https://nix-community.cachix.org/" ];
nix.settings.trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
# srvos
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.settings.auto-optimise-store = true;
nix.settings.min-free = asGB 10;
nix.settings.max-free = asGB 200;
# avoid search path warnings
nix.nixPath = pkgs.lib.mkForce [ "nixpkgs=${pkgs.path}" ];
nix.gc.automatic = true;
nix.gc.options = "--delete-older-than 14d";
environment.systemPackages = with pkgs; [
htop
];