about summary refs log blame commit diff
path: root/hosts/default.nix
blob: 83fb4c212687b096e793c45d872ffdf38802a1cf (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                           
                          






















                                                                                         
                                                                              




            
{ 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)
    ];
  };

  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 ./${ hostname }/home.nix) ];
          };
        }
      ];
    };
}