Files
nixos/hosts/default.nix
T

55 lines
1.5 KiB
Nix
Raw Normal View History

2023-06-21 10:58:40 -05:00
{ inputs, overlays, ... }:
2023-05-11 09:32:05 -05:00
let
2023-06-21 10:58:40 -05:00
wsl = args: (unstable (args // { extraMods = [ inputs.wsl.nixosModules.wsl ]; }));
2023-11-03 12:41:49 -05:00
unstable = args: (machine (args // {
channel = inputs.nixunstable;
hm = inputs.hmunstable;
}));
2023-05-11 09:32:05 -05:00
machine = {
2023-06-21 10:58:40 -05:00
channel ? inputs.nixstable,
2023-06-28 22:51:18 -05:00
extraMods ? [],
name,
2023-11-03 12:41:49 -05:00
system ? "x86_64-linux",
hm ? inputs.hm
2023-05-11 09:32:05 -05:00
}:
let
2023-06-28 22:51:18 -05:00
nixpkgs = import channel {
inherit system;
};
in channel.lib.nixosSystem {
2023-05-11 09:32:05 -05:00
inherit system;
2024-03-04 23:03:47 -06:00
specialArgs = { inherit nixpkgs inputs overlays; };
2023-05-11 09:32:05 -05:00
modules = [
2023-06-28 22:51:18 -05:00
{
nixpkgs.overlays = overlays;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.greg = import ../home/home.nix;
home-manager.extraSpecialArgs = {
2024-02-26 11:39:56 -06:00
inherit inputs overlays;
2023-06-28 22:51:18 -05:00
home = "/home/greg";
2023-08-21 10:34:42 -05:00
host = name;
2023-06-28 22:51:18 -05:00
};
}
2023-06-21 10:58:40 -05:00
inputs.agenix.nixosModules.default
2023-11-03 12:41:49 -05:00
hm.nixosModules.home-manager
2024-02-09 14:33:51 -06:00
inputs.self.modules.nixosModule
2023-05-11 09:32:05 -05:00
./${name}
] ++ extraMods;
};
in {
2024-01-22 13:56:14 -06:00
genesis = machine { name = "genesis"; };
2024-02-26 11:39:56 -06:00
jude = unstable { name = "jude"; };
2023-05-11 09:32:05 -05:00
icdm-root = unstable { name = "icdm-root"; };
linode = machine { name = "linode"; };
2024-04-02 11:17:44 -05:00
hosea = unstable { name = "hosea"; };
2024-04-16 08:34:06 -05:00
jeremiah = unstable { name = "jeremiah"; };
2023-12-12 16:25:58 -06:00
myself = unstable { name = "myself"; };
2023-05-11 09:32:05 -05:00
iso = machine { name = "iso"; };
2023-12-06 08:06:52 -06:00
iso-beta = unstable { name = "iso"; };
2023-05-11 09:32:05 -05:00
# nix build '.#nixosConfigurations.wsl.config.system.build.installer'
nixos = wsl { name = "wsl"; system = "aarch64-linux"; };
# nix build '.#nixosConfigurations.wsl-aarch.config.system.build.installer'
nixos-arm = wsl { name = "wsl"; system = "aarch64-linux"; };
}