-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
44 lines (35 loc) · 1.04 KB
/
Copy pathflake.nix
File metadata and controls
44 lines (35 loc) · 1.04 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
# this was taken from hydra
{
description = "A simple flake comprising a package and a module which can be added to a NixOS configuration";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11-small";
outputs =
{
self,
nixpkgs,
nix,
}:
let
systems = [
"x86_64-linux"
"aarch64-linux"
];
forEachSystem = nixpkgs.lib.genAttrs systems;
overlayList = [ self.overlays.default ];
pkgsBySystem = forEachSystem (
system:
import nixpkgs {
inherit system;
overlays = overlayList;
}
);
in
rec {
# A Nixpkgs overlay that provides a 'simple-go-webserver' package.
overlays.default = final: prev: { simple-go-server = final.callPackage ./package.nix { }; };
packages = forEachSystem (system: {
simple-go-server = pkgsBySystem.${system}.simple-go-server;
default = pkgsBySystem.${system}.simple-go-server;
});
nixosModules = import ./nixos-modules { overlays = overlayList; };
};
}