forked from mirrors/nixpkgs
nixos/*: use $out instead of $bin with buildGoPackage
This commit is contained in:
parent
3f17518490
commit
c59c4e3589
|
@ -5,8 +5,8 @@ let
|
|||
cfg = config.programs.singularity;
|
||||
singularity = pkgs.singularity.overrideAttrs (attrs : {
|
||||
installPhase = attrs.installPhase + ''
|
||||
mv $bin/libexec/singularity/bin/starter-suid $bin/libexec/singularity/bin/starter-suid.orig
|
||||
ln -s /run/wrappers/bin/singularity-suid $bin/libexec/singularity/bin/starter-suid
|
||||
mv $out/libexec/singularity/bin/starter-suid $out/libexec/singularity/bin/starter-suid.orig
|
||||
ln -s /run/wrappers/bin/singularity-suid $out/libexec/singularity/bin/starter-suid
|
||||
'';
|
||||
});
|
||||
in {
|
||||
|
|
|
@ -127,7 +127,7 @@ in
|
|||
serviceConfig = {
|
||||
StateDirectory = "gitlab-runner";
|
||||
ExecReload= "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
|
||||
ExecStart = ''${cfg.package.bin}/bin/gitlab-runner run \
|
||||
ExecStart = ''${cfg.package}/bin/gitlab-runner run \
|
||||
--working-directory ${cfg.workDir} \
|
||||
--config /etc/gitlab-runner/config.toml \
|
||||
--service gitlab-runner \
|
||||
|
|
|
@ -75,7 +75,7 @@ in {
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package.bin}/bin/confd";
|
||||
ExecStart = "${cfg.package}/bin/confd";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ in {
|
|||
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStart = "${pkgs.etcd.bin}/bin/etcd";
|
||||
ExecStart = "${pkgs.etcd}/bin/etcd";
|
||||
User = "etcd";
|
||||
LimitNOFILE = 40000;
|
||||
};
|
||||
|
|
|
@ -335,7 +335,7 @@ in
|
|||
description = "gitea";
|
||||
after = [ "network.target" ] ++ lib.optional usePostgresql "postgresql.service" ++ lib.optional useMysql "mysql.service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ gitea.bin pkgs.gitAndTools.git ];
|
||||
path = [ gitea pkgs.gitAndTools.git ];
|
||||
|
||||
preStart = let
|
||||
runConfig = "${cfg.stateDir}/custom/conf/app.ini";
|
||||
|
@ -347,11 +347,11 @@ in
|
|||
cp -f ${configFile} ${runConfig}
|
||||
|
||||
if [ ! -e ${secretKey} ]; then
|
||||
${gitea.bin}/bin/gitea generate secret SECRET_KEY > ${secretKey}
|
||||
${gitea}/bin/gitea generate secret SECRET_KEY > ${secretKey}
|
||||
fi
|
||||
|
||||
if [ ! -e ${jwtSecret} ]; then
|
||||
${gitea.bin}/bin/gitea generate secret LFS_JWT_SECRET > ${jwtSecret}
|
||||
${gitea}/bin/gitea generate secret LFS_JWT_SECRET > ${jwtSecret}
|
||||
fi
|
||||
|
||||
KEY="$(head -n1 ${secretKey})"
|
||||
|
@ -374,7 +374,7 @@ in
|
|||
HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*")
|
||||
if [ "$HOOKS" ]
|
||||
then
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' $HOOKS
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea}/bin/gitea,g' $HOOKS
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/env,${pkgs.coreutils}/bin/env,g' $HOOKS
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/bash,${pkgs.bash}/bin/bash,g' $HOOKS
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS
|
||||
|
@ -383,7 +383,7 @@ in
|
|||
# update command option in authorized_keys
|
||||
if [ -r ${cfg.stateDir}/.ssh/authorized_keys ]
|
||||
then
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys
|
||||
fi
|
||||
'';
|
||||
|
||||
|
@ -392,7 +392,7 @@ in
|
|||
User = cfg.user;
|
||||
Group = "gitea";
|
||||
WorkingDirectory = cfg.stateDir;
|
||||
ExecStart = "${gitea.bin}/bin/gitea web";
|
||||
ExecStart = "${gitea}/bin/gitea web";
|
||||
Restart = "always";
|
||||
|
||||
# Filesystem
|
||||
|
@ -450,7 +450,7 @@ in
|
|||
description = "gitea dump";
|
||||
after = [ "gitea.service" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
path = [ gitea.bin ];
|
||||
path = [ gitea ];
|
||||
|
||||
environment = {
|
||||
USER = cfg.user;
|
||||
|
@ -461,7 +461,7 @@ in
|
|||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = cfg.user;
|
||||
ExecStart = "${gitea.bin}/bin/gitea dump";
|
||||
ExecStart = "${gitea}/bin/gitea dump";
|
||||
WorkingDirectory = cfg.stateDir;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -200,7 +200,7 @@ in
|
|||
description = "Gogs (Go Git Service)";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.gogs.bin ];
|
||||
path = [ pkgs.gogs ];
|
||||
|
||||
preStart = let
|
||||
runConfig = "${cfg.stateDir}/custom/conf/app.ini";
|
||||
|
@ -230,7 +230,7 @@ in
|
|||
HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 4 -type f -wholename "*git/hooks/*")
|
||||
if [ "$HOOKS" ]
|
||||
then
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gogs,${pkgs.gogs.bin}/bin/gogs,g' $HOOKS
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gogs,${pkgs.gogs}/bin/gogs,g' $HOOKS
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/env,${pkgs.coreutils}/bin/env,g' $HOOKS
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/bash,${pkgs.bash}/bin/bash,g' $HOOKS
|
||||
sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS
|
||||
|
@ -242,7 +242,7 @@ in
|
|||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
WorkingDirectory = cfg.stateDir;
|
||||
ExecStart = "${pkgs.gogs.bin}/bin/gogs web";
|
||||
ExecStart = "${pkgs.gogs}/bin/gogs web";
|
||||
Restart = "always";
|
||||
};
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ in
|
|||
Restart = "on-failure";
|
||||
WorkingDirectory = stateDir;
|
||||
PrivateTmp = true;
|
||||
ExecStart = "${pkgs.leaps.bin}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}";
|
||||
ExecStart = "${pkgs.leaps}/bin/leaps -path ${toString cfg.path} -address ${cfg.address}:${toString cfg.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@ in {
|
|||
|
||||
path = [ fake-lsb-release ];
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package.bin}/bin/agent";
|
||||
ExecStart = "${cfg.package}/bin/agent";
|
||||
KillMode = "process";
|
||||
Restart = "on-failure";
|
||||
RestartSec = "15min";
|
||||
|
@ -43,4 +43,3 @@ in {
|
|||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ in {
|
|||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ExecStart = ''
|
||||
${cfg.package.bin}/bin/bosun -c ${configFile}
|
||||
${cfg.package}/bin/bosun -c ${configFile}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -59,7 +59,7 @@ in {
|
|||
"-templates ${cfg.templateDir}"
|
||||
];
|
||||
in {
|
||||
ExecStart = "${pkgs.grafana_reporter.bin}/bin/grafana-reporter ${args}";
|
||||
ExecStart = "${pkgs.grafana_reporter}/bin/grafana-reporter ${args}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -535,7 +535,7 @@ in {
|
|||
${optionalString cfg.provision.enable ''
|
||||
export GF_PATHS_PROVISIONING=${provisionConfDir};
|
||||
''}
|
||||
exec ${cfg.package.bin}/bin/grafana-server -homepath ${cfg.dataDir}
|
||||
exec ${cfg.package}/bin/grafana-server -homepath ${cfg.dataDir}
|
||||
'';
|
||||
serviceConfig = {
|
||||
WorkingDirectory = cfg.dataDir;
|
||||
|
|
|
@ -58,7 +58,7 @@ in
|
|||
in {
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \
|
||||
${pkgs.prometheus-snmp-exporter}/bin/snmp_exporter \
|
||||
--config.file=${escapeShellArg configFile} \
|
||||
--log.format=${escapeShellArg cfg.logFormat} \
|
||||
--log.level=${cfg.logLevel} \
|
||||
|
|
|
@ -118,7 +118,7 @@ in {
|
|||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ExecStart = "${cfg.package.bin}/bin/scollector -conf=${conf} ${lib.concatStringsSep " " cfg.extraOpts}";
|
||||
ExecStart = "${cfg.package}/bin/scollector -conf=${conf} ${lib.concatStringsSep " " cfg.extraOpts}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -179,15 +179,15 @@ in
|
|||
(filterAttrs (n: _: hasPrefix "consul.d/" n) config.environment.etc);
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "@${cfg.package.bin}/bin/consul consul agent -config-dir /etc/consul.d"
|
||||
ExecStart = "@${cfg.package}/bin/consul consul agent -config-dir /etc/consul.d"
|
||||
+ concatMapStrings (n: " -config-file ${n}") configFiles;
|
||||
ExecReload = "${cfg.package.bin}/bin/consul reload";
|
||||
ExecReload = "${cfg.package}/bin/consul reload";
|
||||
PermissionsStartOnly = true;
|
||||
User = if cfg.dropPrivileges then "consul" else null;
|
||||
Restart = "on-failure";
|
||||
TimeoutStartSec = "infinity";
|
||||
} // (optionalAttrs (cfg.leaveOnStop) {
|
||||
ExecStop = "${cfg.package.bin}/bin/consul leave";
|
||||
ExecStop = "${cfg.package}/bin/consul leave";
|
||||
});
|
||||
|
||||
path = with pkgs; [ iproute gnugrep gawk consul ];
|
||||
|
@ -238,7 +238,7 @@ in
|
|||
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${cfg.alerts.package.bin}/bin/consul-alerts start \
|
||||
${cfg.alerts.package}/bin/consul-alerts start \
|
||||
--alert-addr=${cfg.alerts.listenAddr} \
|
||||
--consul-addr=${cfg.alerts.consulAddr} \
|
||||
${optionalString cfg.alerts.watchChecks "--watch-checks"} \
|
||||
|
|
|
@ -19,8 +19,8 @@ in {
|
|||
package = mkOption {
|
||||
description = "Package to use for flannel";
|
||||
type = types.package;
|
||||
default = pkgs.flannel.bin;
|
||||
defaultText = "pkgs.flannel.bin";
|
||||
default = pkgs.flannel;
|
||||
defaultText = "pkgs.flannel";
|
||||
};
|
||||
|
||||
publicIp = mkOption {
|
||||
|
@ -167,7 +167,7 @@ in {
|
|||
touch /run/flannel/docker
|
||||
'' + optionalString (cfg.storageBackend == "etcd") ''
|
||||
echo "setting network configuration"
|
||||
until ${pkgs.etcdctl.bin}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
|
||||
until ${pkgs.etcdctl}/bin/etcdctl set /coreos.com/network/config '${builtins.toJSON networkConfig}'
|
||||
do
|
||||
echo "setting network configuration, retry"
|
||||
sleep 1
|
||||
|
|
|
@ -83,7 +83,7 @@ in {
|
|||
SKYDNS_NAMESERVERS = concatStringsSep "," cfg.nameservers;
|
||||
};
|
||||
serviceConfig = {
|
||||
ExecStart = "${cfg.package.bin}/bin/skydns";
|
||||
ExecStart = "${cfg.package}/bin/skydns";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -43,12 +43,12 @@ in {
|
|||
description = "Provide EC2 instance credentials to machines outside of EC2";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ];
|
||||
requires = [ "network-link-dummy0.service" "network-addresses-dummy0.service" ];
|
||||
preStart = ''
|
||||
/run/current-system/sw/bin/rm -fv /run/hologram.sock
|
||||
'';
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.hologram.bin}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}";
|
||||
ExecStart = "${pkgs.hologram}/bin/hologram-agent -debug -conf ${cfgFile} -port ${cfg.httpPort}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ in {
|
|||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.hologram.bin}/bin/hologram-server --debug --conf ${cfgFile}";
|
||||
ExecStart = "${pkgs.hologram}/bin/hologram-server --debug --conf ${cfgFile}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -577,7 +577,7 @@ in
|
|||
serviceConfig = {
|
||||
User = "oauth2_proxy";
|
||||
Restart = "always";
|
||||
ExecStart = "${cfg.package.bin}/bin/oauth2_proxy ${configString}";
|
||||
ExecStart = "${cfg.package}/bin/oauth2_proxy ${configString}";
|
||||
EnvironmentFile = mkIf (cfg.keyFile != null) cfg.keyFile;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -224,7 +224,7 @@ in
|
|||
serviceConfig = {
|
||||
User = "nobody";
|
||||
Group = "nogroup";
|
||||
ExecStart = "${pkgs.matterircd.bin}/bin/matterircd ${concatStringsSep " " cfg.matterircd.parameters}";
|
||||
ExecStart = "${pkgs.matterircd}/bin/matterircd ${concatStringsSep " " cfg.matterircd.parameters}";
|
||||
WorkingDirectory = "/tmp";
|
||||
PrivateTmp = true;
|
||||
Restart = "always";
|
||||
|
|
|
@ -38,9 +38,8 @@ in {
|
|||
if [ ! -z "$ECS_DATADIR" ]; then
|
||||
mkdir -p "$ECS_DATADIR"
|
||||
fi
|
||||
${cfg.package.bin}/bin/agent
|
||||
${cfg.package}/bin/agent
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ in
|
|||
'';
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "@${cfg.package.bin}/bin/lxd lxd --group lxd";
|
||||
ExecStart = "@${cfg.package}/bin/lxd lxd --group lxd";
|
||||
Type = "simple";
|
||||
KillMode = "process"; # when stopping, leave the containers alone
|
||||
LimitMEMLOCK = "infinity";
|
||||
|
|
|
@ -6,13 +6,11 @@ let
|
|||
|
||||
# Provides a fake "docker" binary mapping to podman
|
||||
dockerCompat = pkgs.runCommandNoCC "${pkgs.podman.pname}-docker-compat-${pkgs.podman.version}" {
|
||||
outputs = [ "out" "bin" "man" ];
|
||||
outputs = [ "out" "man" ];
|
||||
inherit (pkgs.podman) meta;
|
||||
} ''
|
||||
mkdir $out
|
||||
|
||||
mkdir -p $bin/bin
|
||||
ln -s ${pkgs.podman.bin}/bin/podman $bin/bin/docker
|
||||
mkdir -p $out/bin
|
||||
ln -s ${pkgs.podman}/bin/podman $out/bin/docker
|
||||
|
||||
mkdir -p $man/share/man/man1
|
||||
for f in ${pkgs.podman.man}/share/man/man1/*; do
|
||||
|
|
Loading…
Reference in a new issue