diff --git a/modules/hosts/janus/default.nix b/modules/hosts/janus/default.nix index 9c86f82..15e9734 100644 --- a/modules/hosts/janus/default.nix +++ b/modules/hosts/janus/default.nix @@ -3,7 +3,7 @@ let username = "john"; hostname = "janus"; ca-url = "https://janus.john-stream.com/"; - fingerprint = "2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6"; + fingerprint = builtins.readFile ./fingerprint; in { flake.modules.nixos.janus-ca = @@ -102,7 +102,7 @@ in }; }; - perSystem = { pkgs, lib, ... }: { + perSystem = { system, pkgs, lib, ... }: { packages.janus-ca = inputs.wrappers.lib.wrapPackage { inherit pkgs; package = pkgs.step-cli; diff --git a/modules/hosts/janus/fingerprint b/modules/hosts/janus/fingerprint new file mode 100644 index 0000000..14029b4 --- /dev/null +++ b/modules/hosts/janus/fingerprint @@ -0,0 +1 @@ +2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6 \ No newline at end of file diff --git a/modules/hosts/john-pc/default.nix b/modules/hosts/john-pc/default.nix index 4537f67..6e758b1 100644 --- a/modules/hosts/john-pc/default.nix +++ b/modules/hosts/john-pc/default.nix @@ -3,26 +3,23 @@ let username = "john"; hostname = "john-pc-ubuntu"; - testHost = "soteria"; # which host to test build - testTarget = "fded:fb16:653e:25da:be24:11ff:fea0:753f"; # test-nix - resolvedTarget = "test-nix"; # testTarget = "fded:fb16:653e:25da:be24:11ff:fe89:1cc3"; # soteria + # testTarget = "fded:fb16:653e:25da:be24:11ff:fea0:753f"; # test-nix + testHost = "soteria"; # which host to test build + testTarget = "test-nix"; in { flake.modules.homeManager."${hostname}" = { config, pkgs, lib, ... }: let - flakeDir = "${config.xdg.configHome}/home-manager/jsl-dendritic"; + selfPkgs = inputs.self.packages.${pkgs.stdenv.hostPlatform.system}; resticPasswordFile = "${config.xdg.configHome}/restic/password.txt"; - - testPushCmd = (pkgs.writeShellScriptBin "test-push" '' - ${lib.getExe' pkgs.coreutils "echo"} "Pushing ${testHost} to ${resolvedTarget}" - ${lib.getExe pkgs.nh} os switch ${flakeDir}#${testHost} \ - -e passwordless \ - --target-host ${resolvedTarget} \ - --diff always \ - "$@" - ''); + flakeDir = "${config.xdg.configHome}/home-manager/jsl-dendritic"; + test-push = with pkgs; writeShellApplication { + name = "test-push"; + runtimeInputs = [ nh ]; + text = ''nh os switch ${flakeDir}#${testHost} --target-host root@${testTarget} -e none''; + }; in { imports = with inputs.self.modules.homeManager; [ @@ -46,8 +43,11 @@ in home.homeDirectory = "/home/${username}"; home.packages = with pkgs; [ nixos-rebuild - testPushCmd - inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.my-neovim + test-push + selfPkgs.neovim-min + # ${selfPkgs}.my-neovim + selfPkgs.richPrinter + selfPkgs.janus-ca ]; shell.program = "zsh";