ci.nix 603 B

12345678910111213141516171819202122232425
  1. let
  2. krops = ./.;
  3. lib = import "${krops}/lib";
  4. pkgs = import "${krops}/pkgs" {};
  5. source = lib.evalSource [{
  6. nixos-config.file = toString (pkgs.writeText "nixos-config" ''
  7. { pkgs, ... }: {
  8. fileSystems."/" = { device = "/dev/sda1"; };
  9. boot.loader.systemd-boot.enable = true;
  10. services.openssh.enable = true;
  11. environment.systemPackages = [ pkgs.git ];
  12. }
  13. '');
  14. nixpkgs.symlink = toString <nixpkgs>;
  15. }];
  16. in {
  17. test = pkgs.krops.writeTest "test" {
  18. force = true;
  19. source = source;
  20. target = "${lib.getEnv "HOME"}/krops-test";
  21. };
  22. }