nixos: pin taffybar via github input (override locally when needed)
This commit is contained in:
11
nixos/flake.lock
generated
11
nixos/flake.lock
generated
@@ -1992,14 +1992,15 @@
|
||||
"locked": {
|
||||
"lastModified": 1770971159,
|
||||
"narHash": "sha256-FOMr9QGs6dzQ0AHfvq0/s5H8I8IWVl347h2NCu+Upz8=",
|
||||
"owner": "taffybar",
|
||||
"repo": "taffybar",
|
||||
"rev": "276ed1fd83bb56d22cb854acb10aeebf64b97c5c",
|
||||
"revCount": 1790,
|
||||
"type": "git",
|
||||
"url": "file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar"
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar"
|
||||
"owner": "taffybar",
|
||||
"repo": "taffybar",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vscode-server": {
|
||||
|
||||
@@ -125,10 +125,9 @@
|
||||
};
|
||||
|
||||
taffybar = {
|
||||
# Use git+file so Nix locks to the git revision and ignores local build
|
||||
# artifacts (e.g. dist-newstyle, .direnv) that would otherwise make the
|
||||
# narHash differ across machines.
|
||||
url = "git+file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar";
|
||||
# Use a remote, lockfile-pinned input so rebuilds are reproducible across
|
||||
# machines. For local development, use `nixos-rebuild --override-input taffybar path:...`.
|
||||
url = "github:taffybar/taffybar";
|
||||
inputs = {
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
flake-utils.follows = "flake-utils";
|
||||
|
||||
@@ -1,8 +1,28 @@
|
||||
switch *args:
|
||||
# Avoid "Unit nixos-rebuild-switch-to-configuration.service was already loaded"
|
||||
# when another switch is still running.
|
||||
bash -lc 'if systemctl is-active --quiet nixos-rebuild-switch-to-configuration.service; then \
|
||||
echo "nixos-rebuild switch already running; waiting..." >&2; \
|
||||
systemctl status nixos-rebuild-switch-to-configuration.service --no-pager >&2 || true; \
|
||||
while systemctl is-active --quiet nixos-rebuild-switch-to-configuration.service; do sleep 1; done; \
|
||||
fi'
|
||||
sudo nixos-rebuild switch --flake '.#' --impure --option warn-dirty false {{args}}
|
||||
|
||||
switch-local-taffybar *args:
|
||||
# Like `switch`, but use the local taffybar checkout (useful when hacking on it).
|
||||
# Note: requires the submodule/checkout to exist at ../dotfiles/config/taffybar/taffybar.
|
||||
bash -lc 'if systemctl is-active --quiet nixos-rebuild-switch-to-configuration.service; then \
|
||||
echo "nixos-rebuild switch already running; waiting..." >&2; \
|
||||
systemctl status nixos-rebuild-switch-to-configuration.service --no-pager >&2 || true; \
|
||||
while systemctl is-active --quiet nixos-rebuild-switch-to-configuration.service; do sleep 1; done; \
|
||||
fi'
|
||||
sudo nixos-rebuild switch --flake '.#' --impure --option warn-dirty false \
|
||||
--override-input taffybar path:../dotfiles/config/taffybar/taffybar \
|
||||
{{args}}
|
||||
|
||||
remote-switch host *args:
|
||||
nixos-rebuild switch --flake '.#{{host}}' --target-host {{host}}.local --sudo --impure --option warn-dirty false {{args}}
|
||||
|
||||
fix-local-path-issue:
|
||||
nix flake update imalison-taffybar
|
||||
# Kept for backwards-compat: update the lockfile inputs explicitly.
|
||||
nix flake update taffybar imalison-taffybar
|
||||
|
||||
Reference in New Issue
Block a user