2023-04-14 20:51:52 +00:00
|
|
|
# Local developpement
|
2024-09-05 12:39:17 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
2023-04-14 20:51:52 +00:00
|
|
|
virtualisation = {
|
|
|
|
docker.enable = true;
|
2024-03-23 21:01:55 +00:00
|
|
|
#docker.rootless = {
|
|
|
|
# enable = true;
|
|
|
|
# setSocketVariable = true;
|
|
|
|
#};
|
2024-05-10 17:20:18 +00:00
|
|
|
#libvirtd.enable = true;
|
|
|
|
#lxd.enable = true;
|
2024-01-03 17:29:16 +00:00
|
|
|
#waydroid.enable = true;
|
2023-04-14 20:51:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-23 19:52:57 +00:00
|
|
|
systemd.services.yeswikidev = {
|
|
|
|
enable = true;
|
|
|
|
script = ''
|
|
|
|
${pkgs.systemd}/bin/systemctl start mysql
|
|
|
|
# etc
|
|
|
|
'';
|
2024-09-05 12:39:17 +00:00
|
|
|
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;
|
2024-01-23 19:52:57 +00:00
|
|
|
|
2024-09-05 12:39:17 +00:00
|
|
|
in
|
2024-01-23 19:52:57 +00:00
|
|
|
#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;
|
2024-09-05 12:39:17 +00:00
|
|
|
{
|
|
|
|
# pkgs.writeScript, pkgs.writeScriptBin
|
|
|
|
#ExecStart = startstop "start";
|
|
|
|
#ExecStop = startstop "stop";
|
|
|
|
# OR
|
|
|
|
# ExecStart = "${startstopFullShell} start";
|
|
|
|
# ExecStop = "${startstopFullShell} stop";
|
|
|
|
# OR
|
|
|
|
# ExecStart = "${scripts[0]}";
|
|
|
|
# ExecStop = "${scripts[1]}";
|
|
|
|
};
|
2024-01-23 19:52:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
services.mysql = {
|
2024-02-05 17:49:09 +00:00
|
|
|
enable = true;
|
2024-01-23 19:52:57 +00:00
|
|
|
package = pkgs.mariadb;
|
|
|
|
};
|
|
|
|
|
2023-04-14 20:51:52 +00:00
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
# $ nix search wget
|
2024-09-05 12:39:17 +00:00
|
|
|
environment.systemPackages =
|
|
|
|
with pkgs;
|
|
|
|
let
|
|
|
|
php83 = pkgs.php83.buildEnv { extraConfig = "memory_limit = 2G"; };
|
|
|
|
in
|
|
|
|
[
|
|
|
|
#clang
|
|
|
|
dart-sass
|
|
|
|
dbeaver-bin
|
|
|
|
docker-compose
|
|
|
|
eris-go
|
|
|
|
gcc
|
|
|
|
go
|
|
|
|
nixfmt-rfc-style
|
|
|
|
lua
|
|
|
|
lua-language-server
|
|
|
|
luarocks
|
|
|
|
nixpkgs-fmt
|
|
|
|
nodejs
|
|
|
|
nodePackages.eslint
|
|
|
|
nodePackages.prettier
|
|
|
|
php83
|
|
|
|
php83Packages.composer
|
|
|
|
php83Packages.php-cs-fixer
|
|
|
|
python3
|
|
|
|
python311Packages.virtualenv
|
|
|
|
rpi-imager
|
|
|
|
ruff-lsp
|
|
|
|
stylelint
|
|
|
|
symfony-cli
|
|
|
|
tree-sitter
|
|
|
|
virt-manager
|
|
|
|
yarn
|
|
|
|
zig
|
|
|
|
# image optimizers
|
|
|
|
image_optim
|
|
|
|
nodePackages.svgo
|
|
|
|
jpegoptim
|
|
|
|
optipng
|
|
|
|
pngquant
|
|
|
|
gifsicle
|
|
|
|
libwebp
|
|
|
|
];
|
2023-12-23 10:54:29 +00:00
|
|
|
}
|