From 69eafb5594149392512ab18d0b3dbff22f5eaeff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Mon, 20 Oct 2025 14:51:44 +0200 Subject: [PATCH] update system --- flake.lock | 195 +++++++++++++++++++++++ flake.nix | 17 +- hosts/MONSTER/default.nix | 17 +- modules/home-manager/theme/hyprland.conf | 5 +- modules/home-manager/theme/md3-evo.nix | 24 ++- modules/nixos/default.nix | 1 + modules/nixos/desktops/hyprland.nix | 10 +- modules/nixos/desktops/niri.nix | 144 +++++++++++++++++ modules/nixos/hardware/fv43u.nix | 14 ++ modules/nixos/xdg/forced-compliance.nix | 4 +- 10 files changed, 407 insertions(+), 24 deletions(-) create mode 100644 modules/nixos/desktops/niri.nix diff --git a/flake.lock b/flake.lock index 0d05b18..3200883 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,70 @@ { "nodes": { + "dank-material-shell": { + "inputs": { + "dgop": "dgop", + "dms-cli": "dms-cli", + "nixpkgs": [ + "nixpkgs" + ], + "quickshell": "quickshell" + }, + "locked": { + "lastModified": 1760163288, + "narHash": "sha256-SMPeHIC/JGAOL8sOxQ+dN4P4pz1j5wjYLCp80r6voMo=", + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "rev": "362bcb9294aa9317474e217b7d87d91f6788bec1", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "type": "github" + } + }, + "dgop": { + "inputs": { + "nixpkgs": [ + "dank-material-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1759769087, + "narHash": "sha256-b4dEAjvIfIkw2/C47aZGDnwhTBEjqptDo8J5PizeTCo=", + "owner": "AvengeMedia", + "repo": "dgop", + "rev": "ad6ad285e8b882c41eb8994ef7c91e151afb9a97", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "dgop", + "type": "github" + } + }, + "dms-cli": { + "inputs": { + "nixpkgs": [ + "dank-material-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1759982027, + "narHash": "sha256-4deRT98VwfZWZ685wIGevyYl3CzpuZJPjdjfulABH00=", + "owner": "AvengeMedia", + "repo": "danklinux", + "rev": "5cdfeeae2e14089079dcb0d6b61f014ce754021f", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "danklinux", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -177,6 +242,64 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1760121522, + "narHash": "sha256-8SGgpcZsMZIqFU+J/1OwebC/px8sgx5YYHNw1XkBM98=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "17dbedb88a21142c41d120f139e2870bc56bb5f4", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1759395653, + "narHash": "sha256-sv9J1z6CrTPf9lRJLyCN90fZVdQz7LFeX7pIlInH8BQ=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "ba6e5e082a79901dc89b0d49c5da1b769d652aec", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nix-flatpak": { "locked": { "lastModified": 1739444422, @@ -209,6 +332,22 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1759994382, + "narHash": "sha256-wSK+3UkalDZRVHGCRikZ//CyZUJWDJkBDTQX1+G77Ow=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5da4a26309e796daa7ffca72df93dbe53b8164c7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "flake-parts": "flake-parts", @@ -255,11 +394,34 @@ "type": "github" } }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "dank-material-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1759610621, + "narHash": "sha256-P3UPFd95mS/3aNgy40nCXAmyfR2bEEBd+tX6xfkYFb0=", + "ref": "refs/heads/master", + "rev": "c5c438f1cd1a76660a8658ef929a3d19e968e2ce", + "revCount": 689, + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/quickshell/quickshell" + } + }, "root": { "inputs": { + "dank-material-shell": "dank-material-shell", "home-manager": "home-manager", "lix-module": "lix-module", "matugen": "matugen", + "niri": "niri", "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", "nixvim": "nixvim" @@ -324,6 +486,39 @@ "repo": "default", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1759707084, + "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "a9188e70bd748118b4d56a529871b9de5adb9988", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index e9253c2..87b2a5b 100644 --- a/flake.nix +++ b/flake.nix @@ -18,6 +18,14 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest"; + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + dank-material-shell = { + url = "github:AvengeMedia/DankMaterialShell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -28,6 +36,8 @@ lix-module, matugen, nix-flatpak, + niri, + dank-material-shell, ... }@inputs: let @@ -45,6 +55,7 @@ experimental-features = "nix-command flakes"; }; overlays = [ + niri.overlays.niri (final: prev: { matugen = matugen.packages.${prev.system}.default; gccdiag = prev.callPackage ./overlays/gccdiag { }; @@ -84,7 +95,8 @@ ./modules/nixos ./hosts/${hostname} home-manager.nixosModules.home-manager - # lix-module.nixosModules.default + dank-material-shell.nixosModules.greeter + niri.nixosModules.niri nix-flatpak.nixosModules.nix-flatpak { _module.args = @@ -132,6 +144,9 @@ matugen.homeManagerModules.default nix-flatpak.homeManagerModules.nix-flatpak nixvim.homeModules.nixvim + # niri.homeModules.niri + dank-material-shell.homeModules.dankMaterialShell.default + dank-material-shell.homeModules.dankMaterialShell.niri ./modules/home-manager/modules/nixvim ]; users.${username} = { diff --git a/hosts/MONSTER/default.nix b/hosts/MONSTER/default.nix index d251aaf..4b17fae 100644 --- a/hosts/MONSTER/default.nix +++ b/hosts/MONSTER/default.nix @@ -34,18 +34,16 @@ shell.components = { firefox-pip.enable = true; - grimblast.enable = true; - gnome-keyring.enable = true; - hyprpicker.enable = true; + # grimblast.enable = true; + # gnome-keyring.enable = true; + # hyprpicker.enable = true; kde-connect.enable = true; kitty.enable = true; - swaync.enable = true; - walker.enable = true; - waybar.enable = true; - }; - desktops = { - hyprland.enable = true; + # swaync.enable = true; + # walker.enable = true; + # waybar.enable = true; }; + desktops.niri.enable = true; locale.preset.theaninova.enable = true; networking.hosts = { @@ -162,6 +160,7 @@ # List packages installed in system profile. To search, run: environment.systemPackages = with pkgs; [ # Essential utils + alacritty usbutils usbimager uhubctl diff --git a/modules/home-manager/theme/hyprland.conf b/modules/home-manager/theme/hyprland.conf index 471f021..eababef 100644 --- a/modules/home-manager/theme/hyprland.conf +++ b/modules/home-manager/theme/hyprland.conf @@ -1,8 +1,9 @@ general { col.inactive_border = 0x00000000 + col.active_border = 0x00000000 # col.inactive_border = rgba({{colors.surface.default.hex_stripped}}{{custom.transparency_hex | to_lower}}) - col.active_border = rgb({{colors.primary.default.hex_stripped}}) - border_size = 4 + # col.active_border = rgb({{colors.primary.default.hex_stripped}}) + border_size = 0 extend_border_grab_area = 4 gaps_in = {{custom.padding}} gaps_out = {{custom.double_padding}} diff --git a/modules/home-manager/theme/md3-evo.nix b/modules/home-manager/theme/md3-evo.nix index 51b1b1c..7c602ef 100644 --- a/modules/home-manager/theme/md3-evo.nix +++ b/modules/home-manager/theme/md3-evo.nix @@ -347,19 +347,29 @@ in wayland.windowManager.hyprland = { settings = { windowrulev2 = [ "float,class:^(zenity)$" ]; - decoration.shadow = { - enabled = true; - range = 16; - color = "rgba(00000044)"; + decoration = { + inactive_opacity = 0.8; + shadow = { + enabled = true; + range = 32; + render_power = 8; + color = "rgba(000000aa)"; + color_inactive = "rgba(00000011)"; + }; }; animations = { enabled = "yes"; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + bezier = [ + "expoOut, 0.16, 1, 0.3, 1" + ]; animation = [ - "windows, 1, 5, myBezier" - "windowsOut, 1, 7, default, popin 80%" + "windowsIn, 1, 5, expoOut, slide bottom" + "windows, 1, 5, expoOut, slide" + "windowsOut, 1, 5, expoOut, slide bottom" "border, 1, 10, default" "fade, 1, 7, default" + "fadeShadow, 1, 10, default" + "fadeDim, 1, 10, default" "workspaces, 1, 6, default" ]; }; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 071bf12..7b46754 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -4,6 +4,7 @@ ./boot/quiet.nix ./desktops/hyprland.nix + ./desktops/niri.nix ./fonts/fira-code.nix ./fonts/noto-sans.nix diff --git a/modules/nixos/desktops/hyprland.nix b/modules/nixos/desktops/hyprland.nix index 4a2a6c7..5bb45a2 100644 --- a/modules/nixos/desktops/hyprland.nix +++ b/modules/nixos/desktops/hyprland.nix @@ -27,10 +27,14 @@ in systemd.enable = false; package = null; portalPackage = null; - settings.ecosystem = { - no_update_news = true; - no_donation_nag = true; + settings = { + ecosystem = { + no_update_news = true; + no_donation_nag = true; + }; }; + plugins = with pkgs.hyprlandPlugins; [ + ]; }; home = { packages = with pkgs; [ grim ]; diff --git a/modules/nixos/desktops/niri.nix b/modules/nixos/desktops/niri.nix new file mode 100644 index 0000000..fc7f283 --- /dev/null +++ b/modules/nixos/desktops/niri.nix @@ -0,0 +1,144 @@ +{ + config, + lib, + pkgs, + username, + ... +}: + +let + cfg = config.desktops.niri; +in +{ + options.desktops.niri = { + enable = lib.mkEnableOption "Enable a DE based on Niri"; + }; + + config = lib.mkIf cfg.enable { + programs.niri.enable = true; + + home-manager.users.${username} = { + fonts.fontconfig.enable = true; + home = { + sessionVariables = { + NIXOS_OZONE_WL = "1"; + GDK_BACKEND = "wayland,x11,*"; + QT_QPA_PLATFORM = "wayland;xcb"; + SDL_VIDEODRIVER = "wayland"; + }; + + packages = with pkgs; [ + xwayland-satellite + # fonts + noto-fonts + # gnome packages + evince + baobab + gnome.gvfs + nautilus + simple-scan + eog + ghex + gnome-disk-utility + # fixes + xorg.xrandr + ]; + + pointerCursor = { + gtk.enable = true; + package = pkgs.capitaine-cursors; + name = "capitaine-cursors"; + }; + }; + + programs = { + dankMaterialShell = { + enable = true; + niri = { + enableSpawn = true; + enableKeybinds = false; + }; + }; + niri.settings = { + binds = { + "Mod+Left".action.focus-column-left = [ ]; + "Mod+Right".action.focus-column-right = [ ]; + "Mod+Up".action.focus-window-or-workspace-up = [ ]; + "Mod+Down".action.focus-window-or-workspace-down = [ ]; + + "Mod+WheelScrollUp".action.focus-column-left = [ ]; + "Mod+WheelScrollDown".action.focus-column-right = [ ]; + + "Mod+Shift+Left".action.move-column-left = [ ]; + "Mod+Shift+Right".action.move-column-right = [ ]; + "Mod+Shift+Up".action.move-window-up-or-to-workspace-up = [ ]; + "Mod+Shift+Down".action.move-window-down-or-to-workspace-down = [ ]; + + "Mod+C".action.close-window = [ ]; + "Mod+M".action.center-window = [ ]; + + "Mod+T".action.spawn = [ "kitty" ]; + + "Mod+V".action.maximize-column = [ ]; + "Mod+P".action.fullscreen-window = [ ]; + + "Mod+Space".action.spawn = [ + "dms" + "ipc" + "spotlight" + "toggle" + ]; + "Mod+MouseMiddle".action.toggle-overview = [ ]; + }; + window-rules = [ + { + geometry-corner-radius = { + top-left = 24.0; + top-right = 24.0; + bottom-left = 24.0; + bottom-right = 24.0; + }; + clip-to-geometry = true; + tiled-state = true; + } + { + matches = [ { app-id = "neovide"; } ]; + default-column-width.fixed = 1300; + } + { + matches = [ { app-id = "firefox"; } ]; + default-column-width.fixed = 1500; + } + ]; + layout = { + always-center-single-column = true; + center-focused-column = "always"; + focus-ring.enable = false; + border.enable = false; + }; + input = { + mouse.accel-profile = "flat"; + warp-mouse-to-focus.enable = true; + focus-follows-mouse = { + enable = false; + max-scroll-amount = "5%"; + }; + }; + }; + }; + }; + + programs.dankMaterialShell.greeter = { + enable = true; + compositor.name = "niri"; + configHome = "/home/${username}"; + }; + + services = { + kmscon = { + enable = true; + hwRender = true; + }; + }; + }; +} diff --git a/modules/nixos/hardware/fv43u.nix b/modules/nixos/hardware/fv43u.nix index 1f66a3a..700c2ea 100644 --- a/modules/nixos/hardware/fv43u.nix +++ b/modules/nixos/hardware/fv43u.nix @@ -43,12 +43,26 @@ in gpu-context = "waylandvk"; target-colorspace-hint = "auto"; }; + programs.niri.settings = { + prefer-no-csd = true; + outputs."DP-3" = { + scale = 1; + mode = { + width = 3840; + height = 2160; + refresh = 143.999; + }; + variable-refresh-rate = "on-demand"; + }; + layout.struts.top = 340; + }; wayland.windowManager.hyprland.settings = { general.layout = "master"; master = { orientation = "center"; slave_count_for_center_master = 0; mfact = 0.4; + allow_small_split = true; }; render.direct_scanout = 0; /* diff --git a/modules/nixos/xdg/forced-compliance.nix b/modules/nixos/xdg/forced-compliance.nix index 0bfe648..fbe671c 100644 --- a/modules/nixos/xdg/forced-compliance.nix +++ b/modules/nixos/xdg/forced-compliance.nix @@ -94,8 +94,8 @@ in ".zshenv".enable = lib.mkIf itgr.zsh false; # This might break some stuff, see # https://github.com/nix-community/home-manager/blob/bfa7c06436771e3a0c666ccc6ee01e815d4c33aa/modules/config/home-cursor.nix#L152 - ".icons/default/index.theme".enable = lib.mkIf itgr.home-cursor false; - ".icons/${homeConfig.home.pointerCursor.name}".enable = lib.mkIf itgr.home-cursor false; + # ".icons/default/index.theme".enable = lib.mkIf itgr.home-cursor false; + # ".icons/${homeConfig.home.pointerCursor.name}".enable = lib.mkIf itgr.home-cursor false; }; gtk.gtk2.configLocation = lib.mkIf itgr.gtk2 "${xdgConfig.configHome}/gtk-2.0/gtkrc"; programs = {