From 7a0ea8c4f1cea5e0d42e13cc56ab6aafe546fd9f Mon Sep 17 00:00:00 2001 From: Cookiez Date: Wed, 4 Feb 2026 11:20:05 +0100 Subject: [PATCH] New services and package updates - Added support for open-webui and ollama-rocm in CLI packages. - Updated desktop packages to include filezilla, audacity, and freecad. - Expanded essentials with distrobox, dbus, cifs-utils, samba, and kdePackages.ksshaskpass. - Introduced niri-waybar and niri-session-manager services for improved session management. - Configured mako notifications with custom settings in the Niri environment. - Adjusted hyprpaper settings and enabled additional wallpapers. (TODO on niri. Not working ATM) --- modules/configuration.nix | 36 +++++++++++++++++++++-- modules/hyprpaper/home.nix | 12 ++++---- modules/packages/cli.nix | 4 ++- modules/packages/desktop.nix | 3 ++ modules/packages/essentials.nix | 5 ++++ niri/autostart.nix | 51 +++++++++++++++++++++++++++++++++ niri/home.nix | 12 ++++++-- niri/niri.nix | 5 ++-- 8 files changed, 113 insertions(+), 15 deletions(-) create mode 100644 niri/autostart.nix diff --git a/modules/configuration.nix b/modules/configuration.nix index c14b5d3..aba24a3 100644 --- a/modules/configuration.nix +++ b/modules/configuration.nix @@ -29,7 +29,10 @@ # Bootloader. boot = { kernelParams = [ "quiet" "splash" ]; - initrd.verbose = false; + initrd = { + verbose = false; + kernelModules = [ "amdgpu" ]; + }; loader = { systemd-boot.enable = false; efi.canTouchEfiVariables = true; @@ -118,6 +121,16 @@ #loadModels = [ ... ]; }; + open-webui = { + enable = true; + package = pkgs.open-webui; + #environment = { + # DATA_DIR = "/var/lib/open-webui"; # System-wide writable dir + # OLLAMA_API_BASE_URL = "http://127.0.0.1:11434"; + #}; + #openFirewall = true; + }; + fprintd.enable = true; fprintd.tod.enable = true; fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix; @@ -212,7 +225,10 @@ enable = true; # Mesa should be enabled by default for Vulkan, but you can be explicit enable32Bit = true; # For 32-bit applications - extraPackages = with pkgs; [ rocmPackages.clr.icd ]; + extraPackages = with pkgs; [ + rocmPackages.clr.icd + rocmPackages.rocm-smi + ]; }; cpu.amd.updateMicrocode = true; @@ -255,6 +271,11 @@ virtualisation = { docker.enable = true; + #podman = { + # enable = true; + # dockerCompat = true; + #}; + waydroid.enable = true; }; @@ -276,7 +297,16 @@ }; #So no user in the group Wheel has to input the password in order to use sudo - security.sudo.wheelNeedsPassword = false; + security = { + sudo.wheelNeedsPassword = false; + + pam.services = { + login.fprintAuth = true; + sudo.fprintAuth = true; + kde.fprintAuth = false; + hyprlock = {}; + }; + }; #Allow Nix Commands nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/modules/hyprpaper/home.nix b/modules/hyprpaper/home.nix index ec724ab..337f6df 100644 --- a/modules/hyprpaper/home.nix +++ b/modules/hyprpaper/home.nix @@ -6,21 +6,21 @@ services = { hyprpaper = { - enable = true; - + enable = false; + settings = { preload = [ - "/home/${username}/${project}/other/wallpaper1.png" + #"/home/${username}/${project}/other/wallpaper1.png" #"/home/${username}/${project}/other/wallpaper2.png" #"/home/${username}/${project}/other/wallpaper3.png" - #"/home/${username}/${project}/other/wallpaper4.png" + "/home/${username}/${project}/other/wallpaper4.png" ]; wallpaper = [ - "eDP-1,/home/${username}/${project}/other/wallpaper1.png" + #"eDP-1,/home/${username}/${project}/other/wallpaper1.png" #"eDP-1,/home/${username}/${project}/other/wallpaper2.png" #"eDP-1,/home/${username}/${project}/other/wallpaper3.png" - #"eDP-1,/home/${username}/${project}/other/wallpaper4.png" + "eDP-1,/home/${username}/${project}/other/wallpaper4.png" ]; }; }; diff --git a/modules/packages/cli.nix b/modules/packages/cli.nix index cd6da73..6e37b57 100644 --- a/modules/packages/cli.nix +++ b/modules/packages/cli.nix @@ -7,7 +7,8 @@ tailscale #VPN speedtest-cli #Internet speed tester #duplicati - #ollama + ollama-rocm + open-webui cloudflare-warp ddrescue texliveFull #LaTeX PDF maker @@ -16,5 +17,6 @@ powertop #Power consumption monitor and optimizer file #File type identifier hashcat #Password recovery/cracking tool + packwiz #A Minecraft modpack editor ]; } diff --git a/modules/packages/desktop.nix b/modules/packages/desktop.nix index cd62af2..ae5dfaf 100644 --- a/modules/packages/desktop.nix +++ b/modules/packages/desktop.nix @@ -51,5 +51,8 @@ waydroid #Android emulator on Linux gimp2-with-plugins #Image Editor kdePackages.filelight #Disk Usage Analyzer + filezilla + audacity + freecad ]; } diff --git a/modules/packages/essentials.nix b/modules/packages/essentials.nix index 395c5c8..8bf7b32 100644 --- a/modules/packages/essentials.nix +++ b/modules/packages/essentials.nix @@ -38,5 +38,10 @@ rocmPackages.rocm-runtime #AMD ROCm runtime ripgrep #Alternative to grep search for text in files pipewire #Multimedia handling + distrobox + dbus + cifs-utils + samba + kdePackages.ksshaskpass ]; } diff --git a/niri/autostart.nix b/niri/autostart.nix new file mode 100644 index 0000000..8f5d2a3 --- /dev/null +++ b/niri/autostart.nix @@ -0,0 +1,51 @@ +{ config, pkgs, username, project, ... }: +{ + +#To show logs of services run: +#journalctl --user-unit={service-name} --user + systemd.user.services.niri-waybar = { + description = "Waybar status bar for Niri"; + + # "wantedBy" replaces the [Install] section + wantedBy = [ "graphical-session.target" ]; + + # "partOf" and "after" replace the [Unit] section dependencies + partOf = [ "graphical-session.target" ]; + after = [ "graphical-session.target" ]; + + # [Unit] configuration goes here + unitConfig = { + # This checks the environment variable to ensure we are in Niri + ConditionEnvironment = "XDG_CURRENT_DESKTOP=niri"; + }; + + # [Service] configuration goes here + serviceConfig = { + ExecStart = "${pkgs.waybar}/bin/waybar"; + Restart = "on-failure"; + RestartSec = "1s"; + }; + }; + + # 2. The Niri Session Cleanup Service + # This service starts when the graphical session starts, and when it stops, + # it forcibly stops the graphical-session.target to ensure a clean state for the next login. + systemd.user.services.niri-session-manager = { + description = "Niri Session Management"; + wantedBy = [ "graphical-session.target" ]; + partOf = [ "graphical-session.target" ]; + + # Only run this cleanup logic for Niri + unitConfig.ConditionEnvironment = "XDG_CURRENT_DESKTOP=niri"; + + serviceConfig = { + Type = "simple"; + # A dummy command that stays alive. 'sleep infinity' is low resource. + ExecStart = "${pkgs.coreutils}/bin/sleep infinity"; + + # IMPORTANT: When this service stops (which happens when niri kills its children), + # it brings down the whole target. + ExecStopPost = "${pkgs.systemd}/bin/systemctl --user stop graphical-session.target"; + }; + }; +} diff --git a/niri/home.nix b/niri/home.nix index 36325e2..ca63405 100644 --- a/niri/home.nix +++ b/niri/home.nix @@ -6,6 +6,11 @@ ../modules/waybar/home.nix ]; + xdg.configFile."mako/config".text = '' + default-timeout=5000 + ignore-timeout=1 + ''; + programs.niri = { package = pkgs.niri; enable = true; @@ -76,8 +81,9 @@ } } - spawn-at-startup "waybar" + // spawn-at-startup "waybar" spawn-at-startup "hyprpaper" + spawn-at-startup "${pkgs.mako}/bin/mako" // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" @@ -150,8 +156,8 @@ Mod+Ctrl+End { move-column-to-last; } Mod+Shift+Left { focus-monitor-left; } - Mod+Shift+Down { focus-monitor-down; } - Mod+Shift+Up { focus-monitor-up; } + Mod+Shift+Down { move-window-down-or-to-workspace-down; } + Mod+Shift+Up { move-window-up-or-to-workspace-up; } Mod+Shift+Right { focus-monitor-right; } Mod+Shift+H { focus-monitor-left; } Mod+Shift+J { focus-monitor-down; } diff --git a/niri/niri.nix b/niri/niri.nix index 36764b4..8c474e9 100644 --- a/niri/niri.nix +++ b/niri/niri.nix @@ -1,7 +1,7 @@ { config, inputs, pkgs, ... }: { imports = [ -# ./autostart.nix + ./autostart.nix ../modules/hyprlock ../modules/hyprpaper ../modules/stylix @@ -13,9 +13,10 @@ environment.systemPackages = with pkgs; [ - mako + #mako fuzzel waybar + xwayland-satellite ]; programs = {