diff options
author | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-07-28 22:24:15 +0200 |
commit | 060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch) | |
tree | 2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/krops.nix | |
parent | cbfcc890e3b76d942b927809bf981a5fa7289e6a (diff) |
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/krops.nix')
-rw-r--r-- | makefu/krops.nix | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/makefu/krops.nix b/makefu/krops.nix deleted file mode 100644 index 94677609e..000000000 --- a/makefu/krops.nix +++ /dev/null @@ -1,110 +0,0 @@ -{ config ? config, name, target ? name , buildTarget ? target }: let - krops = ../submodules/krops; - nixpkgs-src = lib.importJSON ../krebs/nixpkgs.json; - - lib = import "${krops}/lib"; - pkgs = import "${krops}/pkgs" {}; - - host-src = { - secure = false; - torrent = false; - hw = false; - musnix = false; - python = false; - unstable = false; #unstable channel checked out - mic92 = false; - nms = false; - arm6 = false; - clever_kexec = false; - home-manager = false; - nix-ld = false; - } // import (./. + "/1systems/${name}/source.nix"); - source = { test }: lib.evalSource [ - { - nixpkgs = if host-src.arm6 then { - # TODO: we want to track the unstable channel - symlink = "/nix/var/nix/profiles/per-user/root/channels/nixos/"; - } else { - derivation = '' - with import (builtins.fetchTarball { - url = "https://github.com/nixos/nixpkgs/archive/${nixpkgs-src.rev}.tar.gz"; - sha256 = "${nixpkgs-src.sha256}"; - }) {}; - pkgs.fetchFromGitHub { - owner = "nixos"; - repo = "nixpkgs"; - rev = "${nixpkgs-src.rev}"; - sha256 = "${nixpkgs-src.sha256}"; - } - ''; - }; - nixos-config.symlink = "stockholm/makefu/1systems/${name}/config.nix"; - - stockholm.file = toString ./..; - secrets = if test then { - file = toString ./0tests/data/secrets; - } else { - pass = { - dir = "${lib.getEnv "HOME"}/.secrets-pass"; - inherit name; - }; - }; - } - (lib.mkIf (host-src.unstable) { - nixpkgs-unstable.git = { - url = "https://github.com/nixos/nixpkgs"; - ref = (lib.importJSON ../krebs/nixpkgs-unstable.json).rev; - }; - }) - (lib.mkIf (host-src.torrent) { - torrent-secrets = if test then { - file = toString ./0tests/data/secrets; - } else { - pass = { - dir = "${lib.getEnv "HOME"}/.secrets-pass"; - name = "torrent"; - }; - }; - }) - (lib.mkIf ( host-src.musnix ) { - musnix.git = { - url = https://github.com/musnix/musnix.git; - ref = "master"; # follow the musnix channel, lets see how this works out - }; - }) - (lib.mkIf ( host-src.hw ) { - nixos-hardware.git = { - url = https://github.com/nixos/nixos-hardware.git; - ref = "9d87bc030a0bf3f00e953dbf095a7d8e852dab6b"; - }; - }) - - (lib.mkIf ( host-src.nix-ld ) { - nix-ld.git = { - url = https://github.com/Mic92/nix-ld.git; - ref = "7d251c0c5adf6b9b003499243be257d0f130b3d6"; - }; - }) - (lib.mkIf ( host-src.home-manager ) { - home-manager.git = { - url = https://github.com/rycee/home-manager; - ref = "054d9e3187ca00479e8036dc0e92900a384f30fd"; - }; - }) - ]; - -in { - # usage: $(nix-build --no-out-link --argstr name HOSTNAME -A deploy) - deploy = pkgs.krops.writeDeploy "${name}-deploy" { - source = source { test = false; }; - target = "root@${target}/var/src"; - buildTarget = if target == buildTarget then "root@${target}/var/src" else "root@${buildTarget}/tmp/"; - }; - - # usage: $(nix-build --no-out-link --argstr name HOSTNAME --argstr target PATH -A test) - test = { target ? target }: pkgs.krops.writeTest "${name}-test" { - force = true; - inherit target; - source = source { test = true; }; - }; -} |