Compare commits
No commits in common. "dfd8f31f1e99a79f1b954fae1446ad50f4a0b1d9" and "6132cb3c9a905f60d88ddf705d358191db07ebf0" have entirely different histories.
dfd8f31f1e
...
6132cb3c9a
12
justfile
12
justfile
|
@ -28,12 +28,10 @@ update:
|
|||
| gum choose --no-limit --height=15 \
|
||||
| xargs nix flake update --commit-lock-file
|
||||
|
||||
#build hostname=`if test -z "${IS_REMOTE_ENV:-}"; then just _a_host_timeout; else echo; fi`:
|
||||
build hostname="":
|
||||
build hostname=`if test -z "${IS_REMOTE_ENV:-}"; then just _a_host; else echo; fi`:
|
||||
nixos-rebuild build --accept-flake-config --show-trace --flake .#"{{hostname}}"
|
||||
|
||||
#build-no-remote-builders hostname=`if test -z "$IS_REMOTE_ENV"; then just _a_host_timeout; else echo; fi`:
|
||||
build-no-remote-builders hostname="":
|
||||
build-no-remote-builders hostname=`if test -z "$IS_REMOTE_ENV"; then just _a_host; else echo; fi`:
|
||||
nixos-rebuild build --accept-flake-config --show-trace --flake .#"{{hostname}}" --builders ""
|
||||
|
||||
build-vm hostname=`just _a_host`:
|
||||
|
@ -69,12 +67,6 @@ inspect-config host=`just _a_host` prefix="":
|
|||
if test "$(grep <<<"$hostnames" "^$(hostname)$" | wc -l)" -eq 1; then hostnames="$(hostname; grep <<<"$hostnames" -v "^$(hostname)$")"; fi; \
|
||||
gum <<<"$hostnames" filter --placeholder "Pick a host..."
|
||||
|
||||
# ctrl-c is counted as a timeout...
|
||||
@_a_host_timeout:
|
||||
hostnames="$(nix eval .#nixosConfigurations --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r)"; \
|
||||
if test "$(grep <<<"$hostnames" "^$(hostname)$" | wc -l)" -eq 1; then hostnames="$(hostname; grep <<<"$hostnames" -v "^$(hostname)$")"; fi; \
|
||||
gum <<<"$hostnames" filter --placeholder "Pick a host..." --timeout 5s || hostname
|
||||
|
||||
@_some_hosts:
|
||||
hostnames="$(nix eval .#nixosConfigurations --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r)"; \
|
||||
if test "$(grep <<<"$hostnames" "^$(hostname)$" | wc -l)" -eq 1; then hostnames="$(hostname; grep <<<"$hostnames" -v "^$(hostname)$")"; fi; \
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
(pkgs.makeDesktopItem {
|
||||
desktopName = "Open Syncthing";
|
||||
name = "Syncthing";
|
||||
exec = "${pkgs.xdg-utils}/bin/xdg-open http://${config.services.syncthing.guiAddress}";
|
||||
exec = "${pkgs.xdg-utils}/bin/xdg-open ${config.services.syncthing.guiAddress}";
|
||||
icon = "${pkgs.syncthing.src}/assets/logo-512.png";
|
||||
})
|
||||
];
|
||||
|
@ -41,9 +41,7 @@
|
|||
/* devices."bjarte".autoAcceptFolders = true; # TODO */
|
||||
|
||||
folders = lib.flip lib.pipe [
|
||||
# add `path` default
|
||||
(lib.mapAttrs (name: attrs: { path = lib.mkDefault "${config.services.syncthing.dataDir}/${name}"; } // attrs ))
|
||||
# filter folders this host does not have access to
|
||||
(lib.mapAttrsToList (name: attrs: lib.mkIf (builtins.elem config.networking.hostName (attrs.devices or [])) { ${name} = attrs; } ))
|
||||
lib.mkMerge
|
||||
] {
|
||||
|
|
Loading…
Reference in New Issue