diff --git a/common/mtl-aas.nix b/common/mtl-aas.nix new file mode 100644 index 0000000..9f19cdc --- /dev/null +++ b/common/mtl-aas.nix @@ -0,0 +1,39 @@ +# Example configuration: +# host: deemz.org +# refineryBaseUrl: /refinery + +{ config, pkgs, mtlAasHost, mtlAasBaseUrl, ... }: +{ + # reverse proxy + services.nginx = { + enable = true; + + virtualHosts.${mtlAasHost} = { + locations."${mtlAasBaseUrl}/" = { + proxyPass = "http://127.0.0.1:15478/"; + extraConfig = '' + charset UTF-8; + more_set_headers 'Server: NIXOS'; + ''; + }; + + serverName = mtlAasHost; + }; + }; + + # run refinery container as a systemd service + systemd.services.mtl-aas = { + script = '' + ${mtl-aas}/bin/run_server + ''; + serviceConfig = { + Type = "exec"; + User = "mtl-aas"; + }; + }; + users.users.mtl-aas = { + isSystemUser = true; + group = "mtl-aas"; + }; + users.groups.mtl-aas = {}; +} diff --git a/deemz.org/configuration.nix b/deemz.org/configuration.nix index 1fd2b2a..52b0dc4 100644 --- a/deemz.org/configuration.nix +++ b/deemz.org/configuration.nix @@ -318,6 +318,10 @@ let secrets = import ../secrets.nix; in proxyWebsockets = true; }; + locations."/apis/mtl-aas/" = { + proxyPass = "http://127.0.0.1:15478/"; + }; + forceSSL = true; enableACME = true; extraConfig = '' diff --git a/flake.lock b/flake.lock index 682eddf..38474a2 100644 --- a/flake.lock +++ b/flake.lock @@ -22,11 +22,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1761468971, - "narHash": "sha256-vY2OLVg5ZTobdroQKQQSipSIkHlxOTrIF1fsMzPh8w8=", + "lastModified": 1760862643, + "narHash": "sha256-PXwG0TM7Ek87DNx4LbGWuD93PbFeKAJs4FfALtp7Wo0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "78e34d1667d32d8a0ffc3eba4591ff256e80576e", + "rev": "33c6dca0c0cb31d6addcd34e90a63ad61826b28c", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1761373498, - "narHash": "sha256-Q/uhWNvd7V7k1H1ZPMy/vkx3F8C13ZcdrKjO7Jv7v0c=", + "lastModified": 1760878510, + "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6a08e6bb4e46ff7fcbb53d409b253f6bad8a28ce", + "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6cbea70..c924f3d 100644 --- a/flake.nix +++ b/flake.nix @@ -8,9 +8,13 @@ url = "git+https://deemz.org/git/joeri/icomidal"; inputs.nixpkgs.follows = "nixpkgs-stable"; }; + mtl-aas = { + url = "git+https://deemz.org/git/teaching/mtl-aas"; + inputs.nixpkgs.follows = "nixpkgs-stable"; + }; }; - outputs = { self, nixpkgs-stable, nixpkgs-unstable, icomidal }: + outputs = { self, nixpkgs-stable, nixpkgs-unstable, icomidal, mtl-aas }: let system = "x86_64-linux"; in { @@ -27,10 +31,12 @@ icomidal=icomidal.packages.${system}.default; refineryHost = "deemz.org"; refineryBaseUrl = "/refinery"; + mtl-aas=mtl-aas.packages.${system}.default; }; modules = [ ./deemz.org/configuration.nix ./common/refinery.nix + ./common/mtl-aas.nix ]; }; msdl = nixpkgs-stable.lib.nixosSystem { diff --git a/msdl/configuration.nix b/msdl/configuration.nix index bc8a62f..50dafd3 100644 --- a/msdl/configuration.nix +++ b/msdl/configuration.nix @@ -79,6 +79,7 @@ services.nginx = { enable = true; + recommendedGzipSettings = true; recommendedOptimisation = true; recommendedProxySettings = true; diff --git a/t14/configuration.nix b/t14/configuration.nix index be030f2..487fcba 100644 --- a/t14/configuration.nix +++ b/t14/configuration.nix @@ -183,9 +183,14 @@ virtualisation.docker.enable = true; # KDE config - services.desktopManager.plasma6.enable = true; + #services.desktopManager.plasma6.enable = true; #services.xserver.desktopManager.xfce.enable = true; + + # GNOME + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + # firmware updates services.fwupd.enable = true; @@ -204,6 +209,7 @@ services.udev.extraRules = '' ACTION=="add", SUBSYSTEM=="usb", DRIVERS=="usb", ATTR{power/wakeup}="disabled" ''; + services.udev.packages = with pkgs; [ gnome-settings-daemon ]; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/t14/system-packages.nix b/t14/system-packages.nix index 7f8a7b1..8898bd0 100644 --- a/t14/system-packages.nix +++ b/t14/system-packages.nix @@ -44,6 +44,7 @@ in [ xfce.xfce4-weather-plugin alacritty xorg.xkill + gpu-screen-recorder-gtk # great screen recorder # Programming git @@ -118,4 +119,7 @@ in [ qdigidoc solaar # extra options for logitech mouse + + # GNOME stuff + gnomeExtensions.appindicator ]