Compare commits

..

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

View file

@ -12,14 +12,13 @@ with inputs.nixpkgs.lib; {
suite ? "",
docker ? false,
hostModules ? [],
}: let
# Secrets directory.
secrets = builtins.toString inputs.secrets;
}:
{
nixosConfigurations.${hostname} = nixosSystem rec {
# Architecture.
system = platform;
# Stable nixpkgs with overlay.
# nixpkgs config.
pkgs = import nixpkgs {
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 = {
# Pass variables to config.
inherit inputs secrets hostname;
# Pass hostname & inputs to config.
inherit inputs hostname;
# Secrets directory.
secrets = builtins.toString inputs.secrets;
};
modules =
@ -99,8 +83,22 @@ with inputs.nixpkgs.lib; {
++ optionals (docker == true) [./suites/server/docker] # Enable docker if required.
++ (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";
profiles.system = {
user = "root";