-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathflake.nix
43 lines (39 loc) · 1.15 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
{
inputs.nixpkgs.url = github:NixOS/nixpkgs;
inputs.sops-nix.url = github:Mic92/sops-nix;
outputs = { self, nixpkgs, sops-nix }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in
{
mk_scalpel = {matchers, source, destination, user ? null, group ? null, mode ? null}:
pkgs.callPackage ./packages/scalpel.nix {
inherit matchers source destination user group mode;
};
nixosModules.scalpel = import ./modules/scalpel { inherit self; };
nixosModule = self.nixosModules.scalpel;
nixosConfigurations = let
base_sys = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
sops-nix.nixosModules.sops
./example/system.nix
];
};
in {
exampleContainer = base_sys.extendModules {
modules = [
self.nixosModules.scalpel
./example/scalpel.nix
];
specialArgs = { prev = base_sys; };
};
exampleContainerManual = base_sys.extendModules {
modules = [
./example/scalpel-manual.nix
];
specialArgs = { prev = base_sys; inherit (self) mk_scalpel; };
};
};
};
}