Personal-use NixOS configuration
1{ self, ... }@inputs:
2
3let
4 forAllSystems = inputs.nixpkgs.lib.genAttrs inputs.nixpkgs.lib.systems.flakeExposed;
5
6 mkSystem = import ./lib/mkSystem.nix {
7 inherit inputs;
8
9 flake = self;
10 flakeRoot = ./.;
11 };
12
13 overlayAllSystems =
14 path:
15 forAllSystems (
16 system:
17 let
18 pkgs = import inputs.nixpkgs {
19 inherit system;
20 };
21
22 flake = self;
23 in
24 import path { inherit flake pkgs; }
25 );
26in
27{
28 formatter = forAllSystems (system: inputs.nixpkgs.legacyPackages.${system}.nixfmt-tree);
29
30 packages = overlayAllSystems ./packages;
31
32 nixosModules = import ./modules;
33
34 checks = overlayAllSystems ./tests;
35
36 devShells = overlayAllSystems ./shells;
37
38 nixosConfigurations = {
39 encryption = mkSystem {
40 hostName = "encryption";
41 system = "x86_64-linux";
42 };
43
44 decryption = mkSystem {
45 hostName = "decryption";
46 system = "x86_64-linux";
47
48 isLaptop = true;
49 };
50
51 prospect = mkSystem {
52 hostName = "prospect";
53 system = "x86_64-linux";
54 };
55
56 index = mkSystem {
57 hostName = "index";
58 system = "x86_64-linux";
59
60 extraModules = [
61 inputs.vpn-confinement.nixosModules.default
62 inputs.tangled.nixosModules.knot
63 inputs.tangled.nixosModules.spindle
64 ];
65 };
66 };
67}