configurations for my servers and desktops
nix
nixos
flake
dots
dotfiles
1# update flake
2up:
3 nix flake update --flake . --commit-lock-file
4
5# switch to flake
6sw:
7 #!/usr/bin/env bash
8 if [[ "$(uname -s)" == "Darwin" ]]; then
9 echo "detected darwin, using nh darwin..."
10 nix run nixpkgs#nh darwin switch .
11 elif [[ "$(uname -s)" == "Linux" ]]; then
12 echo "detected linux, using nh os..."
13 nix run nixpkgs#nh os switch .
14 else
15 echo "unsupported os"
16 exit 1
17 fi
18
19# garbage collection/cleanup
20gc:
21 nix run nixpkgs#nh clean all