feat(inventory): working nixin

This commit is contained in:
Florian Schmitt 2024-12-17 11:09:58 +03:00
parent ce35829467
commit d0b1fdffdc

View file

@ -4,7 +4,23 @@
lib, lib,
... ...
}: }:
let
nixin-web = pkgs.stdenv.mkDerivation {
pname = "nixin-web";
version = "0.1-alpha";
src = pkgs.fetchzip {
url = "https://git.distrilab.fr/NixiN/nixin-web/actions/runs/85/artifacts/nixin-website.zip";
hash = "sha256-+cgWvbmjV9xckRCeRaj1dWqowBRbe/5497FcoZW+5ec=";
stripRoot = false;
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/
cp -r $src/* $out/
'';
};
in
{ {
networking.hosts = { networking.hosts = {
"127.0.0.1" = [ "nixin.chmok.net" ]; "127.0.0.1" = [ "nixin.chmok.net" ];
@ -176,6 +192,7 @@
environment.systemPackages = environment.systemPackages =
with pkgs; with pkgs;
let let
in
#nixin-web = buildNpmPackage { #nixin-web = buildNpmPackage {
# pname = "nixin-web"; # pname = "nixin-web";
# version = "0.1-alpha"; # version = "0.1-alpha";
@ -188,16 +205,22 @@
# npmDepsHash = "sha256-0YIrAMbM1CtInq1XPs/5r8FhOzE7bKXMoN23vm/ihEA="; # npmDepsHash = "sha256-0YIrAMbM1CtInq1XPs/5r8FhOzE7bKXMoN23vm/ihEA=";
# npmBuildScript = "docs:build"; # npmBuildScript = "docs:build";
#}; #};
indication = "the code above keep stuck because vite and nixos are'nt friends"; #indication = "the code above keep stuck because vite and nixos are'nt friends";
in
[ [
#nixin-web nixin-web
git git
wget wget
tmux tmux
mosh mosh
htop htop
neovim
]; ];
services.nginx.virtualHosts."nixin.chmok.net" = {
forceSSL = true;
enableACME = true;
locations."/".root = ''${nixin-web}'';
locations."/".index = "index.html";
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }