writeShellApplication updates
This commit is contained in:
@@ -3,7 +3,7 @@ let
|
|||||||
username = "john";
|
username = "john";
|
||||||
hostname = "janus";
|
hostname = "janus";
|
||||||
ca-url = "https://janus.john-stream.com/";
|
ca-url = "https://janus.john-stream.com/";
|
||||||
fingerprint = "2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6";
|
fingerprint = builtins.readFile ./fingerprint;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.modules.nixos.janus-ca =
|
flake.modules.nixos.janus-ca =
|
||||||
@@ -102,7 +102,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem = { pkgs, lib, ... }: {
|
perSystem = { system, pkgs, lib, ... }: {
|
||||||
packages.janus-ca = inputs.wrappers.lib.wrapPackage {
|
packages.janus-ca = inputs.wrappers.lib.wrapPackage {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
package = pkgs.step-cli;
|
package = pkgs.step-cli;
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
2036c44f7b5901566ff7611ea6c927291ecc6d2dd00779c0eead70ec77fa10d6
|
||||||
@@ -3,26 +3,23 @@ let
|
|||||||
username = "john";
|
username = "john";
|
||||||
hostname = "john-pc-ubuntu";
|
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: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
|
in
|
||||||
{
|
{
|
||||||
flake.modules.homeManager."${hostname}" = { config, pkgs, lib, ... }:
|
flake.modules.homeManager."${hostname}" = { config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
flakeDir = "${config.xdg.configHome}/home-manager/jsl-dendritic";
|
selfPkgs = inputs.self.packages.${pkgs.stdenv.hostPlatform.system};
|
||||||
resticPasswordFile = "${config.xdg.configHome}/restic/password.txt";
|
resticPasswordFile = "${config.xdg.configHome}/restic/password.txt";
|
||||||
|
flakeDir = "${config.xdg.configHome}/home-manager/jsl-dendritic";
|
||||||
testPushCmd = (pkgs.writeShellScriptBin "test-push" ''
|
test-push = with pkgs; writeShellApplication {
|
||||||
${lib.getExe' pkgs.coreutils "echo"} "Pushing ${testHost} to ${resolvedTarget}"
|
name = "test-push";
|
||||||
${lib.getExe pkgs.nh} os switch ${flakeDir}#${testHost} \
|
runtimeInputs = [ nh ];
|
||||||
-e passwordless \
|
text = ''nh os switch ${flakeDir}#${testHost} --target-host root@${testTarget} -e none'';
|
||||||
--target-host ${resolvedTarget} \
|
};
|
||||||
--diff always \
|
|
||||||
"$@"
|
|
||||||
'');
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = with inputs.self.modules.homeManager; [
|
imports = with inputs.self.modules.homeManager; [
|
||||||
@@ -46,8 +43,11 @@ in
|
|||||||
home.homeDirectory = "/home/${username}";
|
home.homeDirectory = "/home/${username}";
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nixos-rebuild
|
nixos-rebuild
|
||||||
testPushCmd
|
test-push
|
||||||
inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.my-neovim
|
selfPkgs.neovim-min
|
||||||
|
# ${selfPkgs}.my-neovim
|
||||||
|
selfPkgs.richPrinter
|
||||||
|
selfPkgs.janus-ca
|
||||||
];
|
];
|
||||||
|
|
||||||
shell.program = "zsh";
|
shell.program = "zsh";
|
||||||
|
|||||||
Reference in New Issue
Block a user