summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 1a64ab84fbe264949e8def8edcde1587c31098da (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
42
43
{
  inputs = {
    personal-webpage = {
      url = "github:qaristote/webpage";
      inputs.nixpkgs.follows = "/nixpkgs";
    };
    my-nixpkgs.url = "github:qaristote/my-nixpkgs";
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05-small";
    nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
  };

  outputs =
    { self, nixpkgs, nixpkgs-unstable, my-nixpkgs, personal-webpage, ... }: {
      nixosConfigurations = let
        system = "x86_64-linux";
        commonModules = [
          my-nixpkgs.nixosModules.personal
          ({ ... }: {
            nixpkgs.overlays = [
              personal-webpage.overlays.default
              # TODO the order shouldn't matter, yet this overlay doesn't work
              # if it comes first
              my-nixpkgs.overlays.default
              (_: prev: {
                inherit (nixpkgs-unstable.legacyPackages."${prev.system}")
                  filtron;
              })
            ];
          })
        ];
      in {
        hermes = nixpkgs.lib.nixosSystem {
          inherit system;
          modules = commonModules
            ++ [ ./config ./config/hardware-configuration.nix ];
        };
        hermes-test = nixpkgs.lib.nixosSystem {
          inherit system;
          modules = commonModules ++ [ ./tests/configuration.nix ];
        };
      };
    };
}