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: (system:
let let
mkKubenixPackage = module: kubenix.packages.${system}.default.override 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 ]; }; module = { imports = [ module ]; };
}; };
in in

View file

@ -23,6 +23,28 @@
"type": "github" "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": { "darwin": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -155,7 +177,7 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@ -173,7 +195,7 @@
}, },
"flake-utils_3": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_5" "systems": "systems_6"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,
@ -190,7 +212,7 @@
}, },
"flake-utils_4": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_6" "systems": "systems_7"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1694529238,
@ -206,6 +228,24 @@
"type": "github" "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": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -233,7 +273,7 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_4", "systems": "systems_5",
"treefmt": "treefmt" "treefmt": "treefmt"
}, },
"locked": { "locked": {
@ -251,6 +291,22 @@
"type": "github" "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": { "nix-github-actions": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -383,7 +439,7 @@
"nixhelm", "nixhelm",
"nixpkgs" "nixpkgs"
], ],
"systems": "systems_7", "systems": "systems_8",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
@ -403,6 +459,7 @@
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"blog-pim": "blog-pim",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"disko": "disko", "disko": "disko",
"dns": "dns", "dns": "dns",
@ -469,8 +526,9 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "systems", "owner": "nix-systems",
"type": "indirect" "repo": "default",
"type": "github"
} }
}, },
"systems_5": { "systems_5": {
@ -483,9 +541,8 @@
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "id": "systems",
"repo": "default", "type": "indirect"
"type": "github"
} }
}, },
"systems_6": { "systems_6": {
@ -504,6 +561,21 @@
} }
}, },
"systems_7": { "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": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
@ -562,7 +634,7 @@
}, },
"utils": { "utils": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,

View file

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

View file

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

View file

@ -2,7 +2,8 @@
machines.lewis = { machines.lewis = {
arch = "x86_64-linux"; arch = "x86_64-linux";
nixosModule.lab = { nixosModule = {
lab = {
backups.enable = true; backups.enable = true;
data-sharing.enable = true; data-sharing.enable = true;
@ -11,5 +12,11 @@
dataPartition = "/dev/nvme0n1p1"; dataPartition = "/dev/nvme0n1p1";
}; };
}; };
services.tailscale = {
enable = true;
extraUpFlags = [ "--ssh" ];
};
};
}; };
} }