From a7985e56c958cdd4b42a2439efea1e52d2aa6298 Mon Sep 17 00:00:00 2001 From: ulve Date: Sat, 20 Jun 2026 16:48:12 +0200 Subject: [PATCH] enable upower, move noctalia config to niri module, make useNoctalia a module option --- config/niri/noctalia.kdl | 35 ++++++ config/noctalia/colors.json | 32 ++--- config/noctalia/settings.json | 224 +++++++++++++++++++++++++++++----- configuration.nix | 2 + home.nix | 4 - niri.nix | 155 ++++++++++++----------- 6 files changed, 326 insertions(+), 126 deletions(-) create mode 100644 config/niri/noctalia.kdl diff --git a/config/niri/noctalia.kdl b/config/niri/noctalia.kdl new file mode 100644 index 0000000..88ab4bf --- /dev/null +++ b/config/niri/noctalia.kdl @@ -0,0 +1,35 @@ +layout { + + focus-ring { + active-color "#e48267" + inactive-color "#291814" + urgent-color "#88402c" + } + + border { + active-color "#e48267" + inactive-color "#291814" + urgent-color "#88402c" + } + + shadow { + color "#29181470" + } + + tab-indicator { + active-color "#e48267" + inactive-color "#8d280c" + urgent-color "#88402c" + } + + insert-hint { + color "#e4826780" + } +} + +recent-windows { + highlight { + active-color "#e48267" + urgent-color "#88402c" + } +} diff --git a/config/noctalia/colors.json b/config/noctalia/colors.json index 63d239c..49dc22c 100644 --- a/config/noctalia/colors.json +++ b/config/noctalia/colors.json @@ -1,25 +1,25 @@ { - "mPrimary": "#ffb4a3", - "mOnPrimary": "#5e1606", + "mPrimary": "#e48267", + "mOnPrimary": "#130e0d", - "mSecondary": "#e7bdb3", - "mOnSecondary": "#442a23", + "mSecondary": "#d6b45c", + "mOnSecondary": "#251b18", - "mTertiary": "#dac58c", - "mOnTertiary": "#3c2f04", + "mTertiary": "#b6cd65", + "mOnTertiary": "#251b18", - "mError": "#ffb4ab", - "mOnError": "#690005", + "mError": "#88402c", + "mOnError": "#faf8f7", - "mSurface": "#181211", - "mOnSurface": "#ede0dd", + "mSurface": "#291814", + "mOnSurface": "#f3f2f2", - "mSurfaceVariant": "#251e1d", - "mOnSurfaceVariant": "#d8c2bd", + "mSurfaceVariant": "#452921", + "mOnSurfaceVariant": "#b6b0af", - "mOutline": "#534340", - "mShadow": "#000000", + "mOutline": "#74645f", + "mShadow": "#291814", - "mHover": "#dac58c", - "mOnHover": "#3c2f04" + "mHover": "#b6cd65", + "mOnHover": "#251b18" } \ No newline at end of file diff --git a/config/noctalia/settings.json b/config/noctalia/settings.json index ef2b60e..feb81be 100644 --- a/config/noctalia/settings.json +++ b/config/noctalia/settings.json @@ -42,19 +42,19 @@ "bar": { "autoHideDelay": 500, "autoShowDelay": 150, - "backgroundOpacity": 0.93, + "backgroundOpacity": 0.39, "barType": "floating", - "capsuleColorKey": "primary", - "capsuleOpacity": 0.33, - "contentPadding": 2, - "density": "compact", + "capsuleColorKey": "none", + "capsuleOpacity": 1, + "contentPadding": 10, + "density": "default", "displayMode": "always_visible", "enableExclusionZoneInset": true, "fontScale": 1, "frameRadius": 12, "frameThickness": 8, "hideOnOverview": false, - "marginHorizontal": 4, + "marginHorizontal": 100, "marginVertical": 4, "middleClickAction": "none", "middleClickCommand": "", @@ -74,8 +74,8 @@ "showCapsule": true, "showOnWorkspaceSwitch": true, "showOutline": false, - "useSeparateOpacity": false, - "widgetSpacing": 6, + "useSeparateOpacity": true, + "widgetSpacing": 4, "widgets": { "center": [ { @@ -178,21 +178,21 @@ "showUnreadBadge": true, "unreadBadgeColor": "primary" }, - { - "deviceNativePath": "__default__", - "displayMode": "graphic-clean", - "hideIfIdle": false, - "hideIfNotDetected": true, - "id": "Battery", - "showNoctaliaPerformance": false, - "showPowerProfiles": false - }, { "displayMode": "onhover", "iconColor": "none", "id": "Volume", "middleClickCommand": "pwvucontrol || pavucontrol", "textColor": "none" + }, + { + "deviceNativePath": "__default__", + "displayMode": "graphic-clean", + "hideIfIdle": true, + "hideIfNotDetected": true, + "id": "Battery", + "showNoctaliaPerformance": true, + "showPowerProfiles": true } ] } @@ -222,13 +222,13 @@ }, "colorSchemes": { "darkMode": true, - "generationMethod": "tonal-spot", + "generationMethod": "vibrant", "manualSunrise": "06:30", "manualSunset": "18:30", "monitorForColors": "", - "predefinedScheme": "Kanagawa", + "predefinedScheme": "Gruvbox", "schedulingMode": "off", - "syncGsettings": true, + "syncGsettings": false, "useWallpaperColors": true }, "controlCenter": { @@ -376,14 +376,14 @@ "animationDisabled": false, "animationSpeed": 1, "autoStartAuth": false, - "avatarImage": "/home/ulve/.face", + "avatarImage": "/home/ulve/Pictures/ulve.png", "boxRadiusRatio": 1, "clockFormat": "hh\\nmm", "clockStyle": "custom", "compactLockScreen": false, "dimmerOpacity": 0.2, "enableBlurBehind": true, - "enableLockScreenCountdown": true, + "enableLockScreenCountdown": false, "enableLockScreenMediaControls": false, "enableShadows": true, "forceBlackScreenCorners": false, @@ -414,12 +414,12 @@ }, "language": "", "lockOnSuspend": true, - "lockScreenAnimations": false, - "lockScreenBlur": 0, - "lockScreenCountdownDuration": 10000, + "lockScreenAnimations": true, + "lockScreenBlur": 0.39, + "lockScreenCountdownDuration": 1000, "lockScreenMonitors": [ ], - "lockScreenTint": 0, + "lockScreenTint": 0.12, "passwordChars": true, "radiusRatio": 1, "reverseScroll": false, @@ -431,7 +431,7 @@ "showChangelogOnStartup": true, "showHibernateOnLockScreen": false, "showScreenCorners": false, - "showSessionButtonsOnLockScreen": true, + "showSessionButtonsOnLockScreen": false, "smoothScrollEnabled": true, "telemetryEnabled": false }, @@ -449,7 +449,7 @@ }, "idle": { "customCommands": "[]", - "enabled": false, + "enabled": true, "fadeDuration": 5, "lockCommand": "", "lockTimeout": 660, @@ -459,7 +459,7 @@ "screenOffCommand": "", "screenOffTimeout": 600, "suspendCommand": "", - "suspendTimeout": 1800 + "suspendTimeout": 0 }, "location": { "analogClockInCalendar": false, @@ -551,9 +551,9 @@ "notifyUpdates": true }, "sessionMenu": { - "countdownDuration": 10000, - "enableCountdown": true, - "largeButtonsLayout": "single-row", + "countdownDuration": 1000, + "enableCountdown": false, + "largeButtonsLayout": "grid", "largeButtonsStyle": true, "position": "center", "powerOptions": [ @@ -643,6 +643,10 @@ }, "templates": { "activeTemplates": [ + { + "enabled": true, + "id": "niri" + } ], "enableUserTheming": false }, @@ -666,6 +670,160 @@ "enableMultiMonitorDirectories": false, "enabled": true, "favorites": [ + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "tonal-spot", + "paletteColors": [ + "#9ccaff", + "#bac8db", + "#d6bee5", + "#ffb4ab" + ], + "path": "/home/ulve/.config/niri/wallpapers/Anime - Landscape.jpeg", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "tonal-spot", + "paletteColors": [ + "#ffb5a0", + "#e7bdb2", + "#d8c58d", + "#ffb4ab" + ], + "path": "/home/ulve/.config/niri/wallpapers/Anime-City-Night.png", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "tonal-spot", + "paletteColors": [ + "#b4c5ff", + "#c1c5dd", + "#e2bbdb", + "#ffb4ab" + ], + "path": "/home/ulve/.config/niri/wallpapers/Buildings.png", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "vibrant", + "paletteColors": [ + "#b3e467", + "#6ad65c", + "#5ed48c", + "#fd4663" + ], + "path": "/home/ulve/.config/niri/wallpapers/Concept-Japanese house.png", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "vibrant", + "paletteColors": [ + "#e47367", + "#e2ac5b", + "#d5e25b", + "#e2685b" + ], + "path": "/home/ulve/.config/niri/wallpapers/Courtside-Sunset.png", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "tonal-spot", + "paletteColors": [ + "#5ed4fd", + "#b3cad5", + "#c4c3eb", + "#ffb4ab" + ], + "path": "/home/ulve/.config/niri/wallpapers/Fog-Forest-Everforest.png", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "tonal-spot", + "paletteColors": [ + "#a4c9ff", + "#bcc7db", + "#d9bde3", + "#ffb4ab" + ], + "path": "/home/ulve/.config/niri/wallpapers/Anime-Girl-Night-Sky.jpg", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "monochrome", + "paletteColors": [ + "#ffffff", + "#c6c6c6", + "#e2e2e2", + "#ffb4ab" + ], + "path": "/home/ulve/.config/niri/wallpapers/Dark_Nature.png", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "vibrant", + "paletteColors": [ + "#67b6e4", + "#5265e0", + "#8652e0", + "#fd4663" + ], + "path": "/home/ulve/.config/niri/wallpapers/Fantasy-Lake1.png", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "vibrant", + "paletteColors": [ + "#60ecc6", + "#4bc5e9", + "#4b76e9", + "#fd4663" + ], + "path": "/home/ulve/.config/niri/wallpapers/IT_guy.png", + "useWallpaperColors": true + }, + { + "appearance": "dark", + "colorScheme": "Gruvbox", + "darkMode": true, + "generationMethod": "tonal-spot", + "paletteColors": [ + "#afd36d", + "#c1caab", + "#a0d0c9", + "#ffb4ab" + ], + "path": "/home/ulve/.config/niri/wallpapers/Patterns.png", + "useWallpaperColors": true + } ], "fillColor": "#000000", "fillMode": "crop", @@ -674,7 +832,7 @@ "monitorDirectories": [ ], "overviewBlur": 0.4, - "overviewEnabled": false, + "overviewEnabled": true, "overviewTint": 0.6, "panelPosition": "follow_bar", "randomIntervalSec": 3600, diff --git a/configuration.nix b/configuration.nix index da13edb..59a2acf 100644 --- a/configuration.nix +++ b/configuration.nix @@ -86,6 +86,8 @@ programs.firefox.enable = true; programs.niri.enable = true; + services.upower.enable = true; + xdg.portal = { enable = true; wlr.enable = true; diff --git a/home.nix b/home.nix index be53e6c..02dba88 100644 --- a/home.nix +++ b/home.nix @@ -251,10 +251,6 @@ source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/nvim"; }; - xdg.configFile."noctalia" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/noctalia"; - }; - # ── Packages ───────────────────────────────────────────────────────────────── home.packages = with pkgs; [ # general diff --git a/niri.nix b/niri.nix index 65c55c7..2fe7d6d 100644 --- a/niri.nix +++ b/niri.nix @@ -1,83 +1,92 @@ { pkgs, lib, config, ... }: -let - useNoctalia = true; -in { - # ── Niri desktop environment ───────────────────────────────────────────────── - xdg.configFile."niri" = { - source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/niri"; - }; - xdg.configFile."foot".source = ./config/foot; - xdg.configFile."waybar" = lib.mkIf (!useNoctalia) { source = ./config/waybar; }; - xdg.configFile."fuzzel/fuzzel.ini" = lib.mkIf (!useNoctalia) { source = ./config/fuzzel/fuzzel.ini; }; - - home.file.".local/bin/wallpaper.sh" = { - source = ./config/niri/wallpaper.sh; - executable = true; - }; - home.file.".local/bin/waybar-network.sh" = lib.mkIf (!useNoctalia) { - source = ./config/waybar/network.sh; - executable = true; - }; - home.file.".local/bin/waybar-weather.sh" = lib.mkIf (!useNoctalia) { - source = ./config/waybar/weather.sh; - executable = true; + options.niri.useNoctalia = lib.mkOption { + type = lib.types.bool; + default = true; }; - xdg.dataFile."applications/switch-wallpaper.desktop".source = ./config/applications/switch-wallpaper.desktop; - xdg.dataFile."applications/signal.desktop".source = ./config/applications/signal.desktop; - xdg.dataFile."applications/vesktop.desktop".source = ./config/applications/vesktop.desktop; - xdg.dataFile."applications/steam.desktop".source = ./config/applications/steam.desktop; - - systemd.user.services.xwayland-satellite = { - Unit = { - Description = "Xwayland for niri"; - BindsTo = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; + config = let + useNoctalia = config.niri.useNoctalia; + in { + # ── Niri desktop environment ───────────────────────────────────────────────── + xdg.configFile."niri" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/niri"; }; - Service = { - ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite"; - Restart = "on-failure"; + xdg.configFile."noctalia" = lib.mkIf useNoctalia { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos-dotfiles/config/noctalia"; }; - Install.WantedBy = [ "graphical-session.target" ]; - }; + xdg.configFile."foot".source = ./config/foot; + xdg.configFile."waybar" = lib.mkIf (!useNoctalia) { source = ./config/waybar; }; + xdg.configFile."fuzzel/fuzzel.ini" = lib.mkIf (!useNoctalia) { source = ./config/fuzzel/fuzzel.ini; }; - services.mako = { - enable = true; - settings = { - background-color = "#0a0a0a99"; - text-color = "#f3eeea"; - border-color = "#cd0a00"; - border-radius = 8; - border-size = 1; - default-timeout = 7500; - max-icon-size = 64; - padding = "10,14"; - font = "JetBrains Mono 12"; + home.file.".local/bin/wallpaper.sh" = { + source = ./config/niri/wallpaper.sh; + executable = true; }; + home.file.".local/bin/waybar-network.sh" = lib.mkIf (!useNoctalia) { + source = ./config/waybar/network.sh; + executable = true; + }; + home.file.".local/bin/waybar-weather.sh" = lib.mkIf (!useNoctalia) { + source = ./config/waybar/weather.sh; + executable = true; + }; + + xdg.dataFile."applications/switch-wallpaper.desktop".source = ./config/applications/switch-wallpaper.desktop; + xdg.dataFile."applications/signal.desktop".source = ./config/applications/signal.desktop; + xdg.dataFile."applications/vesktop.desktop".source = ./config/applications/vesktop.desktop; + xdg.dataFile."applications/steam.desktop".source = ./config/applications/steam.desktop; + + systemd.user.services.xwayland-satellite = { + Unit = { + Description = "Xwayland for niri"; + BindsTo = [ "graphical-session.target" ]; + After = [ "graphical-session.target" ]; + }; + Service = { + ExecStart = "${pkgs.xwayland-satellite}/bin/xwayland-satellite"; + Restart = "on-failure"; + }; + Install.WantedBy = [ "graphical-session.target" ]; + }; + + services.mako = { + enable = true; + settings = { + background-color = "#0a0a0a99"; + text-color = "#f3eeea"; + border-color = "#cd0a00"; + border-radius = 8; + border-size = 1; + default-timeout = 7500; + max-icon-size = 64; + padding = "10,14"; + font = "JetBrains Mono 12"; + }; + }; + + home.packages = with pkgs; [ + # wayland / desktop + libnotify + wl-clipboard + slurp + grim + satty + wlogout + brightnessctl + awww + lxqt.lxqt-policykit + + # messaging + telegram-desktop + signal-desktop + vesktop + karere + ] ++ lib.optionals (!useNoctalia) [ + fuzzel + waybar + ] ++ lib.optionals useNoctalia [ + noctalia-shell + ]; }; - - home.packages = with pkgs; [ - # wayland / desktop - libnotify - wl-clipboard - slurp - grim - satty - wlogout - brightnessctl - awww - lxqt.lxqt-policykit - - # messaging - telegram-desktop - signal-desktop - vesktop - karere - ] ++ lib.optionals (!useNoctalia) [ - fuzzel - waybar - ] ++ lib.optionals useNoctalia [ - noctalia-shell - ]; }