2019-06-08 14:59:43 +02:00
|
|
|
{ catullus-ssh ? "root@catullus.r:22022"
|
2019-04-10 21:14:29 +02:00
|
|
|
, scardanelli-ssh ? "root@scardanelli.r:22022"
|
|
|
|
|
, homeros-ssh ? "root@homeros.r:22022"
|
2019-06-15 17:50:02 +02:00
|
|
|
, wilde-ssh ? "root@192.168.178.31:22"
|
2019-04-10 21:14:29 +02:00
|
|
|
}:
|
2019-01-31 23:39:38 +01:00
|
|
|
let
|
|
|
|
|
krops = builtins.fetchGit {
|
|
|
|
|
url = "https://cgit.krebsco.de/krops/";
|
2019-05-15 18:21:58 +02:00
|
|
|
ref = "v1.14.0";
|
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
|
|
|
|
2019-04-20 09:08:39 +02:00
|
|
|
niveum = path: {
|
2019-01-31 23:39:38 +01:00
|
|
|
nixpkgs.git = {
|
|
|
|
|
url = https://github.com/NixOS/nixpkgs-channels;
|
2019-04-11 15:06:03 +02:00
|
|
|
ref = (importJson ./nixpkgs.json).rev;
|
2019-04-11 07:52:05 +02:00
|
|
|
};
|
2019-04-20 09:56:39 +02:00
|
|
|
nixos-unstable.git = {
|
|
|
|
|
url = https://github.com/NixOS/nixpkgs-channels;
|
|
|
|
|
ref = "nixos-unstable";
|
|
|
|
|
};
|
2019-04-20 09:08:39 +02:00
|
|
|
system.file = toString path;
|
|
|
|
|
lib.file = toString ./lib;
|
|
|
|
|
packages.file = toString ./packages;
|
|
|
|
|
configs.file = toString ./configs;
|
|
|
|
|
dot.file = toString ./dot;
|
|
|
|
|
modules.file = toString ./modules;
|
|
|
|
|
|
|
|
|
|
nixos-config.symlink = "system/configuration.nix";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
minimal = path: other: lib.evalSource [(niveum path // other)];
|
|
|
|
|
|
2019-05-29 19:26:16 +02:00
|
|
|
regular = path: name: minimal path {
|
2019-04-19 03:11:51 +02:00
|
|
|
home-manager.git = {
|
|
|
|
|
url = https://github.com/rycee/home-manager;
|
|
|
|
|
ref = "2ccbf43";
|
|
|
|
|
};
|
2019-04-18 17:09:34 +02:00
|
|
|
stockholm.git = {
|
|
|
|
|
url = https://cgit.krebsco.de/stockholm;
|
2019-05-17 07:25:03 +02:00
|
|
|
ref = "1340e3fb";
|
2019-04-18 17:09:34 +02:00
|
|
|
};
|
2019-05-29 19:26:16 +02:00
|
|
|
secrets.pass = {
|
2019-06-17 17:13:35 +02:00
|
|
|
dir = toString ~/.password-store/niveum/systems;
|
2019-05-29 19:26:16 +02:00
|
|
|
inherit name;
|
|
|
|
|
};
|
2019-06-15 17:50:02 +02:00
|
|
|
art.file = toString ./art;
|
2019-05-29 17:23:38 +02:00
|
|
|
};
|
2019-01-31 23:39:38 +01:00
|
|
|
|
2019-04-10 21:14:29 +02:00
|
|
|
systems.scardanelli = pkgs.krops.writeDeploy "deploy-scardanelli" {
|
2019-05-29 19:26:16 +02:00
|
|
|
source = regular ./systems/scardanelli "scardanelli";
|
2019-04-10 21:14:29 +02:00
|
|
|
target = scardanelli-ssh;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
systems.homeros = pkgs.krops.writeDeploy "deploy-homeros" {
|
2019-05-29 19:26:16 +02:00
|
|
|
source = regular ./systems/homeros "homeros";
|
2019-04-10 21:14:29 +02:00
|
|
|
target = homeros-ssh;
|
|
|
|
|
};
|
|
|
|
|
|
2019-06-15 17:50:02 +02:00
|
|
|
systems.wilde = pkgs.krops.writeDeploy "deploy-wilde" {
|
|
|
|
|
source = regular ./systems/wilde "wilde";
|
|
|
|
|
target = wilde-ssh;
|
|
|
|
|
};
|
|
|
|
|
|
2019-01-31 23:39:38 +01:00
|
|
|
systems.catullus = pkgs.krops.writeDeploy "deploy-catullus" {
|
2019-04-20 09:08:39 +02:00
|
|
|
source = minimal ./systems/catullus {
|
|
|
|
|
secrets.pass = {
|
|
|
|
|
dir = toString ~/.password-store;
|
|
|
|
|
name = "catullus";
|
2019-04-13 23:26:01 +02:00
|
|
|
};
|
|
|
|
|
};
|
2019-02-06 13:17:31 +01:00
|
|
|
target = catullus-ssh;
|
2019-01-31 23:39:38 +01:00
|
|
|
};
|
|
|
|
|
in systems // {
|
|
|
|
|
all = pkgs.writeScript "deploy-all" (lib.concatStringsSep "\n" (lib.attrValues systems));
|
|
|
|
|
}
|