Format everything with alejandra
This commit is contained in:
parent
82bbd7ce87
commit
7888103b1e
100 changed files with 2827 additions and 2756 deletions
|
|
@ -1,10 +1,8 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./syncthing.nix
|
||||
./mysql.nix
|
||||
./xampp.nix
|
||||
./mongodb.nix
|
||||
];
|
||||
{...}: {
|
||||
imports = [
|
||||
./syncthing.nix
|
||||
./mysql.nix
|
||||
./xampp.nix
|
||||
./mongodb.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,31 +1,34 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.mongodb = {
|
||||
enable = true;
|
||||
package = pkgs.mongodb-4_4;
|
||||
user = "toast";
|
||||
};
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.mongodb = {
|
||||
enable = true;
|
||||
package = pkgs.mongodb-4_4;
|
||||
user = "toast";
|
||||
};
|
||||
|
||||
# Don't autostart MySQL
|
||||
systemd.services.mongodb.wantedBy = lib.mkForce [];
|
||||
# Don't autostart MySQL
|
||||
systemd.services.mongodb.wantedBy = lib.mkForce [];
|
||||
|
||||
# Allow regular users to start/stop mongodb
|
||||
# https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "mongodb.service" &&
|
||||
subject.user == "${config.services.mongodb.user}"
|
||||
)
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
})
|
||||
'';
|
||||
# Allow regular users to start/stop mongodb
|
||||
# https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "mongodb.service" &&
|
||||
subject.user == "${config.services.mongodb.user}"
|
||||
)
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
})
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mongosh
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
mongosh
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,36 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mysql80;
|
||||
user = "toast";
|
||||
group = "users";
|
||||
};
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mysql80;
|
||||
user = "toast";
|
||||
group = "users";
|
||||
};
|
||||
|
||||
# Don't autostart MySQL
|
||||
systemd.services.mysql.wantedBy = lib.mkForce [];
|
||||
# Don't autostart MySQL
|
||||
systemd.services.mysql.wantedBy = lib.mkForce [];
|
||||
|
||||
# Allow regular users to start/stop mysql
|
||||
# https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "mysql.service" &&
|
||||
subject.user == "${config.services.mysql.user}"
|
||||
)
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
})
|
||||
'';
|
||||
# Allow regular users to start/stop mysql
|
||||
# https://stackoverflow.com/questions/61480914/using-policykit-to-allow-non-root-users-to-start-and-stop-a-service
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "mysql.service" &&
|
||||
subject.user == "${config.services.mysql.user}"
|
||||
)
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
})
|
||||
'';
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mysql-workbench
|
||||
mycli
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
mysql-workbench
|
||||
mycli
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.syncthing.settings.folders = {
|
||||
"school-things" = {
|
||||
label = "School things";
|
||||
id = "z6alc-nfoqr";
|
||||
devices = [ "steamdeck" "server" "pc" "winmax2" ];
|
||||
path = "~/Documents/School things";
|
||||
};
|
||||
};
|
||||
{config, ...}: {
|
||||
services.syncthing.settings.folders = {
|
||||
"school-things" = {
|
||||
label = "School things";
|
||||
id = "z6alc-nfoqr";
|
||||
devices = ["steamdeck" "server" "pc" "winmax2"];
|
||||
path = "~/Documents/School things";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,38 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
booDark = pkgs.fetchzip {
|
||||
url = "https://github.com/adorade/boodark/releases/download/v1.1.1/boodark-v1.1.1.zip";
|
||||
hash = "sha256-GE/FtFlU6A4I9sRyjMhQIidGpDLD99Wzzngz3QI/rSo=";
|
||||
};
|
||||
in
|
||||
{
|
||||
# I tried setting up httpd + php in class but I just gave up
|
||||
virtualisation.oci-containers = {
|
||||
containers."xampp" = {
|
||||
autoStart = false;
|
||||
image = "tomsik68/xampp";
|
||||
#user = "${toString users.users.atfc.uid}:${toString users.groups.minecraft.gid}";
|
||||
volumes = [
|
||||
"xampp-mysql:/opt/lampp/var/mysql"
|
||||
# No dark mode installed by default :(
|
||||
"${booDark}:/opt/lampp/phpmyadmin/themes/booDark"
|
||||
];
|
||||
ports = [ "41061:22" "41062:80" ];
|
||||
};
|
||||
};
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
booDark = pkgs.fetchzip {
|
||||
url = "https://github.com/adorade/boodark/releases/download/v1.1.1/boodark-v1.1.1.zip";
|
||||
hash = "sha256-GE/FtFlU6A4I9sRyjMhQIidGpDLD99Wzzngz3QI/rSo=";
|
||||
};
|
||||
in {
|
||||
# I tried setting up httpd + php in class but I just gave up
|
||||
virtualisation.oci-containers = {
|
||||
containers."xampp" = {
|
||||
autoStart = false;
|
||||
image = "tomsik68/xampp";
|
||||
#user = "${toString users.users.atfc.uid}:${toString users.groups.minecraft.gid}";
|
||||
volumes = [
|
||||
"xampp-mysql:/opt/lampp/var/mysql"
|
||||
# No dark mode installed by default :(
|
||||
"${booDark}:/opt/lampp/phpmyadmin/themes/booDark"
|
||||
];
|
||||
ports = ["41061:22" "41062:80"];
|
||||
};
|
||||
};
|
||||
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "podman-xampp.service" &&
|
||||
subject.user == "toast"
|
||||
)
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
})
|
||||
'';
|
||||
}
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "podman-xampp.service" &&
|
||||
subject.user == "toast"
|
||||
)
|
||||
{
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
})
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue