working-ish, not all options

This commit is contained in:
John Lancaster
2025-07-01 23:16:12 -05:00
parent 9b4f75126e
commit 8b48ed06e2
3 changed files with 30 additions and 8 deletions

16
nixosModules/scripts.nix Normal file
View File

@@ -0,0 +1,16 @@
{ config, pkgs, ... }:
let
hostName = config.networking.hostName;
in
{
environment.systemPackages = with pkgs; [
(pkgs.writeShellScriptBin "nfs" ''
sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#${hostName} --impure
'')
(pkgs.writeShellScriptBin "nfsu" ''
FLAKE=$(readlink -f /etc/nixos)
nix flake update --flake $FLAKE --impure
sudo nixos-rebuild switch --flake $FLAKE#${hostName} --impure
'')
];
}