fix(local-dev): no yeswikidev service
This commit is contained in:
parent
a8687e89f1
commit
b63400e00b
1 changed files with 53 additions and 55 deletions
|
@ -1,8 +1,6 @@
|
|||
# Local developpement
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
@ -17,60 +15,60 @@
|
|||
#waydroid.enable = true
|
||||
};
|
||||
#programs.virt-manager.enable = true;
|
||||
systemd.services.yeswikidev = {
|
||||
enable = true;
|
||||
script = ''
|
||||
${pkgs.systemd}/bin/systemctl start mysql
|
||||
# etc
|
||||
'';
|
||||
serviceConfig =
|
||||
let
|
||||
startstop =
|
||||
command:
|
||||
(pkgs.writeShellApplication {
|
||||
name = "yeswikidev";
|
||||
runtimeInputs = with pkgs; [ systemd ];
|
||||
text = ''
|
||||
systemctl ${command} mysql.service
|
||||
'';
|
||||
});
|
||||
#startstopFullShell = pkgs.writeShellApplication {
|
||||
# name = "yeswikidev";
|
||||
# runtimeInputs = with pkgs; [ systemd ];
|
||||
# text = ''
|
||||
# systemctl "$1" mysql.service
|
||||
# '';
|
||||
#});
|
||||
#commands = [ "start" "stop" ];
|
||||
#scripts = map (command: (pkgs.writeShellApplication {
|
||||
# name = "yeswikidev";
|
||||
# runtimeInputs = with pkgs; [ systemd ];
|
||||
# text = ''
|
||||
# systemctl ${command} mysql.service
|
||||
# '';
|
||||
#})) commands;
|
||||
#systemd.services.yeswikidev = {
|
||||
# enable = true;
|
||||
# script = ''
|
||||
# ${pkgs.systemd}/bin/systemctl start mysql
|
||||
# # etc
|
||||
# '';
|
||||
# serviceConfig =
|
||||
# let
|
||||
# startstop =
|
||||
# command:
|
||||
# (pkgs.writeShellApplication {
|
||||
# name = "yeswikidev";
|
||||
# runtimeInputs = with pkgs; [ systemd ];
|
||||
# text = ''
|
||||
# systemctl ${command} mysql.service
|
||||
# '';
|
||||
# });
|
||||
#startstopFullShell = pkgs.writeShellApplication {
|
||||
# name = "yeswikidev";
|
||||
# runtimeInputs = with pkgs; [ systemd ];
|
||||
# text = ''
|
||||
# systemctl "$1" mysql.service
|
||||
# '';
|
||||
#});
|
||||
#commands = [ "start" "stop" ];
|
||||
#scripts = map (command: (pkgs.writeShellApplication {
|
||||
# name = "yeswikidev";
|
||||
# runtimeInputs = with pkgs; [ systemd ];
|
||||
# text = ''
|
||||
# systemctl ${command} mysql.service
|
||||
# '';
|
||||
#})) commands;
|
||||
|
||||
in
|
||||
#execs = {
|
||||
# ExecStart = "start";
|
||||
# ExecStop = "stop";
|
||||
#};
|
||||
# https://nixos.org/manual/nix/stable/language/builtins
|
||||
# https://nixos.org/manual/nix/stable/language/builtins#builtins-mapAttrs
|
||||
#execAttrs = attrNames execs; # ["Start" "Stop"];
|
||||
#execs2 = mapAttrs (k: v: ()) execs;
|
||||
{
|
||||
# pkgs.writeScript, pkgs.writeScriptBin
|
||||
#ExecStart = startstop "start";
|
||||
#ExecStop = startstop "stop";
|
||||
# OR
|
||||
# ExecStart = "${startstopFullShell} start";
|
||||
# ExecStop = "${startstopFullShell} stop";
|
||||
# OR
|
||||
# ExecStart = "${scripts[0]}";
|
||||
# ExecStop = "${scripts[1]}";
|
||||
};
|
||||
};
|
||||
# in
|
||||
#execs = {
|
||||
# ExecStart = "start";
|
||||
# ExecStop = "stop";
|
||||
#};
|
||||
# https://nixos.org/manual/nix/stable/language/builtins
|
||||
# https://nixos.org/manual/nix/stable/language/builtins#builtins-mapAttrs
|
||||
#execAttrs = attrNames execs; # ["Start" "Stop"];
|
||||
#execs2 = mapAttrs (k: v: ()) execs;
|
||||
# {
|
||||
# pkgs.writeScript, pkgs.writeScriptBin
|
||||
#ExecStart = startstop "start";
|
||||
#ExecStop = startstop "stop";
|
||||
# OR
|
||||
# ExecStart = "${startstopFullShell} start";
|
||||
# ExecStop = "${startstopFullShell} stop";
|
||||
# OR
|
||||
# ExecStart = "${scripts[0]}";
|
||||
# ExecStop = "${scripts[1]}";
|
||||
# };
|
||||
#};
|
||||
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue