Skip to content

Commit

Permalink
Merge pull request #14 from Openmesh-Network/feature/xnode-admin-service
Browse files Browse the repository at this point in the history
Feature/xnode admin service
  • Loading branch information
harrys522 authored Jul 6, 2024
2 parents c1ac827 + d398bc9 commit 28f96d1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions repo/modules/services/openmesh/xnode/admin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ in
wants = [ "network-online.target" ];

serviceConfig = {
ExecStart = ''${lib.getExe cfg.package} -p ${cfg.stateDir} ${cfg.remoteDir} ${toString cfg.searchInterval}'';
ExecStartPre = ''-${lib.getExe pkgs.git} clone --branch dev https://github.com/openmesh-network/xnodeos ${cfg.stateDir}/xnodeos'';
ExecCondition = ''-${lib.getExe pkgs.git} pull --branch dev https://github.com/openmesh-network/xnodeos ${cfg.stateDir}/xnodeos'';
ExecStartPre = ''/bin/sh -c 'test -d ${cfg.stateDir}/xnodeos/.git || ${lib.getExe pkgs.git} clone --branch feature/xnode-admin-service https://github.com/openmesh-network/xnodeos ${cfg.stateDir}/xnodeos' '';
ExecStart = ''${lib.getExe cfg.package} --remote ${cfg.remoteDir} ${cfg.stateDir}'';
Restart = "always";
RestartSec = 5;
WorkingDirectory = cfg.stateDir;
StateDirectory = "openmesh-xnode-admin";
StateDirectoryMode = "0775";
Expand Down
16 changes: 8 additions & 8 deletions repo/pkgs/openmesh/xnode/admin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pkgs.python3Packages.buildPythonPackage rec {
src = pkgs.fetchFromGitHub {
owner = "Openmesh-Network";
repo = pname;
rev = "b3ea84ac6d095dfaf260976dd04a84d2cd77c21c";
sha256 = "1q14lvppzyimmrpnmznxycv0x0k0d86h9v2mm7wyg9wqw45c1ypw";
rev = "fad3f3136e868a131a0f3735cb0fae3224e45047";
sha256 = "1fqkir6847x19fprbjpma8n6ma5ldgvj3ljlfc4bw73g3aihr69n";
};

nativeBuildInputs = [
Expand All @@ -23,10 +23,10 @@ pkgs.python3Packages.buildPythonPackage rec {
];

meta = with lib; {
homepage = "https://openmesh.network/";
description = "Agent service for Xnode reconfiguration and management";
mainProgram = "openmesh-xnode-admin";
#license = with licenses; [ x ];
maintainers = with maintainers; [ harrys522 j-openmesh ];
};
homepage = "https://openmesh.network/";
description = "Agent service for Xnode reconfiguration and management";
mainProgram = "openmesh-xnode-admin";
#license = with licenses; [ x ];
maintainers = with maintainers; [ harrys522 j-openmesh ];
};
}
2 changes: 1 addition & 1 deletion systems/custom-formats/netboot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
# - xnode_version
# - xnode_uuid
# - xnode_access_token
kernel http://127.0.0.1:8000/kernel initrd=initrd init=${builtins.unsafeDiscardStringContext config.system.build.toplevel}/init ${toString config.boot.kernelParams} -- XNODE_VERSION=''${xnode_version} XNODE_UUID=''${xnode_uuid} XNODE_ACCESS_TOKEN=''${xnode_access_token}
kernel http://127.0.0.1:8000/kernel initrd=initrd init=${builtins.unsafeDiscardStringContext config.system.build.toplevel}/init ${toString config.boot.kernelParams} -- XNODE_VERSION=''${xnode_version} XNODE_UUID=''${xnode_uuid} XNODE_ACCESS_TOKEN=''${xnode_access_token} AVOID_NEWLINE=1
initrd http://127.0.0.1:8000/initrd
boot
'';
Expand Down

0 comments on commit 28f96d1

Please sign in to comment.