36 lines
795 B
Nix
36 lines
795 B
Nix
|
{ lib, config, ... }:
|
||
|
|
||
|
let
|
||
|
cfg = config.repo-clone;
|
||
|
in
|
||
|
{
|
||
|
options.repo-clone = {
|
||
|
enable = lib.mkEnableOption "repo-clone service";
|
||
|
};
|
||
|
|
||
|
|
||
|
# /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" ];
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|