1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00
Files
niveum/deploy.nix
Kierán Meinhardt c0cee07a0d catullus: fix deploy
2019-04-13 23:26:01 +02:00

59 lines
1.7 KiB
Nix

{ catullus-ssh ? "root@catullus.r"
, scardanelli-ssh ? "root@scardanelli.r:22022"
, homeros-ssh ? "root@homeros.r:22022"
}:
let
krops = builtins.fetchGit {
url = "https://cgit.krebsco.de/krops/";
};
lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" {};
importJson = (import <nixpkgs> {}).lib.importJSON;
source = {path, other ? {}}: lib.evalSource [({
nixpkgs.git = {
url = https://github.com/NixOS/nixpkgs-channels;
ref = (importJson ./nixpkgs.json).rev;
};
# stockholm.git = {
# url = https://cgit.krebsco.de/stockholm;
# ref = "7e1b197dab13d024ba491c96dc959306324943c0";
# };
system.file = toString path;
art.file = toString ./art;
lib.file = toString ./lib;
packages.file = toString ./packages;
systems.file = toString ./systems;
configs.file = toString ./configs;
dot.file = toString ./dot;
modules.file = toString ./modules;
nixos-config.symlink = "system/configuration.nix";
} // other)];
systems.scardanelli = pkgs.krops.writeDeploy "deploy-scardanelli" {
source = source { path = ./systems/scardanelli; };
target = scardanelli-ssh;
};
systems.homeros = pkgs.krops.writeDeploy "deploy-homeros" {
source = source { path = ./systems/homeros; };
target = homeros-ssh;
};
systems.catullus = pkgs.krops.writeDeploy "deploy-catullus" {
source = source {
path = ./systems/catullus;
other = {
secrets.pass = {
dir = toString ~/.password-store;
name = "catullus";
};
};
};
target = catullus-ssh;
};
in systems // {
all = pkgs.writeScript "deploy-all" (lib.concatStringsSep "\n" (lib.attrValues systems));
}