From 47929714fb99ec3e9475312c5e5a52d53b434924 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Mon, 1 Jun 2026 23:00:29 -0400 Subject: [PATCH] tidy --- bin/lib/cmds.nu | 37 ++++++++++---------- hosts/fwbook.nix | 1 - hosts/hl-bigbox1.nix | 4 +-- modules/core/default.nix | 13 +++++++ modules/home/programs.nix | 2 +- modules/nixos/server/default.nix | 1 - modules/nixos/server/dns/routing/default.nix | 2 +- 7 files changed, 36 insertions(+), 24 deletions(-) diff --git a/bin/lib/cmds.nu b/bin/lib/cmds.nu index 5869937..cafa5c8 100644 --- a/bin/lib/cmds.nu +++ b/bin/lib/cmds.nu @@ -17,24 +17,6 @@ export def "skyg profiles" [only_remote: bool = false] { } } -# Build configuration -export def "skyg build" [] { - cd $REPO_ROOT - nh os build | print -} - -# Switch configuration -export def "skyg switch" [] { - cd $REPO_ROOT - nh os switch --ask | print -} - -# test configuration -export def "skyg test" [] { - cd $REPO_ROOT - nh os test | print -} - export def "skyg check" [] { nix flake check --no-build } @@ -57,10 +39,26 @@ export def "skyg update" [input_name: string = ""] { git diff flake.lock | print } + +# Build local os +export def "skyg os" [ + cmd: string@remote-cmds, + --build-host: string@remote_targets = "" +] { + cd $REPO_ROOT + mut runcmd = $"nh os ($cmd)" + if $build_host != "" { + $runcmd = $"($runcmd) --build-host ($build_host).lab.internal" + } + $runcmd | print + bash -c $runcmd +} + # Deploy to remote machine export def "skyg remote" [ cmd: string@remote-cmds, target: string@remote_targets = "", + --build-host: string@remote_targets = "", # Optional remote builder host (e.g. builder.lab.internal) ] { cd $REPO_ROOT mut target_host = $"root@($target).lab.internal" @@ -72,6 +70,9 @@ export def "skyg remote" [ $"Using [(ansi green_bold)($profile)(ansi reset)]" | print $"($cmd) on ($target_host) with ($profile)" | print mut runcmd = $"nh os ($cmd) --target-host ($target_host) --ask .#($profile)" + if $build_host != "" { + $runcmd = $"($runcmd) --build-host ($build_host).lab.internal" + } $runcmd | print bash -c $runcmd } diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 4fb9e5c..c233508 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -183,7 +183,6 @@ in darling-dmg # password - bitwarden-desktop bitwarden-cli # documents diff --git a/hosts/hl-bigbox1.nix b/hosts/hl-bigbox1.nix index 777ea23..3255585 100644 --- a/hosts/hl-bigbox1.nix +++ b/hosts/hl-bigbox1.nix @@ -55,7 +55,7 @@ }; services.displayManager.defaultSession = "gnome"; services.displayManager.gdm.enable = false; - services.displayManager.gdm.wayland = false; + services.autosuspend.enable = false; services.displayManager.autoLogin = { enable = true; @@ -96,7 +96,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; boot.tmp.useTmpfs = true; - boot.kernelPackages = pkgs.linuxPackages_hardened; + boot.kernelPackages = pkgs.linuxPackages_latest; # linuxPackages_hardened was removed in 26.05 # Wake on Lan networking.interfaces.enp4s0.wakeOnLan.enable = true; networking.interfaces.lo.wakeOnLan.enable = true; diff --git a/modules/core/default.nix b/modules/core/default.nix index 25fb7db..0c8bc1f 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -6,6 +6,19 @@ ./nix-substituters.nix ]; config = { + # Workaround: pipx 1.8.0 test suite fails in nixpkgs 26.05 due to a whitespace + # normalization regression in PEP 508 URL specifiers (space before @ in URLs). + # Must use pythonPackagesExtensions to patch the python3Packages.pipx that + # the build system actually uses, not just the top-level pkgs.pipx wrapper. + nixpkgs.overlays = [ + (final: prev: { + pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ + (pyFinal: pyPrev: { + pipx = pyPrev.pipx.overrideAttrs (_: { doInstallCheck = false; }); + }) + ]; + }) + ]; # Remote Builder nix.buildMachines = [ { diff --git a/modules/home/programs.nix b/modules/home/programs.nix index 78d51c1..257edbf 100644 --- a/modules/home/programs.nix +++ b/modules/home/programs.nix @@ -88,7 +88,7 @@ plugins = with pkgs.nushellPlugins; [ polars # net - highlight + # highlight # broken: compiled for nushell 0.110.0, nixpkgs 26.05 ships 0.112.2 ]; }; carapace = { diff --git a/modules/nixos/server/default.nix b/modules/nixos/server/default.nix index ca4e12e..18f4591 100644 --- a/modules/nixos/server/default.nix +++ b/modules/nixos/server/default.nix @@ -9,6 +9,5 @@ ./services ./timers.nix ./dns - ./certbot.nix ]; } diff --git a/modules/nixos/server/dns/routing/default.nix b/modules/nixos/server/dns/routing/default.nix index 2c756b6..61df0dc 100644 --- a/modules/nixos/server/dns/routing/default.nix +++ b/modules/nixos/server/dns/routing/default.nix @@ -62,7 +62,7 @@ in config = mkIf cfg.enable { age.secrets = mkIf (cfg.addressesSecretName != null) { ${cfg.addressesSecretName} = { - file = ../../../../secrets + "/${cfg.addressesSecretName}.age"; + file = ../../../../../secrets + "/${cfg.addressesSecretName}.age"; }; };