use nix devshell for helpers

This commit is contained in:
Joakim Repomaa
2025-02-08 15:13:27 +02:00
parent 0cf0753e5b
commit 271d9e8f88
2 changed files with 9 additions and 22 deletions

View File

@@ -61,7 +61,15 @@
perSystem = { pkgs, ... }: {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
nix-output-monitor
(writeShellScriptBin "switch" ''
${nh}/bin/nh os switch .
'')
(writeShellScriptBin "deploy" ''
${openssh}/bin/ssh -t "$1" nh os switch sourcehut:~repomaa/NixOS -- --option tarball-ttl 0
'')
(writeShellScriptBin "evaluate" ''
${nix}/bin/nix build --dry-run ".#nixosConfigurations.$1.config.system.build.toplevel" | ${nix-output-monitor}/bin/nom
'')
];
};
};