57 lines
1.3 KiB
Nix
57 lines
1.3 KiB
Nix
inputs:
|
|
with inputs;
|
|
with inputs.nixpkgs.lib; {
|
|
mergeHosts = lists.foldl' (
|
|
a: b: attrsets.recursiveUpdate a b
|
|
) {};
|
|
|
|
mkHost = hostname: {
|
|
platform ? "x86_64-linux",
|
|
suite,
|
|
user ? "fern",
|
|
extraModules ? [],
|
|
}: {
|
|
nixosConfigurations.${hostname} = nixosSystem rec {
|
|
system = platform;
|
|
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config = {
|
|
allowUnfree = true;
|
|
permittedInsecurePackages = [
|
|
"dotnet-sdk-6.0.428"
|
|
"dotnet-runtime-6.0.36"
|
|
];
|
|
};
|
|
};
|
|
|
|
specialArgs = {
|
|
inherit
|
|
hostname
|
|
nixpkgs
|
|
suite
|
|
platform
|
|
user
|
|
; # Inherit variables.
|
|
|
|
userPackages = {
|
|
fluffychat = fluffychat-2_0_0.legacyPackages.${system}.fluffychat;
|
|
feishin = feishin-0_17_0.legacyPackages.${system}.feishin;
|
|
webone = pkgs.callPackage ./packages/webone {};
|
|
};
|
|
|
|
secrets = builtins.toString inputs.secrets; # Secrets directory.
|
|
};
|
|
|
|
modules =
|
|
[
|
|
nixvim.nixosModules.nixvim
|
|
./suites/common.nix
|
|
./suites/${suite}.nix
|
|
./hosts/${suite}/${hostname}.nix
|
|
]
|
|
++ (filesystem.listFilesRecursive ./modules)
|
|
++ extraModules;
|
|
};
|
|
};
|
|
}
|