From 5ea500785f7a10e6e063e2829addb865f070e2e8 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 11 Mar 2025 07:46:38 +0100 Subject: laptop changes --- flake.nix | 7 +++++ host/Arc/hooks/post-rebuild.sh | 0 host/Arc/hooks/pre-rebuild.sh | 0 host/Rory-laptop/configuration.nix | 11 +++---- host/Rory-laptop/hooks/post-rebuild.sh | 0 host/Rory-laptop/hooks/pre-rebuild.sh | 0 host/Rory-laptop/nginx.nix | 4 +-- host/Rory-nginx/hooks/post-rebuild.sh | 0 host/uISO/test.sh | 0 packages/matrix-spec.nix | 52 ++++++++++++++++++++++++++++++++++ 10 files changed, 67 insertions(+), 7 deletions(-) mode change 100644 => 100755 host/Arc/hooks/post-rebuild.sh mode change 100644 => 100755 host/Arc/hooks/pre-rebuild.sh mode change 100644 => 100755 host/Rory-laptop/hooks/post-rebuild.sh mode change 100644 => 100755 host/Rory-laptop/hooks/pre-rebuild.sh mode change 100644 => 100755 host/Rory-nginx/hooks/post-rebuild.sh mode change 100644 => 100755 host/uISO/test.sh create mode 100644 packages/matrix-spec.nix diff --git a/flake.nix b/flake.nix index 879df49..63e458c 100755 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,11 @@ url = "github:the-draupnir-project/Draupnir/main"; flake = false; }; + + matrixSpecSrc = { + url = "github:matrix-org/matrix-spec/main"; + flake = false; + }; }; outputs = @@ -266,6 +271,7 @@ ]; specialArgs = { inherit home-manager; + inherit (inputs) matrixSpecSrc; inherit (inputs) mtxclientSrc; inherit (inputs) nhekoSrc; inherit nixpkgs-stable; @@ -390,6 +396,7 @@ ); packages.mtxclient-git = (pkgs.callPackage ./packages/mtxclient-git.nix { inherit mtxclientSrc; }); + packages.matrix-spec-git = (pkgs.callPackage ./packages/matrix-spec.nix { inherit matrixSpecSrc; }); packages.nbtexplorer = pkgs.callPackage ./packages/nbtexplorer.nix { }; # untested diff --git a/host/Arc/hooks/post-rebuild.sh b/host/Arc/hooks/post-rebuild.sh old mode 100644 new mode 100755 diff --git a/host/Arc/hooks/pre-rebuild.sh b/host/Arc/hooks/pre-rebuild.sh old mode 100644 new mode 100755 diff --git a/host/Rory-laptop/configuration.nix b/host/Rory-laptop/configuration.nix index 6a7d8ed..ad060f3 100644 --- a/host/Rory-laptop/configuration.nix +++ b/host/Rory-laptop/configuration.nix @@ -17,14 +17,14 @@ args@{ #../../modules/software-templates/profilers.nix ../../modules/software-templates/dotnet.client.nix - ./postgres.nix + #./postgres.nix ./nginx.nix - ./edu/vmware.nix - ./edu/nodejs-dev.nix + #./edu/vmware.nix + #./edu/nodejs-dev.nix # hardware-specific imports - ./optional/hardware-specific/nvidia.nix + #./optional/hardware-specific/nvidia.nix ./optional/hardware-specific/intel.nix ./optional/gui/wayland.nix ]; @@ -40,12 +40,13 @@ args@{ efiSupport = true; #efiInstallAsRemovable = true; }; - efi.canTouchEfiVariables = true; + #efi.canTouchEfiVariables = true; }; }; programs.noisetorch.enable = true; programs.gamemode.enable = true; users.users.Rory.extraGroups = [ "gamemode" ]; + virtualisation.diskSize = 81920; environment.sessionVariables = { ZSH_DISABLE_COMPFIX = "true"; diff --git a/host/Rory-laptop/hooks/post-rebuild.sh b/host/Rory-laptop/hooks/post-rebuild.sh old mode 100644 new mode 100755 diff --git a/host/Rory-laptop/hooks/pre-rebuild.sh b/host/Rory-laptop/hooks/pre-rebuild.sh old mode 100644 new mode 100755 diff --git a/host/Rory-laptop/nginx.nix b/host/Rory-laptop/nginx.nix index 42d17de..0a72304 100644 --- a/host/Rory-laptop/nginx.nix +++ b/host/Rory-laptop/nginx.nix @@ -18,11 +18,11 @@ recommendedOptimisation = true; #defaultMimeTypes = ../../../../packages/nginx/mime.types; appendConfig = '' - worker_processes 16; + #worker_processes 16; ''; eventsConfig = '' #use kqueue; - worker_connections 512; + #worker_connections 512; ''; appendHttpConfig = '' #sendfile on; diff --git a/host/Rory-nginx/hooks/post-rebuild.sh b/host/Rory-nginx/hooks/post-rebuild.sh old mode 100644 new mode 100755 diff --git a/host/uISO/test.sh b/host/uISO/test.sh old mode 100644 new mode 100755 diff --git a/packages/matrix-spec.nix b/packages/matrix-spec.nix new file mode 100644 index 0000000..01475bf --- /dev/null +++ b/packages/matrix-spec.nix @@ -0,0 +1,52 @@ +{ + lib, + stdenv, + fetchFromGitHub, + buildGoModule, + hugo, + cacert, + + pkgs, + + matrixSpecSrc +}: +let + src = matrixSpecSrc; + + version = src.shortRev or (builtins.substring 0 7 src.dirtyRev); + rev = src.rev or src.dirtyRev; +in +buildGoModule { + inherit version; + pname = "matrix-spec"; + src = src; + vendorHash = "sha256-4f04IS76JtH+I4Xpu6gF8JQSO3TM7p56mCs8BwyPo8U="; + buildInputs = [ cacert ]; + + nativeBuildInputs = [ hugo ]; + # Nix doesn't play well with Hugo's "GitInfo" module, so disable it and inject + # the revision from the flake. + postPatch = '' +# substituteInPlace ./site/layouts/shortcodes/gitinfo.html \ +# --replace "{{ .Page.GitInfo.Hash }}" "${rev}" + +# substituteInPlace ./config/_default/config.yaml \ +# --replace "enableGitInfo: true" "enableGitInfo: false" + ${lib.getExe pkgs.lsd} -lAh . + ''; + + # Generate the Hugo site before building the Go application which embeds the + # built site. + preBuild = '' + hugo --minify --gc --cleanDestinationDir -d spec + ''; + + ldflags = [ "-X main.commit=${rev}" ]; + + # Rename the main executable in the output directory + postInstall = '' + mv $out/bin/jnsgr.uk $out/bin/jnsgruk + ''; + + meta.mainProgram = "jnsgruk"; +} -- cgit 1.5.1