add mercurial to rundeck path

This commit is contained in:
Luke Granger-Brown 2021-04-10 22:17:28 +00:00
parent 15ed0197e3
commit e0241545d2
5 changed files with 28 additions and 10 deletions

View file

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
{ pkgs, ... }@args: {
{ depot, pkgs, ... }@args: {
bazel-run = import ./bazel-run.nix args;
crane = import ./crane.nix args;
javaws-env = import ./javaws-env.nix args;
@ -28,5 +28,8 @@
flameshot = pkgs.libsForQt5.callPackage ./flameshot {};
lukegb-wallpapers = pkgs.callPackage ./lukegb-wallpapers {};
rundeck-bin = pkgs.callPackage ./rundeck-bin {};
mercurial = with pkgs; (mercurial.overridePythonAttrs (origAttrs: {
propagatedBuildInputs = [python3Packages.hg-evolve depot.nix.pkgs.hg-git];
}));
} // (import ./heptapod-runner.nix args)
// (import ./lightspeed args)

View file

@ -7,11 +7,22 @@ in {
options.services.rundeck = {
enable = mkEnableOption "rundeck";
user = mkOption {
default = null;
type = types.nullOr types.str;
};
package = mkOption {
default = depot.pkgs.rundeck-bin;
defaultText = "depot.pkgs.rundeck-bin";
type = types.package;
};
pathPackages = mkOption {
default = [];
defaultText = "[]";
type = types.listOf types.package;
};
};
config = mkIf cfg.enable {
@ -19,7 +30,9 @@ in {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
User = "deployer";
User = cfg.user;
DynamicUser = cfg.user != cfg.user;
Path = lib.makeBinPath cfg.pathPackages;
ExecStart = "${cfg.package}/bin/rundeckd -b /var/lib/rundeck";
StateDirectory = "rundeck";
};

View file

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
{ depot, lib, ... }:
{ depot, lib, pkgs, ... }:
{
imports = [
../lib/bvm.nix
@ -20,7 +20,13 @@
};
my.ip.tailscale = "100.65.226.19";
services.rundeck.enable = true;
services.rundeck = {
enable = true;
user = "deployer";
pathPackages = with pkgs; [
depot.nix.pkgs.mercurial
];
};
environment.etc."rundeck.nodes.yaml" = let
content = builtins.mapAttrs (name: value: {

View file

@ -86,9 +86,7 @@ in
environment.systemPackages = with pkgs; [
vim rxvt_unicode.terminfo tmux rebuilder tailscale rsync libarchive tcpdump restic
iftop htop jq
(mercurial.overridePythonAttrs (origAttrs: {
propagatedBuildInputs = [python3Packages.hg-evolve depot.nix.pkgs.hg-git];
}))
depot.nix.pkgs.mercurial
switch-prebuilt
];

View file

@ -100,9 +100,7 @@ in
'')
rxvt_unicode.terminfo tmux rsync libarchive tcpdump restic
iftop htop jq
(mercurial.overridePythonAttrs (origAttrs: {
propagatedBuildInputs = [python3Packages.hg-evolve depot.nix.pkgs.hg-git];
}))
depot.nix.pkgs.mercurial
] ++ lib.optionals isLinux [
iotop
]));