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,
...
}:
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 = {
"127.0.0.1" = [ "nixin.chmok.net" ];
@ -176,28 +192,35 @@
environment.systemPackages =
with pkgs;
let
#nixin-web = buildNpmPackage {
# pname = "nixin-web";
# version = "0.1-alpha";
# src = fetchgit {
# url = "https://git.distrilab.fr/NixiN/nixin-web";
# rev = "30384e64854b04e1f51ba68c3874765e141e9fc1";
# hash = "sha256-ERx6GX/qaiZXMzaLXuWTq4FxJ3RYy/LtkC2/kstF9nw=";
# };
# makeCacheWritable = true;
# npmDepsHash = "sha256-0YIrAMbM1CtInq1XPs/5r8FhOzE7bKXMoN23vm/ihEA=";
# npmBuildScript = "docs:build";
#};
indication = "the code above keep stuck because vite and nixos are'nt friends";
in
#nixin-web = buildNpmPackage {
# pname = "nixin-web";
# version = "0.1-alpha";
# src = fetchgit {
# url = "https://git.distrilab.fr/NixiN/nixin-web";
# rev = "30384e64854b04e1f51ba68c3874765e141e9fc1";
# hash = "sha256-ERx6GX/qaiZXMzaLXuWTq4FxJ3RYy/LtkC2/kstF9nw=";
# };
# makeCacheWritable = true;
# npmDepsHash = "sha256-0YIrAMbM1CtInq1XPs/5r8FhOzE7bKXMoN23vm/ihEA=";
# npmBuildScript = "docs:build";
#};
#indication = "the code above keep stuck because vite and nixos are'nt friends";
[
#nixin-web
nixin-web
git
wget
tmux
mosh
htop
neovim
];
services.nginx.virtualHosts."nixin.chmok.net" = {
forceSSL = true;
enableACME = true;
locations."/".root = ''${nixin-web}'';
locations."/".index = "index.html";
};
system.stateVersion = "24.05";
}