diff options
| -rw-r--r-- | configuration.nix | 8 | ||||
| -rw-r--r-- | modules/mealie.nix | 14 | ||||
| -rw-r--r-- | modules/ssh.nix | 2 | ||||
| -rw-r--r-- | modules/syncthing.nix | 2 | ||||
| -rw-r--r-- | modules/webserver.nix | 13 |
5 files changed, 30 insertions, 9 deletions
diff --git a/configuration.nix b/configuration.nix index e95f0cb..a7a7270 100644 --- a/configuration.nix +++ b/configuration.nix @@ -10,6 +10,7 @@ ./modules/webserver.nix ./modules/syncthing.nix ./modules/mailserver.nix + ./modules/mealie.nix ]; networking.hostName = "nixos"; @@ -18,13 +19,10 @@ environment.systemPackages = with pkgs; [ git - neovim - openssh - htop lazygit - python312 - python312Packages.flask + neovim + htop ]; system.copySystemConfiguration = true; diff --git a/modules/mealie.nix b/modules/mealie.nix new file mode 100644 index 0000000..74dcf57 --- /dev/null +++ b/modules/mealie.nix @@ -0,0 +1,14 @@ +{ config, libs, pkgs, ... }: +let + unstable = import <nixos-unstable> {}; +in +{ + + services.mealie = { + enable = true; + package = unstable.mealie; + }; + + networking.firewall.allowedTCPPorts = [ 9000 8080 ]; + +} diff --git a/modules/ssh.nix b/modules/ssh.nix index 44580d7..a23dacd 100644 --- a/modules/ssh.nix +++ b/modules/ssh.nix @@ -1,6 +1,8 @@ { config, libs, pkgs, ... }: { + environment.systemPackages = [ pkgs.openssh ]; + services.openssh = { enable = true; settings.PasswordAuthentication = false; diff --git a/modules/syncthing.nix b/modules/syncthing.nix index 4144f7b..4458b42 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -3,7 +3,7 @@ services.syncthing = { enable = true; - guiAddress = "krinitsin.com:8384"; + guiAddress = "localhost:8384"; dataDir = "/var/lib/syncthing"; openDefaultPorts = true; }; diff --git a/modules/webserver.nix b/modules/webserver.nix index 8f8543e..e8867d3 100644 --- a/modules/webserver.nix +++ b/modules/webserver.nix @@ -18,13 +18,14 @@ "recipes.krinitsin.com" = { forceSSL = true; useACMEHost = "krinitsin.com"; - root = "/var/www/recipes.krinitsin.com"; + serverAliases = [ "rezepte.krinitsin.com" ]; + locations."/".proxyPass = "http://localhost:9000"; }; "syncthing.krinitsin.com" = { forceSSL = true; useACMEHost = "krinitsin.com"; - locations."/".proxyPass = "https://krinitsin.com:8384"; + locations."/".proxyPass = "https://localhost:8384"; }; }; }; @@ -32,9 +33,15 @@ security.acme = { acceptTerms = true; defaults.email = "christian@krinitsin.xyz"; - certs."krinitsin.com".extraDomainNames = [ "recipes.krinitsin.com" "webmail.krinitsin.com" "syncthing.krinitsin.com" ]; + certs."krinitsin.com".extraDomainNames = [ "recipes.krinitsin.com" "rezepte.krinitsin.com" "webmail.krinitsin.com" "syncthing.krinitsin.com" ]; }; + + environment.systemPackages = with pkgs; [ + python312 + python312Packages.flask + ]; + systemd.services.flask = { enable = true; wantedBy = ["default.target"]; |