mrflos-nixos-config-fork/modules/local-dev.nix

111 lines
2.6 KiB
Nix
Raw Normal View History

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;
#docker.rootless = {
# enable = true;
# setSocketVariable = true;
#};
#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
2024-07-28 10:40:28 +00:00
environment.systemPackages = with pkgs;
let
php83 = pkgs.php83.buildEnv { extraConfig = "memory_limit = 2G"; };
in [
2024-05-21 12:57:21 +00:00
#clang
dart-sass
2024-07-03 07:46:47 +00:00
dbeaver-bin
docker-compose
2023-11-03 08:09:19 +00:00
gcc
2024-02-03 04:39:56 +00:00
go
2024-07-03 07:46:47 +00:00
nixfmt-rfc-style
nixpkgs-fmt
nodejs
2024-05-21 12:57:21 +00:00
nodePackages.eslint
nodePackages.prettier
php83
php83Packages.composer
php83Packages.php-cs-fixer
python3
2023-11-03 08:09:19 +00:00
python311Packages.virtualenv
rpi-imager
ruff-lsp
2024-05-21 12:57:21 +00:00
stylelint
symfony-cli
2024-07-03 07:46:47 +00:00
tree-sitter
2023-04-14 20:51:52 +00:00
virt-manager
yarn
2023-11-03 08:09:19 +00:00
zig
2024-05-16 06:41:41 +00:00
# image optimizers
image_optim
nodePackages.svgo
jpegoptim
optipng
pngquant
gifsicle
libwebp
2023-04-14 20:51:52 +00:00
];
}