-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
54 lines (54 loc) · 1.36 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
44
45
46
47
48
49
50
51
52
53
54
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
fretboard = {
url = "github:rossnomann/fretboard";
inputs.nixpkgs.follows = "nixpkgs";
};
makky = {
url = "github:rossnomann/makky";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
let
system = "x86_64-linux";
pkgs = import inputs.nixpkgs { inherit system; };
lib = import ./src/nih/lib pkgs;
nixosSystem =
deviceName:
inputs.nixpkgs.lib.nixosSystem {
inherit lib system;
modules = [
inputs.makky.nixosModules.default
inputs.fretboard.nixosModules.default
./src/nih/packages
./src/nih/modules
./src/config/base.nix
(./src/config + "/${deviceName}.nix")
];
specialArgs = {
nixpkgs = inputs.nixpkgs;
};
};
in
{
devShells.${system}.default = pkgs.mkShell {
shellHook = ''
export NPINS_DIRECTORY=$PWD/src/nih/modules/sources/npins
'';
};
nixosConfigurations = {
legion = nixosSystem "legion";
yoga = nixosSystem "yoga";
};
templates = {
rust = {
path = ./templates/rust;
description = "Rust flake";
};
};
};
}