Compare commits

...

2 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
786648990f Merge branch 'master' of ssh://ssh.nx2.site:50022/nx2/dotfiles 2025-06-17 15:11:29 +02:00
Lennart J. Kurzweg (Nx2)
30f5ee6a3a no nixondroid + deploy hugo 2025-06-17 15:11:27 +02:00
3 changed files with 17 additions and 26 deletions

View File

@@ -31,6 +31,7 @@
user = "nx2";
domain = "nx2.site";
home = "/home/${user}/";
webroot = "/var/lib/hugo/nx2site/public";
};
pkgs = (import nixpkgs { inherit system config; }) // {
@@ -38,13 +39,6 @@
latest = import nixpkgs-latest { inherit system config; };
version = "25.05";
};
pkgs64 = let
system = "aarch64-linux";
in import nixpkgs { inherit system config; } // {
unstable = import nixpkgs-unstable { inherit system config; };
latest = import nixpkgs-latest { inherit system config; };
version = "24.05";
};
nvidia-base = import ./flake-modules/nvidia.nix;
secrets = import ./git-crypt/secrets.nix;
@@ -69,10 +63,6 @@
NxACE = make-nixos-system "NxACE" { enable = false; };
NxWSL = make-nixos-wsl-system "NxWSL";
};
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
pkgs = pkgs64;
modules = [ ./nix-on-droid.nix ];
};
homeConfigurations = let
make-home-configuration = host: user: nvidia-settings: home-manager.lib.homeManagerConfiguration {
@@ -94,8 +84,6 @@
"${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; };
"${hyper-base.user}@NxACE" = make-home-configuration "NxACE" hyper-base.user { enable = false; };
"${hyper-base.user}@NxS23U" = make-shell-configuration "NxS23U" hyper-base.user;
"${hyper-base.user}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user;
};
};

View File

@@ -1,11 +1,11 @@
{ pkgs, ... }:
{ pkgs, hyper, ... }:
{
home.packages = [
(pkgs.writeShellApplication {
name = "nx_backup";
runtimeInputs = [ ];
text = let
web-root = "/var/nginx/webroot";
web-root = hyper.webroot;
gitea-backup = "/var/backup/gitea";
postgres-backup = "/var/backup/postgresql";
in /* bash */ ''

View File

@@ -9,7 +9,7 @@
acceptTerms = true;
defaults = {
email = "acme@${hyper.domain}";
webroot = "/var/nginx/webroot";
webroot = config.services.nginx.virtualHosts."${hyper.domain}".root;
group = "nginx";
};
certs = {
@@ -77,22 +77,24 @@
};
in {
"${hyper.domain}" = vh // {
root = "/var/nginx/webroot";
# root = "/var/nginx/webroot";
root = "/var/lib/hugo/nx2site/public";
default = true;
listen = dl;
locations = {
"/" = {
extraConfig = ''
index index.html;
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
return 301 /$1;
}
try_files $uri $uri.html $uri/ /404.html =404;
'';
};
"~^(/ba)$" = { return = "301 /BA.pdf"; };
"/.well-known/matrix/client" = { return = "502"; };
"/.well-known/matrix/server" = { return = "502"; };
"/phone" = { return = "301 /en/cards/phone"; };
"/about-me" = { return = "301 /en/slides/about-me"; };
"/about-this-site" = { return = "301 /en/slides/about-this-site"; };
"/gpg" = { return = "301 /en/cards/gpg"; };
"/contact" = { return = "301 /en/cards/contact"; };
};
};
"matrix.${hyper.domain}" = {
@@ -121,7 +123,7 @@
};
"sync.${hyper.domain}" = vh // {
listen = dl;
locations = { "/" = { proxyPass = "http://127.0.0.1:11434"; }; };
locations = { "/" = { proxyPass = "http://127.0.0.1:8384"; }; };
};
# "git.${hyper.domain}" = vh // {
# listen = dl;
@@ -157,8 +159,9 @@
proxyWebsockets = true;
};
};
"wip.${hyper.domain}" = vh // {
"old.${hyper.domain}" = vh // {
listen = dl;
root = "/var/nginx/webroot";
};
"dev.${hyper.domain}" = vh // {
listen = dl;