wip local dev
This commit is contained in:
parent
750b55bd68
commit
1b49cdba2c
2 changed files with 65 additions and 2 deletions
|
@ -144,6 +144,7 @@ in
|
||||||
(chromium.override {
|
(chromium.override {
|
||||||
enableWideVine = true; # DRM support
|
enableWideVine = true; # DRM support
|
||||||
})
|
})
|
||||||
|
appimage-run
|
||||||
audacious
|
audacious
|
||||||
calibre
|
calibre
|
||||||
digikam
|
digikam
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# Local developpement
|
# Local developpement
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }: {
|
||||||
{
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
docker.enable = true;
|
docker.enable = true;
|
||||||
docker.rootless = {
|
docker.rootless = {
|
||||||
|
@ -12,6 +11,68 @@
|
||||||
#waydroid.enable = true;
|
#waydroid.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;
|
||||||
|
|
||||||
|
#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 = {
|
||||||
|
package = pkgs.mariadb;
|
||||||
|
ensureDatabases = [ "yeswiki-db" ];
|
||||||
|
ensureUsers = [{
|
||||||
|
name = "yeswiki-db-user";
|
||||||
|
ensurePermissions = { "yeswiki-db" = "ALL PRIVILEGES"; };
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
systemd.services.mysql.wantedBy = lib.mkForce [];
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
@ -19,6 +80,7 @@
|
||||||
docker-compose
|
docker-compose
|
||||||
gcc
|
gcc
|
||||||
gitkraken
|
gitkraken
|
||||||
|
nixfmt
|
||||||
nodejs
|
nodejs
|
||||||
php83
|
php83
|
||||||
php83Packages.composer
|
php83Packages.composer
|
||||||
|
|
Loading…
Reference in a new issue