ma krops.nix: fix stockholm.file
This commit is contained in:
parent
383091ba2b
commit
964ab6cceb
@ -1,14 +1,14 @@
|
|||||||
{ config ? config, name }: let
|
{ config ? config, name, target ? name }: let
|
||||||
krops = builtins.fetchGit {
|
krops = builtins.fetchGit {
|
||||||
url = https://cgit.krebsco.de/krops/;
|
url = https://cgit.krebsco.de/krops/;
|
||||||
rev = "4e466eaf05861b47365c5ef46a31a188b70f3615";
|
rev = "4e466eaf05861b47365c5ef46a31a188b70f3615";
|
||||||
};
|
};
|
||||||
nixpkgs-src = lib.importJSON ./nixpkgs.json;
|
nixpkgs-src = lib.importJSON ./nixpkgs.json;
|
||||||
lib = import "${krops}/lib";
|
|
||||||
|
|
||||||
# TODO document why pkgs should be used like this
|
lib = import "${krops}/lib";
|
||||||
pkgs = import "${krops}/pkgs" {};
|
pkgs = import "${krops}/pkgs" {};
|
||||||
hostSource = {
|
|
||||||
|
host-src = {
|
||||||
secure = false;
|
secure = false;
|
||||||
full = false;
|
full = false;
|
||||||
torrent = false;
|
torrent = false;
|
||||||
@ -26,15 +26,17 @@
|
|||||||
# + do_sqlite3 ruby: 55a952be5b5
|
# + do_sqlite3 ruby: 55a952be5b5
|
||||||
# + exfat-nofuse bump: ee6a5296a35
|
# + exfat-nofuse bump: ee6a5296a35
|
||||||
# + uhub/sqlite: 5dd7610401747
|
# + uhub/sqlite: 5dd7610401747
|
||||||
nixpkgs.git = {
|
nixpkgs = if test || host-src.full then {
|
||||||
ref = nixpkgs-src.rev;
|
git.ref = nixpkgs-src.rev;
|
||||||
url = nixpkgs-src.url;
|
git.url = nixpkgs-src.url;
|
||||||
|
} else {
|
||||||
|
file = "/home/makefu/store/${nixpkgs-src.rev}";
|
||||||
};
|
};
|
||||||
nixos-config.symlink = "stockholm/makefu/1systems/${name}/config.nix";
|
nixos-config.symlink = "stockholm/makefu/1systems/${name}/config.nix";
|
||||||
|
|
||||||
stockholm.file = toString <stockholm>;
|
stockholm.file = toString ./..;
|
||||||
secrets = if test then {
|
secrets = if test then {
|
||||||
file = toString (./. + "/0tests/data/secrets");
|
file = toString ./0tests/data/secrets;
|
||||||
} else {
|
} else {
|
||||||
pass = {
|
pass = {
|
||||||
dir = "${lib.getEnv "HOME"}/.secrets-pass";
|
dir = "${lib.getEnv "HOME"}/.secrets-pass";
|
||||||
@ -42,9 +44,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
(lib.mkIf (hostSource.torrent) {
|
(lib.mkIf (host-src.torrent) {
|
||||||
torrent-secrets = if test then {
|
torrent-secrets = if test then {
|
||||||
file = ./. + "/makefu/0tests/data/secrets";
|
file = toString ./0tests/data/secrets;
|
||||||
} else {
|
} else {
|
||||||
pass = {
|
pass = {
|
||||||
dir = "${lib.getEnv "HOME"}/.secrets-pass";
|
dir = "${lib.getEnv "HOME"}/.secrets-pass";
|
||||||
@ -52,13 +54,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(lib.mkIf ( hostSource.musnix ) {
|
(lib.mkIf ( host-src.musnix ) {
|
||||||
musnix.git = {
|
musnix.git = {
|
||||||
url = https://github.com/musnix/musnix.git;
|
url = https://github.com/musnix/musnix.git;
|
||||||
ref = "master"; # follow the musnix channel, lets see how this works out
|
ref = "master"; # follow the musnix channel, lets see how this works out
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(lib.mkIf ( hostSource.hw ) {
|
(lib.mkIf ( host-src.hw ) {
|
||||||
nixos-hardware.git = {
|
nixos-hardware.git = {
|
||||||
url = https://github.com/nixos/nixos-hardware.git;
|
url = https://github.com/nixos/nixos-hardware.git;
|
||||||
ref = "30fdd53";
|
ref = "30fdd53";
|
||||||
@ -70,7 +72,7 @@ in {
|
|||||||
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
|
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy)
|
||||||
deploy = pkgs.krops.writeDeploy "${name}-deploy" {
|
deploy = pkgs.krops.writeDeploy "${name}-deploy" {
|
||||||
source = source { test = false; };
|
source = source { test = false; };
|
||||||
target = "root@${name}/var/src";
|
target = "root@${target}/var/src";
|
||||||
};
|
};
|
||||||
|
|
||||||
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test)
|
# usage: $(nix-build --no-out-link --argstr name HOSTNAME -A test)
|
||||||
|
Loading…
Reference in New Issue
Block a user