Add colmena deployment

This commit is contained in:
Sridhar Ratnakumar 2024-03-26 14:14:33 -04:00
parent a3c11169fb
commit fbfe594def
2 changed files with 34 additions and 0 deletions

16
flake.lock generated
View file

@ -66,6 +66,21 @@
"type": "github"
}
},
"colmena-flake": {
"locked": {
"lastModified": 1711476729,
"narHash": "sha256-Qgbafdn8cakqnSKD6tC1G6+5LrKs12c+vs9PoQ8Hq14=",
"owner": "juspay",
"repo": "colmena-flake",
"rev": "8a659d55529918012234e662413a3758a2ba3db1",
"type": "github"
},
"original": {
"owner": "juspay",
"repo": "colmena-flake",
"type": "github"
}
},
"crane": {
"inputs": {
"nixpkgs": [
@ -1791,6 +1806,7 @@
"root": {
"inputs": {
"actual": "actual",
"colmena-flake": "colmena-flake",
"disko": "disko",
"emacs-overlay": "emacs-overlay",
"emanote": "emanote",

View file

@ -13,6 +13,7 @@
nixos-flake.url = "github:srid/nixos-flake";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
colmena-flake.url = "github:juspay/colmena-flake";
# CI server
sops-nix.url = "github:juspay/sops-nix/json-nested"; # https://github.com/Mic92/sops-nix/pull/328
@ -59,12 +60,28 @@
imports = [
inputs.treefmt-nix.flakeModule
inputs.nixos-flake.flakeModule
inputs.colmena-flake.flakeModules.default
./users
./home
./nixos
./nix-darwin
];
colmena-parts.deployment =
let
read1Password = field:
[ "op" "read" "op://Personal/nixos-config/${field}" ];
in
{
github-runner = {
targetHost = "github-runner";
targetUser = "srid";
keys."github-runner-token.secret" = {
keyCommand = read1Password "github-runner-token";
};
};
};
flake = {
# Configuration for my M1 Macbook Max (using nix-darwin)
darwinConfigurations.appreciate =
@ -109,6 +126,7 @@
pkgs.ssh-to-age
pkgs.nixos-rebuild
pkgs.just
pkgs.colmena
];
};
};