2023-04-14 20:51:52 +00:00
|
|
|
# Local developpement
|
2024-01-23 19:52:57 +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;
|
|
|
|
#};
|
2023-04-14 20:51:52 +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
|
|
|
|
'';
|
|
|
|
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;
|
|
|
|
|
|
|
|
#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;
|
|
|
|
in {
|
|
|
|
# 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 = {
|
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
|
|
|
|
environment.systemPackages = with pkgs; [
|
2023-11-03 08:09:19 +00:00
|
|
|
clang
|
2024-03-16 17:14:36 +00:00
|
|
|
dart-sass
|
|
|
|
dbeaver
|
2023-04-15 07:48:46 +00:00
|
|
|
docker-compose
|
2023-11-03 08:09:19 +00:00
|
|
|
gcc
|
|
|
|
gitkraken
|
2024-02-03 04:39:56 +00:00
|
|
|
go
|
2024-01-23 19:52:57 +00:00
|
|
|
nixfmt
|
2024-03-16 17:14:36 +00:00
|
|
|
nixpkgs-fmt
|
2023-05-11 14:03:37 +00:00
|
|
|
nodejs
|
2024-01-23 19:28:11 +00:00
|
|
|
php83
|
|
|
|
php83Packages.composer
|
|
|
|
php83Packages.php-cs-fixer
|
2024-03-16 17:14:36 +00:00
|
|
|
python3
|
2023-11-03 08:09:19 +00:00
|
|
|
python311Packages.virtualenv
|
2023-07-16 09:44:31 +00:00
|
|
|
rpi-imager
|
2024-03-16 17:14:36 +00:00
|
|
|
ruff-lsp
|
2023-07-16 09:44:31 +00:00
|
|
|
symfony-cli
|
2023-04-14 20:51:52 +00:00
|
|
|
virt-manager
|
2023-05-11 14:03:37 +00:00
|
|
|
yarn
|
2023-11-03 08:09:19 +00:00
|
|
|
zig
|
2023-04-14 20:51:52 +00:00
|
|
|
];
|
2023-12-23 10:54:29 +00:00
|
|
|
}
|