Deployment: colmena -> nixos-flake (#58)

This commit is contained in:
Sridhar Ratnakumar 2024-06-21 19:33:55 -04:00 committed by GitHub
parent e99d1579bc
commit 06cea073ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 54 deletions

16
flake.lock generated
View file

@ -78,21 +78,6 @@
"type": "github"
}
},
"colmena-flake": {
"locked": {
"lastModified": 1711493191,
"narHash": "sha256-boxs2M0It0Bh7CGZnEbZJohA+wphXNTjUZ32D9y1KUE=",
"owner": "juspay",
"repo": "colmena-flake",
"rev": "0a9118df5e2e20db9f0e81f273ce906e26a286f3",
"type": "github"
},
"original": {
"owner": "juspay",
"repo": "colmena-flake",
"type": "github"
}
},
"crane": {
"inputs": {
"nixpkgs": [
@ -1050,7 +1035,6 @@
"root": {
"inputs": {
"actualism-app": "actualism-app",
"colmena-flake": "colmena-flake",
"disko": "disko",
"flake-parts": "flake-parts_2",
"home-manager": "home-manager",

View file

@ -13,7 +13,6 @@
nixos-flake.url = "github:srid/nixos-flake/deploy";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
colmena-flake.url = "github:juspay/colmena-flake";
ragenix.url = "github:yaxitech/ragenix";
# Software inputs
@ -38,49 +37,13 @@
imports = [
inputs.treefmt-nix.flakeModule
inputs.nixos-flake.flakeModule
inputs.colmena-flake.flakeModules.default
inputs.nixos-flake.flakeModule
./users
./home
./nixos
./nix-darwin
];
# Colmena deployment configuration
# See https://github.com/juspay/colmena-flake
colmena-flake.deployment =
let
read1Password = field:
[ "op" "read" "op://Personal/nixos-config/${field}" ];
in
{
immediacy = {
targetHost = "immediacy";
targetUser = "srid";
keys."hedgedoc.env" = {
user = "hedgedoc";
keyCommand = read1Password "hedgedoc.env";
};
};
github-runner =
let
user = "github-runner";
in
{
targetHost = "github-runner";
targetUser = "srid";
keys = {
"github-runner-token.secret" = {
inherit user;
keyCommand = read1Password "github-runner-token";
};
"nix-conf-gh-token.secret" = {
user = "root";
permissions = "0440";
keyCommand = read1Password "nix-conf-gh-token";
};
};
};
};
flake = {
# Configuration for my M1 Macbook Max (using nix-darwin)
@ -103,6 +66,11 @@
# Flake inputs we want to update periodically
# Run: `nix run .#update`.
nixos-flake = {
# https://github.com/srid/nixos-flake/pull/54
deploy = {
enable = true;
sshTarget = "srid@immediacy";
};
primary-inputs = [
"nixpkgs"
"home-manager"