diff --git a/flake.nix b/flake.nix index fe818d1..e9043cb 100644 --- a/flake.nix +++ b/flake.nix @@ -52,7 +52,7 @@ }; packages."${system}" = { - h3c-inode-client = pkgs.callPackage ./h3c-inode-client/package.nix { }; + h3c = import ./h3c { inherit pkgs; }; }; nixosModules = @@ -64,7 +64,7 @@ { config, lib, ... }: { imports = [ - (import ./h3c-inode-client/module.nix { inherit lib pkgs-chuang config; }) + (import ./h3c/inode-client/module.nix { inherit lib pkgs-chuang config; }) ]; }; diff --git a/h3c/default.nix b/h3c/default.nix new file mode 100644 index 0000000..42e4a84 --- /dev/null +++ b/h3c/default.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: +{ + # 导入安装包 + inode-client = pkgs.callPackage ./inode-client/package.nix { }; +} diff --git a/h3c-inode-client/module.nix b/h3c/inode-client/module.nix similarity index 75% rename from h3c-inode-client/module.nix rename to h3c/inode-client/module.nix index 42c7f58..2f52202 100644 --- a/h3c-inode-client/module.nix +++ b/h3c/inode-client/module.nix @@ -10,7 +10,13 @@ in { options.services.h3c-inode-client = { enable = lib.mkEnableOption "H3C iNodeClient - ssl vpn client."; - package = lib.mkPackageOption pkgs-chuang "h3c-inode-client" { }; + package = lib.mkPackageOption pkgs-chuang "h3c.inode-client" { + pkgsText = "pkgs-chuang"; + default = [ + "h3c" + "inode-client" + ]; + }; }; config = lib.mkIf cfg.enable { @@ -18,10 +24,10 @@ in environment.systemPackages = [ cfg.package ]; systemd.services.h3c-inode-client = { - wantedBy = [ - "network-online.target" - "graphical.target" - ]; + #wantedBy = [ + # "network-online.target" + # "graphical.target" + #]; after = [ "network-online.target" ]; serviceConfig = { Type = "simple"; diff --git a/h3c-inode-client/package.nix b/h3c/inode-client/package.nix similarity index 95% rename from h3c-inode-client/package.nix rename to h3c/inode-client/package.nix index 71e558e..cbdf04a 100644 --- a/h3c-inode-client/package.nix +++ b/h3c/inode-client/package.nix @@ -53,8 +53,8 @@ let xorg.libXxf86vm ]; in -stdenv.mkDerivation { - pname = "h3c-inode-client"; +stdenv.mkDerivation rec { + pname = "inode-client"; version = "7.3.0"; src = fetchTarball { @@ -113,11 +113,11 @@ stdenv.mkDerivation { # 运行文件 mkdir -p $out/bin - cat > $out/bin/h3c-inode-client < $out/bin/${pname} < $out/bin/setup <