allow building with nix build
This commit is contained in:
67
flake.nix
67
flake.nix
@@ -103,53 +103,62 @@
|
|||||||
agenix.packages.${system}.default
|
agenix.packages.${system}.default
|
||||||
colmena.packages.${system}.colmena
|
colmena.packages.${system}.colmena
|
||||||
colmena.packages.${system}.manual
|
colmena.packages.${system}.manual
|
||||||
(pkgs.writeShellScriptBin "build" ''
|
(writeShellScriptBin "build" ''
|
||||||
colmena --experimental-flake-eval build --keep-result "$@"
|
colmena --experimental-flake-eval build --keep-result "$@"
|
||||||
'')
|
'')
|
||||||
(pkgs.writeShellScriptBin "apply" ''
|
(writeShellScriptBin "apply" ''
|
||||||
colmena --experimental-flake-eval apply --keep-result "$@"
|
colmena --experimental-flake-eval apply --keep-result "$@"
|
||||||
'')
|
'')
|
||||||
(pkgs.writeShellScriptBin "apply-local" ''
|
(writeShellScriptBin "apply-local" ''
|
||||||
colmena --experimental-flake-eval apply-local --sudo "$@"
|
colmena --experimental-flake-eval apply-local --sudo "$@"
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
flake = {
|
flake = {
|
||||||
colmenaHive = colmena.lib.makeHive self.outputs.colmena;
|
nixosConfigurations =
|
||||||
|
let
|
||||||
colmena = {
|
mkConfiguration =
|
||||||
meta = {
|
name:
|
||||||
inherit specialArgs;
|
nixpkgs.lib.nixosSystem {
|
||||||
|
inherit specialArgs;
|
||||||
nixpkgs = import nixpkgs {
|
modules = [
|
||||||
system = "x86_64-linux";
|
./modules
|
||||||
overlays = [ ];
|
./hosts/${name}
|
||||||
};
|
];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
radish = mkConfiguration "radish";
|
||||||
|
freun-dev = mkConfiguration "freun-dev";
|
||||||
|
apu = mkConfiguration "apu";
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults =
|
colmenaHive = colmena.lib.makeHive self.outputs.colmena;
|
||||||
{ name, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./modules
|
|
||||||
./hosts/${name}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
radish =
|
colmena =
|
||||||
{ ... }:
|
let
|
||||||
{
|
deploymentOptions = {
|
||||||
deployment = {
|
radish = {
|
||||||
allowLocalDeployment = true;
|
allowLocalDeployment = true;
|
||||||
targetHost = null;
|
targetHost = null;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
meta = {
|
||||||
|
inherit specialArgs;
|
||||||
|
|
||||||
freun-dev = { ... }: { };
|
nixpkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
apu = { ... }: { };
|
overlays = [ ];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
// builtins.mapAttrs (name: config: {
|
||||||
|
imports = config._module.args.modules;
|
||||||
|
deployment = if builtins.hasAttr name deploymentOptions then deploymentOptions.${name} else { };
|
||||||
|
}) self.nixosConfigurations;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user