From 4eb0dea713bec8aa79dd7dc5540e5daafd301cf9 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 24 Dec 2021 21:11:24 -0500 Subject: refactor(wpcarro/nixos): Define common.services DRY things up with this mixin. Change-Id: I5791a50b01902734dff91d391e1aa90a21ce4fbb Reviewed-on: https://cl.tvl.fyi/c/depot/+/4600 Reviewed-by: wpcarro Autosubmit: wpcarro Tested-by: BuildkiteCI --- users/wpcarro/common.nix | 10 ++++++++++ users/wpcarro/nixos/diogenes/default.nix | 10 +--------- users/wpcarro/nixos/marcus/default.nix | 10 +--------- 3 files changed, 12 insertions(+), 18 deletions(-) (limited to 'users') diff --git a/users/wpcarro/common.nix b/users/wpcarro/common.nix index 79e2eecf5ae3..7093b5f1d43b 100644 --- a/users/wpcarro/common.nix +++ b/users/wpcarro/common.nix @@ -1,6 +1,16 @@ { pkgs, ... }: { + services = { + depot.automatic-gc = { + enable = true; + interval = "1 hour"; + diskThreshold = 16; # GiB + maxFreed = 10; # GiB + preserveGenerations = "14d"; + }; + }; + # Command-line tools I commonly used and want available on most (or all) of my # machines. shell-utils = with pkgs; [ diff --git a/users/wpcarro/nixos/diogenes/default.nix b/users/wpcarro/nixos/diogenes/default.nix index 2a3df2e3f52d..105c31793d4c 100644 --- a/users/wpcarro/nixos/diogenes/default.nix +++ b/users/wpcarro/nixos/diogenes/default.nix @@ -69,15 +69,7 @@ in { environment.systemPackages = wpcarro.common.shell-utils; - services = { - depot.automatic-gc = { - enable = true; - interval = "1 hour"; - diskThreshold = 16; # GiB - maxFreed = 10; # GiB - preserveGenerations = "14d"; - }; - + services = wpcarro.common.services // { depot.quassel = { enable = true; acmeHost = "quassel.wpcarro.dev"; diff --git a/users/wpcarro/nixos/marcus/default.nix b/users/wpcarro/nixos/marcus/default.nix index d03da2b910eb..57b9124b2cc6 100644 --- a/users/wpcarro/nixos/marcus/default.nix +++ b/users/wpcarro/nixos/marcus/default.nix @@ -34,7 +34,7 @@ in { time.timeZone = "America/New_York"; - services = { + services = wpcarro.common.services // { xserver = { enable = true; libinput = { @@ -61,14 +61,6 @@ in { start = "${wpcarrosEmacs}/bin/wpcarros-emacs"; }; }; - - depot.automatic-gc = { - enable = true; - interval = "1 hour"; - diskThreshold = 16; # GiB - maxFreed = 10; # GiB - preserveGenerations = "14d"; - }; }; # Enable sound. -- cgit 1.4.1