From 870755f79b9da1827ce3665ea13c15c39a64fe24 Mon Sep 17 00:00:00 2001 From: xqtc Date: Mon, 9 Sep 2024 20:41:48 +0200 Subject: [PATCH] idk conduit und ricing und caddyfile --- flake.nix | 2 +- home/config-files/hyprland.conf | 4 +- home/modules/foot.nix | 6 +- home/modules/wm.nix | 100 ++++++++++++----------- hosts/x86_64-linux/beleth/conduit.nix | 26 ++++++ hosts/x86_64-linux/beleth/default.nix | 24 ++++++ hosts/x86_64-linux/beleth/networking.nix | 16 ++-- 7 files changed, 116 insertions(+), 62 deletions(-) create mode 100644 hosts/x86_64-linux/beleth/conduit.nix diff --git a/flake.nix b/flake.nix index f28f928..52899ae 100644 --- a/flake.nix +++ b/flake.nix @@ -94,7 +94,7 @@ lib, ... }: { - services.proxmox-ve.enable = true; + services.proxmox-ve.enable = false; nixpkgs.overlays = [ proxmox-nixos.overlays.${system} ]; diff --git a/home/config-files/hyprland.conf b/home/config-files/hyprland.conf index c2d0976..70fe628 100644 --- a/home/config-files/hyprland.conf +++ b/home/config-files/hyprland.conf @@ -19,10 +19,10 @@ exec-once = waybar & swww init & mako & kwalletd6 & nextcloud # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { - kb_layout = us + kb_layout = us,de kb_variant = kb_model = - kb_options = + kb_options = grp:win_space_toggle kb_rules = follow_mouse = 1 diff --git a/home/modules/foot.nix b/home/modules/foot.nix index 8894de5..003fadd 100644 --- a/home/modules/foot.nix +++ b/home/modules/foot.nix @@ -12,15 +12,15 @@ }; cursor = { - blink = "yes"; + blink = "yes"; }; mouse = { - hide-when-typing = "yes"; + hide-when-typing = "yes"; }; colors = { - alpha = 0.8; + alpha = 0.8; foreground = "cdd6f4"; background = "1e1e2e"; diff --git a/home/modules/wm.nix b/home/modules/wm.nix index f79a280..a968b99 100644 --- a/home/modules/wm.nix +++ b/home/modules/wm.nix @@ -15,60 +15,64 @@ extraConfig = builtins.readFile ../config-files/hyprland.conf; }; - programs.waybar = /* lib.mkIf (pkgs.system == "x86_64-linux") */ { - enable = true; - settings = { - mainBar = { - layer = "top"; - position = "top"; - height = 30; - # modules-left = ["wlr/workspaces"]; - #modules-center = [ "hyprland/window" ]; - modules-center = ["hyprland/workspaces" "tray" "network" "battery" "battery#bat2" "battery#bat3" "clock"]; - "tray" = {"icon-size" = 21;}; - "network" = { - "format-wifi" = "NET: {essid} ({signalStrength}%) "; - "format-ethernet" = "{ifname} "; - "format-disconnected" = ""; - "max-length" = 50; - }; - "battery" = { - "bat" = "BAT0"; - "interval" = 10; - "states" = { - "warning" = 30; - "critical" = 15; + programs.waybar = + /* + lib.mkIf (pkgs.system == "x86_64-linux") + */ + { + enable = true; + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 30; + # modules-left = ["wlr/workspaces"]; + #modules-center = [ "hyprland/window" ]; + modules-center = ["hyprland/workspaces" "tray" "network" "battery" "battery#bat2" "battery#bat3" "clock"]; + "tray" = {"icon-size" = 21;}; + "network" = { + "format-wifi" = "NET: {essid} ({signalStrength}%) "; + "format-ethernet" = "{ifname} "; + "format-disconnected" = ""; + "max-length" = 50; }; - "format" = " BAT IN: {capacity}%"; - #"format-icons" = ''["", "", "", "", ""]''; - "max-length" = 25; - }; - "battery#bat2" = { - "bat" = "BAT1"; - "interval" = 10; - "states" = { - "warning" = 30; - "critical" = 15; + "battery" = { + "bat" = "BAT0"; + "interval" = 10; + "states" = { + "warning" = 30; + "critical" = 15; + }; + "format" = " BAT IN: {capacity}%"; + #"format-icons" = ''["", "", "", "", ""]''; + "max-length" = 25; }; - "format" = " BAT EX: {capacity}%"; - #"format-icons" = ''["", "", "", "", ""]''; - "max-length" = 25; - }; - "battery#bat3" = { - "bat" = "macsmc-battery"; - "interval" = 10; - "states" = { - "warning" = 30; - "critical" = 15; + "battery#bat2" = { + "bat" = "BAT1"; + "interval" = 10; + "states" = { + "warning" = 30; + "critical" = 15; + }; + "format" = " BAT EX: {capacity}%"; + #"format-icons" = ''["", "", "", "", ""]''; + "max-length" = 25; + }; + "battery#bat3" = { + "bat" = "macsmc-battery"; + "interval" = 10; + "states" = { + "warning" = 30; + "critical" = 15; + }; + "format" = " BAT: {capacity}%"; + #"format-icons" = ''["", "", "", "", ""]''; + "max-length" = 25; }; - "format" = " BAT: {capacity}%"; - #"format-icons" = ''["", "", "", "", ""]''; - "max-length" = 25; }; }; + style = builtins.readFile ../config-files/waybar-mocha.css; }; - style = builtins.readFile ../config-files/waybar-mocha.css; - }; services.mako = { enable = true; diff --git a/hosts/x86_64-linux/beleth/conduit.nix b/hosts/x86_64-linux/beleth/conduit.nix new file mode 100644 index 0000000..05a4fab --- /dev/null +++ b/hosts/x86_64-linux/beleth/conduit.nix @@ -0,0 +1,26 @@ +{ + config, + lib, + inputs, + ... +}: { + services.matrix-conduit = { + enable = true; + settings = { + global = { + server_name = "matrix.heroin.trade"; + allow_federation = true; + allow_encryption = true; + allow_registration = false; + max_request_size = 20000000; + port = 6167; + database_backend = "sqlite"; + }; + extraEnvironment = { + CONDUIT_MAX_CONCURRENT_REQUESTS = "100"; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [config.services.matrix-conduit.settings.global.port]; +} diff --git a/hosts/x86_64-linux/beleth/default.nix b/hosts/x86_64-linux/beleth/default.nix index 47df1af..1e0a8a9 100644 --- a/hosts/x86_64-linux/beleth/default.nix +++ b/hosts/x86_64-linux/beleth/default.nix @@ -15,6 +15,7 @@ with lib; { ./fail2ban.nix ./lanrarari.nix # ./hydra.nix + ./conduit.nix ./uptime.nix ./networking.nix ./git.nix @@ -44,6 +45,11 @@ with lib; { file_server ''; }; + "matrix.heroin.trade" = { + extraConfig = '' + reverse_proxy /_matrix/* 127.0.0.1:${builtins.toString config.services.matrix-conduit.settings.global.port} + ''; + }; "hydra.heroin.trade" = { extraConfig = '' reverse_proxy http://localhost:${builtins.toString config.services.hydra.port} @@ -123,6 +129,12 @@ with lib; { reverse_proxy http://127.0.0.1:8085 ''; }; + "marie.software" = { + extraConfig = '' + root * /var/www/marie-website/ + file_server + ''; + }; "servers" = { extraConfig = '' metrics @@ -169,6 +181,18 @@ with lib; { "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYa+LoHGGvu12iBufUcr3GD8tsq4LuJdwLjaDkTr0SL xqtc@lilith" ]; }; + + users.users.marie = { + isNormalUser = true; + packages = with pkgs; [ + git + wget + ]; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN0mGd4YS4f3Wy+a4PBXbie42C5Qo4H0uWsN7joaK27h marie@titania" + ]; + }; + users.users.root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJTLJqIVwnqFO64rnc66d234TFOdFXpDS9fJUA4/f4in xqtc@alastor" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN7UkcmSVo+SeB5Obevz3mf3UHruYxn0UHUzoOs2gDBy xqtc@asmodeus" diff --git a/hosts/x86_64-linux/beleth/networking.nix b/hosts/x86_64-linux/beleth/networking.nix index 39b0039..8c2c5fa 100644 --- a/hosts/x86_64-linux/beleth/networking.nix +++ b/hosts/x86_64-linux/beleth/networking.nix @@ -11,16 +11,16 @@ # networking.useDHCP = lib.mkDefault true; # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; networking = { - # bridges = { - # vmbr0 = { - # interfaces = [ "enp0s31f6" ]; - # }; - # }; + # bridges = { + # vmbr0 = { + # interfaces = [ "enp0s31f6" ]; + # }; + # }; # useDhCP = lib.mkDefault true; interfaces = { - # vmbr0 = { - # useDHCP = lib.mkDefault true; - # }; + # vmbr0 = { + # useDHCP = lib.mkDefault true; + # }; enp0s31f6 = { ipv4 = { addresses = [