From a53f7d4079140440faf0fa464f864c41d6244f0c Mon Sep 17 00:00:00 2001 From: Mr Hedgehog Date: Fri, 24 Jun 2022 22:43:44 -0400 Subject: [PATCH] flake: Add colmena for deployments --- flake.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/flake.nix b/flake.nix index 0aa66f7..981a8f3 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ agenix.inputs.nixpkgs.follows = "nixpkgs"; alejandra.url = "github:kamadorueda/alejandra"; alejandra.inputs.nixpkgs.follows = "nixpkgs"; + colmena.url = "github:zhaofengli/colmena"; doom-emacs.url = "github:nix-community/nix-doom-emacs"; doom-emacs.inputs.nixpkgs.follows = "nixpkgs"; emacs.url = "github:nix-community/emacs-overlay"; @@ -47,6 +48,7 @@ nixos-hardware, agenix, alejandra, + colmena, doom-emacs, emacs, home-manager, @@ -64,6 +66,7 @@ alejandra-overlay = final: prev: {alejandra = alejandra.defaultPackage.${prev.system};}; nixpkgs-update-overlay = final: prev: {nixpkgs-update = nixpkgs-update.defaultPackage.${prev.system};}; my-pkgs = final: prev: {my-pkgs = self.packages."${prev.system}";}; + colmena-overlay = final: prev: {colmena = colmena.defaultPackage.${prev.system};}; system = "x86_64-linux"; @@ -79,6 +82,7 @@ (import ./overlays/sumneko.nix) my-pkgs alejandra-overlay + colmena-overlay emacs.overlay neovim.overlay nixgl.overlay @@ -149,5 +153,38 @@ ]; extraSpecialArgs = {inherit nix-colors;}; }; + + colmena = { + meta = { + nixpkgs = pkgs; + description = "The Hedgehog's personal computing infrastructure"; + name = "hedgehog"; + specialArgs = { inherit self inputs pkgs;}; + }; + defaults = { + deployment.buildOnTarget = true; + deployment.targetPort = 22; + }; + marvin = { + deployment = { + targetHost = "marvin"; + targetUser = "root"; + }; + imports = [ + ./hosts/marvin/configuration.nix + ./hosts/marvin/bootloader.nix + ]; + }; + prefect = { + deployment = { + targetHost = "136.243.175.187"; + targetUser = "root"; + }; + imports = [ + ./hosts/prefect/configuration.nix + ./hosts/prefect/bootloader.nix + ]; + }; + }; }; }