Compare commits

..

No commits in common. "4c77c9fc6757583491eaf71cdfff20c6808f3fa3" and "47ed79986cea2451de65b6ee7dc680d61296c703" have entirely different histories.

3 changed files with 103 additions and 70 deletions

View File

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1729281548, "lastModified": 1728763831,
"narHash": "sha256-MuojlSnwAJAwfhgmW8ZtZrwm2Sko4fqubCvReqbUzYw=", "narHash": "sha256-KOp33tls7jRAhcmu77aVxKpSMou8QgK0BC+Y3sYLuGo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "a6a3179ddf396dfc28a078e2f169354d0c137125", "rev": "b6215392ec3bd05e9ebfbb2f7945c414096fce8f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -20,25 +20,64 @@
"type": "github" "type": "github"
} }
}, },
"greg": { "fix-python": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"grzegorz",
"nixpkgs" "nixpkgs"
], ]
"rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1722796402, "lastModified": 1725463969,
"narHash": "sha256-Y6PdbTcfzDAZkVTLhTbRJMJCVR3KtCI7QyGqPR141uw=", "narHash": "sha256-d3c1TAlIN1PtK+oQP1wO6XbDfmR4SUp/C/4s7G46ARo=",
"ref": "refs/heads/main", "owner": "GuillaumeDesforges",
"rev": "c1438f248020e4c71673c59501ae87ea4f5bec4f", "repo": "fix-python",
"revCount": 16, "rev": "2926402234c3f99aa8e4608c51d9ffa73ea403c0",
"type": "github"
},
"original": {
"owner": "GuillaumeDesforges",
"repo": "fix-python",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"grzegorz": {
"inputs": {
"fix-python": "fix-python",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1726861911,
"narHash": "sha256-pXPmVp4AgszzJXlLjj8r9NxoDvxoV4USGaiMwqCyb4M=",
"ref": "refs/heads/master",
"rev": "d10db19d7df5c5c2cd2dcb878376d5d681f6c2f2",
"revCount": 94,
"type": "git", "type": "git",
"url": "https://git.pvv.ntnu.no/Projects/greg-ng.git" "url": "https://git.pvv.ntnu.no/Projects/grzegorz.git"
}, },
"original": { "original": {
"type": "git", "type": "git",
"url": "https://git.pvv.ntnu.no/Projects/greg-ng.git" "url": "https://git.pvv.ntnu.no/Projects/grzegorz.git"
} }
}, },
"grzegorz-clients": { "grzegorz-clients": {
@ -119,11 +158,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1729307008, "lastModified": 1728843132,
"narHash": "sha256-QUvb6epgKi9pCu9CttRQW4y5NqJ+snKr1FZpG/x3Wtc=", "narHash": "sha256-VWIF1sMD6MJZyB+x5z0ZpirQdH8Cqb3avboq1VfSjRg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9b86fc2290b69375c5542b622088eb6eca2a7c3", "rev": "414e01b61f0015e49353a6104824b9385a430a5d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -151,11 +190,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1729308112, "lastModified": 1728805616,
"narHash": "sha256-Ap+cPeiluam2KFZO+OWuFTl/IkIJfyGYGMgkT2pVCRY=", "narHash": "sha256-CfPKX2yaHwTOpGqcul89N12zjRfZ8GOSxG24/Ao9BcQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "61253596816c4cd65e2a0f474cbc0ac0c6e0f7cf", "rev": "73057677e8557925e999ac54196423fa34418c24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -208,7 +247,7 @@
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"greg": "greg", "grzegorz": "grzegorz",
"grzegorz-clients": "grzegorz-clients", "grzegorz-clients": "grzegorz-clients",
"matrix-next": "matrix-next", "matrix-next": "matrix-next",
"minecraft-data": "minecraft-data", "minecraft-data": "minecraft-data",
@ -220,27 +259,6 @@
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
} }
}, },
"rust-overlay": {
"inputs": {
"nixpkgs": [
"greg",
"nixpkgs"
]
},
"locked": {
"lastModified": 1722651535,
"narHash": "sha256-2uRmNwxe3CO5h7PfvqXrRe8OplXaEdwhqOUtaF13rpU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "56d83ca6f3c557647476f3720426a7615c22b860",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -261,6 +279,21 @@
"repo": "sops-nix", "repo": "sops-nix",
"type": "github" "type": "github"
} }
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -23,8 +23,8 @@
nix-gitea-themes.url = "git+https://git.pvv.ntnu.no/oysteikt/nix-gitea-themes.git"; nix-gitea-themes.url = "git+https://git.pvv.ntnu.no/oysteikt/nix-gitea-themes.git";
nix-gitea-themes.inputs.nixpkgs.follows = "nixpkgs"; nix-gitea-themes.inputs.nixpkgs.follows = "nixpkgs";
greg-ng.url = "git+https://git.pvv.ntnu.no/Projects/greg-ng.git"; grzegorz.url = "git+https://git.pvv.ntnu.no/Projects/grzegorz.git";
greg-ng.inputs.nixpkgs.follows = "nixpkgs"; grzegorz.inputs.nixpkgs.follows = "nixpkgs";
grzegorz-clients.url = "git+https://git.pvv.ntnu.no/Projects/grzegorz-clients.git"; grzegorz-clients.url = "git+https://git.pvv.ntnu.no/Projects/grzegorz-clients.git";
grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs"; grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs";
@ -116,20 +116,14 @@
brzeczyszczykiewicz = stableNixosConfig "brzeczyszczykiewicz" { brzeczyszczykiewicz = stableNixosConfig "brzeczyszczykiewicz" {
modules = [ modules = [
inputs.grzegorz.nixosModules.grzegorz-kiosk
inputs.grzegorz-clients.nixosModules.grzegorz-webui inputs.grzegorz-clients.nixosModules.grzegorz-webui
inputs.greg-ng.nixosModules.default
];
overlays = [
inputs.greg-ng.overlays.default
]; ];
}; };
georg = stableNixosConfig "georg" { georg = stableNixosConfig "georg" {
modules = [ modules = [
inputs.grzegorz.nixosModules.grzegorz-kiosk
inputs.grzegorz-clients.nixosModules.grzegorz-webui inputs.grzegorz-clients.nixosModules.grzegorz-webui
inputs.greg-ng.nixosModules.default
];
overlays = [
inputs.greg-ng.overlays.default
]; ];
}; };
}; };

