Update run script
This commit is contained in:
parent
3c76aa0936
commit
ce3a1df8d9
31
run
31
run
|
@ -4,6 +4,10 @@ set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
function build {
|
||||||
|
_nixos build "$@"
|
||||||
|
}
|
||||||
|
|
||||||
function check {
|
function check {
|
||||||
nix flake check
|
nix flake check
|
||||||
}
|
}
|
||||||
|
@ -25,23 +29,11 @@ function help {
|
||||||
printf "\nExtended help:\n Each task has comments for general usage\n"
|
printf "\nExtended help:\n Each task has comments for general usage\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
function home-manager:build {
|
function switch {
|
||||||
_home build "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
function home-manager:switch {
|
|
||||||
_home switch "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
function nixos:build {
|
|
||||||
_nixos build "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
function nixos:switch {
|
|
||||||
_nixos switch "$@"
|
_nixos switch "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function nixos:test {
|
function test {
|
||||||
_nixos test "$@"
|
_nixos test "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,17 +41,6 @@ function update {
|
||||||
nix flake update
|
nix flake update
|
||||||
}
|
}
|
||||||
|
|
||||||
function _home {
|
|
||||||
local command="$1"
|
|
||||||
shift 1
|
|
||||||
|
|
||||||
NIXPKGS_ALLOW_UNFREE=1 home-manager "$command" \
|
|
||||||
--extra-experimental-features flakes \
|
|
||||||
--extra-experimental-features nix-command \
|
|
||||||
--flake ".#$(whoami)@$(hostname)" \
|
|
||||||
--impure "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
function _nixos {
|
function _nixos {
|
||||||
local command="$1"
|
local command="$1"
|
||||||
shift 1
|
shift 1
|
||||||
|
|
Loading…
Reference in a new issue