about summary refs log tree commit diff
path: root/nix/mkSystem.nix
blob: 14035387ffd9dcc13552b7a08a1c8e4ef950077a (plain) (blame)
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
inputs@{ self, ... }:
{ system ? "x86_64-linux", hostname, }:
let
  naersk = inputs.naersk.lib."${system}";
in
inputs.nixpkgs.lib.nixosSystem {
  inherit system;
  specialArgs = { inherit inputs system hostname self; };
  modules = [
    "${self}/modules"
    "${self}/hosts/${hostname}"
    "${self}/modules/homelab"
    ./private-wireguard.nix
    {
      networking.hostName = hostname;
      nixpkgs = {
        config.allowUnfree = true;
        overlays = [
          inputs.nur.overlay
          inputs.rust.overlays.default
          inputs.sendsms.overlay
          (final: prev:
            {
              tools = import "${self}/tools" { pkgs = prev; inherit naersk; };
            })
        ];
      };
    }
  ];
}