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": {
|
"locked": {
|
||||||
"lastModified": 1770971159,
|
"lastModified": 1770971159,
|
||||||
"narHash": "sha256-FOMr9QGs6dzQ0AHfvq0/s5H8I8IWVl347h2NCu+Upz8=",
|
"narHash": "sha256-FOMr9QGs6dzQ0AHfvq0/s5H8I8IWVl347h2NCu+Upz8=",
|
||||||
|
"owner": "taffybar",
|
||||||
|
"repo": "taffybar",
|
||||||
"rev": "276ed1fd83bb56d22cb854acb10aeebf64b97c5c",
|
"rev": "276ed1fd83bb56d22cb854acb10aeebf64b97c5c",
|
||||||
"revCount": 1790,
|
"type": "github"
|
||||||
"type": "git",
|
|
||||||
"url": "file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"owner": "taffybar",
|
||||||
"url": "file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar"
|
"repo": "taffybar",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vscode-server": {
|
"vscode-server": {
|
||||||
|
|||||||
@@ -125,10 +125,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
taffybar = {
|
taffybar = {
|
||||||
# Use git+file so Nix locks to the git revision and ignores local build
|
# Use a remote, lockfile-pinned input so rebuilds are reproducible across
|
||||||
# artifacts (e.g. dist-newstyle, .direnv) that would otherwise make the
|
# machines. For local development, use `nixos-rebuild --override-input taffybar path:...`.
|
||||||
# narHash differ across machines.
|
url = "github:taffybar/taffybar";
|
||||||
url = "git+file:///home/imalison/dotfiles/dotfiles/config/taffybar/taffybar";
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
flake-utils.follows = "flake-utils";
|
flake-utils.follows = "flake-utils";
|
||||||
|
|||||||
@@ -1,8 +1,28 @@
|
|||||||
switch *args:
|
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}}
|
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:
|
remote-switch host *args:
|
||||||
nixos-rebuild switch --flake '.#{{host}}' --target-host {{host}}.local --sudo --impure --option warn-dirty false {{args}}
|
nixos-rebuild switch --flake '.#{{host}}' --target-host {{host}}.local --sudo --impure --option warn-dirty false {{args}}
|
||||||
|
|
||||||
fix-local-path-issue:
|
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