From 9009f63efc8327592e3fd810d563b821e315d11e Mon Sep 17 00:00:00 2001 From: joy Date: Fri, 17 Jan 2025 22:52:42 +0100 Subject: [PATCH] sql --- flake.lock | 30 +++++++++++++++--------------- hosts/desktop/default.nix | 1 + hosts/laptop/default.nix | 1 + modules/services/default.nix | 1 + modules/services/mysql/default.nix | 20 ++++++++++++++++++++ modules/wm/misc/default.nix | 1 + 6 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 modules/services/mysql/default.nix diff --git a/flake.lock b/flake.lock index 0a82e0e..d483a76 100644 --- a/flake.lock +++ b/flake.lock @@ -97,11 +97,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1737028554, - "narHash": "sha256-6VB1uVPqyaXTTori47ESnvAlQ1nHR4XwRybBHxWpL3E=", + "lastModified": 1737086610, + "narHash": "sha256-c8b20yTbg2oaUvCVXdm2Lvh1YQN0v2Xp4lpvJaGPOCQ=", "owner": "rycee", "repo": "nur-expressions", - "rev": "9b53b108b417e6d3fef7743c4034df582fbd9a7e", + "rev": "75a6a0f78832ef7c1e5e86f0d55bf07e7d01980d", "type": "gitlab" }, "original": { @@ -267,11 +267,11 @@ ] }, "locked": { - "lastModified": 1736883540, - "narHash": "sha256-dgPgoPUSg8cGAMqbhQRkww665sZtgzpWXxWjlyqhv94=", + "lastModified": 1737120639, + "narHash": "sha256-p5e/45V41YD3tMELuiNIoVCa25/w4nhOTm0B9MtdHFI=", "owner": "nix-community", "repo": "home-manager", - "rev": "0dfec9deb275854a56c97c356c40ef72e3a2e632", + "rev": "a0046af169ce7b1da503974e1b22c48ef4d71887", "type": "github" }, "original": { @@ -376,11 +376,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1736883708, - "narHash": "sha256-uQ+NQ0/xYU0N1CnXsa2zghgNaOPxWpMJXSUJJ9W7140=", + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "eb62e6aa39ea67e0b8018ba8ea077efe65807dc8", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "type": "github" }, "original": { @@ -512,11 +512,11 @@ ] }, "locked": { - "lastModified": 1736808430, - "narHash": "sha256-wlgdf/n7bJMLBheqt1jmPoxJFrUP6FByKQFXuM9YvIk=", + "lastModified": 1737107480, + "narHash": "sha256-GXUE9+FgxoZU8v0p6ilBJ8NH7k8nKmZjp/7dmMrCv3o=", "owner": "Mic92", "repo": "sops-nix", - "rev": "553c7cb22fed19fd60eb310423fdc93045c51ba8", + "rev": "4c4fb93f18b9072c6fa1986221f9a3d7bf1fe4b6", "type": "github" }, "original": { @@ -532,11 +532,11 @@ ] }, "locked": { - "lastModified": 1736808430, - "narHash": "sha256-wlgdf/n7bJMLBheqt1jmPoxJFrUP6FByKQFXuM9YvIk=", + "lastModified": 1737107480, + "narHash": "sha256-GXUE9+FgxoZU8v0p6ilBJ8NH7k8nKmZjp/7dmMrCv3o=", "owner": "Mic92", "repo": "sops-nix", - "rev": "553c7cb22fed19fd60eb310423fdc93045c51ba8", + "rev": "4c4fb93f18b9072c6fa1986221f9a3d7bf1fe4b6", "type": "github" }, "original": { diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index b56dd0f..68a250b 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -24,6 +24,7 @@ theme.enable = true; hyprland.enable = true; networking.enable = true; + mysql.enable = true; imports = [ ./hardware.nix diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 11fe467..7ce32d7 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -22,6 +22,7 @@ theme.enable = true; hyprland.enable = true; networking.enable = true; + mysql.enable = true; imports = [ ./hardware.nix diff --git a/modules/services/default.nix b/modules/services/default.nix index 2880bdf..10eedfc 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -8,5 +8,6 @@ ./nginx ./forgejo ./immich + ./mysql ]; } diff --git a/modules/services/mysql/default.nix b/modules/services/mysql/default.nix new file mode 100644 index 0000000..0404a17 --- /dev/null +++ b/modules/services/mysql/default.nix @@ -0,0 +1,20 @@ +{ + pkgs, + config, + lib, + ... +}: { + options = { + mysql.enable = lib.mkEnableOption ""; + }; + + config = lib.mkIf config.mysql.enable { + services.mysql = { + enable = true; + package = pkgs.mariadb; + }; + environment.systemPackages = with pkgs; [ + mysql-workbench + ]; + }; +} diff --git a/modules/wm/misc/default.nix b/modules/wm/misc/default.nix index 69cf0e3..4d764b4 100644 --- a/modules/wm/misc/default.nix +++ b/modules/wm/misc/default.nix @@ -25,6 +25,7 @@ gnome-sound-recorder kdePackages.kdenlive sqlitebrowser + libreoffice-qt ]; }; }