all repos — nixfiles @ a838ebb5f8b65ce524b0acf79de545045c10557a

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

use nh and flake-compatish to skip copying source to store

Alin
commit

a838ebb5f8b65ce524b0acf79de545045c10557a

parent

cadefaeb30f306774e7e50c51dea91684ef550df

1 file changed, 7 insertions(+), 4 deletions(-)

changed files
M justfile → justfile
@@ -1,19 +1,22 @@
flake := ".?submodules=1" +user := env("USER", "alin") +hostname := env("hostname", env("HOSTNAME", `hostname`)) +export NH_FILE := "." test: nix flake check --all-systems {{ flake }} build *args: - home-manager switch --flake {{ flake }} {{ args }} + nh home switch --file . "homeConfigurations.{{ user }}@{{ hostname }}" {{ args }} run action="switch" *args: #!/usr/bin/env fish set --local os $(string split -- - $system)[-1] switch $os: case "darwin": - sudo darwin-rebuild {{ action }} --flake {{ flake }}#{$hostname} {{ args }} + nh darwin {{ action }} --file . darwinConfigurations.{{ hostname }} {{ args }} case "linux": - nixos-rebuild {{ action }} --flake {{ flake }}#{$hostname} --sudo {{ args }} + nh os {{ action }} --file . nixosConfigurations.{{ hostname }} {{ args }} case *: - + echo "Couldn't find a supported os in \$system: $system" end