From ff5e0d6bb23b3935a557f4ec77a6540c803cb968 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 9 Jan 2026 19:47:53 -0600 Subject: [PATCH] try uwsm again --- system/default.nix | 4 ++ system/etc/default.nix | 6 ++ system/programs/hyprland/default.nix | 2 + .../services/containers/nextcloud/default.nix | 2 +- system/services/ollama/default.nix | 4 +- system/services/openvpn/default.nix | 0 .../nathan/home-manager/dotfiles/default.nix | 1 + .../home-manager/dotfiles/hypr/main.conf | 56 +++++++++---------- .../home-manager/dotfiles/hypr/pyprland.toml | 6 +- .../home-manager/packages/scripts/default.nix | 2 +- .../home-manager/programs/git/default.nix | 3 + .../programs/hyprland/default.nix | 2 +- .../programs/quickshell/default.nix | 7 ++- .../programs/terminal/opencode/default.nix | 34 +++++++++++ .../programs/terminal/zsh/default.nix | 5 ++ 15 files changed, 96 insertions(+), 38 deletions(-) create mode 100644 system/services/openvpn/default.nix create mode 100644 system/users/nathan/home-manager/programs/terminal/opencode/default.nix diff --git a/system/default.nix b/system/default.nix index 73269d9..b7911d6 100644 --- a/system/default.nix +++ b/system/default.nix @@ -37,6 +37,10 @@ experimental-features = [ "nix-command" "flakes" ]; builders-use-substitutes = lib.mkIf config.sysconfig.remoteBuildClient true; trusted-users = lib.mkIf config.sysconfig.remoteBuildHost [ "remote-builder" ]; + + substituters = lib.mkIf config.sysconfig.programs.hyprland.enable ["https://hyprland.cachix.org"]; + trusted-substituters = lib.mkIf config.sysconfig.programs.hyprland.enable ["https://hyprland.cachix.org"]; + trusted-public-keys = lib.mkIf config.sysconfig.programs.hyprland.enable ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; }; distributedBuilds = config.sysconfig.remoteBuildClient; diff --git a/system/etc/default.nix b/system/etc/default.nix index e69de29..3620852 100644 --- a/system/etc/default.nix +++ b/system/etc/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + + config = { + + }; +} diff --git a/system/programs/hyprland/default.nix b/system/programs/hyprland/default.nix index f9f4f96..5ac7f68 100644 --- a/system/programs/hyprland/default.nix +++ b/system/programs/hyprland/default.nix @@ -14,6 +14,8 @@ programs.hyprland = { enable = true; + withUWSM = true; + xwayland.enable = true; systemd.setPath.enable = true; diff --git a/system/services/containers/nextcloud/default.nix b/system/services/containers/nextcloud/default.nix index e25cefa..b80af8f 100644 --- a/system/services/containers/nextcloud/default.nix +++ b/system/services/containers/nextcloud/default.nix @@ -50,7 +50,7 @@ services.nginx.virtualHosts."192.168.100.15".listen = [ { addr = "0.0.0.0"; port = 80; } ]; services.nextcloud = { enable = true; - package = pkgs.nextcloud31; + package = pkgs.nextcloud32; hostName = "192.168.100.15"; config = { adminpassFile = "/etc/nextcloud-admin-pass"; diff --git a/system/services/ollama/default.nix b/system/services/ollama/default.nix index 7291c34..e39c4ca 100644 --- a/system/services/ollama/default.nix +++ b/system/services/ollama/default.nix @@ -11,12 +11,12 @@ services.ollama = { enable = true; acceleration = "cuda"; - package = let + /*package = let pkgs-us = import nixpkgs-us { system = "x86_64-linux"; config.allowUnfree = true; }; - in pkgs-us.ollama; + in pkgs-us.ollama;*/ }; }; } diff --git a/system/services/openvpn/default.nix b/system/services/openvpn/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/system/users/nathan/home-manager/dotfiles/default.nix b/system/users/nathan/home-manager/dotfiles/default.nix index c4857e4..9a4c194 100644 --- a/system/users/nathan/home-manager/dotfiles/default.nix +++ b/system/users/nathan/home-manager/dotfiles/default.nix @@ -5,6 +5,7 @@ ".config/hyprpanel" = lib.mkIf config.homeconfig.hyprpanel.enable { source = ./hyprpanel; recursive = true; }; ".config/wal/templates" = lib.mkIf config.homeconfig.wal.enable { source = ./wal/templates; recursive = true; }; ".config/ohmyposh" = { source = ./ohmyposh; recursive = true; }; + ".config/quickshell" = lib.mkIf config.homeconfig.quickshell.enable { source = ./quickshell; recursive = true; }; "Pictures/Wallpaper" = lib.mkIf config.homeconfig.graphical { source = ./Wallpaper; recursive = true; }; }; diff --git a/system/users/nathan/home-manager/dotfiles/hypr/main.conf b/system/users/nathan/home-manager/dotfiles/hypr/main.conf index 2325d25..0d37e27 100644 --- a/system/users/nathan/home-manager/dotfiles/hypr/main.conf +++ b/system/users/nathan/home-manager/dotfiles/hypr/main.conf @@ -10,7 +10,7 @@ # # #------------------------------------------------# -exec-once=onSystemStart +exec-once = hyprrun onSystemStart # Some default env vars. env = XCURSOR_SIZE,16 @@ -107,13 +107,11 @@ ecosystem { # Binds $mainMod = ALT -bind = CTRL SHIFT, H, exec, colorPrefix kitty -e 'bash -c "hyprctl binds | less"' +bind = $mainMod SHIFT, E, exec, hyprrun colorPrefix kitty -bind = $mainMod SHIFT, E, exec, colorPrefix kitty +bind = $mainMod, B, exec, hyprrun firefox -bind = $mainMod, B, exec, firefox - -bind = $mainMod SHIFT, B, exec, firefox --private-window +bind = $mainMod SHIFT, B, exec, hyprrun firefox --private-window bind = $mainMod, Q, killactive, @@ -121,20 +119,20 @@ bind = $mainMod, Q, killactive, #bind = $mainMod SHIFT, R, exec, colorPrefix kitty -e _homeRebuild -bind = $mainMod, F, exec, thunar +bind = $mainMod, F, exec, hyprrun thunar bind = $mainMod SHIFT, F, fullscreen -bind = $mainMod SHIFT, semicolon, exec, colorPrefix kitty -e lf +bind = $mainMod SHIFT, semicolon, exec, hyprrun colorPrefix kitty -e lf -bind = $mainMod, Insert, exec, libreoffice +bind = $mainMod, Insert, exec, hyprrun libreoffice bind = $mainMod, V, togglefloating, -bind = $mainMod SHIFT, V, exec, vlc +bind = $mainMod SHIFT, V, exec, hyprrun vlc -bind = , Menu, exec, rofi -show drun +bind = , Menu, exec, hyprrun rofi -show drun -bind = $mainMod, Menu, exec, hyprpanel -q; hyprpanel +bind = $mainMod, Menu, exec, hyprrun hyprpanel -q; hyprrun hyprpanel #bind = $mainMod, P, pseudo, # dwindle #bind = $mainMod, Z, togglesplit, # dwindle @@ -142,34 +140,34 @@ bind = $mainMod, Menu, exec, hyprpanel -q; hyprpanel bind = $mainMod, N, layoutmsg, rollnext # master bind = $mainMod, P, layoutmsg, rollprev # master -bind = $mainMod, M, exec, spotify +bind = $mainMod, M, exec, hyprrun spotify -bind = $mainMod SHIFT, M, exec, firefox soundcloud.com/you/library +bind = $mainMod SHIFT, M, exec, hyprrun firefox soundcloud.com/you/library -bind = $mainMod CTRL, M, exec, colorPrefix kitty -e ncmpcpp -s browser +bind = $mainMod CTRL, M, exec, hyprrun colorPrefix kitty -e ncmpcpp -s browser -bind = $mainMod, XF86AudioPlay, exec, mpc load casual +bind = $mainMod, XF86AudioPlay, exec, hyprrun mpc load casual -bind = , XF86AudioPlay, exec, playerctl play-pause +bind = , XF86AudioPlay, exec, hyprrun playerctl play-pause -bind = , XF86AudioPause, exec, playerctl pause +bind = , XF86AudioPause, exec, hyprrun playerctl pause -bind = , XF86AudioNext, exec, playerctl next +bind = , XF86AudioNext, exec, hyprrun playerctl next -bind = , XF86AudioPrev, exec, playerctl previous +bind = , XF86AudioPrev, exec, hyprrun playerctl previous -bind = , XF86Launch2, exec, steam -bind = $mainMod, XF86Launch2, exec, prismlauncher +bind = , XF86Launch2, exec, hyprrun steam +bind = $mainMod, XF86Launch2, exec, hyprrun prismlauncher -bind = , XF86Calculator, exec, geogebra +bind = , XF86Calculator, exec, hyprrun geogebra -bind = $mainMod SHIFT, Print, exec, firefox localhost:631 +bind = $mainMod SHIFT, Print, exec, hyprrun firefox localhost:631 -bind = $mainMod, Return, exec, discord --enable-features=UseOzonePlatform --ozone-platform=wayland +bind = $mainMod, Return, exec, hyprrun discord --enable-features=UseOzonePlatform --ozone-platform=wayland -bind = $mainMod CTRL, Return, exec, firefox https://discord.com/app +bind = $mainMod CTRL, Return, exec, hyprrun firefox https://discord.com/app -bind = , Home, exec, setWallpaper +bind = , Home, exec, hyprrun setWallpaper # Move focus with mainMod + arrow keys bind = $mainMod, W, movefocus, u @@ -241,7 +239,7 @@ bind = , XF86MonBrightnessDown, exec, brightnessctl set 10%- binde = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_SINK@ 10%+ binde = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_SINK@ 10%- bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_SINK@ toggle -bind = $mainMod, F9, exec, pavucontrol +bind = $mainMod, F9, exec, hyprrun pavucontrol #screen lock key #bind = $mainMod, F12, exec, swaylock @@ -281,7 +279,7 @@ bind = $mainMod, E, exec, pypr toggle kitty bind = $mainMod, C, exec, pypr toggle calendar -bind = CTRL SHIFT, Home, exec, ssh nathan@esotericbytes.com -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen +bind = CTRL SHIFT, Home, exec, hyprrun ssh nathan@esotericbytes.com -fL 5900:localhost:5900 sleep 10; vncviewer localhost:5900 -fullscreen bind = CTRL SHIFT, Home, submap, clean diff --git a/system/users/nathan/home-manager/dotfiles/hypr/pyprland.toml b/system/users/nathan/home-manager/dotfiles/hypr/pyprland.toml index b79834c..7fed7d4 100644 --- a/system/users/nathan/home-manager/dotfiles/hypr/pyprland.toml +++ b/system/users/nathan/home-manager/dotfiles/hypr/pyprland.toml @@ -5,7 +5,7 @@ [scratchpads.lf] animation = "fromTop" - command = "kitty --class scratchpad-lf lf ~" + command = "hyprrun kitty --class scratchpad-lf lf ~" lazy = true class = "scratchpad-lf" margin = 100 @@ -14,7 +14,7 @@ [scratchpads.kitty] animation = "fromBottom" - command = "kitty --class scratchpad-kitty" + command = "hyprrun kitty --class scratchpad-kitty" class = "scratchpad-kitty" lazy = true margin = 100 @@ -23,7 +23,7 @@ [scratchpads.calendar] animation = "fromTop" - command = "kitty --class scratchpad-cal -e calcurse" + command = "hyprrun kitty --class scratchpad-cal -e calcurse" class = "scratchpad-cal" lazy = true margin = 100 diff --git a/system/users/nathan/home-manager/packages/scripts/default.nix b/system/users/nathan/home-manager/packages/scripts/default.nix index f942d95..85c469e 100644 --- a/system/users/nathan/home-manager/packages/scripts/default.nix +++ b/system/users/nathan/home-manager/packages/scripts/default.nix @@ -68,7 +68,7 @@ '') (pkgs.writeShellScriptBin "colorPrefix" '' - exec -a "$0" "$@" & + eval "$@" & sleep 0.4 ${pkgs.pywalfox-native}/bin/pywalfox update & pidof kitty && pkill -USR1 kitty diff --git a/system/users/nathan/home-manager/programs/git/default.nix b/system/users/nathan/home-manager/programs/git/default.nix index 5aa9bd2..e318f41 100644 --- a/system/users/nathan/home-manager/programs/git/default.nix +++ b/system/users/nathan/home-manager/programs/git/default.nix @@ -31,6 +31,9 @@ init = { defaultBranch = "master"; }; + + safe.directory = "/etc/nixos"; + url = { "ssh://gitea@esotericbytes.com/" = { insteadOf = [ diff --git a/system/users/nathan/home-manager/programs/hyprland/default.nix b/system/users/nathan/home-manager/programs/hyprland/default.nix index 1cb4102..9f03e00 100644 --- a/system/users/nathan/home-manager/programs/hyprland/default.nix +++ b/system/users/nathan/home-manager/programs/hyprland/default.nix @@ -32,7 +32,7 @@ enable = true; systemd = { - enable = true; + enable = false; variables = [ "--all" ]; }; diff --git a/system/users/nathan/home-manager/programs/quickshell/default.nix b/system/users/nathan/home-manager/programs/quickshell/default.nix index 47182ae..733213e 100644 --- a/system/users/nathan/home-manager/programs/quickshell/default.nix +++ b/system/users/nathan/home-manager/programs/quickshell/default.nix @@ -12,7 +12,12 @@ configs = { - default = config.homeDirectory + "/Projects/Olympus/system/users/nathan/home-manager/dotfiles/quickshell/shell.qml"; + default = config.homeDirectory + "/${config.home.file.".config/quickshell".target}"; + }; + + systemd = { + enable = true; + target = lib.mkIf config.homeconfig.hyprland.enable "wayland-session@Hyprland.target"; }; activeConfig = "default"; diff --git a/system/users/nathan/home-manager/programs/terminal/opencode/default.nix b/system/users/nathan/home-manager/programs/terminal/opencode/default.nix new file mode 100644 index 0000000..a80eef1 --- /dev/null +++ b/system/users/nathan/home-manager/programs/terminal/opencode/default.nix @@ -0,0 +1,34 @@ +{ config, lib, ... }: { + + options.homeconfig.opencode.enable = with lib; mkOption { + type = with types; bool; + default = false; + }; + + config = lib.mkIf config.homeconfig.opencode.enable { + + programs.opencode = { + enable = true; + + settings = { + theme = "system"; + model = ""; + + provider = { + ollama-local = { + name = "Ollama (local)"; + + npm = "@ai-sdk/openai-compatible"; + + options.baseURL = "http://localhost:11434/v1"; + + models = { + "ministral-3:8b".name = "Ministral 3 8B"; + }; + + }; + }; + }; + }; + }; +} diff --git a/system/users/nathan/home-manager/programs/terminal/zsh/default.nix b/system/users/nathan/home-manager/programs/terminal/zsh/default.nix index be18b6a..cbba6a2 100644 --- a/system/users/nathan/home-manager/programs/terminal/zsh/default.nix +++ b/system/users/nathan/home-manager/programs/terminal/zsh/default.nix @@ -21,6 +21,11 @@ python = "python3.13"; python3 = "python3.13"; + + hyprrun = with lib; mkMerge [ + (mkIf config.programs.hyprland.withUWSM "uwsm app --") + (mkIf (!config.programs.hyprland.withUWSM) ";") + ]; }; history = {