Version Pim's blog using git revision from Nix input

This commit is contained in:
Pim Kunis 2024-04-30 23:22:01 +02:00
parent 70e0fae612
commit b7e5db705b
5 changed files with 105 additions and 21 deletions

View file

@ -1,9 +1,9 @@
{ dns, myLib, flake-utils, kubenix, nixhelm, ... }: flake-utils.lib.eachDefaultSystem
{ dns, myLib, flake-utils, kubenix, nixhelm, blog-pim, ... }: flake-utils.lib.eachDefaultSystem
(system:
let
mkKubenixPackage = module: kubenix.packages.${system}.default.override
{
specialArgs = { inherit myLib kubenix nixhelm system dns; };
specialArgs = { inherit myLib kubenix nixhelm system dns blog-pim; };
module = { imports = [ module ]; };
};
in

View file

@ -23,6 +23,28 @@
"type": "github"
}
},
"blog-pim": {
"inputs": {
"flutils": "flutils",
"nginx": "nginx",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1714511443,
"narHash": "sha256-JigJodtwaSIQ6elhYrlcEGZ6t+fixhDZltvuzbkKLYU=",
"ref": "refs/heads/master",
"rev": "fe9488d31cb8f6eee776ea577ba190ee817acf30",
"revCount": 14,
"type": "git",
"url": "https://git.kun.is/home/blog-pim"
},
"original": {
"type": "git",
"url": "https://git.kun.is/home/blog-pim"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@ -155,7 +177,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
@ -173,7 +195,7 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1701680307,
@ -190,7 +212,7 @@
},
"flake-utils_4": {
"inputs": {
"systems": "systems_6"
"systems": "systems_7"
},
"locked": {
"lastModified": 1694529238,
@ -206,6 +228,24 @@
"type": "github"
}
},
"flutils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -233,7 +273,7 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_4",
"systems": "systems_5",
"treefmt": "treefmt"
},
"locked": {
@ -251,6 +291,22 @@
"type": "github"
}
},
"nginx": {
"flake": false,
"locked": {
"lastModified": 1713277799,
"narHash": "sha256-VNDzQvUGeh54F3s6SIq6lBrp4RatURzJoJqVorexttA=",
"owner": "nginx",
"repo": "nginx",
"rev": "d8a849ae3c99ee5ca82c9a06074761e937dac6d6",
"type": "github"
},
"original": {
"owner": "nginx",
"repo": "nginx",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
@ -383,7 +439,7 @@
"nixhelm",
"nixpkgs"
],
"systems": "systems_7",
"systems": "systems_8",
"treefmt-nix": "treefmt-nix"
},
"locked": {
@ -403,6 +459,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"blog-pim": "blog-pim",
"deploy-rs": "deploy-rs",
"disko": "disko",
"dns": "dns",
@ -469,8 +526,9 @@
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_5": {
@ -483,9 +541,8 @@
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
"id": "systems",
"type": "indirect"
}
},
"systems_6": {
@ -504,6 +561,21 @@
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_8": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -562,7 +634,7 @@
},
"utils": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1701680307,

View file

@ -32,6 +32,11 @@
url = "github:farcaller/nixhelm";
inputs.nixpkgs.follows = "nixpkgs";
};
blog-pim = {
url = "git+https://git.kun.is/home/blog-pim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =

View file

@ -1,4 +1,4 @@
{
{ blog-pim, ... }: {
kubernetes.resources = {
deployments.blog = {
metadata.labels.app = "blog";
@ -11,7 +11,7 @@
spec = {
containers.blog = {
image = "git.kun.is/home/blog-pim:c2022de121ff1d35e52fb2ea4c44ce83c1cffaa9";
image = "git.kun.is/home/blog-pim:${blog-pim.rev}";
ports.web.containerPort = 80;
};
};

View file

@ -2,13 +2,20 @@
machines.lewis = {
arch = "x86_64-linux";
nixosModule.lab = {
backups.enable = true;
data-sharing.enable = true;
nixosModule = {
lab = {
backups.enable = true;
data-sharing.enable = true;
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
storage = {
osDisk = "/dev/sda";
dataPartition = "/dev/nvme0n1p1";
};
};
services.tailscale = {
enable = true;
extraUpFlags = [ "--ssh" ];
};
};
};