更新目录结构,用厂商区分一下包
This commit is contained in:
parent
75a466fbd2
commit
1cc5ff724f
@ -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; })
|
||||
];
|
||||
};
|
||||
|
||||
|
5
h3c/default.nix
Normal file
5
h3c/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# 导入安装包
|
||||
inode-client = pkgs.callPackage ./inode-client/package.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";
|
@ -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 <<EOF
|
||||
cat > $out/bin/${pname} <<EOF
|
||||
#!/usr/bin/env bash
|
||||
$out${install_dir}/.iNode/iNodeClient
|
||||
EOF
|
||||
chmod +x $out/bin/h3c-inode-client
|
||||
chmod +x $out/bin/${pname}
|
||||
|
||||
cat > $out/bin/setup <<EOF
|
||||
#!/usr/bin/env bash
|
Loading…
x
Reference in New Issue
Block a user