Compare commits

..

No commits in common. "main" and "testing" have entirely different histories.

View file

@ -12,14 +12,13 @@ with inputs.nixpkgs.lib; {
suite ? "", suite ? "",
docker ? false, docker ? false,
hostModules ? [], hostModules ? [],
}: let }:
# Secrets directory. {
secrets = builtins.toString inputs.secrets; nixosConfigurations.${hostname} = nixosSystem rec {
# Architecture. # Architecture.
system = platform; system = platform;
# Stable nixpkgs with overlay. # nixpkgs config.
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
@ -39,27 +38,12 @@ with inputs.nixpkgs.lib; {
]; ];
}; };
# deploy-rs.
deployPkgs = import nixpkgs {
inherit system;
overlays = [
deploy-rs.overlays.default
(self: super: {
deploy-rs = {
inherit (pkgs) deploy-rs;
lib = super.deploy-rs.lib;
};
})
];
};
in {
nixosConfigurations.${hostname} = nixosSystem {
inherit system pkgs;
specialArgs = { specialArgs = {
# Pass variables to config. # Pass hostname & inputs to config.
inherit inputs secrets hostname; inherit inputs hostname;
# Secrets directory.
secrets = builtins.toString inputs.secrets;
}; };
modules = modules =
@ -99,8 +83,22 @@ with inputs.nixpkgs.lib; {
++ optionals (docker == true) [./suites/server/docker] # Enable docker if required. ++ optionals (docker == true) [./suites/server/docker] # Enable docker if required.
++ (filesystem.listFilesRecursive ./modules); # Custom modules. ++ (filesystem.listFilesRecursive ./modules); # Custom modules.
}; };
}
deploy.nodes.${hostname} = mkIf (strings.hasPrefix "server" suite) { // optionalAttrs (strings.hasPrefix "server" suite) {
deploy.nodes.${hostname} = let
deployPkgs = import nixpkgs {
inherit system;
overlays = [
deploy-rs.overlays.default
(self: super: {
deploy-rs = {
inherit (pkgs) deploy-rs;
lib = super.deploy-rs.lib;
};
})
];
};
in {
hostname = "${hostname}.local"; hostname = "${hostname}.local";
profiles.system = { profiles.system = {
user = "root"; user = "root";