summaryrefslogtreecommitdiffstats
path: root/ci.nix
blob: 258a4e6f6ef3e8a0f78243aad33f7c1746cc37c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
let
  krops = ./.;

  lib = import "${krops}/lib";
  pkgs = import "${krops}/pkgs" {};

  source = lib.evalSource [{
    nixos-config.file = toString (pkgs.writeText "nixos-config" ''
      { pkgs, ... }: {

        fileSystems."/" = { device = "/dev/sda1"; };
        boot.loader.systemd-boot.enable = true;
        services.openssh.enable = true;
        environment.systemPackages = [ pkgs.git ];
      }
    '');
    nixpkgs.symlink = toString <nixpkgs>;
  }];
in {
  test = pkgs.krops.writeTest "test" {
    force = true;
    source = source;
    target = "${lib.getEnv "HOME"}/krops-test";
  };
}