diff --git a/flake.lock b/flake.lock index d5c4403..8c006c7 100644 --- a/flake.lock +++ b/flake.lock @@ -637,11 +637,11 @@ "niri-blur": { "flake": false, "locked": { - "lastModified": 1772514470, - "narHash": "sha256-nSrfHwbjg8/Rfx5pqDqU8bL5IWh99MsvxfjNZYxqEFw=", + "lastModified": 1771749270, + "narHash": "sha256-ZJCM1XOHIdud6Jfpl4jYQOzbOJId9wmXT+hNJ1IPBIY=", "owner": "niri-wm", "repo": "niri", - "rev": "c837d944f0cc08580ee86574dd0c3a68ca9379a4", + "rev": "734d86ec061d15d1980c5b940b2f4dc9aee80cf5", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index aecf5b5..f3ec258 100644 --- a/flake.nix +++ b/flake.nix @@ -212,7 +212,7 @@ ./home/apps ./home/games ./home/hosts/${hostname} - # ./home/kde + ./home/kde ./home/services ./home/terminal ./home/tiling diff --git a/home/default.nix b/home/default.nix index 96fd263..ee2f997 100755 --- a/home/default.nix +++ b/home/default.nix @@ -41,6 +41,7 @@ # kde and kde theming kde-rounded-corners kdePackages.partitionmanager + pkgs.catppuccin-cursors.mochaPeach adwaita-icon-theme morewaita-icon-theme diff --git a/home/services/default.nix b/home/services/default.nix index 307dc31..686339e 100644 --- a/home/services/default.nix +++ b/home/services/default.nix @@ -63,6 +63,16 @@ gtk = { enable = true; + # colorScheme = if config.userOptions.isDark then "dark" else "light"; + + # theme = { + # package = pkgs.kdePackages.breeze-gtk; + # name = + # if config.userOptions.isDark + # then "Breeze-Dark" + # else "Breeze"; + # }; + colorScheme = "dark"; iconTheme = { name = "MoreWaita"; @@ -85,74 +95,4 @@ gtk-decoration-layout = ":"; }; }; - - xdg.mimeApps = { - enable = true; - associations.added = { - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; - "x-scheme-handler/discord" = [ "vesktop.desktop" ]; - "x-scheme-handler/spotify" = [ "riff.desktop" ]; - "inode/directory" = [ "org.gnome.Nautilus.desktop" ]; - "image/png" = [ "loupe.desktop" ]; - "image/jpeg" = [ "loupe.desktop" ]; - }; - defaultApplications = { - # Web - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; - "text/html" = [ "firefox.desktop" ]; - - # Communication & Social - "x-scheme-handler/discord" = [ "vesktop.desktop" ]; - "x-scheme-handler/spotify" = [ "riff.desktop" ]; - - # File Management - "inode/directory" = [ "org.gnome.Nautilus.desktop" ]; - - # Torrents - "application/x-bittorrent" = [ "org.qbittorrent.qBittorrent.desktop" ]; - "x-scheme-handler/magnet" = [ "org.qbittorrent.qBittorrent.desktop" ]; - - # Documents - "application/pdf" = [ "firefox.desktop" ]; # Or libreoffice-draw.desktop - "application/vnd.openxmlformats-officedocument.wordprocessingml.document" = [ - "libreoffice-writer.desktop" - ]; # docx - "application/msword" = [ "libreoffice-writer.desktop" ]; # doc - "application/vnd.oasis.opendocument.text" = [ "libreoffice-writer.desktop" ]; # odt - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = [ - "libreoffice-calc.desktop" - ]; # xlsx - "application/vnd.ms-excel" = [ "libreoffice-calc.desktop" ]; # xls - "application/vnd.oasis.opendocument.spreadsheet" = [ "libreoffice-calc.desktop" ]; # ods - - # Text & Code - "text/plain" = [ "nvim.desktop" ]; - "text/markdown" = [ "nvim.desktop" ]; - "application/x-shellscript" = [ "nvim.desktop" ]; - "application/json" = [ "nvim.desktop" ]; - "text/x-c" = [ "nvim.desktop" ]; - "text/x-c++" = [ "nvim.desktop" ]; - "text/x-python" = [ "nvim.desktop" ]; - "text/x-makefile" = [ "nvim.desktop" ]; - - # Terminal - "x-scheme-handler/terminal" = [ "kitty.desktop" ]; - - # Media - "video/mp4" = [ "mpv.desktop" ]; - "video/mkv" = [ "mpv.desktop" ]; - "video/webm" = [ "mpv.desktop" ]; - "audio/mpeg" = [ "mpv.desktop" ]; - "audio/flac" = [ "mpv.desktop" ]; - "audio/wav" = [ "mpv.desktop" ]; - - # Images - "image/png" = [ "loupe.desktop" ]; - "image/jpeg" = [ "loupe.desktop" ]; - "image/webp" = [ "loupe.desktop" ]; - "image/gif" = [ "loupe.desktop" ]; - }; - }; } diff --git a/home/tiling/default.nix b/home/tiling/default.nix index 91ec144..512ea0f 100644 --- a/home/tiling/default.nix +++ b/home/tiling/default.nix @@ -47,69 +47,76 @@ }; }; - programs.swaylock = with config.scheme; { - enable = true; - package = pkgs.swaylock-effects; - settings = { - # this would sometimes load the previous day's wallpaper - # when it is run before the bing retrieval script finishes - image = "~/.local/share/wallpaper/daily-colored.jpg"; - effect-blur = "7x5"; - # color = "000000"; # black - font-size = 24; - indicator-idle-visible = true; - indicator-radius = 100; - show-failed-attempts = true; - - bs-hl-color = base09 + "E6"; # peach - caps-lock-bs-hl-color = base09 + "E6"; # peach - caps-lock-key-hl-color = base0E + "E6"; # mauve - inside-color = base00 + "E6"; # base - inside-clear-color = base00 + "E6"; # base - inside-caps-lock-color = base00 + "E6"; # base - inside-ver-color = base00 + "E6"; # base - inside-wrong-color = base00 + "E6"; # base - key-hl-color = base0D + "E6"; # blue - layout-bg-color = base00 + "E6"; # base - layout-border-color = base00 + "E6"; # base - layout-text-color = base05 + "E6"; # text - line-color = base00 + "E6"; # base - line-clear-color = base00 + "E6"; # base - line-caps-lock-color = base00 + "E6"; # base - line-ver-color = base00 + "E6"; # base - line-wrong-color = base00 + "E6"; # base - ring-color = base00 + "E6"; # base - ring-clear-color = base09 + "E6"; # peach - ring-caps-lock-color = base00 + "E6"; # base - ring-ver-color = base0B + "E6"; # green - ring-wrong-color = base00 + "E6"; # base - separator-color = "00000000"; # transparent - text-color = base05 + "E6"; # text - text-clear-color = base09 + "E6"; # peach - text-caps-lock-color = base0E + "E6"; # mauve - text-ver-color = base05 + "E6"; # text - text-wrong-color = base08 + "E6"; # red - }; - }; - - systemd.user.services.swaylock = { - Unit = { - After = [ "niri.service" ]; - PartOf = [ "niri.service" ]; - Description = "Screen locker"; - Documentation = "https://github.com/swaywm/swaylock"; - }; - - Service = { - ExecStart = "${config.programs.swaylock.package}/bin/swaylock"; - Restart = "on-failure"; - }; - - Install.WantedBy = [ "niri.service" ]; - }; - xsession = { enable = true; windowManager.command = "niri"; }; + + xdg.mimeApps = { + enable = true; + associations.added = { + "x-scheme-handler/http" = [ "firefox.desktop" ]; + "x-scheme-handler/https" = [ "firefox.desktop" ]; + "x-scheme-handler/discord" = [ "vesktop.desktop" ]; + "x-scheme-handler/spotify" = [ "riff.desktop" ]; + "inode/directory" = [ "org.gnome.Nautilus.desktop" ]; + "image/png" = [ "loupe.desktop" ]; + "image/jpeg" = [ "loupe.desktop" ]; + }; + defaultApplications = { + # Web + "x-scheme-handler/http" = [ "firefox.desktop" ]; + "x-scheme-handler/https" = [ "firefox.desktop" ]; + "text/html" = [ "firefox.desktop" ]; + + # Communication & Social + "x-scheme-handler/discord" = [ "vesktop.desktop" ]; + "x-scheme-handler/spotify" = [ "riff.desktop" ]; + + # File Management + "inode/directory" = [ "org.gnome.Nautilus.desktop" ]; + + # Torrents + "application/x-bittorrent" = [ "org.qbittorrent.qBittorrent.desktop" ]; + "x-scheme-handler/magnet" = [ "org.qbittorrent.qBittorrent.desktop" ]; + + # Documents + "application/pdf" = [ "firefox.desktop" ]; # Or libreoffice-draw.desktop + "application/vnd.openxmlformats-officedocument.wordprocessingml.document" = [ + "libreoffice-writer.desktop" + ]; # docx + "application/msword" = [ "libreoffice-writer.desktop" ]; # doc + "application/vnd.oasis.opendocument.text" = [ "libreoffice-writer.desktop" ]; # odt + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = [ + "libreoffice-calc.desktop" + ]; # xlsx + "application/vnd.ms-excel" = [ "libreoffice-calc.desktop" ]; # xls + "application/vnd.oasis.opendocument.spreadsheet" = [ "libreoffice-calc.desktop" ]; # ods + + # Text & Code + "text/plain" = [ "nvim.desktop" ]; + "text/markdown" = [ "nvim.desktop" ]; + "application/x-shellscript" = [ "nvim.desktop" ]; + "application/json" = [ "nvim.desktop" ]; + "text/x-c" = [ "nvim.desktop" ]; + "text/x-c++" = [ "nvim.desktop" ]; + "text/x-python" = [ "nvim.desktop" ]; + "text/x-makefile" = [ "nvim.desktop" ]; + + # Media + "video/mp4" = [ "mpv.desktop" ]; + "video/mkv" = [ "mpv.desktop" ]; + "video/webm" = [ "mpv.desktop" ]; + "audio/mpeg" = [ "mpv.desktop" ]; + "audio/flac" = [ "mpv.desktop" ]; + "audio/wav" = [ "mpv.desktop" ]; + + # Images + "image/png" = [ "loupe.desktop" ]; + "image/jpeg" = [ "loupe.desktop" ]; + "image/webp" = [ "loupe.desktop" ]; + "image/gif" = [ "loupe.desktop" ]; + }; + }; + } diff --git a/home/tiling/niri.nix b/home/tiling/niri.nix index c3a898a..199b841 100644 --- a/home/tiling/niri.nix +++ b/home/tiling/niri.nix @@ -121,7 +121,7 @@ clip-to-geometry = true; opacity = 0.90; background-effect = { - xray = true; + xray = false; blur = true; noise = 0.05; saturation = 1; @@ -204,7 +204,7 @@ matches = [ { namespace = "^launcher$"; } ]; opacity = 0.90; background-effect = { - xray = true; + xray = false; blur = true; noise = 0.05; saturation = 1; @@ -409,7 +409,6 @@ "XF86Sleep".action.power-off-monitors = { }; "XF86Search".action.spawn = [ "fuzzel" ]; - "Mod+Shift+L".action.spawn = [ "swaylock" ]; "XF86LaunchA" = { action.toggle-overview = { }; @@ -430,6 +429,10 @@ "Mod+Down".action.focus-window-down = { }; "Mod+Up".action.focus-window-up = { }; "Mod+Right".action.focus-column-right = { }; + "Mod+H".action.focus-column-left = { }; + "Mod+J".action.focus-window-down = { }; + "Mod+K".action.focus-window-up = { }; + "Mod+L".action.focus-column-right = { }; "Mod+Ctrl+Left".action.move-column-left = { }; "Mod+Ctrl+Down".action.move-window-down = { }; @@ -449,6 +452,10 @@ "Mod+Shift+Down".action.focus-monitor-down = { }; "Mod+Shift+Up".action.focus-monitor-up = { }; "Mod+Shift+Right".action.focus-monitor-right = { }; + "Mod+Shift+H".action.focus-monitor-left = { }; + "Mod+Shift+J".action.focus-monitor-down = { }; + "Mod+Shift+K".action.focus-monitor-up = { }; + "Mod+Shift+L".action.focus-monitor-right = { }; "Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = { }; "Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = { }; diff --git a/home/tiling/noctalia.nix b/home/tiling/noctalia.nix index b6791bd..82e53b0 100644 --- a/home/tiling/noctalia.nix +++ b/home/tiling/noctalia.nix @@ -203,7 +203,7 @@ unreadBadgeColor = "primary"; } { - deviceNativePath = ""; + deviceNativePath = "__default__"; displayMode = "icon-hover"; hideIfIdle = false; hideIfNotDetected = true; diff --git a/options.nix b/options.nix index 68396e5..910e25f 100644 --- a/options.nix +++ b/options.nix @@ -16,6 +16,22 @@ default = "base09"; }; }; + # catppuccinUpper = { + # accent = lib.mkOption { + # type = lib.types.str; + # readOnly = true; + # default = + # builtins.substring 0 1 (lib.toUpper config.catppuccin.accent) + # + builtins.substring 1 (-1) config.catppuccin.accent; + # }; + # flavor = lib.mkOption { + # type = lib.types.str; + # readOnly = true; + # default = + # builtins.substring 0 1 (lib.toUpper config.catppuccin.flavor) + # + builtins.substring 1 (-1) config.catppuccin.flavor; + # }; + # }; userOptions = { name = lib.mkOption { type = lib.types.str; @@ -100,36 +116,32 @@ default = pkgs.noto-fonts-color-emoji; }; }; - cursor = { - name = lib.mkOption { - type = lib.types.str; - readOnly = true; - default = config.colors.scheme; + cursor = + let + attrName = "mocha" + "Peach"; + in + { + name = lib.mkOption { + type = lib.types.str; + readOnly = true; + default = "catppuccin-mocha-peach-cursors"; + }; + package = lib.mkOption { + type = lib.types.package; + readOnly = true; + default = pkgs.catppuccin-cursors.${attrName}; + }; + size = lib.mkOption { + type = lib.types.int; + readOnly = true; + default = 24; + }; + path = lib.mkOption { + type = lib.types.str; + readOnly = true; + default = "${pkgs.catppuccin-cursors.${attrName}}/share/icons"; + }; }; - package = lib.mkOption { - type = lib.types.package; - readOnly = true; - default = - with config.scheme; - (pkgs.bibata-cursor.override { - themeName = config.colors.scheme; - baseColor = withHashtag.${config.colors.accent}; - outlineColor = withHashtag.base00; - watchBackgroundColor = withHashtag.base11; - cursorSizes = "16 20 22 24 28 32 40 48 56 64 72 80 88 96"; - }); - }; - size = lib.mkOption { - type = lib.types.int; - readOnly = true; - default = 24; - }; - path = lib.mkOption { - type = lib.types.str; - readOnly = true; - default = "${config.userOptions.cursor.package}/share/icons/${config.colors.scheme}"; - }; - }; # isDark = lib.mkOption { # type = lib.types.bool; # readOnly = true; diff --git a/packages/bibata-cursor/default.nix b/packages/bibata-cursor/default.nix deleted file mode 100644 index 6811afc..0000000 --- a/packages/bibata-cursor/default.nix +++ /dev/null @@ -1,103 +0,0 @@ -{ - pkgs ? import { }, - themeName ? "bibata", - baseColor ? "#000000", - outlineColor ? "#FFFFFF", - watchBackgroundColor ? "", - cursorSizes ? "24", -}: - -let - version = "2.0.7"; - - src = pkgs.fetchFromGitHub { - owner = "ful1e5"; - repo = "Bibata_Cursor"; - rev = "v${version}"; - hash = "sha256-kIKidw1vditpuxO1gVuZeUPdWBzkiksO/q2R/+DUdEc="; - }; - - yarnOfflineCache = pkgs.fetchYarnDeps { - yarnLock = "${src}/yarn.lock"; - hash = "sha256-EpWIGoFFokmzRML2r/dCM+TImOCtii8mifLgnLKdUMY="; - }; - -in -pkgs.stdenv.mkDerivation { - pname = "bibata-${themeName}-cursor"; - inherit version src; - - nativeBuildInputs = with pkgs; [ - yarn - nodejs - fixup-yarn-lock - python3Packages.clickgen - autoPatchelfHook - ]; - - buildInputs = with pkgs; [ - # Required to satisfy dynamic linking for prebuilt JS native modules (like resvg-js) - stdenv.cc.cc.lib - ]; - - configurePhase = '' - runHook preConfigure - - export HOME=$(mktemp -d) - - echo "1. Setup offline yarn cache" - yarn config --offline set yarn-offline-mirror ${yarnOfflineCache} - fixup-yarn-lock yarn.lock - - echo "2. Install node_modules offline" - yarn install --offline --frozen-lockfile --ignore-scripts --no-progress --non-interactive - patchShebangs node_modules/ - - rm -rf node_modules/@resvg/resvg-js-linux-*-musl - - echo "3. Patch prebuilt node binaries (like resvg) so they can run in the Nix sandbox" - autoPatchelf node_modules/ - - # https://github.com/ful1e5/cbmp/issues/4 - echo "4. Patch 'ora' library to prevent Nix sandbox hangs" - sed -i 's/this.#isEnabled = .*/this.#isEnabled = false;/g' node_modules/ora/index.js - - runHook postConfigure - ''; - - buildPhase = '' - runHook preBuild - - echo "Splitting SVGs to render across $NIX_BUILD_CORES cores..." - - echo "1. Distribute SVGs evenly into chunk directories" - if [ -n "${watchBackgroundColor}" ]; then - ./node_modules/.bin/cbmp -d "svg" -o "bitmaps/${themeName}" -bc "${baseColor}" -oc "${outlineColor}" -wc "${watchBackgroundColor}" - else - ./node_modules/.bin/cbmp -d "svg" -o "bitmaps/${themeName}" -bc "${baseColor}" -oc "${outlineColor}" - fi - - echo "Rendering complete. Building XCursor theme..." - - echo "4. Build the final cursors" - ctgen configs/right/x.build.toml -s ${cursorSizes} -p x11 -d "bitmaps/${themeName}" -n "${themeName}" -c "${themeName} cursors" - - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out/share/icons - cp -r themes/${themeName} $out/share/icons/ - - runHook postInstall - ''; - - meta = with pkgs.lib; { - description = "Custom colored Bibata Cursor theme built from source"; - homepage = "https://github.com/ful1e5/Bibata_Cursor"; - license = licenses.gpl3; - platforms = platforms.linux; - }; -} diff --git a/packages/overlay.nix b/packages/overlay.nix index 5346aea..44daa1d 100644 --- a/packages/overlay.nix +++ b/packages/overlay.nix @@ -1,6 +1,5 @@ final: prev: { spotify-webapp = final.callPackage ./spotify-webapp { }; - bibata-cursor = final.callPackage ./bibata-cursor { }; openmw-unstable = prev.openmw.overrideAttrs (oldAttrs: { pname = "openmw"; diff --git a/system/default.nix b/system/default.nix index 324352a..68cf65a 100755 --- a/system/default.nix +++ b/system/default.nix @@ -49,10 +49,6 @@ }; programs = { - gamescope = { - enable = true; - capSysNice = false; - }; gnupg.agent = { enable = true; enableSSHSupport = true; @@ -102,12 +98,11 @@ }; services = { + desktopManager.plasma6.enable = true; displayManager = { - autoLogin.enable = true; - autoLogin.user = "sckova"; - defaultSession = "niri"; sddm.enable = true; sddm.wayland.enable = true; + defaultSession = "niri"; }; gnome.gnome-keyring.enable = true; libinput.enable = true; @@ -137,19 +132,8 @@ }) ]; - security = { - pam.services = { - niri.enableGnomeKeyring = config.services.gnome.gnome-keyring.enable; - swaylock = { - name = "swaylock"; - enableGnomeKeyring = config.services.gnome.gnome-keyring.enable; - gnupg.enable = true; - gnupg.noAutostart = true; - }; - }; - sudo.wheelNeedsPassword = false; - polkit.enable = true; - }; + security.pam.services.niri.enableGnomeKeyring = config.services.gnome.gnome-keyring.enable; + security.polkit.enable = true; networking.firewall.enable = false; networking.networkmanager.enable = true; documentation.man.enable = true; diff --git a/system/hosts/alien/default.nix b/system/hosts/alien/default.nix index 849a622..21bcf9f 100644 --- a/system/hosts/alien/default.nix +++ b/system/hosts/alien/default.nix @@ -36,6 +36,10 @@ boot.loader.limine.maxGenerations = lib.mkForce 100; programs = { + gamescope = { + enable = true; + capSysNice = false; + }; steam = { enable = true; gamescopeSession.enable = true; @@ -61,6 +65,21 @@ "nvidia" ]; + services.displayManager = { + autoLogin = { + enable = false; + user = "sckova"; + }; + }; + + environment = { + loginShellInit = '' + [[ "$(tty)" = "/dev/tty1" ]] && ./gs.sh + ''; + }; + + security.sudo.wheelNeedsPassword = false; + hardware.nvidia = { modesetting.enable = true; powerManagement.enable = false; @@ -68,6 +87,13 @@ open = false; }; + services.sunshine = { + enable = true; + autoStart = true; + capSysAdmin = true; + openFirewall = true; + }; + # virtualization settings virtualisation = { diff --git a/system/hosts/alien/gs.sh b/system/hosts/alien/gs.sh new file mode 100644 index 0000000..40cd18b --- /dev/null +++ b/system/hosts/alien/gs.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -xeuo pipefail + +gamescopeArgs=( + --adaptive-sync # VRR support + --hdr-enabled + --mangoapp # performance overlay + --rt + --steam +) +steamArgs=( + -pipewire-dmabuf + -tenfoot +) +mangoConfig=( + cpu_temp + gpu_temp + ram + vram +) +mangoVars=( + MANGOHUD=1 + MANGOHUD_CONFIG="$(IFS=,; echo "${mangoConfig[*]}")" +) + +export "${mangoVars[@]}" +exec gamescope "${gamescopeArgs[@]}" -- steam "${steamArgs[@]}" diff --git a/system/hosts/peach/default.nix b/system/hosts/peach/default.nix index 0154ded..76d8105 100644 --- a/system/hosts/peach/default.nix +++ b/system/hosts/peach/default.nix @@ -26,12 +26,6 @@ in } ]; - services.logind.settings.Login = { - HandleSuspendKey = "ignore"; - HandlePowerKey = "lock"; - HandleLidSwitch = "lock"; - }; - virtualisation.docker = { enable = true; # Use the rootless mode - run Docker daemon as non-root user @@ -58,4 +52,6 @@ in ''; }; }; + + security.sudo.wheelNeedsPassword = false; }