From 0b7bef124d9f4a5da2a9f169757e80f1741e4b65 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 29 Feb 2024 18:39:57 +0100 Subject: [PATCH] just push --- flake.nix | 1 - hosts/bolle/default.nix | 10 ++++++++++ justfile | 7 ++++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index beca085..2fa12ed 100644 --- a/flake.nix +++ b/flake.nix @@ -288,7 +288,6 @@ nixosModules = mkHosts (mkModule []); nixosConfigurations = mkHosts (mkConfig []); nixosReports = mkHosts (mkReport []); - nixosHostnames = builtins.attrNames self.nixosReports; # faster to eval packages = forAllSystems ({ inputs, pkgs, lib, flakes, ... }: let mk-nspawn-deployer = hostname: # TODO: nspawn-tarball.nix populates /etc/nixos with junk diff --git a/hosts/bolle/default.nix b/hosts/bolle/default.nix index 5f4576d..b9ee890 100644 --- a/hosts/bolle/default.nix +++ b/hosts/bolle/default.nix @@ -27,6 +27,16 @@ # Networking 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? programs.dconf.enable = true; } diff --git a/justfile b/justfile index 86bb995..20feaae 100644 --- a/justfile +++ b/justfile @@ -32,8 +32,11 @@ switch: boot: 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: - 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: >&2 echo Current remote: $(remote-host) @@ -50,8 +53,6 @@ boot: @remote-set remote=`just remote-current && just _a-remote-label`: remote-set {{remote}} -# nixos-rebuild --flake .# --target-host root@.nixos.org --use-substitutes switch - @gorgon: # 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