mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
Just: remove sudo usages
This commit is contained in:
parent
82baec0470
commit
0cdd300498
1 changed files with 8 additions and 5 deletions
13
Justfile
13
Justfile
|
|
@ -6,7 +6,7 @@ os host action:
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .)
|
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .)
|
||||||
sudo nixos-rebuild {{ action }} \
|
nixos-rebuild {{ action }} \
|
||||||
-I nixpkgs=${nixpkgs} \
|
-I nixpkgs=${nixpkgs} \
|
||||||
-I nixos-config=./nix/configurations/{{ host }}.nix \
|
-I nixos-config=./nix/configurations/{{ host }}.nix \
|
||||||
--fast \
|
--fast \
|
||||||
|
|
@ -18,15 +18,18 @@ install host:
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .)
|
nixpkgs=$(nix-instantiate --eval -E "let sources = import ./npins; in sources.nixpkgs.outPath" | jq -r .)
|
||||||
sudo nixos-install \
|
nixos-install \
|
||||||
-I nixpkgs=${nixpkgs} \
|
-I nixpkgs=${nixpkgs} \
|
||||||
-I nixos-config=./nix/configurations/{{ host }}.nix \
|
-I nixos-config=./nix/configurations/{{ host }}.nix \
|
||||||
--file ./default.nix \
|
--file ./default.nix \
|
||||||
--attr "nixosConfigurations.{{ host }}"
|
--attr "nixosConfigurations.{{ host }}"
|
||||||
|
|
||||||
cleanup:
|
# Retain four weeks of generations so I don't fuck up
|
||||||
sudo nix-env --delete-generations +10 -p /nix/var/nix/profiles/system
|
clean-os:
|
||||||
nix-env --delete-generations +10 -p ~/.local/state/nix/profiles/home-manager
|
nix-env --delete-generations 28d -p /nix/var/nix/profiles/system
|
||||||
|
|
||||||
|
clean-hm:
|
||||||
|
nix-env --delete-generations 28d -p ~/.local/state/nix/profiles/home-manager
|
||||||
|
|
||||||
update:
|
update:
|
||||||
npins update
|
npins update
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue