all repos — nixfiles @ 7843fa61b0a1e87ebb83a4906f9d4aa1d9450a66

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

justfile (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
user := env("USER", "alin")
hostname := env("HOSTNAME", `hostname`)
export NH_FILE := "."

alias up := update-packages
alias ui := update-inputs
alias ua := update-all

test:
    nix flake check --all-systems path:.

build *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":
    		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"
    end

update-packages:
    git submodule update --remote packages

update-inputs:
    nix flake update

update-all: update-inputs update-packages