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

59 lines
1.8 KiB
Nix
Raw Normal View History

2019-04-10 21:14:29 +02:00
{ catullus-ssh ? "root@catullus.r"
, scardanelli-ssh ? "root@scardanelli.r:22022"
, homeros-ssh ? "root@homeros.r:22022"
}:
2019-01-31 23:39:38 +01:00
let
krops = builtins.fetchGit {
url = "https://cgit.krebsco.de/krops/";
};
lib = import "${krops}/lib";
pkgs = import "${krops}/pkgs" {};
source = name: path: lib.evalSource [{
2019-01-31 23:39:38 +01:00
nixpkgs.git = {
url = https://github.com/NixOS/nixpkgs-channels;
2019-04-10 21:14:29 +02:00
# ref = "6a3f5bcb061e1822f50e299f5616a0731636e4e7"; # 18.09
ref = builtins.readFile ./NIXPKGS_VERSION;
};
nix-writers.git = {
url = https://cgit.krebsco.de/nix-writers/;
ref = "4d0829328e885a6d7163b513998a975e60dd0a72";
2019-01-31 23:39:38 +01:00
};
2019-04-10 21:14:29 +02:00
# stockholm.git = {
# url = https://cgit.krebsco.de/stockholm;
2019-04-11 07:43:08 +02:00
# ref = "7e1b197dab13d024ba491c96dc959306324943c0";
2019-04-10 21:14:29 +02:00
# };
2019-01-31 23:39:38 +01:00
system.file = toString path;
2019-04-11 07:43:08 +02:00
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";
2019-04-10 21:14:29 +02:00
# secrets.pass = {
# dir = toString ~/.password-store;
# name = name;
# };
2019-01-31 23:39:38 +01:00
}];
2019-04-10 21:14:29 +02:00
systems.scardanelli = pkgs.krops.writeDeploy "deploy-scardanelli" {
2019-04-11 07:43:08 +02:00
source = source "scardanelli" ./systems/scardanelli;
2019-04-10 21:14:29 +02:00
target = scardanelli-ssh;
};
systems.homeros = pkgs.krops.writeDeploy "deploy-homeros" {
2019-04-11 07:43:08 +02:00
source = source "homeros" ./systems/homeros;
2019-04-10 21:14:29 +02:00
target = homeros-ssh;
};
2019-01-31 23:39:38 +01:00
systems.catullus = pkgs.krops.writeDeploy "deploy-catullus" {
2019-04-11 07:43:08 +02:00
source = source "catullus" ./systems/catullus;
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));
}