summaryrefslogtreecommitdiff
path: root/flake.nix
blob: ac3ee30e65f0146235397d719763ac853171e17a (plain)
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
{
  inputs = {
    personal-webpage = {
      url = "github:qaristote/webpage";
      inputs = {
        nixpkgs.follows = "/nixpkgs";
        flake-utils.follows = "/flake-utils";
      };
    };
  };

  outputs = { self, nixpkgs, personal-webpage, flake-utils, ... }@attrs:
    flake-utils.lib.eachDefaultSystem (system: {
      overlays.default = final: prev: {
        personal = import ./pkgs { pkgs = final; } // {
          webpage = personal-webpage.defaultPackage."${system}";
        };
      };
    }) // {
      nixosModules.default = import ./modules;
      nixosConfigurations = let
        system = "x86_64-linux";
        specialArgs = attrs;
        commonModules = [
          self.nixosModules.default
          ({ ... }: {
            nixpkgs.overlays = [ self.overlays."${system}".default ];
          })
        ];
      in {
        hermes = nixpkgs.lib.nixosSystem {
          inherit system specialArgs;
          modules = commonModules ++ [ ./config ./hardware-configuration.nix ];
        };
        hermes-test = nixpkgs.lib.nixosSystem {
          inherit system specialArgs;
          modules = commonModules ++ [ ./tests/configuration.nix ];
        };
      };
    };
}