From 9c9a88de874506383829b4ed4fb0fafc4238da9a Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 16 Dec 2021 00:59:14 -0500 Subject: feat(wpcarro/marcus): Add some TVL goodies TL;DR: - enable TVL cache (ty @grfn) - enable automatic-gc (ty @tazjin) Change-Id: I2c7def718f10d90c6921461c6135f18358e33198 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4362 Tested-by: BuildkiteCI Reviewed-by: wpcarro --- users/wpcarro/nixos/marcus/default.nix | 49 ++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/users/wpcarro/nixos/marcus/default.nix b/users/wpcarro/nixos/marcus/default.nix index 293b9dc73a..bfbc392c21 100644 --- a/users/wpcarro/nixos/marcus/default.nix +++ b/users/wpcarro/nixos/marcus/default.nix @@ -7,7 +7,12 @@ let briefcasePath = "$HOME/depot/users/wpcarro"; }; in { - imports = [ ./hardware.nix ]; + imports = [ + (depot.path + "/users/wpcarro/nixos/marcus/hardware.nix") + ]; + + # Use the TVL binary cache + tvl.cache.enable = true; boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -25,23 +30,33 @@ in { time.timeZone = "America/New_York"; - services.xserver = { - enable = true; - libinput = { + services = { + xserver = { enable = true; - touchpad.naturalScrolling = false; - touchpad.tapping = false; - }; - layout = "us"; - xkbOptions = "caps:escape"; - displayManager = { - # Give EXWM permission to control the session (from tazjin's setup). - sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localhost:$USER"; - lightdm.enable = true; + libinput = { + enable = true; + touchpad.naturalScrolling = false; + touchpad.tapping = false; + }; + layout = "us"; + xkbOptions = "caps:escape"; + displayManager = { + # Give EXWM permission to control the session (from tazjin's setup). + sessionCommands = "${pkgs.xorg.xhost}/bin/xhost +SI:localhost:$USER"; + lightdm.enable = true; + }; + windowManager.session = lib.singleton { + name = "exwm"; + start = "${wpcarros-emacs}/bin/wpcarros-emacs"; + }; }; - windowManager.session = lib.singleton { - name = "exwm"; - start = "${wpcarros-emacs}/bin/wpcarros-emacs"; + + depot.automatic-gc = { + enable = true; + interval = "1 hour"; + diskThreshold = 16; # GiB + maxFreed = 10; # GiB + preserveGenerations = "14d"; }; }; @@ -52,7 +67,7 @@ in { users.mutableUsers = true; users.users.wpcarro = { isNormalUser = true; - extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + extraGroups = [ "wheel" ]; shell = pkgs.fish; }; -- cgit 1.4.1