-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
30 lines (26 loc) · 882 Bytes
/
flake.nix
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
26
27
28
29
30
{
description = "A program to rollback btrfs subvolume to a snapshot";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
systems.url = "systems";
flake-parts.url = "flake-parts";
minimal-shell.url = "github:tie-infra/minimal-shell";
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = import inputs.systems;
flake.overlays.default = import ./overlay.nix;
perSystem = { lib, pkgs, ... }: {
apps = lib.mkIf (pkgs.stdenv.isLinux) {
default.program =
(pkgs.extend inputs.self.overlays.default).btrfs-rollback;
};
checks = lib.mkIf (pkgs.stdenv.isLinux) {
default = inputs.nixpkgs.lib.nixos.runTest {
imports = [ ./test.nix ];
hostPkgs = pkgs;
defaults.nixpkgs.overlays = [ inputs.self.overlays.default ];
};
};
};
};
}