about summary refs log tree commit diff
path: root/hosts/default.nix
blob: f6814c5d191131b30ef4a4d0dc18a97e6880c438 (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
31
32
33
34
35
36
37
38
39
40
{ user, lib, nixpkgs, nur, inputs, home-manager, ... }:
let
  system = "x86_64-linux"; # System architecture

  pkgs = import nixpkgs {
    inherit system;
    config.allowUnfree = true; # Allow proprietary software
    overlays = [
      nur.overlay
      (import ../packages)
      (import ../overlays/base.nix)
    ];
  };

  inherit (nixpkgs.lib);

  secrets = import ../secrets;
in
{
  phobos =
    let hostname = "phobos";
    in
    lib.nixosSystem {
      inherit system;
      specialArgs = { inherit pkgs inputs user secrets hostname; };
      modules = [
        ./configuration.nix
        ./phobos
        home-manager.nixosModules.home-manager
        {
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.extraSpecialArgs = { inherit pkgs user secrets hostname inputs; };
          home-manager.users.${user} = {
            imports = [ ./home.nix ] ++ [ (import ./phobos/home.nix) ];
          };
        }
      ];
    };
}