mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 04:19:19 -08:00
fix(samba): accounts
This commit is contained in:
parent
5dcd5a5be0
commit
8335b8f3a0
12 changed files with 164 additions and 37 deletions
|
|
@ -8,10 +8,13 @@
|
|||
name,
|
||||
attr ? name,
|
||||
subdir ? null,
|
||||
}:
|
||||
pkgs.writeShellScriptBin name ''
|
||||
exe ? null,
|
||||
}: let
|
||||
subcommand = if exe == null then "run" else "shell";
|
||||
exeArg = if exe == null then "--" else "-c ${exe}";
|
||||
in pkgs.writeShellScriptBin name ''
|
||||
${optionalString (subdir != null) ''cd "$NF_CONFIG_ROOT${subdir}"''}
|
||||
exec nix run ''${FLAKE_OPTS-} "$NF_CONFIG_ROOT#${attr}" -- "$@"
|
||||
exec nix ${subcommand} ''${FLAKE_OPTS-} "$NF_CONFIG_ROOT#${attr}" ${exeArg} "$@"
|
||||
'';
|
||||
nf-actions = pkgs.writeShellScriptBin "nf-actions" ''
|
||||
NF_CONFIG_FILES=($NF_CONFIG_ROOT/ci/{nodes,flake-cron}.nix)
|
||||
|
|
@ -84,6 +87,11 @@
|
|||
name = "deploy";
|
||||
attr = "deploy-rs";
|
||||
})
|
||||
(mkWrapper rec {
|
||||
name = "smbencrypt";
|
||||
attr = "pkgs.freeradius";
|
||||
exe = name;
|
||||
})
|
||||
];
|
||||
shellHook = ''
|
||||
export NIX_BIN_DIR=$(dirname $(readlink -f $(type -P nix)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue