writeShellApplication updates
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user