2024-07-31 23:12:48 +00:00
|
|
|
{ lib, config, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.repo-clone;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.repo-clone = {
|
|
|
|
enable = lib.mkEnableOption "repo-clone service";
|
2024-08-01 06:08:41 +00:00
|
|
|
|
|
|
|
repos = lib.mkOption {
|
|
|
|
type = import ./repo.nix { inherit lib; };
|
|
|
|
description = ''
|
|
|
|
attribute set of repos to clone
|
|
|
|
'';
|
|
|
|
default = { };
|
|
|
|
};
|
2024-07-31 23:12:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# /nix/store/pxd7wc8icz577hpl6pmz02b74nhbrj6h-unit-home-manager-ravenshade.service/home-manager-ravenshade.service
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
system.user.services.repo-clone = {
|
|
|
|
Unit = {
|
|
|
|
Description = "repo-clone service";
|
|
|
|
};
|
|
|
|
Service = {
|
|
|
|
Type = "exec";
|
|
|
|
ExecStart =
|
|
|
|
let
|
|
|
|
execName = "repo-clone";
|
|
|
|
script = lib.writeShellScriptBin execName ''
|
|
|
|
echo "hello!"
|
|
|
|
'';
|
|
|
|
in
|
|
|
|
"${script}/bin/${execName}";
|
|
|
|
RemainAfterExit = "yes";
|
|
|
|
};
|
|
|
|
Install = {
|
|
|
|
WantedBy = [ "multi-user.target" ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|