2023-08-29 14:07:17 +01:00
|
|
|
{
|
|
|
|
self,
|
|
|
|
nixpkgs-unstable,
|
|
|
|
...
|
|
|
|
} @ inputs: let
|
|
|
|
inherit (nixpkgs-unstable.lib) forEach;
|
|
|
|
|
2022-12-03 16:40:50 +00:00
|
|
|
mkTree = inputs.tree-input.tree;
|
2022-12-04 13:45:43 +00:00
|
|
|
metaTree = mkTree ((import ../treeConfig.nix {}) // {inherit inputs;});
|
2022-12-03 16:40:50 +00:00
|
|
|
tree = metaTree.impure;
|
|
|
|
|
2022-12-04 13:45:43 +00:00
|
|
|
patchedInputs =
|
|
|
|
inputs
|
|
|
|
// {
|
|
|
|
# set these to the correct versions from inputs
|
|
|
|
nixpkgs = inputs.nixpkgs-unstable;
|
|
|
|
home-manager = inputs.home-manager-unstable;
|
|
|
|
};
|
2022-03-02 17:36:42 +00:00
|
|
|
|
2022-12-03 16:40:50 +00:00
|
|
|
defaultSpecialArgs = {
|
2023-08-29 14:07:17 +01:00
|
|
|
inherit self;
|
2022-12-03 16:40:50 +00:00
|
|
|
tree = metaTree.impure;
|
|
|
|
pureTree = metaTree.pure;
|
|
|
|
inputs = patchedInputs;
|
2022-03-02 17:49:49 +00:00
|
|
|
};
|
|
|
|
|
2022-12-03 16:40:50 +00:00
|
|
|
defaultModules = [
|
|
|
|
tree.profiles.base
|
2023-09-08 13:39:59 +01:00
|
|
|
|
2022-03-02 17:49:49 +00:00
|
|
|
inputs.home-manager-unstable.nixosModules.home-manager
|
2022-11-11 16:32:26 +00:00
|
|
|
|
2023-10-14 12:35:20 +01:00
|
|
|
inputs.nixos-wsl.nixosModules.default
|
|
|
|
|
2023-09-13 16:21:54 +01:00
|
|
|
inputs.vaultui.nixosModules.default
|
2023-09-08 13:39:59 +01:00
|
|
|
|
2023-09-28 19:22:33 +01:00
|
|
|
tree.modules.nixos.rcloneServe
|
|
|
|
tree.modules.nixos.rcloneSync
|
2022-12-03 16:40:50 +00:00
|
|
|
tree.modules.nixos.secrets
|
2023-10-10 22:22:54 +01:00
|
|
|
tree.modules.nixos.postgreSQLRemoteBackup
|
2023-10-14 13:51:03 +01:00
|
|
|
tree.modules.nixos.wslBuildTarballExt
|
2022-03-02 17:49:49 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nixosUnstableSystem = nixpkgs-unstable.lib.nixosSystem;
|
2023-09-18 03:56:58 +01:00
|
|
|
|
|
|
|
nixosX86_64LiveWithExtraDepsForMachines = machines:
|
|
|
|
nixosUnstableSystem {
|
|
|
|
specialArgs =
|
|
|
|
defaultSpecialArgs
|
|
|
|
// {
|
|
|
|
hostPath = ./nixos-live;
|
|
|
|
};
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules =
|
|
|
|
defaultModules
|
|
|
|
++ [
|
|
|
|
./nixos-live/nixos-live.nix
|
|
|
|
({...}: {
|
|
|
|
system.extraDependencies =
|
|
|
|
forEach machines (system:
|
|
|
|
self.nixosConfigurations.${system}.config.system.build.toplevel);
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
2022-03-02 17:36:42 +00:00
|
|
|
in {
|
2023-07-21 11:48:07 +01:00
|
|
|
lappy-t495 = nixosUnstableSystem {
|
2023-09-18 03:56:58 +01:00
|
|
|
specialArgs =
|
|
|
|
defaultSpecialArgs
|
|
|
|
// {
|
|
|
|
hostPath = ./lappy-t495;
|
|
|
|
};
|
2023-07-21 11:48:07 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules ++ [./lappy-t495/lappy-t495.nix ./lappy-t495/hardware.nix];
|
|
|
|
};
|
2022-11-10 11:25:33 +00:00
|
|
|
|
2023-10-14 12:35:20 +01:00
|
|
|
wsl = nixosUnstableSystem {
|
|
|
|
specialArgs =
|
|
|
|
defaultSpecialArgs
|
|
|
|
// {
|
|
|
|
hostPath = ./wsl;
|
|
|
|
};
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules ++ [./wsl/wsl.nix];
|
|
|
|
};
|
|
|
|
|
2023-09-20 18:56:09 +01:00
|
|
|
hetzner-arm = nixosUnstableSystem {
|
|
|
|
specialArgs =
|
|
|
|
defaultSpecialArgs
|
|
|
|
// {
|
|
|
|
hostPath = ./hetzner-arm;
|
|
|
|
};
|
|
|
|
system = "aarch64-linux";
|
|
|
|
modules = defaultModules ++ [./hetzner-arm/hetzner-arm.nix];
|
|
|
|
};
|
|
|
|
|
2022-11-02 10:24:47 +00:00
|
|
|
vault = nixosUnstableSystem {
|
2023-09-18 03:56:58 +01:00
|
|
|
specialArgs =
|
|
|
|
defaultSpecialArgs
|
|
|
|
// {
|
|
|
|
hostPath = ./vault;
|
|
|
|
};
|
2023-09-20 15:46:20 +01:00
|
|
|
system = "aarch64-linux";
|
2022-12-04 13:45:43 +00:00
|
|
|
modules = defaultModules ++ [./vault/vault.nix];
|
2022-11-02 10:24:47 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 09:05:24 +00:00
|
|
|
# nix build .#nixosConfigurations.nixos-live-x86_64.config.system.build.isoImage
|
2023-09-20 17:31:36 +01:00
|
|
|
nixos-live-x86_64 = nixosX86_64LiveWithExtraDepsForMachines ["lappy-t495"];
|
2023-08-29 14:07:17 +01:00
|
|
|
|
2022-03-02 17:36:42 +00:00
|
|
|
# nix --no-sandbox build .#nixosConfigurations.raspberry.config.system.build.sdImage
|
|
|
|
raspberry = nixosUnstableSystem {
|
2023-09-20 18:44:24 +01:00
|
|
|
specialArgs =
|
|
|
|
defaultSpecialArgs
|
|
|
|
// {
|
|
|
|
hostPath = ./vault;
|
|
|
|
};
|
2022-03-02 17:36:42 +00:00
|
|
|
system = "aarch64-linux";
|
2022-12-04 13:45:43 +00:00
|
|
|
modules = defaultModules ++ [./raspberry/raspberry.nix];
|
2022-03-02 17:36:42 +00:00
|
|
|
};
|
|
|
|
}
|