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:
19
flake.nix
19
flake.nix
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user