pre-fetch nixpkgs revision hash

This commit is contained in:
Douze Bé 2024-12-19 11:07:32 +01:00
parent b9cb68638c
commit 2242f128a9
3 changed files with 21 additions and 5 deletions

View file

@ -1,13 +1,16 @@
# Nixin krops POC
This is a proof of concept of using krops to deploy nixos configuration generated by nixin
## How to deploy
To deploy configuration of only one server :
## Tips
Deploy configuration of only one server :
nix-build ./krops.nix -A arachnide && ./result
To deploy configration of all servers
Deploy configration of all servers :
nix-build ./krops.nix -A all && ./result
Update th revision of nixpkgs that is used :
nix-prefetch-git --url https://github.com/NixOS/nixpkgs --rev "refs/heads/nixos-24.11" > nixpkgs.json
## References
- krops : https://github.com/krebs/krops

View file

@ -4,6 +4,7 @@ let
};
lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" {};
importJson = (import <nixpkgs> {}).lib.importJSON;
source = name: lib.evalSource [
{
@ -15,8 +16,8 @@ let
name = "${name}";
};
nixpkgs.git = {
ref = "nixos-24.11";
url = https://github.com/NixOS/nixpkgs-channels;
ref = (importJson ./nixpkgs.json).rev;
url = https://github.com/NixOS/nixpkgs;
};
}
];

12
nixpkgs.json Normal file
View file

@ -0,0 +1,12 @@
{
"url": "https://github.com/NixOS/nixpkgs",
"rev": "394571358ce82dff7411395829aa6a3aad45b907",
"date": "2024-12-15T20:39:46-08:00",
"path": "/nix/store/avy6z2v675lfxax5idvz67hn7yf32cd4-nixpkgs",
"sha256": "1cb6dmpfsz4zyk41b6z07nhrf20c8b6ryb103kc6088c2vm63ycv",
"hash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=",
"fetchLFS": false,
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false
}