diff --git a/default.nix b/default.nix deleted file mode 100644 index d077cc0..0000000 --- a/default.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ pkgs, ... }: -{ - imports = [ - ../krebs - ./2configs - ./3modules - ]; - nixpkgs.config.packageOverrides = import ./5pkgs pkgs; -} diff --git a/krops.nix b/krops.nix deleted file mode 100644 index 9467760..0000000 --- a/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; }; - }; -} diff --git a/nixpkgs.json b/nixpkgs.json deleted file mode 100644 index 08dd715..0000000 --- a/nixpkgs.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "url": "https://github.com/makefu/nixpkgs", - "rev": "cba65c1ab2aec20f0eaa77d6747f16798688e1bb", - "date": "2019-02-25T00:04:17+01:00", - "sha256": "1h6d9kghs7n7nql7fw5v9fpmpgdq6xq62npc7cfvyam8g4ma9iwn", - "fetchSubmodules": false -} diff --git a/update-channel.sh b/update-channel.sh deleted file mode 100755 index 0899581..0000000 --- a/update-channel.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -dir=$(dirname $0) -oldref=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/') -nix-shell -p nix-prefetch-git --run 'nix-prefetch-git \ - --url https://github.com/makefu/nixpkgs \ - --rev refs/heads/master' \ -> $dir/nixpkgs.json -newref=$(cat $dir/nixpkgs.json | jq -r .rev | sed 's/\(.\{7\}\).*/\1/') -echo "git commit $dir/nixpkgs.json -m 'ma nixpkgs: $oldref -> $newref'"