1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat: convenient deploy script

This commit is contained in:
2023-04-15 09:38:31 +02:00
parent 63b8c7ff1e
commit a6232b1a5e

View File

@@ -40,7 +40,24 @@
...
}:
{
apps = nixinate.nixinate.x86_64-linux self;
apps =
nixinate.nixinate.x86_64-linux self
// {
x86_64-linux.deploy = let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in {
type = "app";
program = toString (pkgs.writers.writeDash "deploy" ''
if [ $# -eq 0 ]
then
systems='${toString (builtins.attrNames self.nixosConfigurations)}'
else
systems=$*
fi
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' 'nix run .\?submodules=1\#apps.nixinate.{}' ::: $systems
'');
};
};
nixosModules = {
htgen = import modules/htgen.nix;