nixos-config/flake.nix
2022-01-01 09:36:01 +01:00

41 lines
984 B
Nix

{
description = "my krops file";
inputs = {
secrets = {
url = "git+ssh://gitlab@gitlab.ingolf-wagner.de/palo/nixos-secrets?ref=main";
flake = false;
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.05";
krops = {
url = "github:Mic92/krops";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, krops, secrets, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
writeCommand = krops.packages.${system}.writeCommand;
in
{
# deployment
apps.${system} = {
# nix run ".#deploy.sterni"
deploy = pkgs.callPackage ./nixos/krops.nix {
inherit writeCommand secrets;
lib = krops.lib;
};
# nix run ".#test.sterni"
test = pkgs.callPackage ./nixos/krops.nix {
inherit writeCommand secrets;
lib = krops.lib;
nixosRebuildCommand = "test";
};
};
};
}