View File

@ -1,26 +1,31 @@
{config, lib, pkgs, ...}: {config, lib, pkgs, ...}:
let let
grg = config.services.greg-ng; grg = config.services.grzegorz;
grgw = config.services.grzegorz-webui; grgw = config.services.grzegorz-webui;
in { in {
services.greg-ng = { services.pipewire.enable = true;
enable = true; services.pipewire.alsa.enable = true;
settings.host = "localhost"; services.pipewire.alsa.support32Bit = true;
settings.port = 31337; services.pipewire.pulse.enable = true;
enableSway = true;
enablePipewire = true; users.users.pvv = {
isNormalUser = true;
description = "pvv";
}; };
services.grzegorz-webui = { services.grzegorz.enable = true;
enable = true; services.grzegorz.listenAddr = "localhost";
listenAddr = "localhost"; services.grzegorz.listenPort = 31337;
listenPort = 42069;
listenWebsocketPort = 42042; services.grzegorz-webui.enable = true;
hostName = "${config.networking.fqdn}"; services.grzegorz-webui.listenAddr = "localhost";
apiBase = "http://${grg.settings.host}:${toString grg.settings.port}/api"; services.grzegorz-webui.listenPort = 42069;
}; services.grzegorz-webui.listenWebsocketPort = 42042;
services.grzegorz-webui.hostName = "${config.networking.fqdn}";
services.grzegorz-webui.apiBase = "http://${toString grg.listenAddr}:${toString grg.listenPort}/api";
services.nginx.enable = true; services.nginx.enable = true;
services.nginx.virtualHosts."${config.networking.fqdn}" = { services.nginx.virtualHosts."${config.networking.fqdn}" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
@ -35,19 +40,20 @@ in {
''; '';
locations."/" = { locations."/" = {
proxyPass = "http://${grgw.listenAddr}:${toString grgw.listenPort}"; proxyPass = "http://localhost:${builtins.toString config.services.grzegorz-webui.listenPort}";
}; };
# https://github.com/rawpython/remi/issues/216 # https://github.com/rawpython/remi/issues/216
locations."/websocket" = { locations."/websocket" = {
proxyPass = "http://${grgw.listenAddr}:${toString grgw.listenWebsocketPort}"; proxyPass = "http://localhost:${builtins.toString config.services.grzegorz-webui.listenWebsocketPort}";
proxyWebsockets = true; proxyWebsockets = true;
}; };
locations."/api" = { locations."/api" = {
proxyPass = "http://${grg.settings.host}:${toString grg.settings.port}"; proxyPass = "http://localhost:${builtins.toString config.services.grzegorz.listenPort}";
}; };
locations."/docs" = { locations."/docs" = {
proxyPass = "http://${grg.settings.host}:${toString grg.settings.port}"; proxyPass = "http://localhost:${builtins.toString config.services.grzegorz.listenPort}";
}; };
}; };
} }