just push

This commit is contained in:
Peder Bergebakken Sundt 2024-02-29 18:39:57 +01:00
parent 0f4374d4f5
commit 0b7bef124d
3 changed files with 14 additions and 4 deletions

View File

@ -288,7 +288,6 @@
nixosModules = mkHosts (mkModule []); nixosModules = mkHosts (mkModule []);
nixosConfigurations = mkHosts (mkConfig []); nixosConfigurations = mkHosts (mkConfig []);
nixosReports = mkHosts (mkReport []); nixosReports = mkHosts (mkReport []);
nixosHostnames = builtins.attrNames self.nixosReports; # faster to eval
packages = forAllSystems ({ inputs, pkgs, lib, flakes, ... }: let packages = forAllSystems ({ inputs, pkgs, lib, flakes, ... }: let
mk-nspawn-deployer = hostname: # TODO: nspawn-tarball.nix populates /etc/nixos with junk mk-nspawn-deployer = hostname: # TODO: nspawn-tarball.nix populates /etc/nixos with junk

View File

@ -27,6 +27,16 @@
# Networking # Networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.nameservers = [
"2001:700:1:11::2:51" # dns64.uninett.no
#"129.241.0.200"
#"129.241.0.201"
#"2001:700:300::200"
#"2001:700:300::201"
];
networking.networkmanager.insertNameservers = config.networking.nameservers; # wtf
# TODO: remove? Move? # TODO: remove? Move?
programs.dconf.enable = true; programs.dconf.enable = true;
} }

View File

@ -32,8 +32,11 @@ switch:
boot: boot:
sudo nixos-rebuild boot --flake . sudo nixos-rebuild boot --flake .
push hostname=`just _a-host` cmd=`gum choose test switch boot --header "Select mode..."`:
nixos-rebuild --flake .#{{hostname}} --target-host root@$(nix eval .#nixosReports.{{hostname}}.fqdn --json | jq . -r) --use-substitutes {{cmd}}
@_a-host: @_a-host:
nix eval .#nixosHostnames --json 2>/dev/null | jq '.[]' -r | gum filter --placeholder "Pick a host..." nix eval .#nixosReports --apply builtins.attrNames --json 2>/dev/null | jq '.[]' -r | gum filter --placeholder "Pick a host..."
@remote-current: @remote-current:
>&2 echo Current remote: $(remote-host) >&2 echo Current remote: $(remote-host)
@ -50,8 +53,6 @@ boot:
@remote-set remote=`just remote-current && just _a-remote-label`: @remote-set remote=`just remote-current && just _a-remote-label`:
remote-set {{remote}} remote-set {{remote}}
# nixos-rebuild --flake .#<host> --target-host root@<host>.nixos.org --use-substitutes switch
@gorgon: @gorgon:
# https://codeberg.org/gorgon/gorgon/src/branch/main/nix-web # https://codeberg.org/gorgon/gorgon/src/branch/main/nix-web
# https://discourse.nixos.org/t/a-web-ui-for-the-nix-store-early-beta/35762 # https://discourse.nixos.org/t/a-web-ui-for-the-nix-store-early-beta/35762