1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 18:21:07 +01:00
Files
niveum/deploy.nix

52 lines
1.7 KiB
Nix
Raw Normal View History

2019-01-31 23:39:38 +01:00
let
krops = builtins.fetchGit {
url = "https://cgit.krebsco.de/krops/";
2019-10-30 22:09:49 +01:00
ref = (importJson _versions/krops.json).rev;
2019-01-31 23:39:38 +01:00
};
lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" {};
2019-04-11 15:06:03 +02:00
importJson = (import <nixpkgs> {}).lib.importJSON;
2019-01-31 23:39:38 +01:00
regularSystem = path: name: {
2019-06-17 18:01:14 +02:00
source = lib.evalSource [
2019-10-26 13:43:30 +02:00
{
niveum.file = toString ./.;
2019-06-17 18:01:14 +02:00
system.file = toString path;
2019-10-26 13:43:30 +02:00
nixos-config.symlink = "system/configuration.nix";
nixpkgs.git = {
2019-10-30 22:09:49 +01:00
url = "https://github.com/NixOS/nixpkgs-channels";
ref = (importJson _versions/nixpkgs.json).rev;
2019-10-26 13:43:30 +02:00
};
nixos-unstable.git = {
2019-10-30 22:09:49 +01:00
url = "https://github.com/NixOS/nixpkgs-channels";
ref = (importJson _versions/nixpkgs-unstable.json).rev;
2019-10-26 13:43:30 +02:00
};
home-manager.git = {
2019-10-30 22:09:49 +01:00
url = "https://github.com/rycee/home-manager";
ref = (importJson _versions/home-manager.json).rev;
2019-10-26 13:43:30 +02:00
};
stockholm.git = {
2019-10-30 22:09:49 +01:00
url = "https://cgit.krebsco.de/stockholm";
ref = (importJson _versions/stockholm.json).rev;
2019-10-26 13:43:30 +02:00
};
2019-06-17 18:01:14 +02:00
secrets.pass = {
dir = toString ~/.password-store/systems;
inherit name;
};
2019-06-18 09:23:20 +02:00
shared-secrets.pass = {
dir = toString ~/.password-store;
name = "shared";
};
2019-10-26 13:43:30 +02:00
}
2019-06-17 18:01:14 +02:00
];
target = "root@${name}:22022";
2019-04-10 21:14:29 +02:00
};
2019-06-17 18:01:14 +02:00
in {
scardanelli = pkgs.krops.writeDeploy "deploy-scardanelli" (regularSystem systems/scardanelli "scardanelli");
homeros = pkgs.krops.writeDeploy "deploy-homeros" (regularSystem systems/homeros "homeros");
wilde = pkgs.krops.writeDeploy "deploy-wilde" (regularSystem systems/wilde "wilde");
2019-04-10 21:14:29 +02:00
2019-10-13 12:48:51 +02:00
catullus = pkgs.krops.writeDeploy "deploy-catullus" (regularSystem systems/catullus "catullus");
2019-01-31 23:39:38 +01:00
}