working-ish, not all options
This commit is contained in:
16
nixosModules/scripts.nix
Normal file
16
nixosModules/scripts.nix
Normal 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
|
||||
'')
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user