fix(local-dev): no yeswikidev service

This commit is contained in:
Florian Schmitt 2025-02-03 10:37:51 +03:00
parent a8687e89f1
commit b63400e00b

View file

@ -1,8 +1,6 @@
# Local developpement # Local developpement
{ {
pkgs, pkgs,
config,
lib,
... ...
}: }:
{ {
@ -17,60 +15,60 @@
#waydroid.enable = true #waydroid.enable = true
}; };
#programs.virt-manager.enable = true; #programs.virt-manager.enable = true;
systemd.services.yeswikidev = { #systemd.services.yeswikidev = {
enable = true; # enable = true;
script = '' # script = ''
${pkgs.systemd}/bin/systemctl start mysql # ${pkgs.systemd}/bin/systemctl start mysql
# etc # # etc
''; # '';
serviceConfig = # serviceConfig =
let # let
startstop = # startstop =
command: # command:
(pkgs.writeShellApplication { # (pkgs.writeShellApplication {
name = "yeswikidev"; # name = "yeswikidev";
runtimeInputs = with pkgs; [ systemd ]; # runtimeInputs = with pkgs; [ systemd ];
text = '' # text = ''
systemctl ${command} mysql.service # systemctl ${command} mysql.service
''; # '';
}); # });
#startstopFullShell = pkgs.writeShellApplication { #startstopFullShell = pkgs.writeShellApplication {
# name = "yeswikidev"; # name = "yeswikidev";
# runtimeInputs = with pkgs; [ systemd ]; # runtimeInputs = with pkgs; [ systemd ];
# text = '' # text = ''
# systemctl "$1" mysql.service # systemctl "$1" mysql.service
# ''; # '';
#}); #});
#commands = [ "start" "stop" ]; #commands = [ "start" "stop" ];
#scripts = map (command: (pkgs.writeShellApplication { #scripts = map (command: (pkgs.writeShellApplication {
# name = "yeswikidev"; # name = "yeswikidev";
# runtimeInputs = with pkgs; [ systemd ]; # runtimeInputs = with pkgs; [ systemd ];
# text = '' # text = ''
# systemctl ${command} mysql.service # systemctl ${command} mysql.service
# ''; # '';
#})) commands; #})) commands;
in # in
#execs = { #execs = {
# ExecStart = "start"; # ExecStart = "start";
# ExecStop = "stop"; # ExecStop = "stop";
#}; #};
# https://nixos.org/manual/nix/stable/language/builtins # https://nixos.org/manual/nix/stable/language/builtins
# https://nixos.org/manual/nix/stable/language/builtins#builtins-mapAttrs # https://nixos.org/manual/nix/stable/language/builtins#builtins-mapAttrs
#execAttrs = attrNames execs; # ["Start" "Stop"]; #execAttrs = attrNames execs; # ["Start" "Stop"];
#execs2 = mapAttrs (k: v: ()) execs; #execs2 = mapAttrs (k: v: ()) execs;
{ # {
# pkgs.writeScript, pkgs.writeScriptBin # pkgs.writeScript, pkgs.writeScriptBin
#ExecStart = startstop "start"; #ExecStart = startstop "start";
#ExecStop = startstop "stop"; #ExecStop = startstop "stop";
# OR # OR
# ExecStart = "${startstopFullShell} start"; # ExecStart = "${startstopFullShell} start";
# ExecStop = "${startstopFullShell} stop"; # ExecStop = "${startstopFullShell} stop";
# OR # OR
# ExecStart = "${scripts[0]}"; # ExecStart = "${scripts[0]}";
# ExecStop = "${scripts[1]}"; # ExecStop = "${scripts[1]}";
}; # };
}; #};
services.mysql = { services.mysql = {
enable = true; enable = true;