about summary refs log tree commit diff
path: root/users/wpcarro
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2021-12-16T05·38-0500
committerwpcarro <wpcarro@gmail.com>2021-12-16T22·07+0000
commit9c4e34bde681d9089dba1db788535fa03ac74339 (patch)
treedf61d5c6802b15f57eda2f1e27a43ee7378a1ef8 /users/wpcarro
parentbfb43161e51806e33f124e2f0daac990573b4c38 (diff)
feat(wpcarro/diogenes): Add diogenes to the depot r/3281
Incoming!

Change-Id: I12f9202fea8eb834d40de43109871aef2085416e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4361
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users/wpcarro')
-rw-r--r--users/wpcarro/nixos/diogenes/configuration.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/users/wpcarro/nixos/diogenes/configuration.nix b/users/wpcarro/nixos/diogenes/configuration.nix
new file mode 100644
index 000000000000..afdefce58855
--- /dev/null
+++ b/users/wpcarro/nixos/diogenes/configuration.nix
@@ -0,0 +1,56 @@
+{ depot, pkgs, ... }:
+
+let
+  inherit (depot.users.wpcarro) keys;
+in {
+  imports = [
+    "${depot.path}/ops/modules/tvl.nix"
+    "${pkgs.path}/nixos/modules/virtualisation/google-compute-image.nix"
+  ];
+
+  # Use the TVL binary cache
+  tvl.cache.enable = true;
+
+  # Use 100G volume for /nix
+  fileSystems."/nix" = {
+    device = "/dev/disk/by-uuid/5a65f6c2-7d55-414d-b693-1928480c9b96";
+    fsType = "ext4";
+  };
+
+  users = {
+    mutableUsers = true;
+    users = {
+      wpcarro = {
+        isNormalUser = true;
+        extraGroups = [ "wheel" ];
+        openssh.authorizedKeys.keys = keys.all;
+        shell = pkgs.fish;
+      };
+    };
+  };
+
+
+  security.sudo.wheelNeedsPassword = false;
+
+  environment.systemPackages = with pkgs; [
+    fd
+    fzf
+    mkpasswd
+    ripgrep
+    tldr
+    tree
+    vim
+  ];
+
+  services = {
+    depot.automatic-gc = {
+      enable = true;
+      interval = "1 hour";
+      diskThreshold = 16; # GiB
+      maxFreed = 10; # GiB
+      preserveGenerations = "14d";
+    };
+  };
+
+  system.stateVersion = "21.11";
+}