all repos — nixfiles @ e4f0b634766dfa52a3e3985c8e0ad19887e0cfad

System and user configuration, managed by nix and home-manager

move os update script to repo bin and call via just

Alin
commit

e4f0b634766dfa52a3e3985c8e0ad19887e0cfad

parent

c4af1a8e98ff24621ab47c31020a7d67292acfd8

1 file changed, 16 insertions(+), 11 deletions(-)

changed files
M justfile → justfile
@@ -9,19 +9,24 @@
test: nix flake check --all-systems path:. -build *args: - nh home switch --file . "homeConfigurations.{{ user }}@{{ hostname }}" {{ args }} +build action="switch" *args: + nh home {{ action }} --file . "homeConfigurations.{{ user }}@{{ hostname }}" {{ args }} -run action="switch" *args: +[linux] +os-update action="switch" *args: + nh os {{ action }} --file . nixosConfigurations.{{ hostname }} {{ args }} + +[macos] +os-update action="switch" *args: + nh darwin {{ action }} --file . darwinConfigurations.{{ hostname }} {{ args }} + +run target="" *args: #!/usr/bin/env fish - set --local os $(string split -- - $system)[-1] - switch $os: - case "darwin": - nh darwin {{ action }} --file . darwinConfigurations.{{ hostname }} {{ args }} - case "linux": - nh os {{ action }} --file . nixosConfigurations.{{ hostname }} {{ args }} - case *: - echo "Couldn't find a supported os in \$system: $system" + switch "{{ target }}" + case {{ hostname }} . "" + just os-update {{ args }} + case '*' + ./bin/os_update_remote {{ target }} {{ args }} end update-packages: