From 06a20ba3df2cb22695868043ded4d0b04ab54e44 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Thu, 16 Dec 2021 23:29:59 +0000 Subject: fix(ops/diogenes): Ensure diogenes builds diogenes "passed" CI because the file was named configuration.nix (vestage from the NixOS default /etc/nixos/configuration). This CL fixes some issues I encountered after running depot/bin/rebuild-system. TL;DR: - rename configuration.nix -> default.nix to trigger CI - add diogenes to my systems - add public SSH key Change-Id: I24197b8936c201267db6f71f00099dce590eac1d Reviewed-on: https://cl.tvl.fyi/c/depot/+/4388 Tested-by: BuildkiteCI Reviewed-by: wpcarro Reviewed-by: tazjin Autosubmit: wpcarro --- users/wpcarro/keys.nix | 5 ++- users/wpcarro/nixos/default.nix | 4 +- users/wpcarro/nixos/diogenes/configuration.nix | 56 ------------------------- users/wpcarro/nixos/diogenes/default.nix | 58 ++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 59 deletions(-) delete mode 100644 users/wpcarro/nixos/diogenes/configuration.nix create mode 100644 users/wpcarro/nixos/diogenes/default.nix (limited to 'users') diff --git a/users/wpcarro/keys.nix b/users/wpcarro/keys.nix index 4ac55d530839..30b9b7e5c935 100644 --- a/users/wpcarro/keys.nix +++ b/users/wpcarro/keys.nix @@ -2,8 +2,9 @@ { ... }: rec { + diogenes = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILFDRfpNXDxQuTJAqVg8+Mm/hOfE5VAJP+Lpw9kA5cDG"; marcus = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJkNQJBXekuSzZJ8+gxT+V1+eXTm3hYsfigllr/ARXkf"; - seneca = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDSVqb0ehIxp33j8wJgPoCcd45NPnZ3CisDlcO1f5isTvOTSLVf5WAdqgDk9fuTTcOMdaiPQcun7psZYEZ7EnoiDYiNM/iYoqN5ga0MdQVCU0pvkJuExuK8MqdwAnjwrLx1bqw8ivXxbmrKMyN/fUsG8I7IzC+D61ycb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Nmk2pLhgKkOJu5RrOuitHL9Ts7ax6Co5S086BT57g3BCjaiCZDoWUSRTPc6K+rDPriCGXJqfGncdUJh20QsZPYIrWQSSJuRDW59WxnNbKvIH5aFvHM2S+HyjhZC+d5pjm9mhfHuluL9+Hwis7kxlqNoX3i/i5ufGEODaLeRu5xWp0hc5fYype8BL+NNw=="; - all = [ marcus seneca ]; + all = [ diogenes marcus seneca ]; } diff --git a/users/wpcarro/nixos/default.nix b/users/wpcarro/nixos/default.nix index 693cbd9ac154..15de8c0e113c 100644 --- a/users/wpcarro/nixos/default.nix +++ b/users/wpcarro/nixos/default.nix @@ -2,6 +2,8 @@ let systemFor = sys: (depot.ops.nixos.nixosFor sys).system; in { + diogenesSystem = systemFor depot.users.wpcarro.nixos.diogenes; marcusSystem = systemFor depot.users.wpcarro.nixos.marcus; - meta.targets = [ "marcusSystem" ]; + + meta.targets = [ "diogenesSystem" "marcusSystem" ]; } diff --git a/users/wpcarro/nixos/diogenes/configuration.nix b/users/wpcarro/nixos/diogenes/configuration.nix deleted file mode 100644 index afdefce58855..000000000000 --- a/users/wpcarro/nixos/diogenes/configuration.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ 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"; -} diff --git a/users/wpcarro/nixos/diogenes/default.nix b/users/wpcarro/nixos/diogenes/default.nix new file mode 100644 index 000000000000..076261eb5026 --- /dev/null +++ b/users/wpcarro/nixos/diogenes/default.nix @@ -0,0 +1,58 @@ +{ depot, pkgs, ... }: +{ ... }: + +let + inherit (depot.users.wpcarro) keys; +in { + imports = [ + (pkgs.path + "/nixos/modules/virtualisation/google-compute-image.nix") + ]; + + networking.hostName = "diogenes"; + + # Use the TVL binary cache + tvl.cache.enable = true; + + # Use 100G volume for /nix + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/62396bde-9002-4025-83eb-2a6c731b7adc"; + 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"; +} -- cgit 1.4.1