format according to nixpkgs standards

This commit is contained in:
Florian Schmitt 2024-12-26 13:24:03 +03:00
parent 9f9d513b23
commit 4bebdc4fe4

View file

@ -3,25 +3,27 @@ let
url = "https://cgit.krebsco.de/krops/"; url = "https://cgit.krebsco.de/krops/";
}; };
lib = import "${krops}/lib"; lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" {}; pkgs = import "${krops}/pkgs" { };
importJson = (import <nixpkgs> {}).lib.importJSON; importJson = (import <nixpkgs> { }).lib.importJSON;
source = name: lib.evalSource [ source =
{ name:
config.file = toString ./config/${name}; lib.evalSource [
modules.file = toString ./modules; {
nixos-config.symlink = "config/configuration.nix"; config.file = toString ./config/${name};
secrets.pass = { modules.file = toString ./modules;
dir = toString ~/.password-store/nixin-password-store/krops; nixos-config.symlink = "config/configuration.nix";
name = "${name}"; secrets.pass = {
}; dir = toString ~/.password-store/nixin-password-store/krops;
nixpkgs.git = { name = "${name}";
ref = (importJson ./nixpkgs.json).rev; };
url = https://github.com/NixOS/nixpkgs; nixpkgs.git = {
shallow = true; ref = (importJson ./nixpkgs.json).rev;
}; url = "https://github.com/NixOS/nixpkgs";
} shallow = true;
]; };
}
];
arachnide = pkgs.krops.writeDeploy "deploy-server-arachnide" { arachnide = pkgs.krops.writeDeploy "deploy-server-arachnide" {
source = source "arachnide"; source = source "arachnide";
@ -89,13 +91,20 @@ let
''; '';
}; };
in { in
{
arachnide = arachnide; arachnide = arachnide;
framboise = framboise; framboise = framboise;
grille-pain = grille-pain; grille-pain = grille-pain;
dromadaire = dromadaire; dromadaire = dromadaire;
all = pkgs.writeScript "deploy-all-servers" all = pkgs.writeScript "deploy-all-servers" (
(lib.concatStringsSep "\n" [ arachnide framboise grille-pain dromadaire ]); lib.concatStringsSep "\n" [
arachnide
framboise
grille-pain
dromadaire
]
);
register-runner = register-runner; register-runner = register-runner;
gen-token-arachnide = gen-token-arachnide; gen-token-arachnide = gen-token-arachnide;
gen-token-framboise = gen-token-framboise; gen-token-framboise = gen-token-framboise;