-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
52 lines (43 loc) · 1.3 KB
/
flake.nix
File metadata and controls
52 lines (43 loc) · 1.3 KB
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
44
45
46
47
48
49
50
51
52
{
description = "image-based atomic nix-provisioned systems";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
{ self, ... }@inputs:
let
system = "x86_64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system};
in
{
nixosModules.pattern = ./module;
nixosConfigurations = {
demo = inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
self.nixosModules.pattern
./demo
{ pattern.image.version = "0.0.1"; }
];
};
demo-update = inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
self.nixosModules.pattern
./demo
{
pattern.image.version = "0.0.2";
environment.systemPackages = [ pkgs.fastfetch ];
}
];
};
};
packages.${system} = {
gen-keyring = pkgs.writeShellScriptBin "gen-keyring" (builtins.readFile ./scripts/gen-keyring);
sign-release = pkgs.writeShellScriptBin "sign-release" (builtins.readFile ./scripts/sign-release);
run-demo = pkgs.callPackage ./scripts/run-demo.nix { };
};
};
}