From fd163750c8643c5c3ee013b5e40aee19877bd76e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 20 Apr 2025 12:30:39 +0300 Subject: [PATCH 001/138] --- hosts/dunamis/rebuild-with-x86_64-v3.nix | 9 + modules/home/desktop/jay/default.nix | 649 +++++++++++++++++++++++ modules/nixos/desktop/jay.nix | 73 +++ packages/aim/default.nix | 53 ++ packages/bt/default.nix | 26 + packages/pillager/default.nix | 33 ++ packages/wl-tray-bridge/default.nix | 44 ++ 7 files changed, 887 insertions(+) create mode 100644 hosts/dunamis/rebuild-with-x86_64-v3.nix create mode 100644 modules/home/desktop/jay/default.nix create mode 100644 modules/nixos/desktop/jay.nix create mode 100644 packages/aim/default.nix create mode 100644 packages/bt/default.nix create mode 100644 packages/pillager/default.nix create mode 100644 packages/wl-tray-bridge/default.nix diff --git a/hosts/dunamis/rebuild-with-x86_64-v3.nix b/hosts/dunamis/rebuild-with-x86_64-v3.nix new file mode 100644 index 0000000..5826625 --- /dev/null +++ b/hosts/dunamis/rebuild-with-x86_64-v3.nix @@ -0,0 +1,9 @@ +let + gcc.arch = "x86-64-v3"; +in { + nix.settings.system-features = ["gccarch-${gcc.arch}"]; + nixpkgs.hostPlatform = { + system = "x86_64-linux"; + inherit gcc; + }; +} diff --git a/modules/home/desktop/jay/default.nix b/modules/home/desktop/jay/default.nix new file mode 100644 index 0000000..b3878ff --- /dev/null +++ b/modules/home/desktop/jay/default.nix @@ -0,0 +1,649 @@ +{ + perSystem, + osConfig, + config, + pkgs, + lib, + ... +}: let + inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe; + inherit (osConfig.networking) hostId; + inherit (config.lib.stylix) colors; + cfg = config.desktop.niri; + cursorSize = config.stylix.cursor.size; + cursorName = config.stylix.cursor.name; + keyboard = + if hostId == "eldrid" + then "chromeos" + else "platform"; + xdgPics = + config.xdg.userDirs.pictures; + ifLaptop = mkIf (hostId != "c7f6c4a1"); + # TODO: make terminal depent on thing outside a module + terminal = getExe pkgs.wezterm; + launcher = getExe pkgs.fuzzel; + browser = "app.zen_browser.zen"; + lockscreen = getExe pkgs.gtklock; +in { + options = { + desktop.jay.enable = + mkEnableOption "enable jay desktop"; + }; + config = mkIf cfg.enable { + stylix.targets = { + waybar.enable = false; + wpaperd.enable = true; + qt.enable = false; + }; + services = { + copyq.enable = true; + network-manager-applet.enable = true; + playerctld.enable = true; + swayosd = { + enable = true; + topMargin = 0.8; + }; + wpaperd.enable = true; + gnome-keyring = { + enable = true; + components = ["secrets"]; + }; + gammastep = { + enable = true; + provider = "manual"; + latitude = 49.6; + longitude = 36.1; + tray = true; + temperature = { + day = 6500; + night = 3000; + }; + }; + udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + swaync = { + enable = true; + settings = { + cssPriority = "user"; + image-visibility = "when-available"; + keyboard-shortcut = true; + relative-timestamps = true; + timeout = 5; + timeout-low = 5; + timeout-critical = 0; + script-fail-notify = true; + transition-time = 200; + + # Layer settings + layer-shell = true; + layer = "overlay"; + control-center-layer = "overlay"; + + # Notification settings + positionX = "right"; + positionY = "top"; + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 32; + notification-body-image-height = 100; + notification-body-image-width = 200; + notification-window-width = 400; + + # Control center settings + control-center-positionX = "right"; + control-center-positionY = "top"; + control-center-width = 500; + control-center-exclusive-zone = true; + fit-to-screen = true; + hide-on-action = true; + hide-on-clear = false; + + # Widget settings + widgets = [ + "title" + "dnd" + "notifications" + "mpris" + ]; + + widget-config = { + title = { + text = "Notifications"; + clear-all-button = true; + button-text = "Clear All"; + }; + dnd = { + text = "Do Not Disturb"; + }; + mpris = { + image-size = 96; + image-radius = 12; + blur = true; + }; + }; + }; + style = '' + /*** Global ***/ + progress, + progressbar, + trough { + border-radius: 16px; + } + + .app-icon, + .image { + -gtk-icon-effect: none; + } + + .notification-action { + border-radius: 12px; + margin: 0.5rem; + } + + .close-button { + margin: 24px; + padding: 0.2rem; + border-radius: 16px; + } + + /*** Notifications ***/ + .notification-group.collapsed + .notification-row:not(:last-child) + .notification-action, + .notification-group.collapsed + .notification-row:not(:last-child) + .notification-default-action { + opacity: 0; + } + + .trough { + margin: 4px; + border-radius: 7px; + } + + .notification, + .notification.low, + .notification.normal, + .notification.critical, + .control-center { + margin: 16px; + border-radius: 7px; + } + + .floating-notifications, + .notification-content { + border-radius: 7px; + } + + .control-center-list { + background: transparent; + } + + /*** Widgets ***/ + /* Title widget */ + .widget-title { + margin: 0.5rem; + } + + .widget-title > label { + font-weight: bold; + } + + .widget-title > button { + border-radius: 16px; + padding: 0.5rem; + } + + /* DND Widget */ + .widget-dnd { + margin: 0.5rem; + } + + .widget-dnd > label { + font-weight: bold; + } + + .widget-dnd > switch { + border-radius: 16px; + } + + .widget-dnd > switch slider { + border-radius: 16px; + padding: 0.25rem; + } + + /* Mpris widget */ + .widget-mpris .widget-mpris-player { + border-radius: 16px; + margin: 0.5rem; + padding: 0.5rem; + } + + .widget-mpris .widget-mpris-player .widget-mpris-album-art { + border-radius: 16px; + } + + .widget-mpris .widget-mpris-player .widget-mpris-title { + font-weight: bold; + } + + .widget-mpris .widget-mpris-player .widget-mpris-subtitle { + font-weight: normal; + } + + .widget-mpris .widget-mpris-player > box > button { + border: 1px solid transparent; + border-radius: 16px; + padding: 0.25rem; + } + ''; + }; + }; + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = terminal + " -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = true; + horizontal-pad = 12; + vertical-pad = 12; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = config.dconf.settings."org/gnome/desktop/interface".icon-theme; + }; + border = mkDefault { + width = 3; + radius = 12; + }; + }; + }; + programs.i3status-rust = { + enable = true; + bars = { + default = { + theme = "plain"; + blocks = [ + { + alert = 10.0; + block = "disk_space"; + info_type = "available"; + interval = 60; + path = "/"; + warning = 20.0; + } + { + block = "memory"; + format = " $icon mem_used_percents "; + format_alt = " $icon $swap_used_percents "; + } + { + block = "cpu"; + interval = 1; + } + { + block = "load"; + format = " $icon $1m "; + interval = 1; + } + { + block = "sound"; + } + { + block = "time"; + format = " $timestamp.datetime(f:'%a %d/%m %R') "; + interval = 60; + } + ]; + }; + }; + }; + xdg.configFile.jay = { + target = "jay/config.toml"; + recursive = true; + source = (pkgs.formats.toml {}).generate "jay-config" { + keymap = '' + xkb_keymap { + xkb_keycodes { include "evdev+aliases(qwerty)" }; + xkb_types { include "complete" }; + xkb_compat { include "complete" }; + xkb_symbols { include "pc+us+inet(evdev)" }; + }; + ''; + on-graphics-initialized = [ + { + type = "exec"; + exec = "${perSystem.self.wl-tray-bridge}/bin/wl-tray-bridge"; + } + ]; + outputs = [ + { + match.connector = "eDP-1"; + scale = 1.2; + } + { + match.connector = "DP-2"; + scale = 1.33; + } + ]; + vrr = { + mode = "always"; + cursor-hz = 75; + }; + repeat-rate = { + rate = 50; + delay = 200; + }; + theme = { + bg-color = "#${colors.base00}"; + bar-bg-color = "#${colors.base00}"; + border-color = "#${colors.base0D}"; + separator-color = "#${colors.base01}"; + bar-status-text-color = "#${colors.base05}"; + focused-title-text-color = "#${colors.base07}"; + focused-title-bg-color = "#${colors.base00}"; + focused-inactive-title-text-color = "#${colors.base03}"; + focused-inactive-title-bg-color = "#${colors.base00}"; + unfocused-title-text-color = "#${colors.base03}"; + unfocused-title-bg-color = "#${colors.base01}"; + attention-requested-bg-color = "#${colors.base09}"; + font = "${config.stylix.fonts.serif.name}"; + border-width = 2; + title-height = config.stylix.fonts.serif.size; + }; + status = { + # format = "pango"; + exec = ["${getExe pkgs.i3status-rs}" "config-default"]; + }; + window-management-key = "Super_L"; + shortcuts = let + left = "n"; + down = "e"; + up = "i"; + right = "o"; + in { + "logo-${left}" = "focus-left"; + "logo-${down}" = "focus-down"; + "logo-${up}" = "focus-up"; + "logo-${right}" = "focus-right"; + "logo-shift-${left}" = "move-left"; + "logo-shift-${down}" = "move-down"; + "logo-shift-${up}" = "move-up"; + "logo-shift-${right}" = "move-right"; + logo-d = "split-horizontal"; + logo-v = "split-vertical"; + logo-t = "toggle-split"; + logo-m = "toggle-mono"; + logo-shift-m = "toggle-fullscreen"; + logo-f = "focus-parent"; + logo-q = "close"; + logo-shift-f = "toggle-floating"; + logo-Return = { + type = "exec"; + exec = "wezterm"; + }; + logo-space = { + type = "exec"; + exec = launcher; + }; + logo-shift-ctrl-q = "quit"; + logo-shift-r = "reload-config-toml"; + ctrl-alt-F1 = { + type = "switch-to-vt"; + num = 1; + }; + ctrl-alt-F2 = { + type = "switch-to-vt"; + num = 2; + }; + ctrl-alt-F3 = { + type = "switch-to-vt"; + num = 3; + }; + ctrl-alt-F4 = { + type = "switch-to-vt"; + num = 4; + }; + ctrl-alt-F5 = { + type = "switch-to-vt"; + num = 5; + }; + ctrl-alt-F6 = { + type = "switch-to-vt"; + num = 6; + }; + ctrl-alt-F7 = { + type = "switch-to-vt"; + num = 7; + }; + ctrl-alt-F8 = { + type = "switch-to-vt"; + num = 8; + }; + ctrl-alt-F9 = { + type = "switch-to-vt"; + num = 9; + }; + ctrl-alt-F10 = { + type = "switch-to-vt"; + num = 10; + }; + ctrl-alt-F11 = { + type = "switch-to-vt"; + num = 11; + }; + ctrl-alt-F12 = { + type = "switch-to-vt"; + num = 12; + }; + logo-1 = { + type = "show-workspace"; + name = "1"; + }; + logo-2 = { + type = "show-workspace"; + name = "2"; + }; + logo-3 = { + type = "show-workspace"; + name = "3"; + }; + logo-4 = { + type = "show-workspace"; + name = "4"; + }; + logo-5 = { + type = "show-workspace"; + name = "5"; + }; + logo-6 = { + type = "show-workspace"; + name = "6"; + }; + logo-7 = { + type = "show-workspace"; + name = "7"; + }; + logo-8 = { + type = "show-workspace"; + name = "8"; + }; + logo-9 = { + type = "show-workspace"; + name = "9"; + }; + logo-0 = { + type = "show-workspace"; + name = "10"; + }; + logo-shift-1 = { + type = "move-to-workspace"; + name = "1"; + }; + logo-shift-2 = { + type = "move-to-workspace"; + name = "2"; + }; + logo-shift-3 = { + type = "move-to-workspace"; + name = "3"; + }; + logo-shift-4 = { + type = "move-to-workspace"; + name = "4"; + }; + logo-shift-5 = { + type = "move-to-workspace"; + name = "5"; + }; + logo-shift-6 = { + type = "move-to-workspace"; + name = "6"; + }; + logo-shift-7 = { + type = "move-to-workspace"; + name = "7"; + }; + logo-shift-8 = { + type = "move-to-workspace"; + name = "8"; + }; + logo-shift-9 = { + type = "move-to-workspace"; + name = "9"; + }; + logo-shift-0 = { + type = "move-to-workspace"; + name = "10"; + }; + }; + }; + }; + home.packages = with pkgs; [ + jay + (ifLaptop brightnessctl) + nautilus + helvum + loupe + papers + junction + celluloid + mission-center + dconf + libnotify + playerctl + wdisplays + pwvucontrol + wl-clipboard-rs + libqalculate + ]; + + # gtk = { + # enable = true; + # iconTheme = { + # name = + # if config.stylix.polarity == "dark" + # then "Papirus-Dark" + # else "Papirus-Light"; + # package = + # if osConfig.module.stylix.theme == "nord" + # then pkgs.papirus-nord + # else pkgs.papirus-icon-theme; + # }; + # }; + qt = { + enable = true; + platformTheme.name = "gtk3"; + }; + # dconf.settings = { + # "org/gnome/desktop/interface" = { + # icon-theme = config.gtk.iconTheme.name; + # }; + # }; + xdg = { + mime.enable = true; + mimeApps = { + enable = true; + defaultApplications = let + file_manager = ["org.gnome.Nautilus.desktop"]; + image_viewer = ["org.gnome.Loupe.desktop"]; + pdf_reader = ["org.gnome.Papers.desktop"]; + video_player = ["io.github.celluloid_player.Celluloid.desktop"]; + web_browser = ["re.sonny.Junction.desktop"]; + in { + "application/pdf" = pdf_reader; + "image/jpeg" = image_viewer; + "image/png" = image_viewer; + "inode/directory" = file_manager; + "text/html" = web_browser; + "video/mp4" = video_player; + "video/mpeg" = video_player; + "video/x-matroska" = video_player; + "video/x-mpeg" = video_player; + "x-scheme-handler/about" = web_browser; + "x-scheme-handler/http" = web_browser; + "x-scheme-handler/https" = web_browser; + "x-scheme-handler/unknown" = web_browser; + }; + }; + }; + systemd.user = { + settings.Manager.DefaultEnvironment = { + QT_QPA_PLATFORM = "wayland"; + DISPLAY = ":123"; + }; + targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie + services = let + mkGraphicalService = config: graphicalService // config; + graphicalService = { + Install.WantedBy = ["niri.service"]; + Unit = { + Requisite = ["graphical-session.target"]; + PartOf = ["graphical-session.target"]; + After = ["graphical-session.target"]; + }; + Service = { + Restart = "on-failure"; + TimeoutStopSec = 10; + RestartSec = 1; + }; + }; + in { + udiskie = mkGraphicalService {}; + waybar = mkGraphicalService {}; + network-manager-applet = mkGraphicalService {}; + copyq = mkGraphicalService { + Service = + graphicalService.Service + // { + Environment = mkForce "QT_QPA_PLATFORM=wayland"; + }; + }; + xwayland-satellite = mkGraphicalService { + Service = + graphicalService.Service + // { + Type = "simple"; + ExecStart = getExe pkgs.xwayland-satellite + " :123"; + }; + }; + wpaperd = mkGraphicalService { + Service = + mkDefault graphicalService.Service; + }; + gnome-polkit-agent = mkGraphicalService { + Service = + graphicalService.Service + // { + Type = "simple"; + ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1"; + }; + }; + }; + }; + }; +} diff --git a/modules/nixos/desktop/jay.nix b/modules/nixos/desktop/jay.nix new file mode 100644 index 0000000..3a87650 --- /dev/null +++ b/modules/nixos/desktop/jay.nix @@ -0,0 +1,73 @@ +{ + config, + pkgs, + lib, + ... +}: let + inherit (lib) mkIf mkEnableOption getExe; + cfg = config.desktop.niri; +in { + options = { + desktop.niri.enable = + mkEnableOption "enable niri desktop"; + }; + config = mkIf cfg.enable { + sound.pipewire.enable = true; + programs.niri.enable = true; # wayland compositor in rust + environment.systemPackages = with pkgs; [ + brightnessctl + gcr_4 + ]; + fonts.fontDir.enable = true; + security.pam = { + services.greetd.enableGnomeKeyring = true; + services.gtklock = {}; + loginLimits = [ + { + domain = "@users"; + item = "rtprio"; + type = "-"; + value = 1; + } + ]; + }; + services = { + gnome.gnome-keyring.enable = true; + udisks2.enable = true; + dbus = { + apparmor = "enabled"; + implementation = "broker"; + }; + }; + programs = { + dconf.enable = true; + seahorse.enable = true; + }; + xdg.portal = { + enable = true; + extraPortals = with pkgs; [xdg-desktop-portal-gtk]; + config.jay = { + default = ["gtk"]; + "org.freedesktop.impl.portal.ScreenCast" = "jay"; + "org.freedesktop.impl.portal.RemoteDesktop" = "jay"; + "org.freedesktop.impl.portal.Inhibit" = "none"; + "org.freedesktop.impl.portal.FileChooser" = "gtk4"; + "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; + }; + }; + programs.regreet.enable = true; + services.greetd = { + enable = true; + vt = 6; + settings = { + default_session = { + command = "${pkgs.cage}/bin/cage -s -m last -- ${getExe pkgs.greetd.regreet}"; + }; + initial_session = { + user = "user"; + command = "${pkgs.jay}/bin/jay run"; + }; + }; + }; + }; +} diff --git a/packages/aim/default.nix b/packages/aim/default.nix new file mode 100644 index 0000000..92bc403 --- /dev/null +++ b/packages/aim/default.nix @@ -0,0 +1,53 @@ +{pkgs}: let + inherit + (pkgs) + lib + rustPlatform + fetchFromGitHub + pkg-config + openssl + zlib + stdenv + darwin + ; +in + rustPlatform.buildRustPackage rec { + pname = "aim"; + version = "1.8.6"; + + src = fetchFromGitHub { + owner = "mihaigalos"; + repo = "aim"; + rev = version; + hash = "sha256-+oeyaPBsgQ+eNEGx9lRnNKjTSowLd0T+8WUln1UizBA="; + }; + + cargoHash = "sha256-LeFhaXtzCSujlVuqaIiXYL2TlhlpgqsN9+fACv9iEmY="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = + [ + openssl + zlib + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + darwin.apple_sdk.frameworks.SystemConfiguration + ]; + + env = { + OPENSSL_NO_VENDOR = true; + }; + + meta = { + description = "A command line download/upload tool with resume"; + homepage = "https://github.com/mihaigalos/aim"; + changelog = "https://github.com/mihaigalos/aim/blob/${src.rev}/CHANGELOG.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; []; + mainProgram = "aim"; + }; + } diff --git a/packages/bt/default.nix b/packages/bt/default.nix new file mode 100644 index 0000000..610c699 --- /dev/null +++ b/packages/bt/default.nix @@ -0,0 +1,26 @@ +{pkgs}: let + inherit (pkgs) lib buildGoModule fetchFromGitHub; +in + buildGoModule rec { + pname = "bt"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "LeperGnome"; + repo = "bt"; + rev = "v${version}"; + hash = "sha256-q6vi9dxKWz+mCqRQ11BA/rjXGEOGcHIsmsQSuyWtaLk="; + }; + + vendorHash = "sha256-nBswqk3XAPvjW1qRMHq1waqXLKwXYXVXFpGcByqSS2k="; + + ldflags = ["-s" "-w"]; + + meta = { + description = "Interactive tree-like terminal file manager"; + homepage = "https://github.com/LeperGnome/bt"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; []; + mainProgram = "bt"; + }; + } diff --git a/packages/pillager/default.nix b/packages/pillager/default.nix new file mode 100644 index 0000000..3605256 --- /dev/null +++ b/packages/pillager/default.nix @@ -0,0 +1,33 @@ +{pkgs}: let + inherit (pkgs) lib buildGoModule fetchFromGitHub; +in + buildGoModule rec { + pname = "pillager"; + version = "0.11.6"; + + src = fetchFromGitHub { + owner = "brittonhayes"; + repo = "pillager"; + rev = "v${version}"; + hash = "sha256-GHjAm6x96m79pnberfYKiUujnlahsVqNixY4I9R7AOc="; + }; + + vendorHash = "sha256-uNPNUsD1hEvHKGb5EyEjDanc21ro6dm68ecdyG/+hlk="; + + ldflags = [ + "-s" + "-w" + "-X=github.com/brittonhayes/pillager/internal/commands/version.version=${version}" + "-X=main.commit=${src.rev}" + "-X=main.date=1970-01-01T00:00:00Z" + "-X=main.builtBy=goreleaser" + ]; + + meta = { + description = "Pillage filesystems for sensitive information with Go"; + homepage = "https://github.com/brittonhayes/pillager"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; []; + mainProgram = "pillager"; + }; + } diff --git a/packages/wl-tray-bridge/default.nix b/packages/wl-tray-bridge/default.nix new file mode 100644 index 0000000..cca45b7 --- /dev/null +++ b/packages/wl-tray-bridge/default.nix @@ -0,0 +1,44 @@ +{pkgs}: let + inherit + (pkgs) + lib + rustPlatform + fetchFromGitHub + pkg-config + cairo + glib + pango + wayland + ; +in + rustPlatform.buildRustPackage rec { + pname = "wl-tray-bridge"; + version = "unstable-2024-10-24"; + + src = fetchFromGitHub { + owner = "mahkoh"; + repo = "wl-tray-bridge"; + rev = "5ea5bbddcf1dbb2ab4836b00b300803c928469c5"; + hash = "sha256-ewoHopL9/hgErshUWZBZ4H6MKt7iQD7x+4MebNzDdXQ="; + }; + + cargoHash = "sha256-yvuHE3LdFUSZkcBZH3zangFUfCZNAlkDeW8qFyU/LgU="; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + cairo + glib + pango + wayland + ]; + + meta = { + description = ""; + homepage = "https://github.com/mahkoh/wl-tray-bridge"; + license = lib.licenses.gpl3Only; + mainProgram = "wl-tray-bridge"; + }; + } From 9a023a501d765b79378747496e12d85c58e0655c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 21 May 2025 23:21:57 +0300 Subject: [PATCH 002/138] hosts/dunamis: switch theme Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 3f61fd4..9446e9e 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -31,7 +31,7 @@ }; stylix = { enable = true; - theme = "rose-pine-dawn"; + theme = "rose-pine-moon"; }; }; From 1750bd1727324237a102332498bd9a947fc07432 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 14 May 2025 09:40:36 +0300 Subject: [PATCH 003/138] editor/zed: add fsharp Signed-off-by: unexplrd --- modules/home/programs/editor/zed.nix | 48 +++++++++++++++++++--------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/modules/home/programs/editor/zed.nix b/modules/home/programs/editor/zed.nix index 9023b86..42b380a 100644 --- a/modules/home/programs/editor/zed.nix +++ b/modules/home/programs/editor/zed.nix @@ -16,7 +16,8 @@ in { enable = true; extensions = [ "nix" - "latex" + "fsharp" + # "latex" "typst" "justfile" ]; @@ -24,9 +25,14 @@ in { vim_mode = true; ui_font_size = mkForce 16; buffer_font_size = mkForce 16; - features = {inline_completion_provider = "none";}; + # features = {inline_completion_provider = "none";}; auto_update = false; languages = { + "FSharp" = { + language-servers = [ + "fsautocomplete" + ]; + }; "Nix" = { language-servers = [ "!nil" @@ -67,6 +73,18 @@ in { }; }; lsp = { + fsautocomplete = { + binary = { + path = getExe pkgs.fsautocomplete; + }; + settings = { + AutomaticWorkspaceInit = true; + FSharp.ExternalAutocomplete = true; + FSharp.linting.fsharplint.enabled = true; + FSharp.linting.fsharplint.configFile = "fsharplint.json"; + FSharp.formatting.fantomas.enabled = true; + }; + }; clangd = { binary = { arguments = []; @@ -92,19 +110,19 @@ in { }; initialization_options.formatting.command = [(getExe pkgs.alejandra)]; }; - nil = { - binary = { - arguments = []; - path = getExe pkgs.nil; - }; - initialization_options.formatting.command = [(getExe pkgs.alejandra)]; - }; - texlab = { - binary = { - arguments = []; - path = getExe pkgs.texlab; - }; - }; + # nil = { + # binary = { + # arguments = []; + # path = getExe pkgs.nil; + # }; + # initialization_options.formatting.command = [(getExe pkgs.alejandra)]; + # }; + # texlab = { + # binary = { + # arguments = []; + # path = getExe pkgs.texlab; + # }; + # }; tinymist = { binary = { arguments = []; From 16eb2763f7f751782c53632cc0fc15868fcb1226 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 21 May 2025 23:21:57 +0300 Subject: [PATCH 004/138] user/programs.nix: new programs Signed-off-by: unexplrd --- hosts/dunamis/users/user/programs.nix | 2 ++ modules/home/programs/editor/helix.nix | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index 9e7cca7..c10c11f 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -49,6 +49,7 @@ nix-your-shell.enable = true; pay-respects.enable = true; # thefuck in rust ripgrep.enable = true; # grep in rust + zk.enable = true; zoxide.enable = true; # fuzzy cd in rust }; @@ -72,6 +73,7 @@ procs # ps in rust rbw # bitwarden cli in rust sd # sed in rust + systemctl-tui # systemctl tui in rust trashy # trash cli in rust ] ++ [ diff --git a/modules/home/programs/editor/helix.nix b/modules/home/programs/editor/helix.nix index 9d39776..1e8702c 100644 --- a/modules/home/programs/editor/helix.nix +++ b/modules/home/programs/editor/helix.nix @@ -63,7 +63,7 @@ in { languages = { language-server = { clangd.command = "${pkgs.clang-tools}/bin/clangd"; - markdown-oxide.command = getExe pkgs.markdown-oxide; + # markdown-oxide.command = getExe pkgs.markdown-oxide; # nil.command = getExe pkgs.nil; nixd.command = getExe pkgs.nixd; # pyright.command = getExe pkgs.pyright; @@ -73,6 +73,10 @@ in { # rust-analyzer.command = getExe pkgs.rust-analyzer; # texlab.command = getExe pkgs.texlab; tinymist.command = getExe pkgs.tinymist; + zk = { + command = getExe pkgs.zk; + args = ["lsp"]; + }; fsac.command = getExe pkgs.fsautocomplete; fsac.config = { # editor.formatOnSave = true; @@ -106,7 +110,7 @@ in { name = "markdown"; # auto-format = true; # formatter.command = "${pkgs.comrak}/bin/comrak"; - language-servers = ["markdown-oxide"]; + language-servers = ["zk" "markdown-oxide"]; } { name = "c"; From bba75da88eb610bab51f70218b3dda185b662a52 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 21 May 2025 23:21:57 +0300 Subject: [PATCH 005/138] config/security: new sysctls Signed-off-by: unexplrd --- modules/nixos/config/security/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/nixos/config/security/default.nix b/modules/nixos/config/security/default.nix index 7253e22..559f12b 100644 --- a/modules/nixos/config/security/default.nix +++ b/modules/nixos/config/security/default.nix @@ -50,6 +50,24 @@ in { #}; }; + boot.kernel.sysctl = { + "dev.tty.ldisc_autoload" = 0; + "fs.protected_fifos" = 2; + "fs.protected_regular" = 2; + "fs.suid_dumpable" = 0; + "kernel.kptr_restrict" = 2; + # "kernel.modules_disabled" = 1; + "kernel.sysrq" = 0; + "kernel.unprivileged_bpf_disabled" = 1; + "net.ipv4.conf.all.forwarding" = 0; + "net.ipv4.conf.all.log_martians" = 1; + "net.ipv4.conf.all.rp_filter" = 1; + "net.ipv4.conf.all.send_redirects" = 0; + "net.ipv4.conf.default.accept_redirects" = 0; + "net.ipv4.conf.default.log_martians" = 1; + "net.ipv6.conf.all.accept_redirects" = 0; + "net.ipv6.conf.default.accept_redirects" = 0; + }; boot.kernelParams = [ "amd_iommu=force_isolation" "debugfs=off" From 7833fad95d89cd88f8fbf2463e3f5ef512fc09ec Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 21 May 2025 23:21:57 +0300 Subject: [PATCH 006/138] hosts: bump system.stateVersion flake.lock: bump Signed-off-by: unexplrd --- flake.lock | 102 ++++++++++++++++---------------- hosts/dunamis/configuration.nix | 2 +- hosts/eldrid/configuration.nix | 2 +- hosts/legion/configuration.nix | 2 +- hosts/sarien/configuration.nix | 2 +- 5 files changed, 55 insertions(+), 55 deletions(-) diff --git a/flake.lock b/flake.lock index bbb5ecc..d18c245 100644 --- a/flake.lock +++ b/flake.lock @@ -132,11 +132,11 @@ ] }, "locked": { - "lastModified": 1747157759, - "narHash": "sha256-8qQqCX80Xumu/x0fbOkzmveNAJXOAelf/K3hOSBpOh0=", + "lastModified": 1747823570, + "narHash": "sha256-aYDO6La5fuG5xzVYBFfoheWukwggcyh3LlfI0p+RnHw=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "ba96c160ca011c9407c554237a2451fe623cf3fc", + "rev": "2ab29fd77896a69a77bb98fd792fb6102f44b449", "type": "github" }, "original": { @@ -191,11 +191,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1747118403, - "narHash": "sha256-6LDKrSTxPmh9c1f79ixqIwg6mlXE2FKwi11x9GNPKhA=", + "lastModified": 1747392669, + "narHash": "sha256-zky3+lndxKRu98PAwVK8kXPdg+Q1NVAhaI7YGrboKYA=", "owner": "nix-community", "repo": "fenix", - "rev": "01daa5be6a29caab8b6831b0e936750ea66d463d", + "rev": "c3c27e603b0d9b5aac8a16236586696338856fbb", "type": "github" }, "original": { @@ -494,11 +494,11 @@ ] }, "locked": { - "lastModified": 1747147271, - "narHash": "sha256-ORthkM8I3GpWDK/pjOSXPuxWjLJV2AwWERKQCsjPPAk=", + "lastModified": 1747565775, + "narHash": "sha256-B6jmKHUEX1jxxcdoYHl7RVaeohtAVup8o3nuVkzkloA=", "owner": "nix-community", "repo": "home-manager", - "rev": "df556f2a17b7b94148d0275c1a57fed20e62ad18", + "rev": "97118a310eb8e13bc1b9b12d67267e55b7bee6c8", "type": "github" }, "original": { @@ -514,11 +514,11 @@ ] }, "locked": { - "lastModified": 1747279714, - "narHash": "sha256-UdxlE8yyrKiGq3bgGyJ78AdFwh+fuRAruKtyFY5Zq5I=", + "lastModified": 1747793476, + "narHash": "sha256-2qAOSixSrbb9l6MI+SI4zGineOzDcc2dgOOFK9Dx+IY=", "owner": "nix-community", "repo": "home-manager", - "rev": "954615c510c9faa3ee7fb6607ff72e55905e69f2", + "rev": "2468b2d35512d093aeb04972a1d8c20a0735793f", "type": "github" }, "original": { @@ -624,11 +624,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1747247479, - "narHash": "sha256-y+S9IsF+VbGPvSh/Xr/Qbz1/xGtpsU4DbEE+PnvKg8I=", + "lastModified": 1747610850, + "narHash": "sha256-b41pc9J8b9fxRFHBQRKoTXZHpAsKW5eJbNsTMris2Mo=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "75f2cb5f6559ca6ca7c6300b270e5ddc3fdabe31", + "rev": "eb3b38d40baca5c05ddbc1507b3d3f02a0ccb164", "type": "github" }, "original": { @@ -873,11 +873,11 @@ ] }, "locked": { - "lastModified": 1747109298, - "narHash": "sha256-v6P2Lm2ucRhFpVdY2feQKxJIGfaud3CVHV5GWoCNji8=", + "lastModified": 1747466853, + "narHash": "sha256-/evYltwuF8Kz1odgocWnguh/8VQV1i76VB4yMTU9m7k=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "7ceb01d01e02fa55699db1ecb99df1295b47b499", + "rev": "0ba1a34fa6d995fe433109f0ad66de8d5613d46e", "type": "github" }, "original": { @@ -973,11 +973,11 @@ ] }, "locked": { - "lastModified": 1746934494, - "narHash": "sha256-3n6i+F0sDASjkhbvgFDpPDZGp7z19IrRtjfF9TwJpCA=", + "lastModified": 1747540584, + "narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "e9b21b01e4307176b9718a29ac514838e7f6f4ff", + "rev": "ec179dd13fb7b4c6844f55be91436f7857226dce", "type": "github" }, "original": { @@ -994,11 +994,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1747220948, - "narHash": "sha256-5aNGtHi4mH9ZBB4cFMgRtmuKWH2afNHJHl9RBvt3J3E=", + "lastModified": 1747826251, + "narHash": "sha256-Fe4AXmnnAKnh/wIe1ao4Pv/8m6WGA1ujwp6VApgos30=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "b9afbbf3055d46ec2983ce0cc0d59c544fdb746d", + "rev": "9a67b4a289cd8994080398d40b57cfde8e8cfb0a", "type": "github" }, "original": { @@ -1024,11 +1024,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1746904237, - "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -1056,11 +1056,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1746957726, - "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", + "lastModified": 1747676747, + "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", "type": "github" }, "original": { @@ -1072,11 +1072,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1746957726, - "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", + "lastModified": 1747676747, + "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", + "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", "type": "github" }, "original": { @@ -1088,11 +1088,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1747179050, - "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=", + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", "type": "github" }, "original": { @@ -1151,11 +1151,11 @@ ] }, "locked": { - "lastModified": 1746537231, - "narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", + "lastModified": 1747372754, + "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", + "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", "type": "github" }, "original": { @@ -1215,11 +1215,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1746889290, - "narHash": "sha256-h3LQYZgyv2l3U7r+mcsrEOGRldaK0zJFwAAva4hV/6g=", + "lastModified": 1747323949, + "narHash": "sha256-G4NwzhODScKnXqt2mEQtDFOnI0wU3L1WxsiHX3cID/0=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "2bafe9d96c6734aacfd49e115f6cf61e7adc68bc", + "rev": "f8e784353bde7cbf9a9046285c1caf41ac484ebe", "type": "github" }, "original": { @@ -1258,11 +1258,11 @@ ] }, "locked": { - "lastModified": 1747190175, - "narHash": "sha256-s33mQ2s5L/2nyllhRTywgECNZyCqyF4MJeM3vG/GaRo=", + "lastModified": 1747795013, + "narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "58160be7abad81f6f8cb53120d5b88c16e01c06d", + "rev": "6b1cf12374361859242a562e1933a7930649131a", "type": "github" }, "original": { @@ -1278,11 +1278,11 @@ ] }, "locked": { - "lastModified": 1746485181, - "narHash": "sha256-PxrrSFLaC7YuItShxmYbMgSuFFuwxBB+qsl9BZUnRvg=", + "lastModified": 1747603214, + "narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", "owner": "mic92", "repo": "sops-nix", - "rev": "e93ee1d900ad264d65e9701a5c6f895683433386", + "rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", "type": "github" }, "original": { @@ -1514,11 +1514,11 @@ "systems": "systems_5" }, "locked": { - "lastModified": 1746253489, - "narHash": "sha256-Lsegrsus7oZLLglhjYDUWKSh544Rylkc9y2GBnsD4TE=", + "lastModified": 1747746261, + "narHash": "sha256-qZ9AwEiAB2GkSLBR23NUVi35TWhcy7lTFEdGHXLAr94=", "owner": "abenz1267", "repo": "walker", - "rev": "65fd786cf25c207efe0b5f2963d4cb5b2125bc22", + "rev": "0fed5e4af1530ede04da6d18e0d3bd423f7caceb", "type": "github" }, "original": { diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 9446e9e..9e467fc 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -18,7 +18,7 @@ }; environment.memoryAllocator.provider = "mimalloc"; - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; desktop.niri.enable = true; diff --git a/hosts/eldrid/configuration.nix b/hosts/eldrid/configuration.nix index 0c325cb..184db39 100644 --- a/hosts/eldrid/configuration.nix +++ b/hosts/eldrid/configuration.nix @@ -14,7 +14,7 @@ }; environment.memoryAllocator.provider = "mimalloc"; - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; desktop.plasma.enable = true; diff --git a/hosts/legion/configuration.nix b/hosts/legion/configuration.nix index e0461f7..e568e7f 100644 --- a/hosts/legion/configuration.nix +++ b/hosts/legion/configuration.nix @@ -17,7 +17,7 @@ }; environment.memoryAllocator.provider = "mimalloc"; - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; desktop.niri.enable = true; diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index 00bd94b..eb8d03c 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -16,7 +16,7 @@ boot.loader.systemd-boot.enable = true; environment.memoryAllocator.provider = "mimalloc"; - system.stateVersion = "25.05"; + system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; desktop.niri.enable = true; From 98f454121d141e2172efe93b330ccb57b2b8e57e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 21 May 2025 23:21:57 +0300 Subject: [PATCH 007/138] config/nix: fix Signed-off-by: unexplrd --- modules/nixos/config/nix/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nixos/config/nix/common.nix b/modules/nixos/config/nix/common.nix index 78a2c60..8efde17 100644 --- a/modules/nixos/config/nix/common.nix +++ b/modules/nixos/config/nix/common.nix @@ -19,7 +19,7 @@ "fetch-closure" # Allow derivation builders to call Nix, and thus build derivations recursively. - "recursive-nix" + # "recursive-nix" # Allow the use of the impure-env setting. # "configurable-impure-env" From cb8f94df1a2a06713dd30ddd8bcf5318898fa8cd Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 21 May 2025 23:21:57 +0300 Subject: [PATCH 008/138] desktop/niri: switch polkit-gnome to soteria, update layout, keybinds Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 16 +++++----- modules/home/desktop/niri/niri.nix | 42 ++++++++++++++++++--------- modules/nixos/desktop/niri.nix | 1 + 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index d1abcfe..782561a 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -161,14 +161,14 @@ in { Service = mkDefault graphicalService.Service; }; - gnome-polkit-agent = mkGraphicalService { - Service = - graphicalService.Service - // { - Type = "simple"; - ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1"; - }; - }; + # gnome-polkit-agent = mkGraphicalService { + # Service = + # graphicalService.Service + # // { + # Type = "simple"; + # ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1"; + # }; + # }; }; }; }; diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 76ccef8..a053616 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -104,15 +104,11 @@ in { keyboard { xkb { layout "us,ua" - ${ - if (hostName == "dunamis" || hostName == "legion") - then "// variant \"colemak_dh_ortho,\"" - else "variant \"colemak_dh_ortho,\"" - } - } - repeat-delay 200 - repeat-rate 50 - track-layout "global" + variant "colemak_dh_ortho," + } + repeat-delay 200 + repeat-rate 50 + track-layout "global" } touchpad { // off @@ -174,6 +170,7 @@ in { proportion 0.66667 } + background-color "transparent" // default-column-width { proportion 0.9; } default-column-width { proportion 0.5; } tab-indicator { @@ -227,6 +224,20 @@ in { } } + // Make the wallpaper stationary, rather than moving with workspaces. + layer-rule { + // This is for swaybg; change for other wallpaper tools. + // Find the right namespace by running niri msg layers. + match namespace="^wallpaper$" + place-within-backdrop true + } + + // Optionally, disable the workspace shadows in the overview. + overview { + workspace-shadow { + off + } + } screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png" animations { @@ -284,6 +295,8 @@ in { Mod+Ctrl+M { fullscreen-window; } Mod+Ctrl+G { toggle-window-floating; } + Mod+Ctrl+Shift+M { toggle-windowed-fullscreen; } + Mod+Minus { set-column-width "-10%"; } Mod+Equal { set-column-width "+10%"; } Mod+Comma { set-column-width "-10%"; } @@ -291,12 +304,15 @@ in { Mod+Shift+Comma { set-window-height "-10%"; } Mod+Shift+Period { set-window-height "+10%"; } - Mod+Escape { switch-layout "next"; } + Mod+Space { switch-layout "next"; } + + Mod+Ctrl+Space repeat=false { toggle-overview; } Mod+Return repeat=false { spawn "sh" "-c" "$TERMINAL"; } - Mod+Space repeat=false { spawn "${launcher}"; } - Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; } - Mod+Ctrl+V repeat=false { spawn "copyq" "toggle"; } + Mod+BackSpace repeat=false { spawn "${launcher}"; } + Mod+A repeat=false { spawn "${launcher}"; } + Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; } + Mod+Ctrl+V repeat=false { spawn "copyq" "toggle"; } Mod+Shift+W repeat=false { spawn "walker" "-m" "windows"; } diff --git a/modules/nixos/desktop/niri.nix b/modules/nixos/desktop/niri.nix index 3f08848..fe0fe9f 100644 --- a/modules/nixos/desktop/niri.nix +++ b/modules/nixos/desktop/niri.nix @@ -19,6 +19,7 @@ in { gcr_4 ]; fonts.fontDir.enable = true; + security.soteria.enable = true; security.pam = { services.greetd.enableGnomeKeyring = true; services.gtklock = {}; From 62785bb2d81c3a00b5939bb9b189a78d666999a4 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 22 May 2025 09:41:17 +0300 Subject: [PATCH 009/138] README.md: update Signed-off-by: unexplrd --- README.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f43a25c..8cc4a9c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ -

So what is this?

-

This is a personal config based on Blueprint, and it's pretty usable. If one wants to use it, they have to change and adapt it for their own use case, for that please visit the original repo, as it contains the necessary documentation.

-

TODOs:

-
    -
  • i'll put that in when i recall what i wanted to add
  • -
+# NixOS Configuration +## So what is this? + +This is a personal NixOS config based on +[Blueprint](https://github.com/numtide/blueprint). +This repo is mainly used to sync changes between devices. If you want to +use it - it's pretty composable, so modules can be integrated in your +configs without much hassle. + +## Credits +Configurations I took code/ideas from: +- [github:TheMaxMur/NixOS-Configuration](https://github.com/TheMaxMur/NixOS-Configuration) +- [github:nix-community/srvos](https://github.com/nix-community/srvos) +- [github:cloud-gouv/securix](https://github.com/cloud-gouv/securix) +Thx a lot <3 From 617449d442eda9f3e8a4266ce491824cafc0e411 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 22 May 2025 09:56:52 +0300 Subject: [PATCH 010/138] README.md: update Signed-off-by: unexplrd --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8cc4a9c..cc01e78 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,5 @@ Configurations I took code/ideas from: - [github:TheMaxMur/NixOS-Configuration](https://github.com/TheMaxMur/NixOS-Configuration) - [github:nix-community/srvos](https://github.com/nix-community/srvos) - [github:cloud-gouv/securix](https://github.com/cloud-gouv/securix) + Thx a lot <3 From 5be6c47070b3f66d3c0c4ce91addeb31682f430d Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 23 May 2025 14:34:42 +0300 Subject: [PATCH 011/138] refactor modules/desktop Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 6 ++ modules/nixos/desktop/common/default.nix | 16 +++++ .../nixos/desktop/common/gnome-keyring.nix | 25 ++++++++ modules/nixos/desktop/common/greeter.nix | 48 ++++++++++++++ modules/nixos/desktop/common/pam-rtprio.nix | 10 +++ modules/nixos/desktop/cosmic.nix | 19 ++---- modules/nixos/desktop/default.nix | 2 +- modules/nixos/desktop/gnome.nix | 11 +--- modules/nixos/desktop/hyprland.nix | 63 ++++--------------- modules/nixos/desktop/niri.nix | 58 +++-------------- modules/nixos/desktop/plasma.nix | 22 ++----- 11 files changed, 137 insertions(+), 143 deletions(-) create mode 100644 modules/nixos/desktop/common/default.nix create mode 100644 modules/nixos/desktop/common/gnome-keyring.nix create mode 100644 modules/nixos/desktop/common/greeter.nix create mode 100644 modules/nixos/desktop/common/pam-rtprio.nix diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 9e467fc..aa31ea2 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -1,6 +1,7 @@ { config, inputs, + pkgs, ... }: { imports = with inputs; [ @@ -22,6 +23,11 @@ time.timeZone = "Europe/Kyiv"; desktop.niri.enable = true; + # TODO: make a module for autologin + services.greetd.settings.initial_session = { + user = "user"; + command = "${pkgs.niri}/bin/niri-session"; + }; module = { config = { diff --git a/modules/nixos/desktop/common/default.nix b/modules/nixos/desktop/common/default.nix new file mode 100644 index 0000000..00993b4 --- /dev/null +++ b/modules/nixos/desktop/common/default.nix @@ -0,0 +1,16 @@ +{config, ...}: { + imports = [ + ./gnome-keyring.nix + ./greeter.nix + ./pam-rtprio.nix + ./pipewire.nix + ]; + fonts.fontDir.enable = true; + security = { + pam = { + services.greetd.enableGnomeKeyring = config.services.greetd.enable && config.services.gnome.gnome-keyring.enable; + }; + }; + services.udisks2.enable = true; + programs.dconf.enable = true; +} diff --git a/modules/nixos/desktop/common/gnome-keyring.nix b/modules/nixos/desktop/common/gnome-keyring.nix new file mode 100644 index 0000000..246b9c7 --- /dev/null +++ b/modules/nixos/desktop/common/gnome-keyring.nix @@ -0,0 +1,25 @@ +{ + lib, + pkgs, + config, + ... +}: let + inherit (lib) mkEnableOption mkIf; + cfg = config.module.desktop.gnome-keyring; +in { + options = { + module.desktop.gnome-keyring.enable = mkEnableOption "enable gnome keyring"; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + gcr_4 + libsecret + ]; + # programs.seahorse.enable = true; + services.gnome.gnome-keyring.enable = true; + xdg.portal.config.common = { + "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; + }; + }; +} diff --git a/modules/nixos/desktop/common/greeter.nix b/modules/nixos/desktop/common/greeter.nix new file mode 100644 index 0000000..0e18ef9 --- /dev/null +++ b/modules/nixos/desktop/common/greeter.nix @@ -0,0 +1,48 @@ +{ + lib, + pkgs, + config, + ... +}: let + inherit (lib) mkOption mkIf getExe types mkMerge; + cfg = config.module.desktop; +in { + options = { + module.desktop.displayManager = mkOption { + default = "greetd"; + type = types.enum [ + "cosmic" + "gdm" + "greetd" + "sddm" + ]; + }; + }; + + config = mkMerge [ + (mkIf (cfg.displayManager == "cosmic") { + services.displayManager.cosmic-greeter.enable = true; + }) + (mkIf (cfg.displayManager == "gdm") { + services.xserver.displayManager.gdm.enable = true; + }) + (mkIf (cfg.displayManager == "greetd") { + programs.regreet.enable = true; + services.greetd = { + enable = true; + vt = 1; + settings = { + default_session = { + command = "${getExe pkgs.cage} -s -m last -- ${getExe pkgs.greetd.regreet}"; + }; + }; + }; + }) + (mkIf (cfg.displayManager == "sddm") { + services.displayManager.sddm = { + enable = true; + wayland.enable = true; + }; + }) + ]; +} diff --git a/modules/nixos/desktop/common/pam-rtprio.nix b/modules/nixos/desktop/common/pam-rtprio.nix new file mode 100644 index 0000000..9d91437 --- /dev/null +++ b/modules/nixos/desktop/common/pam-rtprio.nix @@ -0,0 +1,10 @@ +{ + security.pam.loginLimits = [ + { + domain = "@users"; + item = "rtprio"; + type = "-"; + value = -1; + } + ]; +} diff --git a/modules/nixos/desktop/cosmic.nix b/modules/nixos/desktop/cosmic.nix index aff4f9b..dae4da9 100644 --- a/modules/nixos/desktop/cosmic.nix +++ b/modules/nixos/desktop/cosmic.nix @@ -16,17 +16,11 @@ in { mkEnableOption "enable cosmic desktop"; }; config = mkIf cfg.enable { - environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1; + module.desktop.displayManager = "cosmic"; sound.pipewire.enable = true; - services = { - desktopManager.cosmic.enable = true; - displayManager.cosmic-greeter.enable = true; - gnome.gnome-keyring.enable = true; - dbus = { - apparmor = "enabled"; - implementation = "broker"; - }; - }; + + environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1; + services.desktopManager.cosmic.enable = true; systemd = { packages = [pkgs.observatory]; services.monitord.wantedBy = ["multi-user.target"]; @@ -37,10 +31,7 @@ in { xdg-desktop-portal-cosmic xdg-desktop-portal-gtk ]; - config.cosmic = { - default = ["cosmic" "gtk"]; - "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; - }; + config.cosmic.default = ["cosmic" "gtk"]; }; }; } diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index 3140e4a..ca85196 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,6 +1,6 @@ { imports = [ - ./common/pipewire.nix + ./common ./cosmic.nix ./gnome.nix ./hyprland.nix diff --git a/modules/nixos/desktop/gnome.nix b/modules/nixos/desktop/gnome.nix index 7aec45b..794ea0c 100644 --- a/modules/nixos/desktop/gnome.nix +++ b/modules/nixos/desktop/gnome.nix @@ -11,19 +11,12 @@ in { mkEnableOption "enable gnome desktop"; }; config = mkIf cfg.enable { + module.desktop.displayManager = "gdm"; sound.pipewire.enable = true; + services.xserver = { enable = true; - displayManager.gdm.enable = true; desktopManager.gnome.enable = true; }; - programs.dconf.enable = true; - programs.seahorse.enable = true; - services.gnome.gnome-keyring.enable = true; - services.udisks2.enable = true; - services.dbus = { - apparmor = "enabled"; - implementation = "broker"; - }; }; } diff --git a/modules/nixos/desktop/hyprland.nix b/modules/nixos/desktop/hyprland.nix index 8325dc9..9d702db 100644 --- a/modules/nixos/desktop/hyprland.nix +++ b/modules/nixos/desktop/hyprland.nix @@ -4,8 +4,9 @@ pkgs, lib, ... -}: -with lib; let +}: let + inherit (lib) mkEnableOption mkIf; + inherit (perSystem) hyprland; cfg = config.desktop.hyprland; in { options = { @@ -13,65 +14,23 @@ in { mkEnableOption "enable hyprland desktop"; }; config = mkIf cfg.enable { + module.desktop.displayManager = "greetd"; + module.desktop.gnome-keyring.enable = true; sound.pipewire.enable = true; + programs.hyprland = { enable = true; - package = perSystem.hyprland.hyprland; - portalPackage = perSystem.hyprland.xdg-desktop-portal-hyprland; - }; - environment.systemPackages = with pkgs; [ - brightnessctl - gcr_4 - ]; - fonts.fontDir.enable = true; - security.pam = { - services.hyprlock = {}; - loginLimits = [ - { - domain = "@users"; - item = "rtprio"; - type = "-"; - value = 1; - } - ]; - }; - services = { - gnome.gnome-keyring.enable = true; - udisks2.enable = true; - dbus = { - apparmor = "enabled"; - implementation = "broker"; - }; - }; - programs = { - dconf.enable = true; - seahorse.enable = true; + package = hyprland.hyprland; + portalPackage = hyprland.xdg-desktop-portal-hyprland; }; + security.pam.services.hyprlock = {}; xdg.portal = { enable = true; extraPortals = [ - perSystem.hyprland.xdg-desktop-portal-hyprland + hyprland.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ]; - config.common.default = [ - "hyprland" - "gtk" - ]; - }; - - programs.regreet.enable = true; - services.greetd = { - enable = true; - vt = 6; - settings = { - default_session = { - command = "${pkgs.cage}/bin/cage -s -m last -- ${pkgs.greetd.regreet}/bin/regreet"; - }; - initial_session = { - user = "user"; - command = "Hyprland"; - }; - }; + config.hyprland.default = ["hyprland" "gtk"]; }; }; } diff --git a/modules/nixos/desktop/niri.nix b/modules/nixos/desktop/niri.nix index fe0fe9f..0820def 100644 --- a/modules/nixos/desktop/niri.nix +++ b/modules/nixos/desktop/niri.nix @@ -4,7 +4,7 @@ lib, ... }: let - inherit (lib) mkIf mkEnableOption getExe; + inherit (lib) mkIf mkEnableOption; cfg = config.desktop.niri; in { options = { @@ -12,62 +12,22 @@ in { mkEnableOption "enable niri desktop"; }; config = mkIf cfg.enable { + module.desktop.displayManager = "greetd"; + module.desktop.gnome-keyring.enable = true; sound.pipewire.enable = true; + + security = { + soteria.enable = true; # polkit agent in rust + pam.services.gtklock = {}; + }; programs.niri.enable = true; # wayland compositor in rust - environment.systemPackages = with pkgs; [ - brightnessctl - gcr_4 - ]; - fonts.fontDir.enable = true; - security.soteria.enable = true; - security.pam = { - services.greetd.enableGnomeKeyring = true; - services.gtklock = {}; - loginLimits = [ - { - domain = "@users"; - item = "rtprio"; - type = "-"; - value = 1; - } - ]; - }; - services = { - gnome.gnome-keyring.enable = true; - udisks2.enable = true; - dbus = { - apparmor = "enabled"; - implementation = "broker"; - }; - }; - programs = { - dconf.enable = true; - seahorse.enable = true; - }; xdg.portal = { enable = true; extraPortals = with pkgs; [ xdg-desktop-portal-gnome xdg-desktop-portal-gtk ]; - config.niri = { - default = ["gnome" "gtk"]; - "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; - }; - }; - programs.regreet.enable = true; - services.greetd = { - enable = true; - vt = 6; - settings = { - default_session = { - command = "${pkgs.cage}/bin/cage -s -m last -- ${getExe pkgs.greetd.regreet}"; - }; - initial_session = { - user = "user"; - command = "${pkgs.niri}/bin/niri-session"; - }; - }; + config.niri.default = ["gnome" "gtk"]; }; }; } diff --git a/modules/nixos/desktop/plasma.nix b/modules/nixos/desktop/plasma.nix index 2f222fe..9cc28bb 100644 --- a/modules/nixos/desktop/plasma.nix +++ b/modules/nixos/desktop/plasma.nix @@ -13,27 +13,13 @@ in { options = { desktop.plasma = { enable = mkEnableOption "enable plasma desktop"; - # sddmEnable = mkEnableOption "enable simple display manager"; }; }; config = mkIf cfg.enable { - stylix.targets.qt.enable = mkDefault false; - environment.systemPackages = with pkgs; [gcr_4]; - services = { - gnome.gnome-keyring.enable = true; - desktopManager.plasma6.enable = true; - displayManager.sddm = { - enable = true; # cfg.sddmEnable; - wayland.enable = true; - }; - }; - fonts.fontDir.enable = true; + module.desktop.displayManager = "sddm"; + sound.pipewire.enable = true; - xdg.portal = { - enable = true; - config.common = { - "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; - }; - }; + services.desktopManager.plasma6.enable = true; + stylix.targets.qt.enable = mkDefault false; }; } From 31d8cea20f3a33a720193bb5e4d8997e6eda8af4 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 24 May 2025 13:22:24 +0300 Subject: [PATCH 012/138] hosts/sarien: add autologin Signed-off-by: unexplrd --- hosts/sarien/configuration.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index eb8d03c..5e98f38 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -1,4 +1,8 @@ -{inputs, ...}: { +{ + inputs, + pkgs, + ... +}: { imports = with inputs; [ self.nixosModules.desktop self.nixosModules.system @@ -20,6 +24,10 @@ time.timeZone = "Europe/Kyiv"; desktop.niri.enable = true; + services.greetd.settings.initial_session = { + user = "user"; + command = "${pkgs.niri}/bin/niri-session"; + }; module = { config = { From 5e2f12774124467f24e8997cb93ae4eb892e775f Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 24 May 2025 23:03:30 +0300 Subject: [PATCH 013/138] hosts: move additional config to misc/ Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- hosts/dunamis/misc/default.nix | 5 ++++ hosts/dunamis/{ => misc}/minecraft.nix | 0 hosts/eldrid/configuration.nix | 1 + hosts/eldrid/misc/default.nix | 5 ++++ hosts/eldrid/{ => misc}/distributed-build.nix | 0 hosts/legion/configuration.nix | 1 + hosts/legion/misc/default.nix | 5 ++++ .../misc}/distributed-build.nix | 0 hosts/sarien/configuration.nix | 4 +-- hosts/sarien/misc/default.nix | 5 ++++ hosts/sarien/misc/distributed-build.nix | 30 +++++++++++++++++++ 12 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 hosts/dunamis/misc/default.nix rename hosts/dunamis/{ => misc}/minecraft.nix (100%) create mode 100644 hosts/eldrid/misc/default.nix rename hosts/eldrid/{ => misc}/distributed-build.nix (100%) create mode 100644 hosts/legion/misc/default.nix rename hosts/{sarien => legion/misc}/distributed-build.nix (100%) create mode 100644 hosts/sarien/misc/default.nix create mode 100644 hosts/sarien/misc/distributed-build.nix diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index aa31ea2..9860adf 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -9,7 +9,7 @@ self.nixosModules.desktop self.nixosModules.system ./disko - # ./minecraft.nix + ./misc ]; networking = { diff --git a/hosts/dunamis/misc/default.nix b/hosts/dunamis/misc/default.nix new file mode 100644 index 0000000..5ee61c0 --- /dev/null +++ b/hosts/dunamis/misc/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + # ./minecraft.nix + ]; +} diff --git a/hosts/dunamis/minecraft.nix b/hosts/dunamis/misc/minecraft.nix similarity index 100% rename from hosts/dunamis/minecraft.nix rename to hosts/dunamis/misc/minecraft.nix diff --git a/hosts/eldrid/configuration.nix b/hosts/eldrid/configuration.nix index 184db39..e5a3f13 100644 --- a/hosts/eldrid/configuration.nix +++ b/hosts/eldrid/configuration.nix @@ -5,6 +5,7 @@ self.nixosModules.system ./disko ./hardware + ./misc ]; networking = { diff --git a/hosts/eldrid/misc/default.nix b/hosts/eldrid/misc/default.nix new file mode 100644 index 0000000..cc8d3bd --- /dev/null +++ b/hosts/eldrid/misc/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./distributed-build.nix + ]; +} diff --git a/hosts/eldrid/distributed-build.nix b/hosts/eldrid/misc/distributed-build.nix similarity index 100% rename from hosts/eldrid/distributed-build.nix rename to hosts/eldrid/misc/distributed-build.nix diff --git a/hosts/legion/configuration.nix b/hosts/legion/configuration.nix index e568e7f..f2e85f2 100644 --- a/hosts/legion/configuration.nix +++ b/hosts/legion/configuration.nix @@ -9,6 +9,7 @@ self.nixosModules.system ./disko ./hardware + ./misc ]; networking = { diff --git a/hosts/legion/misc/default.nix b/hosts/legion/misc/default.nix new file mode 100644 index 0000000..cc8d3bd --- /dev/null +++ b/hosts/legion/misc/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./distributed-build.nix + ]; +} diff --git a/hosts/sarien/distributed-build.nix b/hosts/legion/misc/distributed-build.nix similarity index 100% rename from hosts/sarien/distributed-build.nix rename to hosts/legion/misc/distributed-build.nix diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index 5e98f38..e9a2bcb 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -9,7 +9,7 @@ self.nixosModules.config ./disko ./hardware - ./distributed-build.nix + ./misc ]; networking = { @@ -38,7 +38,7 @@ }; stylix = { enable = true; - theme = "nord"; + theme = "rose-pine-moon"; }; }; diff --git a/hosts/sarien/misc/default.nix b/hosts/sarien/misc/default.nix new file mode 100644 index 0000000..cc8d3bd --- /dev/null +++ b/hosts/sarien/misc/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./distributed-build.nix + ]; +} diff --git a/hosts/sarien/misc/distributed-build.nix b/hosts/sarien/misc/distributed-build.nix new file mode 100644 index 0000000..b093581 --- /dev/null +++ b/hosts/sarien/misc/distributed-build.nix @@ -0,0 +1,30 @@ +{ + config, + inputs, + ... +}: let + inherit (builtins) readFile; + inherit (config.networking) hostName; + inherit (config.sops) secrets; + inherit (inputs) mysecrets; + pubHost = readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; +in { + nix = { + distributedBuilds = true; + buildMachines = [ + { + hostName = "dunamis"; + publicHostKey = pubHost; + sshKey = secrets."ssh-${hostName}-user".path; + sshUser = "nix-ssh"; + supportedFeatures = [ + "benchmark" + "big-parallel" + "kvm" + "nixos-test" + ]; + system = "x86_64-linux"; + } + ]; + }; +} From dacdc564700da2d70a86a97102fe8d337f285817 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 25 May 2025 15:06:58 +0300 Subject: [PATCH 014/138] desktop/niri: add gnome-text-editor Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 782561a..687ad08 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -6,9 +6,9 @@ lib, ... }: let - inherit (lib.strings) removeSuffix; + # inherit (lib.strings) removeSuffix; inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe; - inherit (osConfig.module.stylix) theme; + # inherit (osConfig.module.stylix) theme; inherit (osConfig.networking) hostName; cfg = config.desktop.niri; ifLaptop = mkIf (hostName != "dunamis"); @@ -69,6 +69,7 @@ in { [ # gui libadwaita apps celluloid # mpv gui in libadwaita + gnome-text-editor helvum # pipewire patchbay in rust junction # app chooser loupe # image viewer and editor in rust From 5d864d2941a8026e7d53b5aae1300c934bf02226 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 25 May 2025 15:06:58 +0300 Subject: [PATCH 015/138] flake.lock: bump Signed-off-by: unexplrd --- flake.lock | 189 +++++++++++++--------------- flake.nix | 3 +- hosts/dunamis/users/user/common.nix | 3 - 3 files changed, 85 insertions(+), 110 deletions(-) diff --git a/flake.lock b/flake.lock index d18c245..f96ffa4 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1745357003, - "narHash": "sha256-jYwzQkv1r7HN/4qrAuKp+NR4YYNp2xDrOX5O9YVqkWo=", + "lastModified": 1747864449, + "narHash": "sha256-PIjVAWghZhr3L0EFM2UObhX84UQxIACbON0IC0zzSKA=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "a19cf76ee1a15c1c12083fa372747ce46387289f", + "rev": "389372c5f4dc1ac0e7645ed29a35fd6d71672ef5", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1732200724, - "narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=", + "lastModified": 1746562888, + "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "153d52373b0fb2d343592871009a286ec8837aec", + "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89", "type": "github" }, "original": { @@ -132,11 +132,11 @@ ] }, "locked": { - "lastModified": 1747823570, - "narHash": "sha256-aYDO6La5fuG5xzVYBFfoheWukwggcyh3LlfI0p+RnHw=", + "lastModified": 1748116304, + "narHash": "sha256-gpO/jh/T/Ygx8ewq0y4LQDKEqvZJ3WiRg3ur8K9KfFg=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "2ab29fd77896a69a77bb98fd792fb6102f44b449", + "rev": "54741d5ed1e944d68ff94fb09ce967269156f65e", "type": "github" }, "original": { @@ -207,11 +207,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1743774811, - "narHash": "sha256-oiHLDHXq7ymsMVYSg92dD1OLnKLQoU/Gf2F1GoONLCE=", + "lastModified": 1744642301, + "narHash": "sha256-5A6LL7T0lttn1vrKsNOKUk9V0ittdW0VEqh6AtefxJ4=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "df53a7a31872faf5ca53dd0730038a62ec63ca9e", + "rev": "59e3de00f01e5adb851d824cf7911bd90c31083a", "type": "github" }, "original": { @@ -308,7 +308,6 @@ "inputs": { "nixpkgs-lib": [ "stylix", - "nur", "nixpkgs" ] }, @@ -340,27 +339,6 @@ "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" } }, - "flake-utils": { - "inputs": { - "systems": [ - "stylix", - "systems" - ] - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "fromYaml": { "flake": false, "locked": { @@ -472,16 +450,16 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1732369855, - "narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=", + "lastModified": 1744584021, + "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "dadd58f630eeea41d645ee225a63f719390829dc", + "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae", "type": "github" }, "original": { "owner": "GNOME", - "ref": "47.2", + "ref": "48.1", "repo": "gnome-shell", "type": "github" } @@ -494,11 +472,11 @@ ] }, "locked": { - "lastModified": 1747565775, - "narHash": "sha256-B6jmKHUEX1jxxcdoYHl7RVaeohtAVup8o3nuVkzkloA=", + "lastModified": 1747978958, + "narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "97118a310eb8e13bc1b9b12d67267e55b7bee6c8", + "rev": "7419250703fd5eb50e99bdfb07a86671939103ea", "type": "github" }, "original": { @@ -514,11 +492,11 @@ ] }, "locked": { - "lastModified": 1747793476, - "narHash": "sha256-2qAOSixSrbb9l6MI+SI4zGineOzDcc2dgOOFK9Dx+IY=", + "lastModified": 1748134483, + "narHash": "sha256-5PBK1nV8X39K3qUj8B477Aa2RdbLq3m7wRxUKRtggX4=", "owner": "nix-community", "repo": "home-manager", - "rev": "2468b2d35512d093aeb04972a1d8c20a0735793f", + "rev": "c1e671036224089937e111e32ea899f59181c383", "type": "github" }, "original": { @@ -535,11 +513,11 @@ ] }, "locked": { - "lastModified": 1744618730, - "narHash": "sha256-n3gN7aHwVRnnBZI64EDoKyJnWidNYJ0xezhqQtdjH2Q=", + "lastModified": 1747763032, + "narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=", "owner": "nix-community", "repo": "home-manager", - "rev": "85dd758c703ffbf9d97f34adcef3a898b54b4014", + "rev": "29dda415f5b2178278283856c6f9f7b48a2a4353", "type": "github" }, "original": { @@ -624,11 +602,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1747610850, - "narHash": "sha256-b41pc9J8b9fxRFHBQRKoTXZHpAsKW5eJbNsTMris2Mo=", + "lastModified": 1748174133, + "narHash": "sha256-dZLdDts/b6ujjrLj62cqwPD+jWM4yuE/aERFWWK9yjs=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "eb3b38d40baca5c05ddbc1507b3d3f02a0ccb164", + "rev": "cc0792c1dce250311a19e92bad204eefae072592", "type": "github" }, "original": { @@ -746,11 +724,11 @@ ] }, "locked": { - "lastModified": 1746655412, - "narHash": "sha256-kVQ0bHVtX6baYxRWWIh4u3LNJZb9Zcm2xBeDPOGz5BY=", + "lastModified": 1747484975, + "narHash": "sha256-+LAQ81HBwG0lwshHlWe0kfWg4KcChIPpnwtnwqmnoEU=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "557241780c179cf7ef224df392f8e67dab6cef83", + "rev": "163c83b3db48a17c113729c220a60b94596c9291", "type": "github" }, "original": { @@ -826,11 +804,11 @@ ] }, "locked": { - "lastModified": 1739870480, - "narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=", + "lastModified": 1747584298, + "narHash": "sha256-PH9qZqWLHvSBQiUnA0NzAyQA3tu2no2z8kz0ZeHWj4w=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b", + "rev": "e511882b9c2e1d7a75d45d8fddd2160daeafcbc3", "type": "github" }, "original": { @@ -873,11 +851,11 @@ ] }, "locked": { - "lastModified": 1747466853, - "narHash": "sha256-/evYltwuF8Kz1odgocWnguh/8VQV1i76VB4yMTU9m7k=", + "lastModified": 1747990026, + "narHash": "sha256-sG5VbID+x5+xUC+jjgHibnzg8IllVcH+K2TLmYHLPME=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "0ba1a34fa6d995fe433109f0ad66de8d5613d46e", + "rev": "e2f4ced874406541a7957f7e2b8f05a0d59a0f00", "type": "github" }, "original": { @@ -973,11 +951,11 @@ ] }, "locked": { - "lastModified": 1747540584, - "narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=", + "lastModified": 1748145500, + "narHash": "sha256-t9fx0l61WOxtWxXCqlXPWSuG/0XMF9DtE2T7KXgMqJw=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "ec179dd13fb7b4c6844f55be91436f7857226dce", + "rev": "a98adbf54d663395df0b9929f6481d4d80fc8927", "type": "github" }, "original": { @@ -994,11 +972,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1747826251, - "narHash": "sha256-Fe4AXmnnAKnh/wIe1ao4Pv/8m6WGA1ujwp6VApgos30=", + "lastModified": 1748171373, + "narHash": "sha256-w13clACePanx7hsF62vtRpZwbM6VUVBY5xK2+jGCTzg=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "9a67b4a289cd8994080398d40b57cfde8e8cfb0a", + "rev": "bf3593b6a84e201251560a20dde9b3b1ac6d49aa", "type": "github" }, "original": { @@ -1024,11 +1002,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1747744144, - "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "lastModified": 1748026106, + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", "type": "github" }, "original": { @@ -1056,11 +1034,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1747676747, - "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", + "lastModified": 1748037224, + "narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", + "rev": "f09dede81861f3a83f7f06641ead34f02f37597f", "type": "github" }, "original": { @@ -1072,11 +1050,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1747676747, - "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=", + "lastModified": 1748037224, + "narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "72841a4a8761d1aed92ef6169a636872c986c76d", + "rev": "f09dede81861f3a83f7f06641ead34f02f37597f", "type": "github" }, "original": { @@ -1088,11 +1066,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1747744144, - "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "lastModified": 1748026106, + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", "type": "github" }, "original": { @@ -1104,11 +1082,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1743583204, - "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=", + "lastModified": 1747542820, + "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434", + "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", "type": "github" }, "original": { @@ -1120,7 +1098,10 @@ }, "nur": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": [ + "stylix", + "flake-parts" + ], "nixpkgs": [ "stylix", "nixpkgs" @@ -1128,11 +1109,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1743884191, - "narHash": "sha256-foVcginhVvjg8ZnTzY5wwMeZ4wjJ8yX66PW5kgyivPE=", + "lastModified": 1746056780, + "narHash": "sha256-/emueQGaoT4vu0QjU9LDOG5roxRSfdY0K2KkxuzazcM=", "owner": "nix-community", "repo": "NUR", - "rev": "fde90f5f52e13eed110a0e53a2818a2b09e4d37c", + "rev": "d476cd0972dd6242d76374fcc277e6735715c167", "type": "github" }, "original": { @@ -1258,11 +1239,11 @@ ] }, "locked": { - "lastModified": 1747795013, - "narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=", + "lastModified": 1748140821, + "narHash": "sha256-GZcjWLQtDifSYMd1ueLDmuVTcQQdD5mONIBTqABooOk=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6b1cf12374361859242a562e1933a7930649131a", + "rev": "476b2ba7dc99ddbf70b1f45357dbbdbdbdfb4422", "type": "github" }, "original": { @@ -1299,7 +1280,7 @@ "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", "flake-compat": "flake-compat_4", - "flake-utils": "flake-utils", + "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", @@ -1313,17 +1294,16 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1745154730, - "narHash": "sha256-gxPyS5pPHH9f+6S3079S6jnc/78s6TvtmEHe/KT5Aus=", + "lastModified": 1748028561, + "narHash": "sha256-IgtJU6n9vR3nBUdcXrc7K9E+Y/G/4P6hFifGRr1tXMU=", "owner": "danth", "repo": "stylix", - "rev": "8b0d9317edd57c5374adcf6957ae4775875c2a9d", + "rev": "34b5930894d8315401d93bd8a9a6635e1cd28eff", "type": "github" }, "original": { "owner": "danth", "repo": "stylix", - "rev": "8b0d9317edd57c5374adcf6957ae4775875c2a9d", "type": "github" } }, @@ -1422,28 +1402,27 @@ "tinted-kitty": { "flake": false, "locked": { - "lastModified": 1716423189, - "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "eb39e141db14baef052893285df9f266df041ff8", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" } }, "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1742851696, - "narHash": "sha256-sR4K+OVFKeUOvNIqcCr5Br7NLxOBEwoAgsIyjsZmb8s=", + "lastModified": 1744974599, + "narHash": "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "c37771c4ae8ff1667e27ddcf24991ebeb94a4e77", + "rev": "28c26a621123ad4ebd5bbfb34ab39421c0144bdd", "type": "github" }, "original": { @@ -1455,11 +1434,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1743296873, - "narHash": "sha256-8IQulrb1OBSxMwdKijO9fB70ON//V32dpK9Uioy7FzY=", + "lastModified": 1745111349, + "narHash": "sha256-udV+nHdpqgkJI9D0mtvvAzbqubt9jdifS/KhTTbJ45w=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "af5152c8d7546dfb4ff6df94080bf5ff54f64e3a", + "rev": "e009f18a01182b63559fb28f1c786eb027c3dee9", "type": "github" }, "original": { @@ -1514,11 +1493,11 @@ "systems": "systems_5" }, "locked": { - "lastModified": 1747746261, - "narHash": "sha256-qZ9AwEiAB2GkSLBR23NUVi35TWhcy7lTFEdGHXLAr94=", + "lastModified": 1748172034, + "narHash": "sha256-lWVMpIzsk6hKRmSEuBpmq1F3k2hT0NESndefFz/mHh0=", "owner": "abenz1267", "repo": "walker", - "rev": "0fed5e4af1530ede04da6d18e0d3bd423f7caceb", + "rev": "37f0b217cc64d775417dccaf879ef3d091c5d15e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 5df11f0..9cf541b 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,6 @@ nix-index-database.url = "github:nix-community/nix-index-database"; nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; - # nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; sops-nix.url = "github:mic92/sops-nix"; @@ -25,7 +24,7 @@ url = "github:abenz1267/walker"; inputs.nixpkgs.follows = "nixpkgs"; }; - stylix.url = "github:danth/stylix/8b0d9317edd57c5374adcf6957ae4775875c2a9d"; + stylix.url = "github:danth/stylix"; # TODO: somehow reduce the number of *.inputs.nixpkgs.follows = "nixpkgs" stuff, mb a function? blueprint.inputs.nixpkgs.follows = "nixpkgs"; chaotic.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/dunamis/users/user/common.nix b/hosts/dunamis/users/user/common.nix index 9a72f96..71c96e3 100644 --- a/hosts/dunamis/users/user/common.nix +++ b/hosts/dunamis/users/user/common.nix @@ -11,7 +11,4 @@ inherit (osConfig) desktop; home.stateVersion = osConfig.system.stateVersion; home.sessionPath = ["$HOME/.local/bin"]; - - # TODO: remove when unbroken - stylix.targets.mako.enable = false; } From 8e0c4f8d9a271a068a6060dfad31fb22a00da25f Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 27 May 2025 16:47:01 +0300 Subject: [PATCH 016/138] hosts/morphius: init new device Signed-off-by: unexplrd --- flake.lock | 8 +-- hosts/morphius/configuration.nix | 49 +++++++++++++ hosts/morphius/disko/default.nix | 14 ++++ hosts/morphius/disko/disk-main.nix | 70 +++++++++++++++++++ hosts/morphius/hardware/default.nix | 11 +++ hosts/morphius/hardware/laptop/default.nix | 5 ++ .../morphius/hardware/laptop/keyboard-fix.nix | 21 ++++++ hosts/morphius/misc/default.nix | 5 ++ hosts/morphius/misc/distributed-build.nix | 30 ++++++++ .../users/user/home-configuration.nix | 7 ++ 10 files changed, 216 insertions(+), 4 deletions(-) create mode 100644 hosts/morphius/configuration.nix create mode 100644 hosts/morphius/disko/default.nix create mode 100644 hosts/morphius/disko/disk-main.nix create mode 100644 hosts/morphius/hardware/default.nix create mode 100644 hosts/morphius/hardware/laptop/default.nix create mode 100644 hosts/morphius/hardware/laptop/keyboard-fix.nix create mode 100644 hosts/morphius/misc/default.nix create mode 100644 hosts/morphius/misc/distributed-build.nix create mode 100644 hosts/morphius/users/user/home-configuration.nix diff --git a/flake.lock b/flake.lock index f96ffa4..0808251 100644 --- a/flake.lock +++ b/flake.lock @@ -893,11 +893,11 @@ "mysecrets": { "flake": false, "locked": { - "lastModified": 1746627807, - "narHash": "sha256-INMl9/jVAZXtkDzQCl/x5bDJeBUZ/GcjJQ0eEvBwpvQ=", + "lastModified": 1748354061, + "narHash": "sha256-2m/sZ+AskdRBQzQfiw7kjDFrBHeHIdyKW/pM7uMmSy4=", "ref": "refs/heads/main", - "rev": "63eda92f2a5c3be31ed28beeadecd756bab576f5", - "revCount": 23, + "rev": "7c65ced56404f49a8d69a051fac04e8789edb97c", + "revCount": 24, "type": "git", "url": "ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets" }, diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix new file mode 100644 index 0000000..95d602b --- /dev/null +++ b/hosts/morphius/configuration.nix @@ -0,0 +1,49 @@ +{ + inputs, + pkgs, + ... +}: { + imports = with inputs; [ + self.nixosModules.desktop + self.nixosModules.system + self.nixosModules.config + ./disko + ./hardware + ./misc + ]; + + networking = { + networkmanager.enable = true; + # hostId = "31150fae"; + hostName = "morphius"; + }; + + boot.loader.systemd-boot.enable = true; + environment.memoryAllocator.provider = "mimalloc"; + system.stateVersion = "25.11"; + time.timeZone = "Europe/Kyiv"; + + desktop.plasma.enable = true; + # services.greetd.settings.initial_session = { + # user = "user"; + # command = "${pkgs.niri}/bin/niri-session"; + # }; + + module = { + config = { + # laptop.homeRowMods = true; + powerSave = true; + useIwd = true; + vaapi = "intel-media-driver"; + }; + stylix = { + enable = true; + theme = "rose-pine-moon"; + }; + }; + + locale.ukrainian.enable = true; + opentabletdriver.enable = false; + qmk-vial.enable = true; + virtual.libvirt.enable = true; +} diff --git a/hosts/morphius/disko/default.nix b/hosts/morphius/disko/default.nix new file mode 100644 index 0000000..aa8982a --- /dev/null +++ b/hosts/morphius/disko/default.nix @@ -0,0 +1,14 @@ +{inputs, ...}: let + disk = "/dev/nvme0n1"; +in { + imports = with inputs; [ + disko.nixosModules.disko + ]; + disko.devices.nodev = { + "/tmp" = { + fsType = "tmpfs"; + mountOptions = ["rw" "nosuid" "nodev"]; + }; + }; + disko.devices.disk.main = import ./disk-main.nix {inherit disk;}; +} diff --git a/hosts/morphius/disko/disk-main.nix b/hosts/morphius/disko/disk-main.nix new file mode 100644 index 0000000..bb72895 --- /dev/null +++ b/hosts/morphius/disko/disk-main.nix @@ -0,0 +1,70 @@ +{disk, ...}: { + type = "disk"; + device = disk; + content = { + type = "gpt"; + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ + "umask=0077" + "fmask=0022" + "dmask=0022" + "noexec" + "nosuid" + "nodev" + ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "luks-main"; + initrdUnlock = true; + settings.allowDiscards = true; + content = { + type = "btrfs"; + extraArgs = ["-f"]; + subvolumes = { + "@nixos-root" = { + mountpoint = "/"; + mountOptions = [ + "compress=zstd" + "noatime" + "noexec" + ]; + }; + "@home" = { + mountpoint = "/home"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + "@storage" = { + mountpoint = "/storage"; + mountOptions = [ + "compress=zstd" + "noatime" + ]; + }; + "@nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress-force=zstd" + "noatime" + ]; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/morphius/hardware/default.nix b/hosts/morphius/hardware/default.nix new file mode 100644 index 0000000..40f8d46 --- /dev/null +++ b/hosts/morphius/hardware/default.nix @@ -0,0 +1,11 @@ +{ + imports = [ + # ./laptop + ]; + services = { + logind = { + lidSwitch = "ignore"; + powerKey = "suspend"; + }; + }; +} diff --git a/hosts/morphius/hardware/laptop/default.nix b/hosts/morphius/hardware/laptop/default.nix new file mode 100644 index 0000000..86ed9a8 --- /dev/null +++ b/hosts/morphius/hardware/laptop/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./keyboard-fix.nix + ]; +} diff --git a/hosts/morphius/hardware/laptop/keyboard-fix.nix b/hosts/morphius/hardware/laptop/keyboard-fix.nix new file mode 100644 index 0000000..d8119fd --- /dev/null +++ b/hosts/morphius/hardware/laptop/keyboard-fix.nix @@ -0,0 +1,21 @@ +{ + services = { + udev.extraHwdb = '' + evdev:input:b0011v0001p0001eAB83* + KEYBOARD_KEY_d5=sysrq + KEYBOARD_KEY_d4=leftmeta + KEYBOARD_KEY_95=brightnessdown + KEYBOARD_KEY_91=brightnessup + ''; + keyd = { + enable = true; + keyboards.default = { + ids = ["0001:0001"]; + settings.main = { + camera = "brightnessdown"; + prog1 = "brightnessup"; + }; + }; + }; + }; +} diff --git a/hosts/morphius/misc/default.nix b/hosts/morphius/misc/default.nix new file mode 100644 index 0000000..cc8d3bd --- /dev/null +++ b/hosts/morphius/misc/default.nix @@ -0,0 +1,5 @@ +{ + imports = [ + ./distributed-build.nix + ]; +} diff --git a/hosts/morphius/misc/distributed-build.nix b/hosts/morphius/misc/distributed-build.nix new file mode 100644 index 0000000..b093581 --- /dev/null +++ b/hosts/morphius/misc/distributed-build.nix @@ -0,0 +1,30 @@ +{ + config, + inputs, + ... +}: let + inherit (builtins) readFile; + inherit (config.networking) hostName; + inherit (config.sops) secrets; + inherit (inputs) mysecrets; + pubHost = readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; +in { + nix = { + distributedBuilds = true; + buildMachines = [ + { + hostName = "dunamis"; + publicHostKey = pubHost; + sshKey = secrets."ssh-${hostName}-user".path; + sshUser = "nix-ssh"; + supportedFeatures = [ + "benchmark" + "big-parallel" + "kvm" + "nixos-test" + ]; + system = "x86_64-linux"; + } + ]; + }; +} diff --git a/hosts/morphius/users/user/home-configuration.nix b/hosts/morphius/users/user/home-configuration.nix new file mode 100644 index 0000000..93ccd24 --- /dev/null +++ b/hosts/morphius/users/user/home-configuration.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ../../../dunamis/users/user/common.nix + ../../../dunamis/users/user/programs.nix + ../../../dunamis/users/user/flatpak.nix + ]; +} From 0bce31c49c79607875742a52fe1cb22cbbdb5797 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 27 May 2025 22:16:49 +0300 Subject: [PATCH 017/138] hosts/morphius: some changes Signed-off-by: unexplrd --- flake.lock | 8 ++++---- hosts/morphius/configuration.nix | 20 +++++++++++--------- hosts/morphius/disko/disk-main.nix | 6 ++++++ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 0808251..2f5e005 100644 --- a/flake.lock +++ b/flake.lock @@ -893,11 +893,11 @@ "mysecrets": { "flake": false, "locked": { - "lastModified": 1748354061, - "narHash": "sha256-2m/sZ+AskdRBQzQfiw7kjDFrBHeHIdyKW/pM7uMmSy4=", + "lastModified": 1748355101, + "narHash": "sha256-2UO6Sg7rEJZ21v1gNKc9MGTknjDW35iGPcL78VnaDnw=", "ref": "refs/heads/main", - "rev": "7c65ced56404f49a8d69a051fac04e8789edb97c", - "revCount": 24, + "rev": "21808ec68bcbd97e0d942a1b09f90d0d1862ab77", + "revCount": 25, "type": "git", "url": "ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets" }, diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 95d602b..cad935c 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -18,20 +18,24 @@ hostName = "morphius"; }; - boot.loader.systemd-boot.enable = true; + boot.kernelModules = ["i915"]; environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; - desktop.plasma.enable = true; - # services.greetd.settings.initial_session = { - # user = "user"; - # command = "${pkgs.niri}/bin/niri-session"; - # }; + swapDevices = [ + { + device = "/swap/swapfile"; + size = 8 * 1024; + } + ]; + + desktop.gnome.enable = true; module = { config = { - # laptop.homeRowMods = true; + secureBoot = true; + tpmDiskUnlock = true; powerSave = true; useIwd = true; vaapi = "intel-media-driver"; @@ -44,6 +48,4 @@ locale.ukrainian.enable = true; opentabletdriver.enable = false; - qmk-vial.enable = true; - virtual.libvirt.enable = true; } diff --git a/hosts/morphius/disko/disk-main.nix b/hosts/morphius/disko/disk-main.nix index bb72895..cd67be2 100644 --- a/hosts/morphius/disko/disk-main.nix +++ b/hosts/morphius/disko/disk-main.nix @@ -61,6 +61,12 @@ "noatime" ]; }; + "@swap" = { + mountpoint = "/swap"; + mountOptions = [ + "noatime" + ]; + }; }; }; }; From 25315e7928f4ce719a73957adf3782467cffaec0 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 28 May 2025 12:08:58 +0300 Subject: [PATCH 018/138] desktop/niri: add border around walker programs/syncthing: add morphius config/users: add morphius Signed-off-by: unexplrd --- modules/home/desktop/niri/programs/walker/default.nix | 7 +++---- modules/home/programs/syncthing.nix | 5 +++-- modules/nixos/config/users.nix | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/home/desktop/niri/programs/walker/default.nix b/modules/home/desktop/niri/programs/walker/default.nix index 0b485bd..a318f7b 100644 --- a/modules/home/desktop/niri/programs/walker/default.nix +++ b/modules/home/desktop/niri/programs/walker/default.nix @@ -230,14 +230,13 @@ } #window { - background: none; + background: @base00; color: @base05; + border-radius: 20px; + border: 3px solid @base0D; } #box { - border-radius: 20px; - border-width: 4px; - border-color: @base0D; background: @base00; } diff --git a/modules/home/programs/syncthing.nix b/modules/home/programs/syncthing.nix index 89f05df..4d17242 100644 --- a/modules/home/programs/syncthing.nix +++ b/modules/home/programs/syncthing.nix @@ -23,7 +23,7 @@ in { "dunamis".id = "72VRZFX-65SZUKP-2XL2WLG-75MMKLG-PQLDEZN-G5OI5U7-RLF4OHS-LNCXEQX"; "eldrid".id = "VTSBNN6-W6UUT66-NDEQBNJ-DJJM5YE-PWU63IW-Y6CTJNN-Q3RHEQB-POBLCQH"; "legion".id = "FDS73OW-BHRWDBO-AOFQX4D-FSCABP2-HN4575T-CSIO6TX-5CPJQLQ-L25TYQJ"; - "phone".id = "XBZLA7Y-YOBZHLO-MSTRAGS-6SN5MEZ-FDKR76F-DIX2BKE-FMDNUYR-TMD6UAQ"; + "morphius".id = "VATWBD7-ZTMGGCT-XH6YDYD-5OMPILK-U43UYYW-OGC4BLB-IQGH35R-4X5HZQH"; "sarien".id = "LUVZGFV-OV6FV5E-SDROWHZ-4BR5PFB-VP5Y326-AFEP6NL-ORUMJQQ-SSYCQQO"; }; folders = { @@ -33,7 +33,7 @@ in { "dunamis" "eldrid" "legion" - "phone" + "morphius" "sarien" ]; }; @@ -42,6 +42,7 @@ in { devices = [ "dunamis" "eldrid" + "morphius" "legion" "sarien" ]; diff --git a/modules/nixos/config/users.nix b/modules/nixos/config/users.nix index 926f590..b39bcf9 100644 --- a/modules/nixos/config/users.nix +++ b/modules/nixos/config/users.nix @@ -21,6 +21,7 @@ in { "eldrid" "sarien" "legion" + "morphius" ]; }; }; From b67722101dcec6f01c22d670523d7105774c43b5 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 27 May 2025 22:16:49 +0300 Subject: [PATCH 019/138] desktop/niri: hotfix for other desktops Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 9 +++++++-- modules/home/desktop/niri/programs/default.nix | 8 +++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 687ad08..7b83766 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -2,12 +2,14 @@ perSystem, osConfig, config, + inputs, pkgs, lib, ... }: let # inherit (lib.strings) removeSuffix; inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe; + inherit (config.lib.stylix) colors; # inherit (osConfig.module.stylix) theme; inherit (osConfig.networking) hostName; cfg = config.desktop.niri; @@ -15,8 +17,8 @@ launcher = getExe pkgs.walker; lockscreen = getExe pkgs.gtklock; in { - imports = [ - ./programs + imports = with inputs; [ + walker.homeManagerModules.default ]; options = { desktop.niri.enable = @@ -62,6 +64,8 @@ in { platformTheme.name = "gtk3"; }; + programs.walker = import ./programs/walker {inherit config inputs pkgs;}; + programs.waybar = import ./programs/waybar {inherit config colors getExe ifLaptop pkgs;}; xdg.configFile.niri = import ./niri.nix {inherit config hostName launcher lockscreen;}; services = import ./services {inherit pkgs lockscreen getExe perSystem;}; @@ -162,6 +166,7 @@ in { Service = mkDefault graphicalService.Service; }; + walker = mkGraphicalService {}; # gnome-polkit-agent = mkGraphicalService { # Service = # graphicalService.Service diff --git a/modules/home/desktop/niri/programs/default.nix b/modules/home/desktop/niri/programs/default.nix index 7056f2e..7ddbcb6 100644 --- a/modules/home/desktop/niri/programs/default.nix +++ b/modules/home/desktop/niri/programs/default.nix @@ -14,7 +14,9 @@ in { imports = with inputs; [ walker.homeManagerModules.default ]; - # programs.fuzzel = import ./fuzzel {inherit config mkDefault;}; - programs.walker = import ./walker {inherit config inputs pkgs;}; - programs.waybar = import ./waybar {inherit colors config getExe ifLaptop pkgs;}; + options = config.desktop.niri.enable { + # programs.fuzzel = import ./fuzzel {inherit config mkDefault;}; + programs.walker = import ./walker {inherit config inputs pkgs;}; + programs.waybar = import ./waybar {inherit colors config getExe ifLaptop pkgs;}; + }; } From 63b89332a37122e8f1a2c479762afdee866065d1 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 28 May 2025 15:53:46 +0300 Subject: [PATCH 020/138] hosts/morphius: enable zramSwap Signed-off-by: unexplrd --- hosts/morphius/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index cad935c..7d54db8 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -23,6 +23,7 @@ system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; + zramSwap.enable = true; swapDevices = [ { device = "/swap/swapfile"; From efa62417de6f58377f09d05c43d476776cf354ce Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 28 May 2025 15:53:46 +0300 Subject: [PATCH 021/138] hosts/morphius: switch desktop to niri Signed-off-by: unexplrd --- hosts/morphius/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 7d54db8..92e1f35 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -31,7 +31,7 @@ } ]; - desktop.gnome.enable = true; + desktop.niri.enable = true; module = { config = { From 2b9be66d846912439eaa9d21d1c57d0648c4847c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 28 May 2025 15:53:46 +0300 Subject: [PATCH 022/138] hosts/morphius: user conf default to ghostty term Signed-off-by: unexplrd --- hosts/morphius/users/user/home-configuration.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/morphius/users/user/home-configuration.nix b/hosts/morphius/users/user/home-configuration.nix index 93ccd24..ef509bb 100644 --- a/hosts/morphius/users/user/home-configuration.nix +++ b/hosts/morphius/users/user/home-configuration.nix @@ -1,7 +1,10 @@ -{ +{lib, ...}: { imports = [ ../../../dunamis/users/user/common.nix ../../../dunamis/users/user/programs.nix ../../../dunamis/users/user/flatpak.nix ]; + systemd.user.settings.Manager.DefaultEnvironment = { + TERMINAL = lib.mkForce "ghostty"; + }; } From f12af915951d721c8f4542047b3d315cba34776c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 29 May 2025 14:39:05 +0300 Subject: [PATCH 023/138] config/nix: try to fix distributed builds Signed-off-by: unexplrd --- hosts/morphius/misc/distributed-build.nix | 1 + modules/nixos/config/nix/common.nix | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hosts/morphius/misc/distributed-build.nix b/hosts/morphius/misc/distributed-build.nix index b093581..cba37f5 100644 --- a/hosts/morphius/misc/distributed-build.nix +++ b/hosts/morphius/misc/distributed-build.nix @@ -22,6 +22,7 @@ in { "big-parallel" "kvm" "nixos-test" + "uid-range" ]; system = "x86_64-linux"; } diff --git a/modules/nixos/config/nix/common.nix b/modules/nixos/config/nix/common.nix index 8efde17..64784db 100644 --- a/modules/nixos/config/nix/common.nix +++ b/modules/nixos/config/nix/common.nix @@ -32,8 +32,5 @@ nix.settings.use-cgroups = true; # for container in builds support - nix.settings.system-features = - if lib.versionAtLeast lib.version "25.05pre" - then ["uid-range"] - else lib.mkDefault ["uid-range"]; + nix.settings.system-features = ["uid-range"]; } From 665625c1ca1dfeca0a84c0f6aa551f2f19459390 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 29 May 2025 11:14:08 +0300 Subject: [PATCH 024/138] stylix: add gruvbox-dark-pale Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- modules/home/desktop/niri/default.nix | 20 ++++++----- modules/nixos/system/misc/stylix/default.nix | 38 ++++++++++++++++++-- 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 9860adf..330212f 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -37,7 +37,7 @@ }; stylix = { enable = true; - theme = "rose-pine-moon"; + theme = "gruvbox-dark-pale"; }; }; diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 7b83766..54baf3f 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -45,19 +45,21 @@ in { gtk = { enable = true; iconTheme = let - papirusPackage = - if (lib.strings.hasPrefix "rose-pine" osConfig.module.stylix.theme) + name = + if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) + then "Gruvbox-Plus-Dark" + else if config.stylix.polarity == "dark" + then "Papirus-Dark" + else "Papirus-Light"; + package = + if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) + then pkgs.gruvbox-plus-icons + else if (lib.strings.hasPrefix "rose-pine" osConfig.module.stylix.theme) then pkgs.papirus-icon-theme.override {color = "indigo";} else if (lib.strings.hasPrefix "nord" osConfig.module.stylix.theme) then pkgs.papirus-icon-theme.override {color = "nordic";} else pkgs.papirus-icon-theme; - in { - name = - if config.stylix.polarity == "dark" - then "Papirus-Dark" - else "Papirus-Light"; - package = papirusPackage; - }; + in {inherit name package;}; }; qt = { enable = true; diff --git a/modules/nixos/system/misc/stylix/default.nix b/modules/nixos/system/misc/stylix/default.nix index 07ab880..f65121d 100644 --- a/modules/nixos/system/misc/stylix/default.nix +++ b/modules/nixos/system/misc/stylix/default.nix @@ -29,6 +29,10 @@ if stateVersion == "24.11" then pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];} else pkgs.nerd-fonts.jetbrains-mono; + geistMonoPackage = + if stateVersion == "24.11" + then pkgs.nerdfonts.override {fonts = ["GeistMono"];} + else pkgs.nerd-fonts.geist-mono; wallpapers = { fern-outline = builtins.fetchurl { @@ -51,6 +55,11 @@ name = "wallhaven-ymo2y7.png"; sha256 = "1b3j0hxxy8m25scq42lxsxc99xvr15pha1j4wplgz761asrvxly3"; }; + nixos-rainbow = builtins.fetchurl { + url = "https://w.wallhaven.cc/full/p9/wallhaven-p9pd23.png"; + name = "wallhaven-p9pd23.png"; + sha256 = "7CMuETntiVUCKhUIdJzX+sf3F47GvuX2a61o4xbEzww="; + }; }; themes = { rose-pine-dawn = { @@ -80,8 +89,10 @@ wallpaper = wallpapers.cyber-dawn; serif = { - package = iosevkaPackage; - name = "Iosevka Nerd Font Propo"; + # package = iosevkaPackage; + # name = "Iosevka Nerd Font Propo"; + package = pkgs.geist-font; + name = "Geist Light"; }; monospace = { @@ -95,6 +106,29 @@ size = 24; }; }; + gruvbox-dark-pale = { + polarity = "dark"; + scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-pale.yaml"; + wallpaper = wallpapers.nixos-rainbow; + + serif = { + # package = iosevkaPackage; + # name = "Iosevka Nerd Font Propo"; + package = pkgs.geist-font; + name = "Geist"; + }; + + monospace = { + package = geistMonoPackage; + name = "GeistMono Nerd Font"; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + }; nord = { polarity = "dark"; scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml"; From 61daa24af87dd8f4951d00fbc1affe10772e32b8 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 27 May 2025 16:47:01 +0300 Subject: [PATCH 025/138] desktop/niri: change focus-ring to border Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 10 ++++++++-- modules/home/desktop/niri/programs/waybar/default.nix | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index a053616..bfcc5bd 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -163,7 +163,7 @@ in { } layout { - gaps 6 + gaps 3 center-focused-column "never" // "on-overflow" preset-column-widths { proportion 0.33333 @@ -185,11 +185,17 @@ in { width 6 } focus-ring { - // off + off width 3 active-gradient from="#${colors.base0D}" to="#${colors.base0F}" angle=40 relative-to="workspace-view" inactive-color "#${colors.base03}" } + border { + width 3 + active-color "#${colors.base0D}" + inactive-color "#${colors.base03}" + + } struts { left 33 right 33 diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index e14e5ce..a91ec3f 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -102,8 +102,9 @@ }; "clock" = { interval = 1; - format = "{:%H:%M:%S}"; - tooltip-format = "{:%d.%m.%Y}"; + format = "{:%B %d - %H:%M - %A}"; + tooltip = false; + # tooltip-format = "{%y.%m.%d - %B %d, %A}"; }; battery = { states = { From dd5ffd3c8324f9837e079f5d3a3fd1ad879e7325 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 4 Jun 2025 12:57:36 +0300 Subject: [PATCH 026/138] hosts/dunamis/disko/disk-main.nix: refactor hosts/sarien/disko/default.nix: source dunamis/disko/disk-main.nix Signed-off-by: unexplrd --- hosts/dunamis/disko/disk-main.nix | 29 +++++++---------------------- hosts/sarien/disko/default.nix | 3 ++- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/hosts/dunamis/disko/disk-main.nix b/hosts/dunamis/disko/disk-main.nix index 9631489..c076947 100644 --- a/hosts/dunamis/disko/disk-main.nix +++ b/hosts/dunamis/disko/disk-main.nix @@ -28,42 +28,27 @@ name = "luks-main"; initrdUnlock = true; settings.allowDiscards = true; - content = { + content = let + mountOptions = ["autodefrag" "compress-force=zstd" "noatime"]; + in { type = "btrfs"; extraArgs = ["-f"]; subvolumes = { "@nixos-root" = { mountpoint = "/"; - mountOptions = [ - "autodefrag" - "compress=zstd" - "noatime" - "noexec" - ]; + mountOptions = mountOptions ++ ["noexec"]; }; "@home" = { mountpoint = "/home"; - mountOptions = [ - "autodefrag" - "compress=zstd" - "noatime" - ]; + inherit mountOptions; }; "@storage" = { mountpoint = "/storage"; - mountOptions = [ - "autodefrag" - "compress=zstd" - "noatime" - ]; + inherit mountOptions; }; "@nix" = { mountpoint = "/nix"; - mountOptions = [ - "autodefrag" - "compress-force=zstd" - "noatime" - ]; + inherit mountOptions; }; }; }; diff --git a/hosts/sarien/disko/default.nix b/hosts/sarien/disko/default.nix index b43f6ed..8468027 100644 --- a/hosts/sarien/disko/default.nix +++ b/hosts/sarien/disko/default.nix @@ -10,5 +10,6 @@ in { mountOptions = ["rw" "nosuid" "nodev"]; }; }; - disko.devices.disk.main = import ./disk-main.nix {inherit disk;}; + # same partitioning setup + disko.devices.disk.main = import ../../dunamis/disko/disk-main.nix {inherit disk;}; } From 6d334b1261fe8bc964477a8e0983734f9e3106df Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 5 Jun 2025 00:36:40 +0300 Subject: [PATCH 027/138] dunamis/user/programs.nix: add gpu-screen-recorder-gtk Signed-off-by: unexplrd --- hosts/dunamis/users/user/programs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index c10c11f..065a9f6 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -82,6 +82,7 @@ pinentry-qt # pinentry for rbw virt-manager # libvirt gui waycheck # check wayland protocols + gpu-screen-recorder-gtk ]; xdg.desktopEntries = { From 63d082593ee00eb3ee4026e5b9bd30c9407331d4 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 4 Jun 2025 12:57:36 +0300 Subject: [PATCH 028/138] desktop/niri: screencast block for materialgram Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index bfcc5bd..b40047d 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -275,6 +275,7 @@ in { match app-id=r#"^org\.keepassxc\.KeePassXC$"# match app-id=r#"^org\.gnome\.World\.Secrets$"# match app-id=r#"^Bitwarden$"# + match app-id="io.github.kukuruzka165.materialgram" match app-id="org.telegram.desktop" match app-id="org.signal.Signal" match app-id="WebCord" From 410e7788262ec5e9ea32d06f0762e196922c9603 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 5 Jun 2025 00:36:40 +0300 Subject: [PATCH 029/138] flake.lock: bump flake.nix: restructure, add some inputs.*.follows Signed-off-by: unexplrd --- flake.lock | 242 ++++++++++++++++++----------------------------------- flake.nix | 98 +++++++++++++++------- 2 files changed, 148 insertions(+), 192 deletions(-) diff --git a/flake.lock b/flake.lock index 2f5e005..fca69ef 100644 --- a/flake.lock +++ b/flake.lock @@ -70,11 +70,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1736852337, - "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=", + "lastModified": 1748408240, + "narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5", + "rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e", "type": "github" }, "original": { @@ -125,18 +125,20 @@ "inputs": { "fenix": "fenix", "flake-schemas": "flake-schemas", - "home-manager": "home-manager", + "home-manager": [ + "home-manager" + ], "jovian": "jovian", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1748116304, - "narHash": "sha256-gpO/jh/T/Ygx8ewq0y4LQDKEqvZJ3WiRg3ur8K9KfFg=", + "lastModified": 1749037647, + "narHash": "sha256-eCYFdO4sr+SXfHHFzDqcjpQTcWudsMmq0Lg5iBKA2Ec=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "54741d5ed1e944d68ff94fb09ce967269156f65e", + "rev": "dcc72d01c5a8a4ea2768b13b2f57794ced9d2525", "type": "github" }, "original": { @@ -191,11 +193,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1747392669, - "narHash": "sha256-zky3+lndxKRu98PAwVK8kXPdg+Q1NVAhaI7YGrboKYA=", + "lastModified": 1748932954, + "narHash": "sha256-1HiKieYFvFi5Hw3x2/mptbbvAuL0QwlZQC9UIGNNb1w=", "owner": "nix-community", "repo": "fenix", - "rev": "c3c27e603b0d9b5aac8a16236586696338856fbb", + "rev": "2da33335e40ca932b4c5ea632816eed573736fba", "type": "github" }, "original": { @@ -207,11 +209,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1744642301, - "narHash": "sha256-5A6LL7T0lttn1vrKsNOKUk9V0ittdW0VEqh6AtefxJ4=", + "lastModified": 1748383148, + "narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "59e3de00f01e5adb851d824cf7911bd90c31083a", + "rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf", "type": "github" }, "original": { @@ -270,11 +272,11 @@ }, "flake-compat_4": { "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -312,11 +314,11 @@ ] }, "locked": { - "lastModified": 1733312601, - "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", "type": "github" }, "original": { @@ -368,11 +370,11 @@ ] }, "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", + "lastModified": 1747372754, + "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", + "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", "type": "github" }, "original": { @@ -467,57 +469,15 @@ "home-manager": { "inputs": { "nixpkgs": [ - "chaotic", "nixpkgs" ] }, "locked": { - "lastModified": 1747978958, - "narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=", + "lastModified": 1749062139, + "narHash": "sha256-gGGLujmeWU+ZjFzfMvFMI0hp9xONsSbm88187wJr82Q=", "owner": "nix-community", "repo": "home-manager", - "rev": "7419250703fd5eb50e99bdfb07a86671939103ea", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1748134483, - "narHash": "sha256-5PBK1nV8X39K3qUj8B477Aa2RdbLq3m7wRxUKRtggX4=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "c1e671036224089937e111e32ea899f59181c383", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_3": { - "inputs": { - "nixpkgs": [ - "stylix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1747763032, - "narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "29dda415f5b2178278283856c6f9f7b48a2a4353", + "rev": "86b95fc1ed2b9b04a451a08ccf13d78fb421859c", "type": "github" }, "original": { @@ -602,11 +562,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1748174133, - "narHash": "sha256-dZLdDts/b6ujjrLj62cqwPD+jWM4yuE/aERFWWK9yjs=", + "lastModified": 1749049255, + "narHash": "sha256-QXg2B/bF/f9IeSiZwJuhdnz2xcnpu/hDfz4eIHWVhz8=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "cc0792c1dce250311a19e92bad204eefae072592", + "rev": "d7a87ce6e2535f1029fc93b062d2828e8549c525", "type": "github" }, "original": { @@ -851,11 +811,11 @@ ] }, "locked": { - "lastModified": 1747990026, - "narHash": "sha256-sG5VbID+x5+xUC+jjgHibnzg8IllVcH+K2TLmYHLPME=", + "lastModified": 1748977211, + "narHash": "sha256-VtL9IxQKMsGMD0jDoMMVeZLTxrPFt36MW43nkeXf1RM=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "e2f4ced874406541a7957f7e2b8f05a0d59a0f00", + "rev": "4989543da0defdedce08b14945ec5d2f6e22abb8", "type": "github" }, "original": { @@ -951,11 +911,11 @@ ] }, "locked": { - "lastModified": 1748145500, - "narHash": "sha256-t9fx0l61WOxtWxXCqlXPWSuG/0XMF9DtE2T7KXgMqJw=", + "lastModified": 1748751003, + "narHash": "sha256-i4GZdKAK97S0ZMU3w4fqgEJr0cVywzqjugt2qZPrScs=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "a98adbf54d663395df0b9929f6481d4d80fc8927", + "rev": "2860bee699248d828c2ed9097a1cd82c2f991b43", "type": "github" }, "original": { @@ -967,16 +927,20 @@ "nixos-cosmic": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable_2", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": [ + "nixpkgs-stable" + ], "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1748171373, - "narHash": "sha256-w13clACePanx7hsF62vtRpZwbM6VUVBY5xK2+jGCTzg=", + "lastModified": 1749035368, + "narHash": "sha256-j+pl67zOANjVyu9hX2vu9APc+hMuPP4sWMLA0GFZ47c=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "bf3593b6a84e201251560a20dde9b3b1ac6d49aa", + "rev": "74c357be1f9d2ff617a9758bf09063e61869daed", "type": "github" }, "original": { @@ -1002,11 +966,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748026106, - "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", + "lastModified": 1748929857, + "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", + "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", "type": "github" }, "original": { @@ -1034,27 +998,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1748037224, - "narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "f09dede81861f3a83f7f06641ead34f02f37597f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_3": { - "locked": { - "lastModified": 1748037224, - "narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=", + "lastModified": 1748995628, + "narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f09dede81861f3a83f7f06641ead34f02f37597f", + "rev": "8eb3b6a2366a7095939cd22f0dc0e9991313294b", "type": "github" }, "original": { @@ -1064,38 +1012,6 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1748026106, - "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1747542820, - "narHash": "sha256-GaOZntlJ6gPPbbkTLjbd8BMWaDYafhuuYRNrxCGnPJw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "292fa7d4f6519c074f0a50394dbbe69859bb6043", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": [ @@ -1109,11 +1025,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1746056780, - "narHash": "sha256-/emueQGaoT4vu0QjU9LDOG5roxRSfdY0K2KkxuzazcM=", + "lastModified": 1748730660, + "narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=", "owner": "nix-community", "repo": "NUR", - "rev": "d476cd0972dd6242d76374fcc277e6735715c167", + "rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb", "type": "github" }, "original": { @@ -1177,7 +1093,7 @@ "blueprint": "blueprint", "chaotic": "chaotic", "disko": "disko", - "home-manager": "home-manager_2", + "home-manager": "home-manager", "hyprland": "hyprland", "hyprsunset": "hyprsunset", "lanzaboote": "lanzaboote", @@ -1186,8 +1102,8 @@ "nix-index-database": "nix-index-database", "nixos-cosmic": "nixos-cosmic", "nixos-facter-modules": "nixos-facter-modules", - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable_3", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable_2", "sops-nix": "sops-nix", "stylix": "stylix", "walker": "walker" @@ -1196,11 +1112,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1747323949, - "narHash": "sha256-G4NwzhODScKnXqt2mEQtDFOnI0wU3L1WxsiHX3cID/0=", + "lastModified": 1748871544, + "narHash": "sha256-7V/sV6JiEp8LFmGIG3OqFDU2YNHgmodg1qNKGYXZKIY=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "f8e784353bde7cbf9a9046285c1caf41ac484ebe", + "rev": "25808c1ba14627876c9a031a67f404ac1927887d", "type": "github" }, "original": { @@ -1239,11 +1155,11 @@ ] }, "locked": { - "lastModified": 1748140821, - "narHash": "sha256-GZcjWLQtDifSYMd1ueLDmuVTcQQdD5mONIBTqABooOk=", + "lastModified": 1749004659, + "narHash": "sha256-zaZrcC5UwHPGkgfnhTPx5sZfSSnUJdvYHhgex10RadQ=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "476b2ba7dc99ddbf70b1f45357dbbdbdbdfb4422", + "rev": "c52e346aedfa745564599558a096e88f9a5557f9", "type": "github" }, "original": { @@ -1283,8 +1199,12 @@ "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_3", + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ], "nur": "nur", "systems": "systems_4", "tinted-foot": "tinted-foot", @@ -1294,11 +1214,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1748028561, - "narHash": "sha256-IgtJU6n9vR3nBUdcXrc7K9E+Y/G/4P6hFifGRr1tXMU=", + "lastModified": 1749053445, + "narHash": "sha256-tf4MNRwJ5ikyg4+UfGuC1+GwMBQYh4dK4sdow1MEGVk=", "owner": "danth", "repo": "stylix", - "rev": "34b5930894d8315401d93bd8a9a6635e1cd28eff", + "rev": "a057acc112856352e77d42ac4685134b2213a810", "type": "github" }, "original": { @@ -1418,11 +1338,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1744974599, - "narHash": "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY=", + "lastModified": 1748180480, + "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=", "owner": "tinted-theming", "repo": "schemes", - "rev": "28c26a621123ad4ebd5bbfb34ab39421c0144bdd", + "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31", "type": "github" }, "original": { @@ -1434,11 +1354,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1745111349, - "narHash": "sha256-udV+nHdpqgkJI9D0mtvvAzbqubt9jdifS/KhTTbJ45w=", + "lastModified": 1748740859, + "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "e009f18a01182b63559fb28f1c786eb027c3dee9", + "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda", "type": "github" }, "original": { @@ -1493,11 +1413,11 @@ "systems": "systems_5" }, "locked": { - "lastModified": 1748172034, - "narHash": "sha256-lWVMpIzsk6hKRmSEuBpmq1F3k2hT0NESndefFz/mHh0=", + "lastModified": 1748502384, + "narHash": "sha256-nmTVxvbENySXZryA+TOGZ9nRr3m/+Xqc07Sy3aSN5Nw=", "owner": "abenz1267", "repo": "walker", - "rev": "37f0b217cc64d775417dccaf879ef3d091c5d15e", + "rev": "ade63feb9f1d91f1b1bf709bb139060579126c19", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 9cf541b..3303c81 100644 --- a/flake.nix +++ b/flake.nix @@ -2,44 +2,80 @@ description = "unexplrd's personal configuration"; inputs = { - blueprint.url = "github:numtide/blueprint"; - chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; - disko.url = "github:nix-community/disko/latest"; - home-manager.url = "github:nix-community/home-manager"; - hyprland.url = "github:hyprwm/Hyprland"; - hyprsunset.url = "github:hyprwm/hyprsunset"; - lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2"; # lix.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-2.tar.gz"; - mysecrets.url = "git+ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets"; # neve.url = "git+https://gitea.linerds.us/unexplrd/Neve"; # nixvim.url = "github:nix-community/nixvim"; - nix-flatpak.url = "github:gmodena/nix-flatpak"; - nix-index-database.url = "github:nix-community/nix-index-database"; - nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic"; - nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; - nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; - nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable"; - sops-nix.url = "github:mic92/sops-nix"; + # lix.inputs.nixpkgs.follows = "nixpkgs"; + # neve.inputs.nixvim.follows = "nixvim"; + blueprint = { + url = "github:numtide/blueprint"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + chaotic = { + url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + disko = { + url = "github:nix-community/disko/latest"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + hyprland = { + url = "github:hyprwm/Hyprland"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + hyprsunset = { + url = "github:hyprwm/hyprsunset"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.hyprland-protocols.follows = "hyprland/hyprland-protocols"; + inputs.hyprutils.follows = "hyprland/hyprutils"; + }; + lanzaboote = { + url = "github:nix-community/lanzaboote/v0.4.2"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + mysecrets = { + url = "git+ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets"; + flake = false; + }; + nix-flatpak = { + url = "github:gmodena/nix-flatpak"; + }; + nix-index-database = { + url = "github:nix-community/nix-index-database"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixos-cosmic = { + url = "github:lilyinstarlight/nixos-cosmic"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs-stable.follows = "nixpkgs-stable"; + }; + nixos-facter-modules = { + url = "github:numtide/nixos-facter-modules"; + }; + nixpkgs-stable = { + url = "github:nixos/nixpkgs/nixos-24.11"; + }; + nixpkgs = { + url = "github:NixOS/nixpkgs?ref=nixos-unstable"; + }; + sops-nix = { + url = "github:mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + stylix = { + url = "github:danth/stylix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; walker = { url = "github:abenz1267/walker"; inputs.nixpkgs.follows = "nixpkgs"; }; - stylix.url = "github:danth/stylix"; - # TODO: somehow reduce the number of *.inputs.nixpkgs.follows = "nixpkgs" stuff, mb a function? - blueprint.inputs.nixpkgs.follows = "nixpkgs"; - chaotic.inputs.nixpkgs.follows = "nixpkgs"; - disko.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - hyprland.inputs.nixpkgs.follows = "nixpkgs"; - hyprsunset.inputs.hyprland-protocols.follows = "hyprland/hyprland-protocols"; - hyprsunset.inputs.hyprutils.follows = "hyprland/hyprutils"; - hyprsunset.inputs.nixpkgs.follows = "nixpkgs"; - lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; - # lix.inputs.nixpkgs.follows = "nixpkgs"; - mysecrets.flake = false; - # neve.inputs.nixvim.follows = "nixvim"; - nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; - sops-nix.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = inputs: inputs.blueprint {inherit inputs;}; From 2b4790a2ca3452d1466eb579887515f9d02fce54 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 31 May 2025 14:16:19 +0300 Subject: [PATCH 030/138] desktop/niri: lisgd for touchscreen gestures Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 83 +++++++++++++++++---------- modules/nixos/config/users.nix | 11 +++- 2 files changed, 61 insertions(+), 33 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 54baf3f..5f9cfc1 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -145,39 +145,60 @@ in { RestartSec = 1; }; }; - in { - udiskie = mkGraphicalService {}; - waybar = mkGraphicalService {}; - network-manager-applet = mkGraphicalService {}; - copyq = mkGraphicalService { - Service = - graphicalService.Service - // { - Environment = mkForce "QT_QPA_PLATFORM=wayland"; + in + lib.mkMerge [ + { + udiskie = mkGraphicalService {}; + waybar = mkGraphicalService {}; + network-manager-applet = mkGraphicalService {}; + copyq = mkGraphicalService { + Service = + graphicalService.Service + // { + Environment = mkForce "QT_QPA_PLATFORM=wayland"; + }; }; - }; - xwayland-satellite = mkGraphicalService { - Service = - graphicalService.Service - // { - Type = "simple"; - ExecStart = getExe pkgs.xwayland-satellite + " :123"; + xwayland-satellite = mkGraphicalService { + Service = + graphicalService.Service + // { + Type = "simple"; + ExecStart = getExe pkgs.xwayland-satellite + " :123"; + }; }; - }; - wpaperd = mkGraphicalService { - Service = - mkDefault graphicalService.Service; - }; - walker = mkGraphicalService {}; - # gnome-polkit-agent = mkGraphicalService { - # Service = - # graphicalService.Service - # // { - # Type = "simple"; - # ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1"; - # }; - # }; - }; + wpaperd = mkGraphicalService { + Service = + mkDefault graphicalService.Service; + }; + walker = mkGraphicalService {}; + # gnome-polkit-agent = mkGraphicalService { + # Service = + # graphicalService.Service + # // { + # Type = "simple"; + # ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1"; + # }; + # }; + } + (lib.mkIf (hostName == "morphius") { + lisgd = mkGraphicalService { + Service = + graphicalService.Service + // { + # Group = "input"; + Type = "simple"; + ExecStart = + "${pkgs.lisgd}/bin/lisgd" + + " -d /dev/input/by-path/pci-0000:00:15.1-platform-i2c_designware.1-event" + + " -g \"1,DU,TL,*,P,niri msg action toggle-overview\"" + + " -g \"3,UD,T,*,P,niri msg action focus-workspace-up\"" + + " -g \"3,DU,B,*,P,niri msg action focus-workspace-down\"" + + " -g \"3,LR,L,*,P,niri msg action focus-column-left\"" + + " -g \"3,RL,R,*,P,niri msg action focus-column-right\""; + }; + }; + }) + ]; }; }; } diff --git a/modules/nixos/config/users.nix b/modules/nixos/config/users.nix index b39bcf9..7f5605b 100644 --- a/modules/nixos/config/users.nix +++ b/modules/nixos/config/users.nix @@ -2,8 +2,10 @@ inputs, config, pkgs, + lib, ... }: let + inherit (config.networking) hostName; inherit (config.sops) secrets; inherit (inputs) mysecrets; sshKeys = f: "${mysecrets}/ssh/user/id_${f}_ed25519.pub"; @@ -13,15 +15,20 @@ in { users.users = { user = { hashedPasswordFile = secrets."user-password-hashed".path; - extraGroups = ["wheel" "video" "libvirtd" "dialout"]; + extraGroups = + ["wheel" "video" "libvirtd" "dialout"] + /* + for lisgd + */ + ++ lib.optional (hostName == "morphius" && config.desktop.niri.enable) "input"; isNormalUser = true; shell = pkgs.fish; openssh.authorizedKeys.keyFiles = map sshKeys [ "dunamis" "eldrid" - "sarien" "legion" "morphius" + "sarien" ]; }; }; From 3007ff44f26d236a5422a90ee6a6c5545d267e64 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 29 May 2025 14:39:05 +0300 Subject: [PATCH 031/138] desktop/hyprland: refactor Signed-off-by: unexplrd --- modules/home/desktop/hyprland/default.nix | 1258 ++--------------- modules/home/desktop/hyprland/hyprland.nix | 458 ++++++ .../desktop/hyprland/programs/default.nix | 23 + .../hyprland/programs/fuzzel/default.nix | 23 + .../hyprland/programs/hyprlock/default.nix | 94 ++ .../hyprland/programs/walker/default.nix | 307 ++++ .../hyprland/programs/waybar/default.nix | 331 +++++ .../desktop/hyprland/services/default.nix | 65 + .../hyprland/services/swaync/default.nix | 177 +++ 9 files changed, 1574 insertions(+), 1162 deletions(-) create mode 100644 modules/home/desktop/hyprland/hyprland.nix create mode 100644 modules/home/desktop/hyprland/programs/default.nix create mode 100644 modules/home/desktop/hyprland/programs/fuzzel/default.nix create mode 100644 modules/home/desktop/hyprland/programs/hyprlock/default.nix create mode 100644 modules/home/desktop/hyprland/programs/walker/default.nix create mode 100644 modules/home/desktop/hyprland/programs/waybar/default.nix create mode 100644 modules/home/desktop/hyprland/services/default.nix create mode 100644 modules/home/desktop/hyprland/services/swaync/default.nix diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index e4e6517..fb01ee0 100644 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -1,1210 +1,143 @@ { - perSystem, - osConfig, config, - pkgs, + inputs, lib, + osConfig, + perSystem, + pkgs, ... }: let - inherit (config.stylix) colors; - inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe; + inherit (config.lib.stylix) colors; + inherit (lib) mkIf mkEnableOption mkForce getExe; cfg = config.desktop.hyprland; hostname = osConfig.networking.hostName; cursorSize = config.stylix.cursor.size; - fontName = config.stylix.fonts.sansSerif.name; - keyboard = - if hostname == "eldrid" - then "chromeos" - else "platform"; - xdgPictures = - config.xdg.userDirs.pictures; ifLaptop = mkIf (hostname != "dunamis"); + launcher = getExe pkgs.walker; + lockscreen = getExe pkgs.hyprlock; in { options = { desktop.hyprland.enable = mkEnableOption "enable hyprland desktop"; }; config = mkIf cfg.enable { - stylix.targets.waybar.enable = false; - stylix.targets.hyprland.enable = false; - stylix.targets.hyprlock.enable = false; - home.pointerCursor.hyprcursor.enable = true; - home.pointerCursor.hyprcursor.size = cursorSize; - wayland.windowManager.hyprland = { - enable = true; - systemd = { - enable = true; - variables = [ - "--all" - ]; - }; - package = perSystem.hyprland.hyprland; - portalPackage = perSystem.hyprland.xdg-desktop-portal-hyprland; - # plugins = with pkgs.hyprlandPlugins; [ - # hyprspace - # hy3 - # hyprscroller - # ]; - settings = { - input = { - kb_layout = "us,ua"; - resolve_binds_by_sym = - if hostname == "dunamis" - then 0 - else 1; - repeat_rate = 50; - repeat_delay = 300; - # mouse - accel_profile = "flat"; - sensitivity = 0; - }; - device = [ - { - name = "ite-tech.-inc.-ite-device(8910)-keyboard"; - kb_variant = "colemak_dh,"; - } - { - name = "at-translated-set-2-keyboard"; - kb_variant = "colemak_dh,"; - } - { - name = "keyd-virtual-keyboard"; - kb_variant = "colemak_dh,"; - } - ]; - xwayland.force_zero_scaling = true; - monitor = [ - ", preferred, auto, 1" - "desc:AOC 27V2G5 0x0000026C, addreserved, 0, 300, 0, 0" - "desc:Samsung Electric Company S24R65x H4TMA03291, preferred, 0x0, 1, bitdepth, 10, vrr, 1" - "desc:Philips Consumer Electronics Company 27M2N5500 UK02418033254, 2560x1440@180.00Hz, 0x0, 1.3333333, bitdepth, 10, vrr, 1" - "desc:BOE 0x08E8, preferred, 1920x0, 1.2, bitdepth, 10" - "desc:LG Display 0x068B, preferred, 1920x0, 1.2, bitdepth, 10" - "desc:Chimei Innolux Corporation 0x1406, preferred, 1920x0, 1.2" - ]; - env = [ - "ELECTRON_OZONE_PLATFORM_HINT,auto" - "QT_QPA_PLATFORM,wayland" - "QT_QPA_PLATFORMTHEME,gtk3" - "XCURSORSIZE,${toString cursorSize}" - "GSK_RENDERER,ngl" - ]; - decoration = { - shadow.enabled = false; - # drop_shadow = false; - blur = { - size = 8; - passes = 3; - }; - # shadow_offset = "0 5"; - # "col.shadow" = "rgba(00000099)"; - rounding = 12; - }; - misc = { - font_family = fontName; - disable_splash_rendering = true; - disable_hyprland_logo = true; - # vfr = true; - }; - bezier = [ - "easeOutQuad, 0.25, 0.46, 0.45, 0.94" - "easeOutExpo, 0.19, 1, 0.22, 1" - ]; - animation = [ - "workspaces, 1, 3, easeOutExpo, slidefade 20%" - "windows, 1, 3, easeOutExpo, popin 80%" - "layers, 1, 2, easeOutExpo, fade" - ]; - plugin = [ - { - overview = { - gapsIn = 12; - gapsOut = 24; - exitOnClick = true; - centerAligned = true; - showNewWorkspace = false; - showEmptyWorkspace = false; - affectStrut = false; - }; - hyprexpo = { - columns = 3; - gap_size = 8; - #bg_col = "rgb(111111)"; - workspace_method = "first 1"; # [center/first] [workspace] e.g. first 1 or center m+1 - enable_gesture = true; # laptop touchpad - gesture_fingers = 3; # 3 or 4 - gesture_distance = 400; # how far is the "max" - gesture_positive = false; # positive = swipe down. Negative = swipe up.; - }; - } - { - hy3 = { - autotile = true; - tab_first_window = false; - tabs = { - render_text = true; - height = 24; - padding = 8; - rounding = 8; - text_height = 14; - text_center = true; - text_font = fontName; - - "col.active" = "0xff${colors.base00}"; - "col.inactive" = "0xff${colors.base00}"; - "col.urgent" = "0xff${colors.base00}"; - "col.active.text" = "0xff${colors.base0D}"; - "col.inactive.text" = "0xff${colors.base05}"; - "col.urgent.text" = "0xff${colors.base09}"; - "col.active.border" = "0xff${colors.base00}"; - "col.inactive.border" = "0xff${colors.base00}"; - "col.urgent.border" = "0xff${colors.base00}"; - }; - }; - } - { - scroller = { - column_widths = "onethird onehalf twothirds one"; - window_heights = "onethird onehalf twothirds one"; - gesture_scroll_fingers = 3; - gesture_overview_fingers = 3; - jump_labels_font = fontName; - jump_labels_color = "0xff${colors.base0A}"; - }; - } - ]; - - dwindle = { - force_split = 2; - default_split_ratio = 1.2; - }; - master = { - mfact = 0.6; - }; - - "$mod" = "SUPER"; - "$modShift" = "$mod SHIFT"; - "$modCtrl" = "$mod CTRL"; - "$modShiftCtrl" = "$mod SHIFT CTRL"; - - "$left" = "N"; - "$down" = "E"; - "$up" = "I"; - "$right" = "O"; - - "$terminal" = "ghostty"; - "$dlauncher" = "tofi-drun"; - "$launcher" = "tofi-run | xargs hyprctl dispatch exec --"; - "$screenLocker" = "hyprlock"; - "$webBrowser" = "io.github.zen_browser.zen"; - "$clipboardManager" = "copyq menu"; - - general = { - "col.active_border" = "0xff${colors.base0D}"; - "col.inactive_border" = "0xff${colors.base03}"; - gaps_in = 4; - gaps_out = 8; - border_size = 3; - allow_tearing = true; - layout = "dwindle"; - }; - group = { - "col.border_active" = "0xff${colors.base0D}"; - "col.border_inactive" = "0xff${colors.base03}"; - "col.border_locked_active" = "0xff${colors.base0A}"; - "col.border_locked_inactive" = "0xff${colors.base0F}"; - groupbar = { - height = 16; - rounding = 0; - indicator_height = 0; - gradient_rounding = 4; - font_size = 14; - gradients = true; - font_family = fontName; - "text_color" = "0xff${colors.base00}"; - "col.active" = "0xff${colors.base0D}"; - "col.inactive" = "0xff${colors.base03}"; - }; - }; - binds.scroll_event_delay = 0; - cursor.persistent_warps = true; - - bind = [ - "$mod, Return, exec, $terminal" - "$mod, Space, exec, $dlauncher" - "$modShift, Space, exec, $launcher" - "$modCtrl, Q, killactive" - "$modCtrl, M, fullscreen" - "$modCtrl, G, togglefloating" - "$mod, G, pin" - - "$mod, T, togglegroup" - "$mod, period, changegroupactive, f" - "$mod, comma, changegroupactive, b" - "$modCtrl, period, movewindoworgroup, r" - "$modCtrl, comma, movewindoworgroup, l" - - "$mod, Tab, cyclenext," - "$modShift, Tab, cyclenext, prev" - "$mod, Tab, bringactivetotop," - - "$modShift, U, focusurgentorlast" - - "$modCtrl, L, exec, $screenLocker" - "$modCtrl, B, exec, $webBrowser" - "$modCtrl, V, exec, $clipboardManager" - "$modCtrl, K, focuswindow, title:(Meet:.*)" - - # ", Print, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -o -r -c '\#\#00000000')\" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ${xdgPictures}/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png" - ", Print, exec, hyprshot -z -m region -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" - "CTRL, Print, exec, hyprshot -z -m window -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" - "SHIFT, Print, exec, hyprshot -z -m output -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" - ## navigation - "$mod, $left, movefocus, l" - "$mod, $down, movefocus, d" - "$mod, $up, movefocus, u" - "$mod, $right, movefocus, r" - "$modShift, $left, workspace, e-1" - "$modShift, $right, workspace, e+1" - "$mod, left, movefocus, l" - "$mod, up, movefocus, u" - "$mod, down, movefocus, d" - "$mod, right, movefocus, r" - "$modShift, W, focuscurrentorlast" - "$mod, mouse_down, workspace, e-1" - "$mod, mouse_up, workspace, e+1" - "$modShift, left, workspace, e-1" - "$modShift, right, workspace, e+1" - - "$modCtrl, $left, movewindow, l" - "$modCtrl, $down, movewindow, d" - "$modCtrl, $up, movewindow, u" - "$modCtrl, $right, movewindow, r" - "$modCtrl, left, movewindow, l" - "$modCtrl, up, movewindow, u" - "$modCtrl, down, movewindow, d" - "$modCtrl, right, movewindow, r" - # workspaces - "$mod, 1, workspace, 1" - "$mod, 2, workspace, 2" - "$mod, 3, workspace, 3" - "$mod, 4, workspace, 4" - "$mod, 5, workspace, 5" - "$mod, 6, workspace, 6" - "$mod, 7, workspace, 7" - "$mod, 8, workspace, 8" - "$mod, 9, workspace, 9" - "$mod, 0, togglespecialworkspace" - - "$modShiftCtrl, 1, movetoworkspace, 1" - "$modShiftCtrl, 2, movetoworkspace, 2" - "$modShiftCtrl, 3, movetoworkspace, 3" - "$modShiftCtrl, 4, movetoworkspace, 4" - "$modShiftCtrl, 5, movetoworkspace, 5" - "$modShiftCtrl, 6, movetoworkspace, 6" - "$modShiftCtrl, 7, movetoworkspace, 7" - "$modShiftCtrl, 8, movetoworkspace, 8" - "$modShiftCtrl, 9, movetoworkspace, 9" - "$modShiftCtrl, 0, movetoworkspace, special" - - "$mod, Q, workspace, 1" - "$mod, W, workspace, 2" - "$mod, F, workspace, 3" - "$mod, P, workspace, 4" - "$mod, B, workspace, 5" - "$mod, J, workspace, 6" - "$mod, L, workspace, 7" - "$mod, U, workspace, 8" - "$mod, Y, workspace, 9" - "$mod, apostrophe, togglespecialworkspace" - - "$modShiftCtrl, Q, movetoworkspace, 1" - "$modShiftCtrl, W, movetoworkspace, 2" - "$modShiftCtrl, F, movetoworkspace, 3" - "$modShiftCtrl, P, movetoworkspace, 4" - "$modShiftCtrl, B, movetoworkspace, 5" - "$modShiftCtrl, J, movetoworkspace, 6" - "$modShiftCtrl, L, movetoworkspace, 7" - "$modShiftCtrl, U, movetoworkspace, 8" - "$modShiftCtrl, Y, movetoworkspace, 9" - "$modShiftCtrl, apostrophe, movetoworkspace, special" - - "$modShiftCtrl, $left, movetoworkspace, e-1" - "$modShiftCtrl, $right, movetoworkspace, e+1" - "$modShiftCtrl, left, movetoworkspace, e-1" - "$modShiftCtrl, right, movetoworkspace, e+1" - - ''$mod ALT, mouse_down, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 1.25}')"'' - ''$mod ALT, mouse_up, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 1.25}')"'' - "$mod ALT, mouse:274, exec, hyprctl keyword cursor:zoom_factor 1" # middle wheel click - ]; - # binde = [ - # "$mod, comma, resizeactive, -10 0" - # "$mod, period, resizeactive, 10 0" - # "$modShift, comma, resizeactive, 0 -10" - # "$modShift, period, resizeactive, 0 10" - # ]; - bindl = [ - "$mod, Escape, exec, hyprctl switchxkblayout all next" - ", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'" - ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, preferred, 1920x0, 1.2'" - ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ", XF86AudioPlay, exec, playerctl play-pause" - ", XF86AudioPrev, exec, playerctl previous" - ", XF86AudioNext, exec, playerctl next" - "$modShiftCtrl ALT, Q, exit" - ]; - binde = [ - ", XF86MonBrightnessUp, exec, brightnessctl s 5%+" - ", XF86MonBrightnessDown, exec, brightnessctl s 5%-" - "ALT, XF86MonBrightnessUp, exec, brightnessctl s 5%+ -d ${keyboard}::kbd_backlight" - "ALT, XF86MonBrightnessDown, exec, brightnessctl s 5%- -d ${keyboard}::kbd_backlight" - ", XF86KbdBrightnessUp, exec, brightnessctl s 5%+ -d ${keyboard}::kbd_backlight" - ", XF86KbdBrightnessDown, exec, brightnessctl s 5%- -d ${keyboard}::kbd_backlight" - ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" - ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - ]; - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - "$mod ALT, mouse:272, resizewindow" - ]; - gestures = { - workspace_swipe = true; - workspace_swipe_fingers = 3; - workspace_swipe_distance = 300; - }; - - workspace = [ - "1, defaultName:general" - "2, defaultName:web" - "3, defaultName:chat" - "4, defaultName:code" - "5, defaultName:uni" - "6, defaultName:games" - "7, defaultName:system" - "8, defaultName:media" - "9, defaultName:tray" - # "10, defaultName:" - ]; - windowrulev2 = [ - ## tray/misc utilities - # file picker - "float, class:xdg-desktop-portal-gtk" - "size <50% <90%, class:xdg-desktop-portal-gtk" - "center 1, class:xdg-desktop-portal-gtk" - # xdp-hyprland stream picker - "float, initialTitle:MainPicker" - # general apps - "float, class:(com.saivert.pwvucontrol)" - "float, class:(re.sonny.Junction)" - "float, class:(com.github.hluk.copyq)" - "float, class:(nm-connection-editor)" - "float, class:(.blueman-manager-wrapped)" - # telegram - "maximize, initialTitle:Медіапереглядач" - "noborder, title:TelegramDesktop" - "keepaspectratio, title:TelegramDesktop" - "noblur, title:TelegramDesktop" - "float, title:TelegramDesktop" - "pin, title:TelegramDesktop" - # any chromium-based - "noborder, title:Картинка в картинці" - "keepaspectratio, title:Картинка в картинці" - "noblur, title:Картинка в картинці" - "float, title:Картинка в картинці" - "pin, title:Картинка в картинці" - # and firefox - "noborder, title:Picture-in-Picture" - "keepaspectratio, title:Picture-in-Picture" - "noblur, title:Picture-in-Picture" - "float, title:Picture-in-Picture" - "pin, title:Picture-in-Picture" - # screenshot editor - "noanim, class:com.gabm.satty" - "float, class:com.gabm.satty" - "rounding 0, class:com.gabm.satty" - "size 100% 100%, class:com.gabm.satty" - "move 0 0, class:com.gabm.satty" - "pin, class:com.gabm.satty" - ## games - "float, class:(com.mojang.minecraft.java-edition)" - "immediate, class:(com.mojang.minecraft.java-edition)" - # cs2 - "immediate, class:(cs2)" - # deadlock - # "float, class:(steam_app_1422450)" - "fullscreen, class:(steam_app_1422450)" - "immediate, class:(steam_app_1422450)" - "immediate, initialTitle:(Ghostrunner)" - # dead by daylight - "immediate, class:deadbydaylight-egs-shipping.exe" - ## workspace assignments - "workspace name:chat, class:org.telegram.desktop" - "workspace name:chat, class:org.signal.Signal" - "workspace name:chat, class:im.riot.Riot" - "workspace name:chat, class:WebCord" - - "workspace name:games, class:com.heroicgameslauncher.hgl" - "workspace name:games, class:net.lutris.Lutris" - "workspace name:games, class:steam" - # "workspace name:game, class:" - ]; - }; - extraConfig = '' - bind = $modShift, R, submap, resize - submap = resize - binde = , right, resizeactive, 10 0 - binde = , left, resizeactive, -10 0 - binde = , up, resizeactive, 0 -10 - binde = , down, resizeactive, 0 10 - binde = , $right, resizeactive, 10 0 - binde = , $left, resizeactive, -10 0 - binde = , $up, resizeactive, 0 -10 - binde = , $down, resizeactive, 0 10 - bind = , escape, submap, reset - submap = reset - ''; + stylix.targets = { + waybar.enable = false; + hyprland.enable = false; + hyprlock.enable = false; + qt.enable = false; }; - services = { - hyprpaper.enable = true; - hypridle = { - enable = true; - settings = { - general = { - before_sleep_cmd = "loginctl lock-session"; - after_sleep_cmd = "hyprctl dispatch dpms on"; - lock_cmd = "pidof hyprlock || hyprlock"; - # unlock_cmd = "loginctl unlock-session"; - }; - listener = [ - { - timeout = 600; - on-timeout = "pidof hyprlock || hyprlock"; - } - { - timeout = 601; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - ]; - }; + home.pointerCursor.hyprcursor = { + enable = true; + size = cursorSize; + }; + dconf.settings = { + "org/gnome/desktop/wm/preferences" = { + button-layout = "icon:close"; }; - network-manager-applet.enable = true; - blueman-applet.enable = true; - playerctld.enable = true; - copyq.enable = true; - gnome-keyring = { - enable = true; - components = ["secrets" "ssh"]; + "org/gnome/desktop/interface" = { + icon-theme = config.gtk.iconTheme.name; + color-scheme = + if config.stylix.polarity == "dark" + then lib.mkDefault "prefer-dark" + else lib.mkDefault "prefer-light"; }; }; gtk = { enable = true; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme; - }; + iconTheme = let + name = + if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) + then "Gruvbox-Plus-Dark" + else if config.stylix.polarity == "dark" + then "Papirus-Dark" + else "Papirus-Light"; + package = + if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) + then pkgs.gruvbox-plus-icons + else if (lib.strings.hasPrefix "rose-pine" osConfig.module.stylix.theme) + then pkgs.papirus-icon-theme.override {color = "indigo";} + else if (lib.strings.hasPrefix "nord" osConfig.module.stylix.theme) + then pkgs.papirus-icon-theme.override {color = "nordic";} + else pkgs.papirus-icon-theme; + in {inherit name package;}; }; qt = { enable = true; - platformTheme.name = mkDefault "gtk3"; + platformTheme.name = "gtk3"; }; - dconf.settings = { - "org/gnome/desktop/interface" = { - icon-theme = "${config.gtk.iconTheme.name}"; - }; - }; - programs.waybar = { - enable = true; - systemd = { - enable = true; - target = "graphical-session.target"; - }; - settings = { - bar-0 = { - layer = "top"; - position = "bottom"; - height = 32; - spacing = 4; - margin-left = 11; - margin-right = 11; - reload_style_on_change = true; - modules-left = [ - "hyprland/language" - "hyprland/workspaces" - "wlr/taskbar" - ]; - # modules-center = []; - modules-right = [ - "wireplumber" - (ifLaptop "group/laptop") - "tray" - "privacy" - (ifLaptop "power-profiles-daemon") - "idle_inhibitor" - "custom/notification" - "clock" - ]; - "hyprland/workspaces" = { - format = "{icon}"; - format-icons = { - "1" = "I"; - "2" = "II"; - "3" = "III"; - "4" = "IV"; - "5" = "V"; - "6" = "VI"; - "7" = "VII"; - "8" = "IIX"; - "9" = "IX"; - "10" = "X"; - general = "󰘧"; - web = "󰖟"; - chat = "󰻞"; - code = "󰅩"; - uni = "󱆀"; - games = "󰺶"; - system = "󰢻"; - media = "󱜐"; - tray = "󱊖"; - }; - }; - "hyprland/language" = { - format = "{}"; - format-en = "🇺🇸"; - format-uk = "🇺🇦"; - }; - "custom/separator" = { - format = "󰝠"; - interval = "once"; - tooltip = false; - }; - "group/laptop" = { - orientation = "inherit"; - modules = [ - "battery" - "backlight" - ]; - }; - "backlight" = { - format = "{percent}% {icon}"; - format-icons = ["" ""]; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = "󰅶"; - deactivated = "󰾪"; - }; - }; - "tray" = { - icon-size = 24; - spacing = 2; - }; - "clock" = { - interval = 1; - format = "{:%H:%M:%S}"; - tooltip-format = "{:%d.%m.%Y}"; - }; - battery = { - states = { - good = 95; - warning = 30; - critical = 15; - }; - format = "{capacity}% {icon}"; - format-full = "{capacity}% 󱟢"; - format-charging = "{capacity}% 󰂄"; - format-plugged = "{capacity}% 󰚥"; - format-alt = "{icon} {time}"; - format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; - }; - "upower" = { - icon-size = 16; - format = "{percentage}"; - hide-if-empty = true; - tooltip = true; - tooltip-spacing = 20; - }; - "power-profiles-daemon" = { - format = "{icon}"; - tooltip-format = "Power profile: {profile}\nDriver: {driver}"; - tooltip = true; - format-icons = { - default = "󱡮"; - performance = "󱡮"; - balanced = ""; - power-saver = ""; - }; - }; - "wireplumber" = { - scroll-step = 3; - format = "{volume}% {icon}"; - format-muted = "󰖁"; - format-icons = ["󰕿" "󰖀" "󰕾"]; - on-click = "${pkgs.pwvucontrol}/bin/pwvucontrol"; - on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon}"; - format-icons = { - notification = ""; - none = ""; - dnd-notification = ""; - dnd-none = ""; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "swaync-client -t -sw"; - on-click-right = "swaync-client -d -sw"; - escape = true; - }; - "privacy" = { - icon-spacing = 2; - icon-size = 16; - transition-duration = 250; - screenshare = { - type = "screenshare"; - tooltip = true; - tooltip-icon-size = 24; - }; - audio-in = { - type = "audio-in"; - tooltip = true; - tooltip-icon-size = 24; - }; - }; - "wlr/taskbar" = { - format = "{icon}"; - icon-size = 24; - icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; - tooltip-format = "{title}"; - on-click = "activate"; - }; - }; - }; - style = '' - @define-color base00 #${colors.base00}; - @define-color base01 #${colors.base01}; - @define-color base02 #${colors.base02}; - @define-color base03 #${colors.base03}; - @define-color base04 #${colors.base04}; - @define-color base05 #${colors.base05}; - @define-color base06 #${colors.base06}; - @define-color base07 #${colors.base07}; - @define-color base08 #${colors.base08}; - @define-color base09 #${colors.base09}; - @define-color base0A #${colors.base0A}; - @define-color base0B #${colors.base0B}; - @define-color base0C #${colors.base0C}; - @define-color base0D #${colors.base0D}; - @define-color base0E #${colors.base0E}; - @define-color base0F #${colors.base0F}; - * { - font-family: ${fontName}, FontAwesome; - font-weight: 500; - font-size: 100%; - } - window#waybar { - background-color: transparent; - color: @base05; - transition-property: background-color; - transition-duration: 0.5s; - } - .modules-left, - .modules-right { - border-top-left-radius: 12px; - border-top-right-radius: 12px; - border-bottom-left-radius: 0px; - border-bottom-right-radius: 0px; - background-color: @base00; - color: @base05; - padding: 0 0.5em; - } - tooltip { - background: @base01; - border: 1px solid @base0E; - } - tooltip label { - color: @base05; - } - button { - box-shadow: inset 0 -3px transparent; - border-radius: 16px; - } - button:hover { - background: inherit; - box-shadow: inset 0 -3px transparent; - } - #mode { - background-color: rgba(0, 0, 0, 0.2); - box-shadow: inset 0 -3px @base05; - } - #battery, - #backlight, - #workspaces, - #taskbar, - #language, - #clock, - #battery, - #backlight, - #wireplumber, - #custom-separator { - padding: 0 0.3em; - } - #privacy, - #tray button, - #privacy-item, - #idle_inhibitor, - #custom-notification, - #power-profiles-daemon, - #workspaces button { - padding: 0 0.2em; - } - #taskbar button { - padding: 0 0.1em; - } - #workspaces button.active { - color: @base0D; - } - #taskbar button:hover { - box-shadow: transparent; - } - #taskbar.empty, - window#empty { - background-color: transparent; - } - #battery.critical:not(.charging) { - color: @base09; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } - #power-profiles-daemon.performance { - color: @base0D; - } - #power-profiles-daemon.balanced { - color: @base0B; - } - #power-profiles-daemon.power-saver { - color: @base0A; - } - label:focus { - background-color: #000000; - } - #tray > .passive { - -gtk-icon-effect: dim; - } - #tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: @base08; - } - #privacy-item.screenshare { - color: @base0C; - } - #privacy-item.audio-in { - color: @base0E; - } - ''; - }; - programs.tofi = { - enable = true; - settings = { - drun-launch = true; - anchor = "bottom"; - width = "50%"; - height = 30; - padding-right = 6; - padding-left = 6; - padding-bottom = 0; - padding-top = 0; - margin-bottom = 2; - border-width = 0; - corner-radius = 12; - outline-width = 0; - min-input-width = 128; - result-spacing = 12; - require-match = false; - horizontal = true; - prompt-text = "~>"; - }; - }; - services.swaync = { - enable = true; - settings = { - cssPriority = "user"; - image-visibility = "when-available"; - keyboard-shortcut = true; - relative-timestamps = true; - timeout = 5; - timeout-low = 5; - timeout-critical = 0; - script-fail-notify = true; - transition-time = 200; - # Layer settings - layer-shell = true; - layer = "overlay"; - control-center-layer = "overlay"; + programs.walker = import ./programs/walker {inherit config inputs pkgs;}; + programs.waybar = import ./programs/waybar {inherit config colors getExe ifLaptop pkgs;}; + wayland.windowManager.hyprland = import ./hyprland.nix {inherit config osConfig perSystem launcher lockscreen;}; + services = import ./services {inherit pkgs lockscreen getExe perSystem;}; - # Notification settings - positionX = "right"; - positionY = "top"; - notification-2fa-action = true; - notification-inline-replies = false; - notification-icon-size = 32; - notification-body-image-height = 100; - notification-body-image-width = 200; - notification-window-width = 400; - - # Control center settings - control-center-positionX = "right"; - control-center-positionY = "top"; - control-center-width = 500; - control-center-exclusive-zone = true; - fit-to-screen = true; - hide-on-action = true; - hide-on-clear = false; - - # Widget settings - widgets = [ - "title" - "dnd" - "notifications" - "mpris" - ]; - - widget-config = { - title = { - text = "Notifications"; - clear-all-button = true; - button-text = "Clear All"; - }; - dnd = { - text = "Do Not Disturb"; - }; - mpris = { - image-size = 96; - image-radius = 12; - blur = true; - }; - }; - }; - style = '' - /*** Global ***/ - progress, - progressbar, - trough { - border-radius: 16px; - } - - .app-icon, - .image { - -gtk-icon-effect: none; - } - - .notification-action { - border-radius: 12px; - margin: 0.5rem; - } - - .close-button { - margin: 24px; - padding: 0.2rem; - border-radius: 16px; - } - - /*** Notifications ***/ - .notification-group.collapsed - .notification-row:not(:last-child) - .notification-action, - .notification-group.collapsed - .notification-row:not(:last-child) - .notification-default-action { - opacity: 0; - } - - .trough { - margin: 4px; - border-radius: 7px; - } - - .notification, - .notification.low, - .notification.normal, - .notification.critical, - .control-center { - margin: 16px; - border-radius: 7px; - } - - .floating-notifications, - .notification-content { - border-radius: 7px; - } - - .control-center-list { - background: transparent; - } - - /*** Widgets ***/ - /* Title widget */ - .widget-title { - margin: 0.5rem; - } - - .widget-title > label { - font-weight: bold; - } - - .widget-title > button { - border-radius: 16px; - padding: 0.5rem; - } - - /* DND Widget */ - .widget-dnd { - margin: 0.5rem; - } - - .widget-dnd > label { - font-weight: bold; - } - - .widget-dnd > switch { - border-radius: 16px; - } - - .widget-dnd > switch slider { - border-radius: 16px; - padding: 0.25rem; - } - - /* Mpris widget */ - .widget-mpris .widget-mpris-player { - border-radius: 16px; - margin: 0.5rem; - padding: 0.5rem; - } - - .widget-mpris .widget-mpris-player .widget-mpris-album-art { - border-radius: 16px; - } - - .widget-mpris .widget-mpris-player .widget-mpris-title { - font-weight: bold; - } - - .widget-mpris .widget-mpris-player .widget-mpris-subtitle { - font-weight: normal; - } - - .widget-mpris .widget-mpris-player > box > button { - border: 1px solid transparent; - border-radius: 16px; - padding: 0.25rem; - } - ''; - }; - services.dunst = { - enable = false; - settings = { - global = { - width = 300; - height = 300; - icon_theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; - corner_radius = mkDefault 9; - #corners = "top-right,bottom-left"; - offset = "16x16"; - origin = "bottom-right"; - timeout = 15; - frame_width = 3; - notification_limit = 5; - }; - rule-telegram = { - "desktop_entry" = "org.telegram.desktop"; - "urgency" = "normal"; - }; - }; - }; - programs.hyprlock = { - enable = true; - settings = { - general = { - disable_loading_bar = true; - #grace = 300; - hide_cursor = true; - no_fade_in = false; - }; - - background = [ - { - path = "screenshot"; - blur_passes = 4; - blur_size = 8; - } - ]; - - input-field = [ - { - size = "274, 50"; - rounding = 12; - outline_thickness = 3; - position = "0, 0"; - monitor = ""; - dots_center = true; - fade_on_empty = false; - font_family = "${config.stylix.fonts.serif.name}"; - font_color = "rgb(${colors.base05})"; - inner_color = "rgb(${colors.base00})"; - outer_color = "rgb(${colors.base0D})"; - check_color = "rgb(${colors.base0A})"; - fail_color = "rgb(${colors.base08})"; - placeholder_text = "locked..."; - fail_text = "wrong"; - shadow_passes = 0; - } - ]; - shape = [ - { - rounding = 12; - #border_size = 3; - size = "274, 50"; - color = "rgb(${colors.base00})"; - border_color = "rgb(${colors.base0D})"; - position = "0, 60"; - halign = "center"; - valign = "center"; - } - { - rounding = 12; - #border_size = 3; - size = "274, 50"; - color = "rgb(${colors.base00})"; - border_color = "rgb(${colors.base0D})"; - position = "0, -60"; - halign = "center"; - valign = "center"; - } - ]; - label = [ - { - monitor = ""; - text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; - text_align = "center"; - font_size = 16; - font_family = "${config.stylix.fonts.serif.name}"; - outer_color = "rgb(${colors.base00})"; - color = "rgb(${colors.base05})"; - position = "0, 60"; - halign = "center"; - valign = "center"; - } - { - monitor = ""; - text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +'%m/%d %a %T')"; - text_align = "center"; - font_size = 16; - font_family = "${config.stylix.fonts.serif.name}"; - outer_color = "rgb(${colors.base00})"; - color = "rgb(${colors.base05})"; - position = "0, -60"; - halign = "center"; - valign = "center"; - } - ]; - }; - }; - services.gammastep = { - enable = true; - provider = "manual"; - latitude = 49.6; - longitude = 36.1; - tray = true; - temperature = { - day = 6500; - night = 3000; - }; - }; - services.wlsunset = { - enable = false; - latitude = "49.6"; - longitude = "36.1"; - temperature = { - day = 6500; - night = 3000; - }; - systemdTarget = "graphical-session.target"; - }; - services.udiskie = { - enable = true; - automount = false; - notify = true; - tray = "auto"; - }; - home.packages = with pkgs; [ - brightnessctl - nautilus - helvum - loupe - evince - junction - celluloid - mission-center - dconf - hyprshot - grim - slurp - libnotify - playerctl - wdisplays - pwvucontrol - wl-clipboard-rs - libqalculate - ]; + home.packages = with pkgs; + [ + # gui libadwaita apps + celluloid # mpv gui in libadwaita + gnome-text-editor + helvum # pipewire patchbay in rust + junction # app chooser + loupe # image viewer and editor in rust + mission-center # task manager in rust (partly) + nautilus # file manager + overskride # bluetooth gui in rust + papers # pdf reader in rust + pika-backup # borg gui in rust + pwvucontrol # pipewire gui in rust + sonusmix # pipewire routing tool in rust + wdisplays # wlroots display configurator + ] + ++ [ + # misc utils + (ifLaptop brightnessctl) + grim + slurp + hyprshot + dconf + libnotify + playerctl + wl-clipboard-rs # wl-clipboard in rust + ]; xdg = { mime.enable = true; mimeApps = { enable = true; defaultApplications = let file_manager = ["org.gnome.Nautilus.desktop"]; - web_browser = ["re.sonny.Junction.desktop"]; image_viewer = ["org.gnome.Loupe.desktop"]; + pdf_reader = ["org.gnome.Papers.desktop"]; video_player = ["io.github.celluloid_player.Celluloid.desktop"]; - pdf_reader = ["org.gnome.Evince.desktop"]; + web_browser = ["re.sonny.Junction.desktop"]; in { + "application/pdf" = pdf_reader; + "image/jpeg" = image_viewer; + "image/png" = image_viewer; "inode/directory" = file_manager; - "video/x-matroska" = video_player; + "text/html" = web_browser; "video/mp4" = video_player; "video/mpeg" = video_player; + "video/x-matroska" = video_player; "video/x-mpeg" = video_player; - "image/png" = image_viewer; - "image/jpeg" = image_viewer; - "application/pdf" = pdf_reader; - "text/html" = web_browser; + "x-scheme-handler/about" = web_browser; "x-scheme-handler/http" = web_browser; "x-scheme-handler/https" = web_browser; - "x-scheme-handler/about" = web_browser; "x-scheme-handler/unknown" = web_browser; }; }; - desktopEntries = { - zen-browser-profile = { - name = "Zen Browser (Choose profile)"; - icon = "app.zen_browser.zen"; - exec = "flatpak run --branch=stable --arch=x86_64 --command=launch-script.sh --file-forwarding app.zen_browser.zen --ProfileManager @@u %u @@"; - }; - logseq-wayland = { - name = "Logseq Desktop (Wayland)"; - icon = "com.logseq.Logseq"; - exec = "flatpak run --branch=stable --arch=x86_64 --command=run.sh --file-forwarding com.logseq.Logseq @@u %U @@ --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations"; - }; - }; + # desktopEntries = { + # zen-browser-profile = { + # name = "Zen Browser (Choose profile)"; + # icon = "app.zen_browser.zen"; + # exec = "flatpak run --branch=stable --arch=x86_64 --command=launch-script.sh --file-forwarding app.zen_browser.zen --ProfileManager @@u %u @@"; + # }; + # logseq-wayland = { + # name = "Logseq Desktop (Wayland)"; + # icon = "com.logseq.Logseq"; + # exec = "flatpak run --branch=stable --arch=x86_64 --command=run.sh --file-forwarding com.logseq.Logseq @@u %U @@ --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-features=WaylandWindowDecorations"; + # }; + # }; }; systemd.user = { settings.Manager.DefaultEnvironment = { @@ -1256,6 +189,7 @@ in { ExecStart = "${getExe perSystem.hyprsunset.hyprsunset} -t 6500"; }; }; + walker = mkGraphicalService {}; }; }; }; diff --git a/modules/home/desktop/hyprland/hyprland.nix b/modules/home/desktop/hyprland/hyprland.nix new file mode 100644 index 0000000..ef443cc --- /dev/null +++ b/modules/home/desktop/hyprland/hyprland.nix @@ -0,0 +1,458 @@ +{ + config, + osConfig, + perSystem, + launcher, + lockscreen, + # pkgs, + # lib, + ... +}: let + inherit (config.lib.stylix) colors; + # inherit (lib) mkIf; + hostname = osConfig.networking.hostName; + cursorSize = config.stylix.cursor.size; + fontName = config.stylix.fonts.sansSerif.name; + keyboard = + if hostname == "eldrid" + then "chromeos" + else "platform"; + xdgPictures = + config.xdg.userDirs.pictures; + # ifLaptop = mkIf (hostname != "dunamis"); +in { + enable = true; + systemd = { + enable = true; + variables = [ + "--all" + ]; + }; + package = perSystem.hyprland.hyprland; + portalPackage = perSystem.hyprland.xdg-desktop-portal-hyprland; + # plugins = with pkgs.hyprlandPlugins; [ + # hyprspace + # hy3 + # hyprscroller + # ]; + settings = { + input = { + kb_layout = "us,ua"; + resolve_binds_by_sym = + if hostname == "dunamis" + then 0 + else 1; + repeat_rate = 50; + repeat_delay = 300; + # mouse + accel_profile = "flat"; + sensitivity = 0; + }; + device = [ + { + name = "ite-tech.-inc.-ite-device(8910)-keyboard"; + kb_variant = "colemak_dh,"; + } + { + name = "at-translated-set-2-keyboard"; + kb_variant = "colemak_dh,"; + } + { + name = "keyd-virtual-keyboard"; + kb_variant = "colemak_dh,"; + } + ]; + xwayland.force_zero_scaling = true; + monitor = [ + ", preferred, auto, 1" + "desc:AOC 27V2G5 0x0000026C, addreserved, 0, 300, 0, 0" + "desc:Samsung Electric Company S24R65x H4TMA03291, preferred, 0x0, 1, bitdepth, 10, vrr, 1" + "desc:Philips Consumer Electronics Company 27M2N5500 UK02418033254, 2560x1440@180.00Hz, 0x0, 1.3333333, bitdepth, 10, vrr, 1" + "desc:BOE 0x08E8, preferred, 1920x0, 1.2, bitdepth, 10" + "desc:LG Display 0x068B, preferred, 1920x0, 1.2, bitdepth, 10" + "desc:Chimei Innolux Corporation 0x1406, preferred, 1920x0, 1.2" + "desc:KDC 0x0000, preferred, 1920x0, 1.25" + ]; + env = [ + "ELECTRON_OZONE_PLATFORM_HINT,auto" + "QT_QPA_PLATFORM,wayland" + "QT_QPA_PLATFORMTHEME,gtk3" + "XCURSORSIZE,${toString cursorSize}" + "GSK_RENDERER,ngl" + ]; + decoration = { + shadow.enabled = false; + # drop_shadow = false; + blur = { + size = 8; + passes = 3; + }; + # shadow_offset = "0 5"; + # "col.shadow" = "rgba(00000099)"; + rounding = 12; + }; + misc = { + font_family = fontName; + disable_splash_rendering = true; + disable_hyprland_logo = true; + # vfr = true; + }; + bezier = [ + "easeOutQuad, 0.25, 0.46, 0.45, 0.94" + "easeOutExpo, 0.19, 1, 0.22, 1" + ]; + animation = [ + "workspaces, 1, 3, easeOutExpo, slidefade 20%" + "windows, 1, 3, easeOutExpo, popin 80%" + "layers, 1, 2, easeOutExpo, fade" + ]; + plugin = [ + { + overview = { + gapsIn = 12; + gapsOut = 24; + exitOnClick = true; + centerAligned = true; + showNewWorkspace = false; + showEmptyWorkspace = false; + affectStrut = false; + }; + hyprexpo = { + columns = 3; + gap_size = 8; + #bg_col = "rgb(111111)"; + workspace_method = "first 1"; # [center/first] [workspace] e.g. first 1 or center m+1 + enable_gesture = true; # laptop touchpad + gesture_fingers = 3; # 3 or 4 + gesture_distance = 400; # how far is the "max" + gesture_positive = false; # positive = swipe down. Negative = swipe up.; + }; + } + { + hy3 = { + autotile = true; + tab_first_window = false; + tabs = { + render_text = true; + height = 24; + padding = 8; + rounding = 8; + text_height = 14; + text_center = true; + text_font = fontName; + + "col.active" = "0xff${colors.base00}"; + "col.inactive" = "0xff${colors.base00}"; + "col.urgent" = "0xff${colors.base00}"; + "col.active.text" = "0xff${colors.base0D}"; + "col.inactive.text" = "0xff${colors.base05}"; + "col.urgent.text" = "0xff${colors.base09}"; + "col.active.border" = "0xff${colors.base00}"; + "col.inactive.border" = "0xff${colors.base00}"; + "col.urgent.border" = "0xff${colors.base00}"; + }; + }; + } + { + scroller = { + column_widths = "onethird onehalf twothirds one"; + window_heights = "onethird onehalf twothirds one"; + gesture_scroll_fingers = 3; + gesture_overview_fingers = 3; + jump_labels_font = fontName; + jump_labels_color = "0xff${colors.base0A}"; + }; + } + ]; + + dwindle = { + force_split = 2; + default_split_ratio = 1.2; + }; + master = { + mfact = 0.6; + }; + + "$mod" = "SUPER"; + "$modShift" = "$mod SHIFT"; + "$modCtrl" = "$mod CTRL"; + "$modShiftCtrl" = "$mod SHIFT CTRL"; + + "$left" = "N"; + "$down" = "E"; + "$up" = "I"; + "$right" = "O"; + + "$terminal" = "ghostty"; + "$launcher" = launcher; + "$screenLocker" = lockscreen; + "$webBrowser" = "io.github.zen_browser.zen"; + "$clipboardManager" = "copyq menu"; + + general = { + "col.active_border" = "0xff${colors.base0D}"; + "col.inactive_border" = "0xff${colors.base03}"; + gaps_in = 4; + gaps_out = 8; + border_size = 3; + allow_tearing = true; + layout = "dwindle"; + }; + group = { + "col.border_active" = "0xff${colors.base0D}"; + "col.border_inactive" = "0xff${colors.base03}"; + "col.border_locked_active" = "0xff${colors.base0A}"; + "col.border_locked_inactive" = "0xff${colors.base0F}"; + groupbar = { + height = 16; + rounding = 0; + indicator_height = 0; + gradient_rounding = 4; + font_size = 14; + gradients = true; + font_family = fontName; + "text_color" = "0xff${colors.base00}"; + "col.active" = "0xff${colors.base0D}"; + "col.inactive" = "0xff${colors.base03}"; + }; + }; + binds.scroll_event_delay = 0; + cursor.persistent_warps = true; + + bind = [ + "$mod, Return, exec, $terminal" + "$mod, Space, exec, $launcher" + # "$modShift, Space, exec, $launcher" + "$modCtrl, Q, killactive" + "$modCtrl, M, fullscreen" + "$modCtrl, G, togglefloating" + "$mod, G, pin" + + "$mod, T, togglegroup" + "$mod, period, changegroupactive, f" + "$mod, comma, changegroupactive, b" + "$modCtrl, period, movewindoworgroup, r" + "$modCtrl, comma, movewindoworgroup, l" + + "$mod, Tab, cyclenext," + "$modShift, Tab, cyclenext, prev" + "$mod, Tab, bringactivetotop," + + "$modShift, U, focusurgentorlast" + + "$modCtrl, L, exec, $screenLocker" + "$modCtrl, B, exec, $webBrowser" + "$modCtrl, V, exec, $clipboardManager" + "$modCtrl, K, focuswindow, title:(Meet:.*)" + + # ", Print, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp -o -r -c '\#\#00000000')\" -t ppm - | ${pkgs.satty}/bin/satty --filename - --fullscreen --output-filename ${xdgPictures}/screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png" + ", Print, exec, hyprshot -z -m region -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" + "CTRL, Print, exec, hyprshot -z -m window -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" + "SHIFT, Print, exec, hyprshot -z -m output -o ${xdgPictures}/screenshots -f screenshot-$(date '+%Y%m%d-%H:%M:%S').png" + ## navigation + "$mod, $left, movefocus, l" + "$mod, $down, movefocus, d" + "$mod, $up, movefocus, u" + "$mod, $right, movefocus, r" + "$modShift, $left, workspace, e-1" + "$modShift, $right, workspace, e+1" + "$mod, left, movefocus, l" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + "$mod, right, movefocus, r" + "$modShift, W, focuscurrentorlast" + "$mod, mouse_down, workspace, e-1" + "$mod, mouse_up, workspace, e+1" + "$modShift, left, workspace, e-1" + "$modShift, right, workspace, e+1" + + "$modCtrl, $left, movewindow, l" + "$modCtrl, $down, movewindow, d" + "$modCtrl, $up, movewindow, u" + "$modCtrl, $right, movewindow, r" + "$modCtrl, left, movewindow, l" + "$modCtrl, up, movewindow, u" + "$modCtrl, down, movewindow, d" + "$modCtrl, right, movewindow, r" + # workspaces + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + "$mod, 6, workspace, 6" + "$mod, 7, workspace, 7" + "$mod, 8, workspace, 8" + "$mod, 9, workspace, 9" + "$mod, 0, togglespecialworkspace" + + "$modShiftCtrl, 1, movetoworkspace, 1" + "$modShiftCtrl, 2, movetoworkspace, 2" + "$modShiftCtrl, 3, movetoworkspace, 3" + "$modShiftCtrl, 4, movetoworkspace, 4" + "$modShiftCtrl, 5, movetoworkspace, 5" + "$modShiftCtrl, 6, movetoworkspace, 6" + "$modShiftCtrl, 7, movetoworkspace, 7" + "$modShiftCtrl, 8, movetoworkspace, 8" + "$modShiftCtrl, 9, movetoworkspace, 9" + "$modShiftCtrl, 0, movetoworkspace, special" + + "$mod, Q, workspace, 1" + "$mod, W, workspace, 2" + "$mod, F, workspace, 3" + "$mod, P, workspace, 4" + "$mod, B, workspace, 5" + "$mod, J, workspace, 6" + "$mod, L, workspace, 7" + "$mod, U, workspace, 8" + "$mod, Y, workspace, 9" + "$mod, apostrophe, togglespecialworkspace" + + "$modShiftCtrl, Q, movetoworkspace, 1" + "$modShiftCtrl, W, movetoworkspace, 2" + "$modShiftCtrl, F, movetoworkspace, 3" + "$modShiftCtrl, P, movetoworkspace, 4" + "$modShiftCtrl, B, movetoworkspace, 5" + "$modShiftCtrl, J, movetoworkspace, 6" + "$modShiftCtrl, L, movetoworkspace, 7" + "$modShiftCtrl, U, movetoworkspace, 8" + "$modShiftCtrl, Y, movetoworkspace, 9" + "$modShiftCtrl, apostrophe, movetoworkspace, special" + + "$modShiftCtrl, $left, movetoworkspace, e-1" + "$modShiftCtrl, $right, movetoworkspace, e+1" + "$modShiftCtrl, left, movetoworkspace, e-1" + "$modShiftCtrl, right, movetoworkspace, e+1" + + ''$mod ALT, mouse_down, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor * 1.25}')"'' + ''$mod ALT, mouse_up, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | awk 'NR==1 {factor = $2; if (factor < 1) {factor = 1}; print factor / 1.25}')"'' + "$mod ALT, mouse:274, exec, hyprctl keyword cursor:zoom_factor 1" # middle wheel click + ]; + # binde = [ + # "$mod, comma, resizeactive, -10 0" + # "$mod, period, resizeactive, 10 0" + # "$modShift, comma, resizeactive, 0 -10" + # "$modShift, period, resizeactive, 0 10" + # ]; + bindl = [ + "$mod, Escape, exec, hyprctl switchxkblayout all next" + ", switch:on:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, disable'" + ", switch:off:Lid Switch, exec, hyprctl keyword monitor 'eDP-1, preferred, 1920x0, 1.2'" + ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ", XF86AudioNext, exec, playerctl next" + "$modShiftCtrl ALT, Q, exit" + ]; + binde = [ + ", XF86MonBrightnessUp, exec, brightnessctl s 5%+" + ", XF86MonBrightnessDown, exec, brightnessctl s 5%-" + "ALT, XF86MonBrightnessUp, exec, brightnessctl s 5%+ -d ${keyboard}::kbd_backlight" + "ALT, XF86MonBrightnessDown, exec, brightnessctl s 5%- -d ${keyboard}::kbd_backlight" + ", XF86KbdBrightnessUp, exec, brightnessctl s 5%+ -d ${keyboard}::kbd_backlight" + ", XF86KbdBrightnessDown, exec, brightnessctl s 5%- -d ${keyboard}::kbd_backlight" + ", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ]; + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + "$mod ALT, mouse:272, resizewindow" + ]; + gestures = { + workspace_swipe = true; + workspace_swipe_fingers = 3; + workspace_swipe_distance = 300; + }; + + workspace = [ + "1, defaultName:general" + "2, defaultName:web" + "3, defaultName:chat" + "4, defaultName:code" + "5, defaultName:uni" + "6, defaultName:games" + "7, defaultName:system" + "8, defaultName:media" + "9, defaultName:tray" + # "10, defaultName:" + ]; + windowrulev2 = [ + ## tray/misc utilities + # file picker + "float, class:xdg-desktop-portal-gtk" + "size <50% <90%, class:xdg-desktop-portal-gtk" + "center 1, class:xdg-desktop-portal-gtk" + # xdp-hyprland stream picker + "float, initialTitle:MainPicker" + # general apps + "float, class:(com.saivert.pwvucontrol)" + "float, class:(re.sonny.Junction)" + "float, class:(com.github.hluk.copyq)" + "float, class:(nm-connection-editor)" + "float, class:(.blueman-manager-wrapped)" + # telegram + "maximize, initialTitle:Медіапереглядач" + "noborder, title:TelegramDesktop" + "keepaspectratio, title:TelegramDesktop" + "noblur, title:TelegramDesktop" + "float, title:TelegramDesktop" + "pin, title:TelegramDesktop" + # any chromium-based + "noborder, title:Картинка в картинці" + "keepaspectratio, title:Картинка в картинці" + "noblur, title:Картинка в картинці" + "float, title:Картинка в картинці" + "pin, title:Картинка в картинці" + # and firefox + "noborder, title:Picture-in-Picture" + "keepaspectratio, title:Picture-in-Picture" + "noblur, title:Picture-in-Picture" + "float, title:Picture-in-Picture" + "pin, title:Picture-in-Picture" + # screenshot editor + "noanim, class:com.gabm.satty" + "float, class:com.gabm.satty" + "rounding 0, class:com.gabm.satty" + "size 100% 100%, class:com.gabm.satty" + "move 0 0, class:com.gabm.satty" + "pin, class:com.gabm.satty" + ## games + "float, class:(com.mojang.minecraft.java-edition)" + "immediate, class:(com.mojang.minecraft.java-edition)" + # cs2 + "immediate, class:(cs2)" + # deadlock + # "float, class:(steam_app_1422450)" + "fullscreen, class:(steam_app_1422450)" + "immediate, class:(steam_app_1422450)" + "immediate, initialTitle:(Ghostrunner)" + # dead by daylight + "immediate, class:deadbydaylight-egs-shipping.exe" + ## workspace assignments + "workspace name:chat, class:org.telegram.desktop" + "workspace name:chat, class:org.signal.Signal" + "workspace name:chat, class:im.riot.Riot" + "workspace name:chat, class:WebCord" + + "workspace name:games, class:com.heroicgameslauncher.hgl" + "workspace name:games, class:net.lutris.Lutris" + "workspace name:games, class:steam" + # "workspace name:game, class:" + ]; + }; + extraConfig = '' + bind = $modShift, R, submap, resize + submap = resize + binde = , right, resizeactive, 10 0 + binde = , left, resizeactive, -10 0 + binde = , up, resizeactive, 0 -10 + binde = , down, resizeactive, 0 10 + binde = , $right, resizeactive, 10 0 + binde = , $left, resizeactive, -10 0 + binde = , $up, resizeactive, 0 -10 + binde = , $down, resizeactive, 0 10 + bind = , escape, submap, reset + submap = reset + ''; +} diff --git a/modules/home/desktop/hyprland/programs/default.nix b/modules/home/desktop/hyprland/programs/default.nix new file mode 100644 index 0000000..7c2a5d0 --- /dev/null +++ b/modules/home/desktop/hyprland/programs/default.nix @@ -0,0 +1,23 @@ +{ + osConfig, + config, + inputs, + pkgs, + lib, + ... +}: let + inherit (lib) mkIf mkDefault getExe; + inherit (config.lib.stylix) colors; + inherit (osConfig.networking) hostName; + ifLaptop = mkIf (hostName != "dunamis"); +in { + imports = with inputs; [ + walker.homeManagerModules.default + ]; + options = config.desktop.hyprland.enable { + # programs.fuzzel = import ./fuzzel {inherit config mkDefault;}; + programs.walker = import ./walker {inherit config inputs pkgs;}; + programs.waybar = import ./waybar {inherit colors config getExe ifLaptop pkgs;}; + programs.hyprlock = import ./hyprlock {inherit config pkgs;}; + }; +} diff --git a/modules/home/desktop/hyprland/programs/fuzzel/default.nix b/modules/home/desktop/hyprland/programs/fuzzel/default.nix new file mode 100644 index 0000000..392d616 --- /dev/null +++ b/modules/home/desktop/hyprland/programs/fuzzel/default.nix @@ -0,0 +1,23 @@ +{ + config, + mkDefault, +}: { + enable = true; + settings = { + main = { + terminal = "$TERMINAL -e"; + fields = "filename,name,generic,keywords,categories,exec"; + dpi-aware = false; + width = 20; + horizontal-pad = 12; + vertical-pad = 12; + show-actions = true; + match-mode = "fuzzy"; + icon-theme = config.dconf.settings."org/gnome/desktop/interface".icon-theme; + }; + border = mkDefault { + width = 3; + radius = 12; + }; + }; +} diff --git a/modules/home/desktop/hyprland/programs/hyprlock/default.nix b/modules/home/desktop/hyprland/programs/hyprlock/default.nix new file mode 100644 index 0000000..be8ce29 --- /dev/null +++ b/modules/home/desktop/hyprland/programs/hyprlock/default.nix @@ -0,0 +1,94 @@ +{ + config, + pkgs, + ... +}: let + inherit (config.stylix) colors; +in { + enable = true; + settings = { + general = { + disable_loading_bar = true; + #grace = 300; + hide_cursor = true; + no_fade_in = false; + }; + + background = [ + { + path = "screenshot"; + blur_passes = 4; + blur_size = 8; + } + ]; + + input-field = [ + { + size = "274, 50"; + rounding = 12; + outline_thickness = 3; + position = "0, 0"; + monitor = ""; + dots_center = true; + fade_on_empty = false; + font_family = "${config.stylix.fonts.serif.name}"; + font_color = "rgb(${colors.base05})"; + inner_color = "rgb(${colors.base00})"; + outer_color = "rgb(${colors.base0D})"; + check_color = "rgb(${colors.base0A})"; + fail_color = "rgb(${colors.base08})"; + placeholder_text = "locked..."; + fail_text = "wrong"; + shadow_passes = 0; + } + ]; + shape = [ + { + rounding = 12; + #border_size = 3; + size = "274, 50"; + color = "rgb(${colors.base00})"; + border_color = "rgb(${colors.base0D})"; + position = "0, 60"; + halign = "center"; + valign = "center"; + } + { + rounding = 12; + #border_size = 3; + size = "274, 50"; + color = "rgb(${colors.base00})"; + border_color = "rgb(${colors.base0D})"; + position = "0, -60"; + halign = "center"; + valign = "center"; + } + ]; + label = [ + { + monitor = ""; + text = "$LAYOUT"; #"cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +%H:%M:%S)"; + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${colors.base00})"; + color = "rgb(${colors.base05})"; + position = "0, 60"; + halign = "center"; + valign = "center"; + } + { + monitor = ""; + text = "cmd[update:1000] ${pkgs.uutils-coreutils-noprefix}/bin/echo $(${pkgs.uutils-coreutils-noprefix}/bin/date +'%m/%d %a %T')"; + text_align = "center"; + font_size = 16; + font_family = "${config.stylix.fonts.serif.name}"; + outer_color = "rgb(${colors.base00})"; + color = "rgb(${colors.base05})"; + position = "0, -60"; + halign = "center"; + valign = "center"; + } + ]; + }; +} diff --git a/modules/home/desktop/hyprland/programs/walker/default.nix b/modules/home/desktop/hyprland/programs/walker/default.nix new file mode 100644 index 0000000..a318f7b --- /dev/null +++ b/modules/home/desktop/hyprland/programs/walker/default.nix @@ -0,0 +1,307 @@ +{ + config, + pkgs, + ... +}: { + enable = true; + package = pkgs.walker; + runAsService = true; + config = { + activation_mode.labels = "neiotsra"; + as_window = false; + disabled = [ + "bookmarks" + "clipboard" + "custom_commands" + "translation" + "websearch" + ]; + builtins = { + applications = { + actions.enabled = true; + context_aware = true; + name = "applications"; + placeholder = "Applications"; + prioritize_new = true; + refresh = true; + show_generic = true; + show_icon_when_single = true; + show_sub_when_single = true; + weight = 10; + }; + calc = { + icon = "accessories-calculator"; + min_chars = 4; + name = "calc"; + placeholder = "Calculator"; + weight = 5; + }; + clipboard = { + image_height = 300; + max_entries = 10; + name = "clipboard"; + placeholder = "Clipboard"; + switcher_only = true; + weight = 5; + }; + commands = { + icon = "utilities-terminal"; + name = "commands"; + placeholder = "Commands"; + switcher_only = true; + weight = 8; + }; + custom_commands = { + icon = "utilities-terminal"; + name = "custom_commands"; + placeholder = "Custom Commands"; + weight = 5; + }; + dmenu = { + name = "dmenu"; + placeholder = "Dmenu"; + switcher_only = true; + weight = 5; + }; + emojis = { + history = true; + name = "emojis"; + placeholder = "Emojis"; + switcher_only = true; + typeahead = true; + weight = 5; + }; + finder = { + concurrency = 8; + icon = "folder"; + ignore_gitignore = true; + name = "finder"; + placeholder = "Finder"; + refresh = true; + switcher_only = true; + weight = 5; + }; + runner = { + generic_entry = false; + history = true; + icon = "utilities-terminal"; + name = "runner"; + placeholder = "Runner"; + refresh = true; + typeahead = true; + weight = 5; + }; + ssh = { + history = true; + icon = "preferences-system-network"; + name = "ssh"; + placeholder = "SSH"; + refresh = true; + switcher_only = true; + weight = 5; + }; + switcher = { + name = "switcher"; + placeholder = "Switcher"; + prefix = "/"; + weight = 5; + }; + websearch = { + icon = "applications-internet"; + name = "websearch"; + placeholder = "Websearch"; + weight = 5; + }; + windows = { + icon = "view-restore"; + name = "windows"; + placeholder = "Windows"; + weight = 10; + }; + }; + disable_click_to_close = false; + force_keyboard_focus = true; + list = { + max_entries = 50; + show_initial_entries = true; + single_click = true; + }; + search = { + delay = 0; + force_keyboard_focus = true; + history = true; + placeholder = "Search..."; + }; + }; + theme = { + layout = { + ui = { + anchors = { + bottom = false; + left = false; + right = false; + top = false; + }; + window = { + h_align = "center"; + v_align = "center"; + box = { + width = 450; + h_align = "center"; + v_align = "center"; + # spacing = 12; + orientation = "vertical"; + search = { + margins = { + start = 8; + top = 8; + end = 8; + bottom = 0; + }; + h_align = "top"; + }; + scroll = { + overlay_scrolling = true; + list = { + margins = { + bottom = 8; + top = 4; + start = 8; + end = 8; + }; + item = { + icon.theme = "${config.gtk.iconTheme.name}"; + spacing = 4; + activation_label = { + x_align = 0.5; + y_align = 0.5; + width = 32; + }; + text = { + h_align = "start"; + h_expand = true; + revert = true; + wrap = true; + }; + }; + }; + }; + }; + }; + }; + }; + style = let + inherit (config.lib.stylix) colors; + in '' + @define-color base00 #${colors.base00}; + @define-color base01 #${colors.base01}; + @define-color base02 #${colors.base02}; + @define-color base03 #${colors.base03}; + @define-color base04 #${colors.base04}; + @define-color base05 #${colors.base05}; + @define-color base06 #${colors.base06}; + @define-color base07 #${colors.base07}; + @define-color base08 #${colors.base08}; + @define-color base09 #${colors.base09}; + @define-color base0A #${colors.base0A}; + @define-color base0B #${colors.base0B}; + @define-color base0C #${colors.base0C}; + @define-color base0D #${colors.base0D}; + @define-color base0E #${colors.base0E}; + @define-color base0F #${colors.base0F}; + + #window, + #box, + #search, + #password, + #input, + #typeahead, + #spinner, + #list, + child, + scrollbar, + slider, + #item, + #text, + #label, + #sub, + #activationlabel { + all: unset; + } + + #window { + background: @base00; + color: @base05; + border-radius: 20px; + border: 3px solid @base0D; + } + + #box { + background: @base00; + } + + #search { + background: @base01; + border-radius: 12px 12px 6px 6px; + padding: 8px; + } + + #password, + #input, + #typeahead { + background: none; + box-shadow: none; + border-radius: 12px; + } + + #input > *:first-child, + #typeahead > *:first-child { + margin-right: 12px; + border-radius: 0px; + } + + #typeahead { + color: @base05; + } + + #input placeholder { + opacity: 0.5; + } + + #list { + padding: 8px; + border-radius: 6px 6px 12px 12px; + background: @base01; + } + + child { + box-shadow: none; + } + + child:selected, + child:hover { + box-shadow: none; + border-radius: 8px; + background: @base02; + } + + #item { + padding: 4px; + } + + #sub { + font-size: smaller; + opacity: 0.5; + } + + #activationlabel { + opacity: 0.5; + } + + .activation #activationlabel { + opacity: 1; + color: @base05; + } + ''; + }; +} diff --git a/modules/home/desktop/hyprland/programs/waybar/default.nix b/modules/home/desktop/hyprland/programs/waybar/default.nix new file mode 100644 index 0000000..637b735 --- /dev/null +++ b/modules/home/desktop/hyprland/programs/waybar/default.nix @@ -0,0 +1,331 @@ +{ + colors, + config, + getExe, + ifLaptop, + pkgs, + ... +}: { + enable = true; + systemd = { + enable = true; + target = "graphical-session.target"; + }; + settings = { + bar-0 = { + # layer = "top"; + position = "bottom"; + height = 24; + spacing = 6; + # margin-left = 33 + 3; + # margin-right = 33 + 3; + margin-left = 8; + margin-right = 8; + margin-bottom = 8; + reload_style_on_change = true; + modules-left = [ + "hyprland/language" + "hyprland/workspaces" + "wlr/taskbar" + ]; + modules-center = ["clock"]; + modules-right = [ + (ifLaptop "group/laptop") + "wireplumber" + "tray" + "privacy" + (ifLaptop "power-profiles-daemon") + "idle_inhibitor" + "custom/notification" + ]; + "niri/workspaces" = { + format = "{icon}"; + format-icons = { + "1" = "൧"; + "2" = "൨"; + "3" = "൩"; + "4" = "൪"; + "5" = "൫"; + "6" = "൬"; + "7" = "൭"; + "8" = "൮"; + "9" = "൯"; + "10" = "൰"; + general = "󰘧"; + web = "󰖟"; + chat = "󰻞"; + code = "󰅩"; + uni = "󱆀"; + games = "󰺶"; + system = "󰢻"; + media = "󱜐"; + tray = "󱊖"; + }; + }; + "niri/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "󰝠"; + interval = "once"; + tooltip = false; + }; + "group/laptop" = { + orientation = "inherit"; + modules = [ + "battery" + "backlight" + ]; + }; + "backlight" = { + format = "{icon} {percent}%"; + format-icons = [ + "󰃚" + "󰃛" + "󰃜" + "󰃝" + "󰃞" + "󰃟" + "󰃠" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰅶"; + deactivated = "󰾪"; + }; + }; + "tray" = { + icon-size = 20; + spacing = 6; + }; + "clock" = { + interval = 1; + format = "{:%H:%M:%S}"; + tooltip-format = "{:%d.%m.%Y}"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{icon} {capacity}%"; + format-full = "󱟢 {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󰚥 {capacity}%"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + mpris = { + format = "{player_icon} {dynamic}"; + format-paused = "{status_icon} {dynamic}"; + playing-len = 30; + playing-paused = 30; + player-icons = { + default = "▶"; + mpv = "🎵"; + }; + status-icons = {paused = "⏸";}; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{icon} {volume}%"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = getExe pkgs.pwvucontrol; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = "󱅫"; + none = "󰂚"; + dnd-notification = "󰂛"; + dnd-none = "󰂛"; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + icon-spacing = 2; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 20; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + }; + style = '' + @define-color base00 #${colors.base00}; + @define-color base01 #${colors.base01}; + @define-color base02 #${colors.base02}; + @define-color base03 #${colors.base03}; + @define-color base04 #${colors.base04}; + @define-color base05 #${colors.base05}; + @define-color base06 #${colors.base06}; + @define-color base07 #${colors.base07}; + @define-color base08 #${colors.base08}; + @define-color base09 #${colors.base09}; + @define-color base0A #${colors.base0A}; + @define-color base0B #${colors.base0B}; + @define-color base0C #${colors.base0C}; + @define-color base0D #${colors.base0D}; + @define-color base0E #${colors.base0E}; + @define-color base0F #${colors.base0F}; + * { + font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + font-weight: 500; + font-size: 100%; + } + window#waybar { + background-color: transparent; + color: @base05; + } + .modules-center { + background-color: transparent; + } + .mpris.stopped { + background-color: transparent; + } + .modules-left, + .modules-center, + .modules-right { + /* border-bottom-left-radius: 12px; + border-bottom-right-radius: 12px; + border-top-left-radius: 0px; + border-top-right-radius: 0px; */ + background-color: @base00; + border-radius: 24px; + border: 3px solid @base0D; + color: @base05; + padding: 0 0.4em; + } + tooltip { + background: @base01; + border: 1px solid @base0E; + } + tooltip label { + color: @base05; + } + button { + box-shadow: inset 0 -3px transparent; + border-radius: 16px; + } + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + #battery, + #backlight, + /* #workspaces, + #taskbar, + #privacy, */ + #taskbar button, + #language, + #clock, + #battery, + #backlight, + #wireplumber, + #workspaces button, + #custom-notification, + #idle_inhibitor, + #power-profiles-daemon, + #privacy-item, + #custom-separator { + padding: 0 0.3em; + } + #tray button { + padding: 0 0.3em; + margin: 0 0.2em; + } + #workspaces button.active { + color: @base0D; + } + #taskbar button:hover { + box-shadow: transparent; + } + #taskbar.empty, + window#empty { + background-color: transparent; + } + #battery.critical:not(.charging) { + color: @base09; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + #power-profiles-daemon.performance { + color: @base0D; + } + #power-profiles-daemon.balanced { + color: @base0B; + } + #power-profiles-daemon.power-saver { + color: @base0A; + } + label:focus { + background-color: #000000; + } + #tray > .passive { + -gtk-icon-effect: dim; + } + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @base08; + } + #privacy-item.screenshare { + color: @base0C; + } + #privacy-item.audio-in { + color: @base0E; + } + ''; +} diff --git a/modules/home/desktop/hyprland/services/default.nix b/modules/home/desktop/hyprland/services/default.nix new file mode 100644 index 0000000..b974069 --- /dev/null +++ b/modules/home/desktop/hyprland/services/default.nix @@ -0,0 +1,65 @@ +{ + # getExe, + perSystem, + # pkgs, + lockscreen, + ... +}: { + swaync = import ./swaync; + network-manager-applet.enable = true; + blueman-applet.enable = true; + playerctld.enable = true; + wpaperd.enable = true; + hyprpaper.enable = true; + copyq = { + enable = true; + package = perSystem.nixpkgs-stable.copyq; + }; + gnome-keyring = { + enable = true; + components = ["secrets"]; + }; + gammastep = { + enable = true; + provider = "manual"; + latitude = 49.6; + longitude = 36.1; + tray = true; + temperature = { + day = 6500; + night = 3000; + }; + }; + swayosd = { + enable = true; + topMargin = 0.8; + }; + udiskie = { + enable = true; + automount = false; + notify = true; + tray = "auto"; + }; + hypridle = { + enable = true; + settings = { + general = { + before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + lock_cmd = "pidof hyprlock || hyprlock"; + # unlock_cmd = "loginctl unlock-session"; + }; + listener = [ + { + timeout = 600; + on-timeout = "pidof ${lockscreen} || ${lockscreen}"; + } + { + timeout = 601; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; +} diff --git a/modules/home/desktop/hyprland/services/swaync/default.nix b/modules/home/desktop/hyprland/services/swaync/default.nix new file mode 100644 index 0000000..fc2b35c --- /dev/null +++ b/modules/home/desktop/hyprland/services/swaync/default.nix @@ -0,0 +1,177 @@ +{ + enable = true; + settings = { + cssPriority = "user"; + image-visibility = "when-available"; + keyboard-shortcut = true; + relative-timestamps = true; + timeout = 5; + timeout-low = 5; + timeout-critical = 0; + script-fail-notify = true; + transition-time = 200; + + # Layer settings + layer-shell = true; + layer = "overlay"; + control-center-layer = "overlay"; + + # Notification settings + positionX = "right"; + positionY = "top"; + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 32; + notification-body-image-height = 100; + notification-body-image-width = 200; + notification-window-width = 400; + + # Control center settings + control-center-positionX = "right"; + control-center-positionY = "top"; + control-center-width = 500; + control-center-exclusive-zone = true; + fit-to-screen = true; + hide-on-action = true; + hide-on-clear = false; + + # Widget settings + widgets = [ + "title" + "dnd" + "notifications" + "mpris" + ]; + + widget-config = { + title = { + text = "Notifications"; + clear-all-button = true; + button-text = "Clear All"; + }; + dnd = { + text = "Do Not Disturb"; + }; + mpris = { + image-size = 96; + image-radius = 12; + blur = true; + }; + }; + }; + style = '' + /*** Global ***/ + progress, + progressbar, + trough { + border-radius: 16px; + } + + .app-icon, + .image { + -gtk-icon-effect: none; + } + + .notification-action { + border-radius: 12px; + margin: 0.5rem; + } + + .close-button { + margin: 24px; + padding: 0.2rem; + border-radius: 16px; + } + + /*** Notifications ***/ + .notification-group.collapsed + .notification-row:not(:last-child) + .notification-action, + .notification-group.collapsed + .notification-row:not(:last-child) + .notification-default-action { + opacity: 0; + } + + .trough { + margin: 4px; + border-radius: 7px; + } + + .notification, + .notification.low, + .notification.normal, + .notification.critical, + .control-center { + margin: 16px; + border-radius: 7px; + } + + .floating-notifications, + .notification-content { + border-radius: 7px; + } + + .control-center-list { + background: transparent; + } + + /*** Widgets ***/ + /* Title widget */ + .widget-title { + margin: 0.5rem; + } + + .widget-title > label { + font-weight: bold; + } + + .widget-title > button { + border-radius: 16px; + padding: 0.5rem; + } + + /* DND Widget */ + .widget-dnd { + margin: 0.5rem; + } + + .widget-dnd > label { + font-weight: bold; + } + + .widget-dnd > switch { + border-radius: 16px; + } + + .widget-dnd > switch slider { + border-radius: 16px; + padding: 0.25rem; + } + + /* Mpris widget */ + .widget-mpris .widget-mpris-player { + border-radius: 16px; + margin: 0.5rem; + padding: 0.5rem; + } + + .widget-mpris .widget-mpris-player .widget-mpris-album-art { + border-radius: 16px; + } + + .widget-mpris .widget-mpris-player .widget-mpris-title { + font-weight: bold; + } + + .widget-mpris .widget-mpris-player .widget-mpris-subtitle { + font-weight: normal; + } + + .widget-mpris .widget-mpris-player > box > button { + border: 1px solid transparent; + border-radius: 16px; + padding: 0.25rem; + } + ''; +} From eb03db888c31462bb6e16677efe1b0e79f6f2b9c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 31 May 2025 14:16:19 +0300 Subject: [PATCH 032/138] hosts/morphius: change desktop, colors Signed-off-by: unexplrd --- hosts/morphius/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 92e1f35..2bc0a50 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -31,7 +31,7 @@ } ]; - desktop.niri.enable = true; + desktop.gnome.enable = true; module = { config = { @@ -43,7 +43,7 @@ }; stylix = { enable = true; - theme = "rose-pine-moon"; + theme = "gruvbox-dark-pale"; }; }; From e7f2aeabe81d7a932ae1209ea7b1ef4b052cc3e7 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 5 Jun 2025 12:30:51 +0300 Subject: [PATCH 033/138] desktop/gnome: better theming Signed-off-by: unexplrd --- modules/home/desktop/gnome/default.nix | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix index bd078ad..a375fd7 100644 --- a/modules/home/desktop/gnome/default.nix +++ b/modules/home/desktop/gnome/default.nix @@ -1,4 +1,5 @@ { + osConfig, config, pkgs, lib, @@ -40,6 +41,30 @@ in { {package = pkgs.gnomeExtensions.pano;} {package = pkgs.gnomeExtensions.window-is-ready-remover;} ]; + gtk = { + enable = true; + iconTheme = let + name = + if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) + then "Gruvbox-Plus-Dark" + else if config.stylix.polarity == "dark" + then "Papirus-Dark" + else "Papirus-Light"; + package = + if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) + then pkgs.gruvbox-plus-icons + else if (lib.strings.hasPrefix "rose-pine" osConfig.module.stylix.theme) + then pkgs.papirus-icon-theme.override {color = "indigo";} + else if (lib.strings.hasPrefix "nord" osConfig.module.stylix.theme) + then pkgs.papirus-icon-theme.override {color = "nordic";} + else pkgs.papirus-icon-theme; + in {inherit name package;}; + }; + qt = { + enable = true; + platformTheme.name = lib.mkForce "adwaita"; + }; + dconf.settings = with lib.hm.gvariant; { "org/gnome/desktop/a11y/applications" = { screen-reader-enabled = false; @@ -59,7 +84,7 @@ in { }; "org/gnome/desktop/interface" = { - accent-color = "slate"; + # accent-color = "slate"; clock-show-seconds = true; color-scheme = "prefer-dark"; enable-animations = true; From 657ecafc51c468bfc5c6b70a0f1711d7a6463559 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 6 Jun 2025 15:06:31 +0300 Subject: [PATCH 034/138] user/programs: remove devenv Signed-off-by: unexplrd --- hosts/dunamis/users/user/programs.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index 065a9f6..ad0df9a 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -57,7 +57,7 @@ [ # development utils alejandra # nix formatter in rust - devenv # programming deps in rust + # devenv # programming deps in rust jj-fzf # fuzzy finder jujutsu tui just # make in rust silicon # create code pics in rust From 94b02096bd6bf21681031c81a021aba8536aec5b Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 6 Jun 2025 15:06:31 +0300 Subject: [PATCH 035/138] hosts/dunamis: move nix.sshServe to misc Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 12 ------------ hosts/dunamis/misc/default.nix | 1 + hosts/dunamis/misc/nix-ssh-serve.nix | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 hosts/dunamis/misc/nix-ssh-serve.nix diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 330212f..196b19b 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -45,16 +45,4 @@ opentabletdriver.enable = false; qmk-vial.enable = true; virtual.libvirt.enable = true; - - nix = let - inherit (builtins) readFile; - inherit (config.users.users) user; - in { - settings.trusted-users = ["nix-ssh"]; - sshServe = { - enable = true; - write = true; - keys = map (f: readFile f) user.openssh.authorizedKeys.keyFiles; - }; - }; } diff --git a/hosts/dunamis/misc/default.nix b/hosts/dunamis/misc/default.nix index 5ee61c0..ebef8d5 100644 --- a/hosts/dunamis/misc/default.nix +++ b/hosts/dunamis/misc/default.nix @@ -1,5 +1,6 @@ { imports = [ # ./minecraft.nix + ./nix-ssh-serve.nix ]; } diff --git a/hosts/dunamis/misc/nix-ssh-serve.nix b/hosts/dunamis/misc/nix-ssh-serve.nix new file mode 100644 index 0000000..434b9f1 --- /dev/null +++ b/hosts/dunamis/misc/nix-ssh-serve.nix @@ -0,0 +1,15 @@ +{config, ...}: { + nix = let + inherit (builtins) readFile; + inherit (config.users.users) user; + in { + sshServe = { + enable = true; + keys = map (f: readFile f) user.openssh.authorizedKeys.keyFiles; + # protocol = "ssh-ng"; + trusted = true; + write = true; + }; + }; + security.pam.enableSSHAgentAuth = true; +} From 0235fb48702e49862d72a7639cd1205000a1cac5 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 6 Jun 2025 15:06:31 +0300 Subject: [PATCH 036/138] flake.nix: PR that fixes nix/lix bug w/ sshServe Signed-off-by: unexplrd --- flake.lock | 8 ++++---- flake.nix | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index fca69ef..b985a34 100644 --- a/flake.lock +++ b/flake.lock @@ -966,16 +966,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748929857, - "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", + "lastModified": 1748962802, + "narHash": "sha256-PmLFTJD6sbGpeGSMcCk091dvygDMxzsSqg4CFm5gHaw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", + "rev": "e7d00ea9afa4b44c0dabfc43a83de1bad0bb71e0", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "pull/413627/head", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 3303c81..ec54245 100644 --- a/flake.nix +++ b/flake.nix @@ -61,7 +61,9 @@ url = "github:nixos/nixpkgs/nixos-24.11"; }; nixpkgs = { - url = "github:NixOS/nixpkgs?ref=nixos-unstable"; + # url = "github:NixOS/nixpkgs?ref=nixos-unstable"; + # workaround for `unexpected Nix daemon error: error: serialised integer 7022364302122705765 is too large for type 'j'` + url = "github:NixOS/nixpkgs/pull/413627/head"; }; sops-nix = { url = "github:mic92/sops-nix"; From c4d1957d52e11b0ba9edc38336380a6f294e82f1 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 29 May 2025 11:14:02 +0300 Subject: [PATCH 037/138] desktop/gnome: move to 25.11 opts, add exdludePackages Signed-off-by: unexplrd --- modules/nixos/desktop/common/greeter.nix | 5 +- modules/nixos/desktop/gnome.nix | 58 ++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 5 deletions(-) diff --git a/modules/nixos/desktop/common/greeter.nix b/modules/nixos/desktop/common/greeter.nix index 0e18ef9..bb2c30b 100644 --- a/modules/nixos/desktop/common/greeter.nix +++ b/modules/nixos/desktop/common/greeter.nix @@ -24,7 +24,10 @@ in { services.displayManager.cosmic-greeter.enable = true; }) (mkIf (cfg.displayManager == "gdm") { - services.xserver.displayManager.gdm.enable = true; + services.displayManager.gdm = { + enable = true; + wayland = true; + }; }) (mkIf (cfg.displayManager == "greetd") { programs.regreet.enable = true; diff --git a/modules/nixos/desktop/gnome.nix b/modules/nixos/desktop/gnome.nix index 794ea0c..be87d21 100644 --- a/modules/nixos/desktop/gnome.nix +++ b/modules/nixos/desktop/gnome.nix @@ -1,5 +1,6 @@ { config, + pkgs, lib, ... }: @@ -14,9 +15,58 @@ in { module.desktop.displayManager = "gdm"; sound.pipewire.enable = true; - services.xserver = { - enable = true; - desktopManager.gnome.enable = true; - }; + services.desktopManager.gnome.enable = true; + + environment.gnome.excludePackages = with pkgs; [ + orca + evince + # file-roller + geary + # gnome-disk-utility + # seahorse + # sushi + # sysprof + # + # gnome-shell-extensions + # + # adwaita-icon-theme + # nixos-background-info + # gnome-backgrounds + # gnome-bluetooth + # gnome-color-manager + # gnome-control-center + # gnome-shell-extensions + gnome-tour # GNOME Shell detects the .desktop file on first log-in. + gnome-user-docs + # glib # for gsettings program + # gnome-menus + # gtk3.out # for gtk-launch program + # xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ + # xdg-user-dirs-gtk # Used to create the default bookmarks + # + # baobab + # epiphany + # gnome-text-editor + # gnome-calculator + # gnome-calendar + # gnome-characters + # gnome-clocks + gnome-console + gnome-contacts + # gnome-font-viewer + gnome-logs + # gnome-maps + gnome-music + gnome-system-monitor + # gnome-weather + # loupe + # nautilus + gnome-connections + # simple-scan + # snapshot + totem + yelp + # gnome-software + ]; }; } From 9d482983e0698019251c10e1261dd63eb36eb524 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 7 Jun 2025 16:30:26 +0300 Subject: [PATCH 038/138] hosts/morphius: set hostId, autologin change boot.loader.timeout to 0 Signed-off-by: unexplrd --- hosts/morphius/configuration.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 2bc0a50..980ca55 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -1,6 +1,7 @@ { inputs, - pkgs, + # pkgs, + lib, ... }: { imports = with inputs; [ @@ -14,11 +15,11 @@ networking = { networkmanager.enable = true; - # hostId = "31150fae"; + hostId = "bd1b5837"; hostName = "morphius"; }; - boot.kernelModules = ["i915"]; + boot.loader.timeout = lib.mkForce 0; environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; @@ -33,6 +34,11 @@ desktop.gnome.enable = true; + services.displayManager.autoLogin = { + enable = true; + user = "user"; + }; + module = { config = { secureBoot = true; From 57ce7c2f4d3f59d7269e02e4d4251f48b8a01f9d Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 7 Jun 2025 16:30:26 +0300 Subject: [PATCH 039/138] desktop/gnome.nix: fix autologin Signed-off-by: unexplrd --- modules/nixos/desktop/gnome.nix | 123 +++++++++++++++++--------------- 1 file changed, 65 insertions(+), 58 deletions(-) diff --git a/modules/nixos/desktop/gnome.nix b/modules/nixos/desktop/gnome.nix index be87d21..67966d7 100644 --- a/modules/nixos/desktop/gnome.nix +++ b/modules/nixos/desktop/gnome.nix @@ -11,62 +11,69 @@ in { desktop.gnome.enable = mkEnableOption "enable gnome desktop"; }; - config = mkIf cfg.enable { - module.desktop.displayManager = "gdm"; - sound.pipewire.enable = true; - - services.desktopManager.gnome.enable = true; - - environment.gnome.excludePackages = with pkgs; [ - orca - evince - # file-roller - geary - # gnome-disk-utility - # seahorse - # sushi - # sysprof - # - # gnome-shell-extensions - # - # adwaita-icon-theme - # nixos-background-info - # gnome-backgrounds - # gnome-bluetooth - # gnome-color-manager - # gnome-control-center - # gnome-shell-extensions - gnome-tour # GNOME Shell detects the .desktop file on first log-in. - gnome-user-docs - # glib # for gsettings program - # gnome-menus - # gtk3.out # for gtk-launch program - # xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ - # xdg-user-dirs-gtk # Used to create the default bookmarks - # - # baobab - # epiphany - # gnome-text-editor - # gnome-calculator - # gnome-calendar - # gnome-characters - # gnome-clocks - gnome-console - gnome-contacts - # gnome-font-viewer - gnome-logs - # gnome-maps - gnome-music - gnome-system-monitor - # gnome-weather - # loupe - # nautilus - gnome-connections - # simple-scan - # snapshot - totem - yelp - # gnome-software - ]; - }; + config = lib.mkMerge [ + (mkIf cfg.enable { + module.desktop.displayManager = "gdm"; + sound.pipewire.enable = true; + services.desktopManager.gnome.enable = true; + environment.gnome.excludePackages = with pkgs; [ + orca + evince + # file-roller + geary + # gnome-disk-utility + # seahorse + # sushi + # sysprof + # + # gnome-shell-extensions + # + # adwaita-icon-theme + # nixos-background-info + # gnome-backgrounds + # gnome-bluetooth + # gnome-color-manager + # gnome-control-center + # gnome-shell-extensions + gnome-tour # GNOME Shell detects the .desktop file on first log-in. + gnome-user-docs + # glib # for gsettings program + # gnome-menus + # gtk3.out # for gtk-launch program + # xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ + # xdg-user-dirs-gtk # Used to create the default bookmarks + # + # baobab + # epiphany + # gnome-text-editor + # gnome-calculator + # gnome-calendar + # gnome-characters + # gnome-clocks + gnome-console + gnome-contacts + # gnome-font-viewer + gnome-logs + # gnome-maps + gnome-music + gnome-system-monitor + # gnome-weather + # loupe + # nautilus + gnome-connections + # simple-scan + # snapshot + totem + yelp + # gnome-software + ]; + }) + # workaround for crashing autologin session + (mkIf (cfg.enable && config.services.displayManager.autoLogin.enable) { + systemd.services = { + "getty@tty1".enable = false; + "autovt@tty1".enable = false; + }; + }) + ]; } From 87426e19a0527887e3dbba31dec861862a0b36e2 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 7 Jun 2025 16:30:26 +0300 Subject: [PATCH 040/138] desktop/gnome: add extension, change shortcut Signed-off-by: unexplrd --- modules/home/desktop/gnome/default.nix | 43 +++++++++++++++++++++----- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix index a375fd7..c92e850 100644 --- a/modules/home/desktop/gnome/default.nix +++ b/modules/home/desktop/gnome/default.nix @@ -16,12 +16,13 @@ in { config = mkIf cfg.enable { home.packages = with pkgs; [ gnomeExtensions.alphabetical-app-grid - gnomeExtensions.removable-drive-menu + gnomeExtensions.app-icons-taskbar gnomeExtensions.caffeine + gnomeExtensions.pano + gnomeExtensions.removable-drive-menu gnomeExtensions.space-bar gnomeExtensions.switcher gnomeExtensions.tactile - gnomeExtensions.pano gnomeExtensions.window-is-ready-remover junction celluloid @@ -32,13 +33,13 @@ in { ]; programs.gnome-shell.extensions = [ {package = pkgs.gnomeExtensions.alphabetical-app-grid;} - - {package = pkgs.gnomeExtensions.removable-drive-menu;} + {package = pkgs.gnomeExtensions.app-icons-taskbar;} {package = pkgs.gnomeExtensions.caffeine;} + {package = pkgs.gnomeExtensions.pano;} + {package = pkgs.gnomeExtensions.removable-drive-menu;} {package = pkgs.gnomeExtensions.space-bar;} {package = pkgs.gnomeExtensions.switcher;} {package = pkgs.gnomeExtensions.tactile;} - {package = pkgs.gnomeExtensions.pano;} {package = pkgs.gnomeExtensions.window-is-ready-remover;} ]; gtk = { @@ -125,8 +126,8 @@ in { move-to-workspace-last = ["End"]; move-to-workspace-left = ["Left"]; move-to-workspace-right = ["Right"]; - switch-input-source = ["Escape"]; - switch-input-source-backward = ["Escape"]; + switch-input-source = ["Space"]; + switch-input-source-backward = ["Space"]; switch-to-workspace-1 = ["1"]; switch-to-workspace-2 = ["2"]; switch-to-workspace-3 = ["3"]; @@ -160,7 +161,18 @@ in { }; "org/gnome/shell" = { - enabled-extensions = ["drive-menu@gnome-shell-extensions.gcampax.github.com" "caffeine@patapon.info" "AlphabeticalAppGrid@stuarthayhurst" "appindicatorsupport@rgcjonas.gmail.com" "user-theme@gnome-shell-extensions.gcampax.github.com" "tactile@lundal.io" "switcher@landau.fi" "pano@elhan.io" "space-bar@luchrioh"]; + enabled-extensions = [ + "AlphabeticalAppGrid@stuarthayhurst" + "appindicatorsupport@rgcjonas.gmail.com" + "aztaskbar@aztaskbar.gitlab.com" + "caffeine@patapon.info" + "drive-menu@gnome-shell-extensions.gcampax.github.com" + "pano@elhan.io" + "space-bar@luchrioh" + "switcher@landau.fi" + "tactile@lundal.io" + "user-theme@gnome-shell-extensions.gcampax.github.com" + ]; }; "org/gnome/shell/app-switcher" = { @@ -192,6 +204,21 @@ in { workspace-indicator = true; }; + "org/gnome/shell/extensions/aztaskbar" = with lib.hm.gvariant; { + favorites = true; + icon-size = 25; + icon-style = "REGULAR"; + # intellihide = true; + main-panel-height = mkTuple [true 40]; + position-offset = 4; + prefs-visible-page = ""; + show-apps-button = mkTuple [true 0]; + show-panel-activities-button = true; + show-weather-by-clock = "LEFT"; + taskbar-spacing = 2; + # update-notifier-project-version = 30; + }; + "org/gnome/shell/extensions/tactile" = { background-color = "#${colors.base00}"; border-color = "#${colors.base0D}"; From 91c635f170142e4776b59d4373a59c23f9f34e04 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 7 Jun 2025 15:46:24 +0300 Subject: [PATCH 041/138] dunamis/misc/nix-ssh-serve.nix: rename Signed-off-by: unexplrd --- hosts/dunamis/misc/nix-ssh-serve.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/dunamis/misc/nix-ssh-serve.nix b/hosts/dunamis/misc/nix-ssh-serve.nix index 434b9f1..05235cf 100644 --- a/hosts/dunamis/misc/nix-ssh-serve.nix +++ b/hosts/dunamis/misc/nix-ssh-serve.nix @@ -11,5 +11,5 @@ write = true; }; }; - security.pam.enableSSHAgentAuth = true; + security.pam.sshAgentAuth.enable = true; } From 8baae93c618b797fcc15fb5bcc080b231723d7c4 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 29 May 2025 11:14:02 +0300 Subject: [PATCH 042/138] dunamis/user/programs: libadwaita apps Signed-off-by: unexplrd --- hosts/dunamis/users/user/programs.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index ad0df9a..7fa1b9c 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -81,8 +81,24 @@ # vial # qmk keyboard configuring app pinentry-qt # pinentry for rbw virt-manager # libvirt gui - waycheck # check wayland protocols + # waycheck # check wayland protocols gpu-screen-recorder-gtk + ] + ++ [ + # gui libadwaita apps + celluloid # mpv gui in libadwaita + # gnome-text-editor + helvum # pipewire patchbay in rust + junction # app chooser + # loupe # image viewer and editor in rust + mission-center # task manager in rust (partly) + # nautilus # file manager + overskride # bluetooth gui in rust + papers # pdf reader in rust + pika-backup # borg gui in rust + pwvucontrol # pipewire gui in rust + sonusmix # pipewire routing tool in rust + # wdisplays # wlroots display configurator ]; xdg.desktopEntries = { From 0427065ca491d3385553683bf85ef230367a9131 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 29 May 2025 11:14:02 +0300 Subject: [PATCH 043/138] hosts/sarien: add swap Signed-off-by: unexplrd --- hosts/sarien/configuration.nix | 14 ++++++++++++++ hosts/sarien/disko/disk-main.nix | 6 ++++++ 2 files changed, 20 insertions(+) diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index e9a2bcb..fc26d9e 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -29,6 +29,20 @@ command = "${pkgs.niri}/bin/niri-session"; }; + zramSwap.enable = true; + swapDevices = [ + { + device = "/swap/swapfile"; + size = 4 * 1024; + priority = 100; + } + { + device = "/swap/hibernate"; + size = 16 * 1024; + priority = 0; + } + ]; + module = { config = { laptop.homeRowMods = true; diff --git a/hosts/sarien/disko/disk-main.nix b/hosts/sarien/disko/disk-main.nix index 3ee66c5..b3168d3 100644 --- a/hosts/sarien/disko/disk-main.nix +++ b/hosts/sarien/disko/disk-main.nix @@ -61,6 +61,12 @@ "noatime" ]; }; + "@swap" = { + mountpoint = "/swap"; + mountOptions = [ + "noatime" + ]; + }; }; }; }; From 2b48bc40db462bd54160d4109b55aa5787d1885f Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 29 May 2025 11:14:02 +0300 Subject: [PATCH 044/138] hosts/sarien: switch to gnome Signed-off-by: unexplrd --- hosts/sarien/configuration.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index fc26d9e..24e4527 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -23,10 +23,10 @@ system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; - desktop.niri.enable = true; - services.greetd.settings.initial_session = { + desktop.gnome.enable = true; + services.displayManager.autoLogin = { + enable = true; user = "user"; - command = "${pkgs.niri}/bin/niri-session"; }; zramSwap.enable = true; @@ -52,7 +52,7 @@ }; stylix = { enable = true; - theme = "rose-pine-moon"; + theme = "gruvbox-dark-pale"; }; }; From ef50b36f7fd0e62809f2cd6681f308437bbbd54c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 8 Jun 2025 15:01:06 +0300 Subject: [PATCH 045/138] desktop/gnome: select layouts individually Signed-off-by: unexplrd --- modules/home/desktop/gnome/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix index c92e850..15c76ea 100644 --- a/modules/home/desktop/gnome/default.nix +++ b/modules/home/desktop/gnome/default.nix @@ -80,7 +80,7 @@ in { "org/gnome/desktop/input-sources" = { mru-sources = [(mkTuple ["xkb" "us"])]; - sources = [(mkTuple ["xkb" "us"]) (mkTuple ["xkb" "ua"]) (mkTuple ["xkb" "us+colemak_dh"])]; + # sources = [(mkTuple ["xkb" "us"]) (mkTuple ["xkb" "ua"]) (mkTuple ["xkb" "us+colemak_dh"])]; xkb-options = ["terminate:ctrl_alt_bksp"]; }; From aa915478a451172a71a14a3ba9c0f23fc4c6a4fa Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 11 Jun 2025 00:15:22 +0300 Subject: [PATCH 046/138] flake.lock: bump Signed-off-by: unexplrd --- flake.lock | 150 ++++++++++++++++++++++++++--------------------------- 1 file changed, 75 insertions(+), 75 deletions(-) diff --git a/flake.lock b/flake.lock index b985a34..01b0e5e 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1747864449, - "narHash": "sha256-PIjVAWghZhr3L0EFM2UObhX84UQxIACbON0IC0zzSKA=", + "lastModified": 1749155310, + "narHash": "sha256-t0HfHg/1+TbSra5s6nNM0o4tnb3uqWedShSpZXsUMYY=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "389372c5f4dc1ac0e7645ed29a35fd6d71672ef5", + "rev": "94981cf75a9f11da0b6dd6a1abbd7c50a36ab2d3", "type": "github" }, "original": { @@ -134,11 +134,11 @@ ] }, "locked": { - "lastModified": 1749037647, - "narHash": "sha256-eCYFdO4sr+SXfHHFzDqcjpQTcWudsMmq0Lg5iBKA2Ec=", + "lastModified": 1749559516, + "narHash": "sha256-lL1GFZnMjjo0Tx8u9C2Cv0+aogvF98CgUCwsUl2pTmE=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "dcc72d01c5a8a4ea2768b13b2f57794ced9d2525", + "rev": "b86053e6253c4b996bb81cc9fd490136da2f6aa6", "type": "github" }, "original": { @@ -193,11 +193,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1748932954, - "narHash": "sha256-1HiKieYFvFi5Hw3x2/mptbbvAuL0QwlZQC9UIGNNb1w=", + "lastModified": 1749451322, + "narHash": "sha256-t53R3kSDl4Jie+Ooxi/aQFN2ODRp1tXQSJBevOt3IkQ=", "owner": "nix-community", "repo": "fenix", - "rev": "2da33335e40ca932b4c5ea632816eed573736fba", + "rev": "77de5067629e201436c76f14f96614a19368c4ae", "type": "github" }, "original": { @@ -473,11 +473,11 @@ ] }, "locked": { - "lastModified": 1749062139, - "narHash": "sha256-gGGLujmeWU+ZjFzfMvFMI0hp9xONsSbm88187wJr82Q=", + "lastModified": 1749526396, + "narHash": "sha256-UL9F76abAk87llXOrcQRjhd5OaOclUd6MIltsqcUZmo=", "owner": "nix-community", "repo": "home-manager", - "rev": "86b95fc1ed2b9b04a451a08ccf13d78fb421859c", + "rev": "427c96044f11a5da50faf6adaf38c9fa47e6d044", "type": "github" }, "original": { @@ -502,11 +502,11 @@ ] }, "locked": { - "lastModified": 1745948457, - "narHash": "sha256-lzTV10FJTCGNtMdgW5YAhCAqezeAzKOd/97HbQK8GTU=", + "lastModified": 1749155331, + "narHash": "sha256-XR9fsI0zwLiFWfqi/pdS/VD+YNorKb3XIykgTg4l1nA=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "ac903e80b33ba6a88df83d02232483d99f327573", + "rev": "45fcc10b4c282746d93ec406a740c43b48b4ef80", "type": "github" }, "original": { @@ -531,11 +531,11 @@ ] }, "locked": { - "lastModified": 1745015490, - "narHash": "sha256-apEJ9zoSzmslhJ2vOKFcXTMZLUFYzh1ghfB6Rbw3Low=", + "lastModified": 1749238452, + "narHash": "sha256-8qiKEWcxUrjpUpK+WyFNg/72C8rp70LUuyTD23T+SdQ=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "60754910946b4e2dc1377b967b7156cb989c5873", + "rev": "c7225d73755a6c4c7c72f4d4f3925ea426e325a8", "type": "github" }, "original": { @@ -562,11 +562,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1749049255, - "narHash": "sha256-QXg2B/bF/f9IeSiZwJuhdnz2xcnpu/hDfz4eIHWVhz8=", + "lastModified": 1749540031, + "narHash": "sha256-11k6hq/4Tao2PNBFQpSNTlFFKmKGswL17caKuZIE0sM=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "d7a87ce6e2535f1029fc93b062d2828e8549c525", + "rev": "6bdb1f413e4c592f73d91bef33dfb202503ef7ab", "type": "github" }, "original": { @@ -587,11 +587,11 @@ ] }, "locked": { - "lastModified": 1743714874, - "narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=", + "lastModified": 1749046714, + "narHash": "sha256-kymV5FMnddYGI+UjwIw8ceDjdeg7ToDVjbHCvUlhn14=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2", + "rev": "613878cb6f459c5e323aaafe1e6f388ac8a36330", "type": "github" }, "original": { @@ -619,11 +619,11 @@ ] }, "locked": { - "lastModified": 1737634706, - "narHash": "sha256-nGCibkfsXz7ARx5R+SnisRtMq21IQIhazp6viBU8I/A=", + "lastModified": 1749154592, + "narHash": "sha256-DO7z5CeT/ddSGDEnK9mAXm1qlGL47L3VAHLlLXoCjhE=", "owner": "hyprwm", "repo": "hyprland-qt-support", - "rev": "8810df502cdee755993cb803eba7b23f189db795", + "rev": "4c8053c3c888138a30c3a6c45c2e45f5484f2074", "type": "github" }, "original": { @@ -655,11 +655,11 @@ ] }, "locked": { - "lastModified": 1745951494, - "narHash": "sha256-2dModE32doiyQMmd6EDAQeZnz+5LOs6KXyE0qX76WIg=", + "lastModified": 1749155776, + "narHash": "sha256-t1PM0wxQLQwv2F2AW23uA7pm5giwmcgYEWbNIRct9r4=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "4be1d324faf8d6e82c2be9f8510d299984dfdd2e", + "rev": "396e8aa1c06274835b69da7f9a015fff9a9b7522", "type": "github" }, "original": { @@ -684,11 +684,11 @@ ] }, "locked": { - "lastModified": 1747484975, - "narHash": "sha256-+LAQ81HBwG0lwshHlWe0kfWg4KcChIPpnwtnwqmnoEU=", + "lastModified": 1749145882, + "narHash": "sha256-qr0KXeczF8Sma3Ae7+dR2NHhvG7YeLBJv19W4oMu6ZE=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "163c83b3db48a17c113729c220a60b94596c9291", + "rev": "1bfb84f54d50c7ae6558c794d3cfd5f6a7e6e676", "type": "github" }, "original": { @@ -714,11 +714,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1746481417, - "narHash": "sha256-mal2vIpRz5BU/0ll6gP/N2FqjFtgFNDgMBgoI6tLWag=", + "lastModified": 1749186395, + "narHash": "sha256-4PMO6bm0hHEOzGEhXRYSCLpkGT6lGwvax8GkLo+nK5w=", "owner": "hyprwm", "repo": "hyprsunset", - "rev": "2a8ef76c6a77ca249e4613fefcd96bad74b5f9b2", + "rev": "4528cca4b2e4b44ed0a4e767a0ba493770d9d141", "type": "github" }, "original": { @@ -739,11 +739,11 @@ ] }, "locked": { - "lastModified": 1746635225, - "narHash": "sha256-W9G9bb0zRYDBRseHbVez0J8qVpD5QbizX67H/vsudhM=", + "lastModified": 1749135356, + "narHash": "sha256-Q8mAKMDsFbCEuq7zoSlcTuxgbIBVhfIYpX0RjE32PS0=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "674ea57373f08b7609ce93baff131117a0dfe70d", + "rev": "e36db00dfb3a3d3fdcc4069cb292ff60d2699ccb", "type": "github" }, "original": { @@ -764,11 +764,11 @@ ] }, "locked": { - "lastModified": 1747584298, - "narHash": "sha256-PH9qZqWLHvSBQiUnA0NzAyQA3tu2no2z8kz0ZeHWj4w=", + "lastModified": 1749145760, + "narHash": "sha256-IHaGWpGrv7seFWdw/1A+wHtTsPlOGIKMrk1TUIYJEFI=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "e511882b9c2e1d7a75d45d8fddd2160daeafcbc3", + "rev": "817918315ea016cc2d94004bfb3223b5fd9dfcc6", "type": "github" }, "original": { @@ -789,11 +789,11 @@ ] }, "locked": { - "lastModified": 1739870480, - "narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=", + "lastModified": 1749145760, + "narHash": "sha256-IHaGWpGrv7seFWdw/1A+wHtTsPlOGIKMrk1TUIYJEFI=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b", + "rev": "817918315ea016cc2d94004bfb3223b5fd9dfcc6", "type": "github" }, "original": { @@ -811,11 +811,11 @@ ] }, "locked": { - "lastModified": 1748977211, - "narHash": "sha256-VtL9IxQKMsGMD0jDoMMVeZLTxrPFt36MW43nkeXf1RM=", + "lastModified": 1749495634, + "narHash": "sha256-NPifVq2XZGRCsLBoUt6M5YUTiIh23+ubq57w7mSODt8=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "4989543da0defdedce08b14945ec5d2f6e22abb8", + "rev": "c40d2f31f92571bf341497884174a132829ef0fc", "type": "github" }, "original": { @@ -868,11 +868,11 @@ }, "nix-flatpak": { "locked": { - "lastModified": 1744659587, - "narHash": "sha256-xJnbmRVte13akgn+Prg06IaRHJ5OX3uVltwsCP/mxoc=", + "lastModified": 1749394952, + "narHash": "sha256-WbWkzIvB0gqAdBLghdmUpGveY7MlAS2iMj3VEJnJ9yE=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "928d868a9141b48f152d3b2b00c433e688d4b106", + "rev": "64c6e53a3999957c19ab95cda78bde466d8374cc", "type": "github" }, "original": { @@ -911,11 +911,11 @@ ] }, "locked": { - "lastModified": 1748751003, - "narHash": "sha256-i4GZdKAK97S0ZMU3w4fqgEJr0cVywzqjugt2qZPrScs=", + "lastModified": 1749355504, + "narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "2860bee699248d828c2ed9097a1cd82c2f991b43", + "rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94", "type": "github" }, "original": { @@ -936,11 +936,11 @@ "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1749035368, - "narHash": "sha256-j+pl67zOANjVyu9hX2vu9APc+hMuPP4sWMLA0GFZ47c=", + "lastModified": 1749511063, + "narHash": "sha256-LjH3btCZgZHGxLcAm1B9pjShQODF3mceFtu6+9KL9+g=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "74c357be1f9d2ff617a9758bf09063e61869daed", + "rev": "a812d36015622e8ca094685f069387468def4c97", "type": "github" }, "original": { @@ -966,11 +966,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748962802, - "narHash": "sha256-PmLFTJD6sbGpeGSMcCk091dvygDMxzsSqg4CFm5gHaw=", + "lastModified": 1749521202, + "narHash": "sha256-9SNHxww6HCKHPBg3h5u3dQqrxRqdGRlCl93PYhsNmOk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e7d00ea9afa4b44c0dabfc43a83de1bad0bb71e0", + "rev": "b57e8a01883a0566ed6213694941ea7acc2093a0", "type": "github" }, "original": { @@ -998,11 +998,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1748995628, - "narHash": "sha256-bFufQGSAEYQgjtc4wMrobS5HWN0hDP+ZX+zthYcml9U=", + "lastModified": 1749173751, + "narHash": "sha256-ENY3y3v6S9ZmLDDLI3LUT8MXmfXg/fSt2eA4GCnMVCE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8eb3b6a2366a7095939cd22f0dc0e9991313294b", + "rev": "ed29f002b6d6e5e7e32590deb065c34a31dc3e91", "type": "github" }, "original": { @@ -1112,11 +1112,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1748871544, - "narHash": "sha256-7V/sV6JiEp8LFmGIG3OqFDU2YNHgmodg1qNKGYXZKIY=", + "lastModified": 1749419176, + "narHash": "sha256-Hs0vidgwvBiBuqNjR5oCQMMGUfUYwwnyxLShg3yzhWU=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "25808c1ba14627876c9a031a67f404ac1927887d", + "rev": "9fc1b9076cf49c7f54497df9cfa4485a63f14d3e", "type": "github" }, "original": { @@ -1155,11 +1155,11 @@ ] }, "locked": { - "lastModified": 1749004659, - "narHash": "sha256-zaZrcC5UwHPGkgfnhTPx5sZfSSnUJdvYHhgex10RadQ=", + "lastModified": 1749436897, + "narHash": "sha256-OkDtaCGQQVwVFz5HWfbmrMJR99sFIMXHCHEYXzUJEJY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "c52e346aedfa745564599558a096e88f9a5557f9", + "rev": "e7876c387e35dc834838aff254d8e74cf5bd4f19", "type": "github" }, "original": { @@ -1214,11 +1214,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1749053445, - "narHash": "sha256-tf4MNRwJ5ikyg4+UfGuC1+GwMBQYh4dK4sdow1MEGVk=", + "lastModified": 1749576521, + "narHash": "sha256-II57ap6MGkArooZFaSDrgNgi24T5Dkdkzhe+xUHdybQ=", "owner": "danth", "repo": "stylix", - "rev": "a057acc112856352e77d42ac4685134b2213a810", + "rev": "6d72fc259b6f595f5bcf9634bf2f82b76f939a0d", "type": "github" }, "original": { @@ -1454,11 +1454,11 @@ ] }, "locked": { - "lastModified": 1745871725, - "narHash": "sha256-M24SNc2flblWGXFkGQfqSlEOzAGZnMc9QG3GH4K/KbE=", + "lastModified": 1749155346, + "narHash": "sha256-KIkJu3zF8MF3DuGwzAmo3Ww9wsWXolwV30SjJRTAxYE=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "76bbf1a6b1378e4ab5230bad00ad04bc287c969e", + "rev": "44bf29f1df45786098920c655af523535a9191ae", "type": "github" }, "original": { From 6e3f5969445bc9d2fabbbe0ff56b369be99324b1 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 11 Jun 2025 00:15:22 +0300 Subject: [PATCH 047/138] user/flatpak: add comments, add/remove programs hosts/dunamis/users/user/programs: bleh Signed-off-by: unexplrd --- hosts/dunamis/users/user/flatpak.nix | 49 ++++++++++++++------------- hosts/dunamis/users/user/programs.nix | 24 ++++++++----- 2 files changed, 42 insertions(+), 31 deletions(-) diff --git a/hosts/dunamis/users/user/flatpak.nix b/hosts/dunamis/users/user/flatpak.nix index 0d224e1..3a8c565 100644 --- a/hosts/dunamis/users/user/flatpak.nix +++ b/hosts/dunamis/users/user/flatpak.nix @@ -24,54 +24,57 @@ [ # browsers "app.zen_browser.zen" - "com.vivaldi.Vivaldi" + # "com.vivaldi.Vivaldi" "net.mullvad.MullvadBrowser" "org.torproject.torbrowser-launcher" ] ++ [ # editing - "com.github.PintaProject.Pinta" - "org.gimp.GIMP" - "org.kde.kdenlive" + "com.github.PintaProject.Pinta" # bootleg paint + "org.gimp.GIMP" # the holy gimp + "org.kde.kdenlive" # video editor ] ++ [ # chatting - "im.riot.Riot" - "io.github.kukuruzka165.materialgram" - "io.github.spacingbat3.webcord" - "org.mozilla.Thunderbird" + "im.riot.Riot" # matrix client + "io.github.kukuruzka165.materialgram" # telegram client + "io.github.spacingbat3.webcord" # discord client + # "org.mozilla.Thunderbird" # mail client "org.signal.Signal" # "org.telegram.desktop" ] ++ [ # media - "ca.edestcroix.Recordbox" - "io.bassi.Amberol" - "io.freetubeapp.FreeTube" - "org.atheme.audacious" + # "ca.edestcroix.Recordbox" # music player + "com.github.neithern.g4music" # music player + # "io.bassi.Amberol" # music player + "io.freetubeapp.FreeTube" # youtube client + # "org.atheme.audacious" # music player ] ++ [ # gaming - "com.heroicgameslauncher.hgl" + "com.heroicgameslauncher.hgl" # gog/egs launcher "com.valvesoftware.Steam" - "net.lutris.Lutris" - "org.prismlauncher.PrismLauncher" + "net.lutris.Lutris" # everything launcher + "org.prismlauncher.PrismLauncher" # minecraft launcher "org.freedesktop.Platform.VulkanLayer.MangoHud//24.08" "org.freedesktop.Platform.VulkanLayer.gamescope//24.08" ] ++ [ # misc + "app.drey.Warp" # share files using magic wormhole "com.bitwarden.desktop" - "com.github.tchx84.Flatseal" + "com.github.tchx84.Flatseal" # control flatpak permissions "com.logseq.Logseq" "com.obsproject.Studio" - "com.usebottles.bottles" - "de.capypara.FieldMonitor" - "de.haeckerfelix.Fragments" - "io.github.amit9838.mousam" - "io.gitlab.news_flash.NewsFlash" - "me.iepure.devtoolbox" - "org.nicotine_plus.Nicotine" + "com.usebottles.bottles" # wine containers + "de.capypara.FieldMonitor" # libvirt + "de.haeckerfelix.Fragments" # torrents + "io.github.amit9838.mousam" # weather + "io.github.lainsce.Khronos" # log time for tasks + "io.gitlab.news_flash.NewsFlash" # rss reader + "me.iepure.devtoolbox" # some cool utils + "org.nicotine_plus.Nicotine" # soulseek ]; overrides = let homeNoNetwork = { diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index 7fa1b9c..f3cc57a 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -1,4 +1,11 @@ -{pkgs, ...}: { +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkIf; +in { console.yazi.enable = true; editor.helix.enable = true; shell = { @@ -6,10 +13,10 @@ oh-my-posh.enable = true; }; syncthing.enable = true; - terminal.wezterm.enable = true; + # terminal.wezterm.enable = true; terminal.ghostty.enable = true; systemd.user.settings.Manager.DefaultEnvironment = { - TERMINAL = "wezterm"; + TERMINAL = "ghostty"; }; services = { @@ -23,8 +30,8 @@ enable = true; settings.update_ms = 200; }; - direnv.enable = true; - direnv.silent = true; + # direnv.enable = true; + # direnv.silent = true; eza.enable = true; # ls in rust fd.enable = true; # find in rust fzf.enable = true; # fuzzy finder in rust @@ -58,19 +65,19 @@ # development utils alejandra # nix formatter in rust # devenv # programming deps in rust - jj-fzf # fuzzy finder jujutsu tui + (mkIf config.programs.jujutsu.enable jj-fzf) # fuzzy finder jujutsu tui just # make in rust silicon # create code pics in rust ] ++ [ # console utils - bluetuith # bluetooth tui in go + # bluetuith # bluetooth tui in go dua # disk space usage in rust duf # better df in go fend # calculator in rust mprocs # process runner in rust ouch # archive manager in rust - procs # ps in rust + # procs # ps in rust rbw # bitwarden cli in rust sd # sed in rust systemctl-tui # systemctl tui in rust @@ -78,6 +85,7 @@ ] ++ [ # misc apps + adwaita-icon-theme # vial # qmk keyboard configuring app pinentry-qt # pinentry for rbw virt-manager # libvirt gui From 93c0c049e6ec72850713af176aeec662e100bc74 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 11 Jun 2025 01:16:15 +0300 Subject: [PATCH 048/138] modules/nixos/config/services: disable speechd Signed-off-by: unexplrd --- modules/nixos/config/services.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/nixos/config/services.nix b/modules/nixos/config/services.nix index 7def073..0acb128 100644 --- a/modules/nixos/config/services.nix +++ b/modules/nixos/config/services.nix @@ -1,9 +1,10 @@ -{ +{lib, ...}: { services = { # hardware.openrgb.enable = true; flatpak.enable = true; fwupd.enable = true; openssh.enable = true; + speechd.enable = lib.mkForce false; syncthing.openDefaultPorts = true; userborn.enable = true; dnscrypt-proxy2 = { From 062148ac1e2b7ea32c05be3fd19dbb10c849112c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 11 Jun 2025 13:10:20 +0300 Subject: [PATCH 049/138] distributed-build: move to modules/config/nix Signed-off-by: unexplrd --- hosts/dunamis/misc/default.nix | 2 +- hosts/dunamis/misc/nix-ssh-serve.nix | 15 ------ hosts/eldrid/misc/default.nix | 2 +- hosts/eldrid/misc/distributed-build.nix | 30 ------------ hosts/legion/misc/default.nix | 2 +- hosts/legion/misc/distributed-build.nix | 30 ------------ hosts/morphius/misc/default.nix | 2 +- hosts/morphius/misc/distributed-build.nix | 31 ------------ hosts/sarien/misc/default.nix | 2 +- hosts/sarien/misc/distributed-build.nix | 30 ------------ modules/nixos/config/nix/default.nix | 1 + modules/nixos/config/nix/distibuted-build.nix | 47 +++++++++++++++++++ 12 files changed, 53 insertions(+), 141 deletions(-) delete mode 100644 hosts/dunamis/misc/nix-ssh-serve.nix delete mode 100644 hosts/eldrid/misc/distributed-build.nix delete mode 100644 hosts/legion/misc/distributed-build.nix delete mode 100644 hosts/morphius/misc/distributed-build.nix delete mode 100644 hosts/sarien/misc/distributed-build.nix create mode 100644 modules/nixos/config/nix/distibuted-build.nix diff --git a/hosts/dunamis/misc/default.nix b/hosts/dunamis/misc/default.nix index ebef8d5..9e1fcd5 100644 --- a/hosts/dunamis/misc/default.nix +++ b/hosts/dunamis/misc/default.nix @@ -1,6 +1,6 @@ { imports = [ # ./minecraft.nix - ./nix-ssh-serve.nix + # ./nix-ssh-serve.nix ]; } diff --git a/hosts/dunamis/misc/nix-ssh-serve.nix b/hosts/dunamis/misc/nix-ssh-serve.nix deleted file mode 100644 index 05235cf..0000000 --- a/hosts/dunamis/misc/nix-ssh-serve.nix +++ /dev/null @@ -1,15 +0,0 @@ -{config, ...}: { - nix = let - inherit (builtins) readFile; - inherit (config.users.users) user; - in { - sshServe = { - enable = true; - keys = map (f: readFile f) user.openssh.authorizedKeys.keyFiles; - # protocol = "ssh-ng"; - trusted = true; - write = true; - }; - }; - security.pam.sshAgentAuth.enable = true; -} diff --git a/hosts/eldrid/misc/default.nix b/hosts/eldrid/misc/default.nix index cc8d3bd..cbbe9ef 100644 --- a/hosts/eldrid/misc/default.nix +++ b/hosts/eldrid/misc/default.nix @@ -1,5 +1,5 @@ { imports = [ - ./distributed-build.nix + # ./distributed-build.nix ]; } diff --git a/hosts/eldrid/misc/distributed-build.nix b/hosts/eldrid/misc/distributed-build.nix deleted file mode 100644 index b093581..0000000 --- a/hosts/eldrid/misc/distributed-build.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - inputs, - ... -}: let - inherit (builtins) readFile; - inherit (config.networking) hostName; - inherit (config.sops) secrets; - inherit (inputs) mysecrets; - pubHost = readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; -in { - nix = { - distributedBuilds = true; - buildMachines = [ - { - hostName = "dunamis"; - publicHostKey = pubHost; - sshKey = secrets."ssh-${hostName}-user".path; - sshUser = "nix-ssh"; - supportedFeatures = [ - "benchmark" - "big-parallel" - "kvm" - "nixos-test" - ]; - system = "x86_64-linux"; - } - ]; - }; -} diff --git a/hosts/legion/misc/default.nix b/hosts/legion/misc/default.nix index cc8d3bd..cbbe9ef 100644 --- a/hosts/legion/misc/default.nix +++ b/hosts/legion/misc/default.nix @@ -1,5 +1,5 @@ { imports = [ - ./distributed-build.nix + # ./distributed-build.nix ]; } diff --git a/hosts/legion/misc/distributed-build.nix b/hosts/legion/misc/distributed-build.nix deleted file mode 100644 index b093581..0000000 --- a/hosts/legion/misc/distributed-build.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - inputs, - ... -}: let - inherit (builtins) readFile; - inherit (config.networking) hostName; - inherit (config.sops) secrets; - inherit (inputs) mysecrets; - pubHost = readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; -in { - nix = { - distributedBuilds = true; - buildMachines = [ - { - hostName = "dunamis"; - publicHostKey = pubHost; - sshKey = secrets."ssh-${hostName}-user".path; - sshUser = "nix-ssh"; - supportedFeatures = [ - "benchmark" - "big-parallel" - "kvm" - "nixos-test" - ]; - system = "x86_64-linux"; - } - ]; - }; -} diff --git a/hosts/morphius/misc/default.nix b/hosts/morphius/misc/default.nix index cc8d3bd..cbbe9ef 100644 --- a/hosts/morphius/misc/default.nix +++ b/hosts/morphius/misc/default.nix @@ -1,5 +1,5 @@ { imports = [ - ./distributed-build.nix + # ./distributed-build.nix ]; } diff --git a/hosts/morphius/misc/distributed-build.nix b/hosts/morphius/misc/distributed-build.nix deleted file mode 100644 index cba37f5..0000000 --- a/hosts/morphius/misc/distributed-build.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - config, - inputs, - ... -}: let - inherit (builtins) readFile; - inherit (config.networking) hostName; - inherit (config.sops) secrets; - inherit (inputs) mysecrets; - pubHost = readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; -in { - nix = { - distributedBuilds = true; - buildMachines = [ - { - hostName = "dunamis"; - publicHostKey = pubHost; - sshKey = secrets."ssh-${hostName}-user".path; - sshUser = "nix-ssh"; - supportedFeatures = [ - "benchmark" - "big-parallel" - "kvm" - "nixos-test" - "uid-range" - ]; - system = "x86_64-linux"; - } - ]; - }; -} diff --git a/hosts/sarien/misc/default.nix b/hosts/sarien/misc/default.nix index cc8d3bd..cbbe9ef 100644 --- a/hosts/sarien/misc/default.nix +++ b/hosts/sarien/misc/default.nix @@ -1,5 +1,5 @@ { imports = [ - ./distributed-build.nix + # ./distributed-build.nix ]; } diff --git a/hosts/sarien/misc/distributed-build.nix b/hosts/sarien/misc/distributed-build.nix deleted file mode 100644 index b093581..0000000 --- a/hosts/sarien/misc/distributed-build.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - inputs, - ... -}: let - inherit (builtins) readFile; - inherit (config.networking) hostName; - inherit (config.sops) secrets; - inherit (inputs) mysecrets; - pubHost = readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; -in { - nix = { - distributedBuilds = true; - buildMachines = [ - { - hostName = "dunamis"; - publicHostKey = pubHost; - sshKey = secrets."ssh-${hostName}-user".path; - sshUser = "nix-ssh"; - supportedFeatures = [ - "benchmark" - "big-parallel" - "kvm" - "nixos-test" - ]; - system = "x86_64-linux"; - } - ]; - }; -} diff --git a/modules/nixos/config/nix/default.nix b/modules/nixos/config/nix/default.nix index 8337c0f..398a988 100644 --- a/modules/nixos/config/nix/default.nix +++ b/modules/nixos/config/nix/default.nix @@ -1,6 +1,7 @@ { imports = [ ./common.nix + ./distibuted-build.nix ./substituters.nix ]; } diff --git a/modules/nixos/config/nix/distibuted-build.nix b/modules/nixos/config/nix/distibuted-build.nix new file mode 100644 index 0000000..5af6877 --- /dev/null +++ b/modules/nixos/config/nix/distibuted-build.nix @@ -0,0 +1,47 @@ +{ + config, + inputs, + lib, + ... +}: let + isBuildHost = config.networking.hostName == "dunamis"; +in { + config = lib.mkMerge [ + (lib.mkIf isBuildHost { + nix = let + inherit (builtins) readFile; + inherit (config.users.users) user; + in { + sshServe = { + enable = true; + keys = map (f: readFile f) user.openssh.authorizedKeys.keyFiles; + # protocol = "ssh-ng"; + trusted = true; + write = true; + }; + }; + security.pam.sshAgentAuth.enable = true; + }) + (lib.mkIf (!isBuildHost) { + nix = let + inherit (builtins) readFile; + inherit (config.networking) hostName; + inherit (config.sops) secrets; + inherit (inputs) mysecrets; + pubHost = readFile "${mysecrets}/ssh/ssh_host_ed25519_dunamis.base64"; + in { + distributedBuilds = true; + buildMachines = [ + { + hostName = "dunamis"; + system = "x86_64-linux"; + publicHostKey = pubHost; + sshKey = secrets."ssh-${hostName}-user".path; + sshUser = "nix-ssh"; + supportedFeatures = ["benchmark" "big-parallel" "kvm" "nixos-test"]; + } + ]; + }; + }) + ]; +} From 872edc85bffc3c4a2ad9758d000213a053b9a9a4 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 11 Jun 2025 17:53:37 +0300 Subject: [PATCH 050/138] distibuted-build: change to ssh-ng Signed-off-by: unexplrd --- modules/nixos/config/nix/distibuted-build.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/nixos/config/nix/distibuted-build.nix b/modules/nixos/config/nix/distibuted-build.nix index 5af6877..28382f6 100644 --- a/modules/nixos/config/nix/distibuted-build.nix +++ b/modules/nixos/config/nix/distibuted-build.nix @@ -15,7 +15,7 @@ in { sshServe = { enable = true; keys = map (f: readFile f) user.openssh.authorizedKeys.keyFiles; - # protocol = "ssh-ng"; + protocol = "ssh-ng"; trusted = true; write = true; }; @@ -34,11 +34,14 @@ in { buildMachines = [ { hostName = "dunamis"; - system = "x86_64-linux"; + maxJobs = 3; + protocol = "ssh-ng"; publicHostKey = pubHost; + speedFactor = 2; sshKey = secrets."ssh-${hostName}-user".path; sshUser = "nix-ssh"; supportedFeatures = ["benchmark" "big-parallel" "kvm" "nixos-test"]; + system = "x86_64-linux"; } ]; }; From ae162c6d40bef4e269c19589ab4c96b3c5a5a16e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 11 Jun 2025 17:53:37 +0300 Subject: [PATCH 051/138] hosts/dunamis/configuration.nix: switch to gnome Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 196b19b..5a69c11 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -22,12 +22,16 @@ system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; - desktop.niri.enable = true; - # TODO: make a module for autologin - services.greetd.settings.initial_session = { + desktop.gnome.enable = true; + services.displayManager.autoLogin = { + enable = true; user = "user"; - command = "${pkgs.niri}/bin/niri-session"; }; + # TODO: make a module for autologin + # services.greetd.settings.initial_session = { + # user = "user"; + # command = "${pkgs.niri}/bin/niri-session"; + # }; module = { config = { From 56bdd83adecc95cbce3ac5a78062e69e6eb4365c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 12 Jun 2025 13:26:42 +0300 Subject: [PATCH 052/138] desktop/gnome: restructure packages Signed-off-by: unexplrd --- modules/home/desktop/gnome/default.nix | 39 +++++++++++++++----------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix index 15c76ea..0ae15d8 100644 --- a/modules/home/desktop/gnome/default.nix +++ b/modules/home/desktop/gnome/default.nix @@ -14,23 +14,28 @@ in { mkEnableOption "enable gnome desktop"; }; config = mkIf cfg.enable { - home.packages = with pkgs; [ - gnomeExtensions.alphabetical-app-grid - gnomeExtensions.app-icons-taskbar - gnomeExtensions.caffeine - gnomeExtensions.pano - gnomeExtensions.removable-drive-menu - gnomeExtensions.space-bar - gnomeExtensions.switcher - gnomeExtensions.tactile - gnomeExtensions.window-is-ready-remover - junction - celluloid - mission-center - dconf - pwvucontrol - wl-clipboard - ]; + home.packages = + (with pkgs.gnomeExtensions; [ + # extensions + alphabetical-app-grid + app-icons-taskbar + caffeine + pano + removable-drive-menu + space-bar + switcher + tactile + window-is-ready-remover + ]) + ++ (with pkgs; [ + # regular packages + junction + celluloid + mission-center + dconf + pwvucontrol + wl-clipboard + ]); programs.gnome-shell.extensions = [ {package = pkgs.gnomeExtensions.alphabetical-app-grid;} {package = pkgs.gnomeExtensions.app-icons-taskbar;} From 56ad1dcaaa3434360283e9f6ac9ffdb11d88ac8e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 11 Jun 2025 17:53:37 +0300 Subject: [PATCH 053/138] hosts/dunamis/users/user/flatpak.nix: an app Signed-off-by: unexplrd --- hosts/dunamis/users/user/flatpak.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/dunamis/users/user/flatpak.nix b/hosts/dunamis/users/user/flatpak.nix index 3a8c565..284051f 100644 --- a/hosts/dunamis/users/user/flatpak.nix +++ b/hosts/dunamis/users/user/flatpak.nix @@ -71,6 +71,7 @@ "de.capypara.FieldMonitor" # libvirt "de.haeckerfelix.Fragments" # torrents "io.github.amit9838.mousam" # weather + "io.github.finefindus.Hieroglyphic" # find latex symbols (in rust) "io.github.lainsce.Khronos" # log time for tasks "io.gitlab.news_flash.NewsFlash" # rss reader "me.iepure.devtoolbox" # some cool utils From 63eba9b76cf0eefb11c2b1d8720ce0e67d9982eb Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 11 Jun 2025 17:53:37 +0300 Subject: [PATCH 054/138] modules/nixos/config/services.nix: enable avahi Signed-off-by: unexplrd --- modules/nixos/config/services.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nixos/config/services.nix b/modules/nixos/config/services.nix index 0acb128..0ad6592 100644 --- a/modules/nixos/config/services.nix +++ b/modules/nixos/config/services.nix @@ -1,6 +1,7 @@ {lib, ...}: { services = { # hardware.openrgb.enable = true; + avahi.enable = true; flatpak.enable = true; fwupd.enable = true; openssh.enable = true; From 491c558054a993b25d9ead9ca76ed64ddac1a404 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 12 Jun 2025 13:26:42 +0300 Subject: [PATCH 055/138] nixos/config: add slim module from nuschtos Signed-off-by: unexplrd --- modules/nixos/config/default.nix | 1 + modules/nixos/config/misc/default.nix | 3 +++ modules/nixos/config/misc/slim.nix | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 modules/nixos/config/misc/default.nix create mode 100644 modules/nixos/config/misc/slim.nix diff --git a/modules/nixos/config/default.nix b/modules/nixos/config/default.nix index 6802cf1..b5a9712 100644 --- a/modules/nixos/config/default.nix +++ b/modules/nixos/config/default.nix @@ -11,6 +11,7 @@ in { imports = [ ./boot ./hardware + ./misc ./networking ./nix ./security diff --git a/modules/nixos/config/misc/default.nix b/modules/nixos/config/misc/default.nix new file mode 100644 index 0000000..8f1c59a --- /dev/null +++ b/modules/nixos/config/misc/default.nix @@ -0,0 +1,3 @@ +{ + imports = [./slim.nix]; +} diff --git a/modules/nixos/config/misc/slim.nix b/modules/nixos/config/misc/slim.nix new file mode 100644 index 0000000..11d5eb9 --- /dev/null +++ b/modules/nixos/config/misc/slim.nix @@ -0,0 +1,20 @@ +{ + # taken from https://github.com/NuschtOS/nixos-modules/blob/main/modules/slim.nix + documentation = { + # html docs and info are not required, man pages are enough + doc.enable = false; + info.enable = false; + }; + + # environment.defaultPackages = lib.mkForce []; + + # programs.thunderbird.package = pkgs.thunderbird.override {cfg.speechSynthesisSupport = false;}; + + # during testing only 550K-650K of the tmpfs where used + security.wrapperDirSize = "10M"; + + services = { + orca.enable = false; # requires speechd + speechd.enable = false; # voice files are big and fat + }; +} From a8b02e9d68ba4d9859593331fe927e1642cf0c69 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 12 Jun 2025 22:39:29 +0300 Subject: [PATCH 056/138] editor/helix: use nil instead of nixd Signed-off-by: unexplrd --- modules/home/programs/editor/helix.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/home/programs/editor/helix.nix b/modules/home/programs/editor/helix.nix index 1e8702c..b0776c0 100644 --- a/modules/home/programs/editor/helix.nix +++ b/modules/home/programs/editor/helix.nix @@ -64,8 +64,8 @@ in { language-server = { clangd.command = "${pkgs.clang-tools}/bin/clangd"; # markdown-oxide.command = getExe pkgs.markdown-oxide; - # nil.command = getExe pkgs.nil; - nixd.command = getExe pkgs.nixd; + nil.command = getExe pkgs.nil; + # nixd.command = getExe pkgs.nixd; # pyright.command = getExe pkgs.pyright; # pyright.args = ["-"]; ruff.command = getExe pkgs.ruff; @@ -92,7 +92,7 @@ in { name = "nix"; auto-format = true; formatter.command = getExe pkgs.alejandra; - language-servers = ["nixd"]; + language-servers = ["nil"]; } # { # name = "latex"; From 47ccbd6e797fc731c0e759d07f87067871c4058d Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 12 Jun 2025 22:39:29 +0300 Subject: [PATCH 057/138] README.md: add GLF OS credits and adapt various config elements from it Signed-off-by: unexplrd --- README.md | 1 + hosts/sarien/configuration.nix | 5 ++--- modules/nixos/config/misc/default.nix | 2 +- modules/nixos/config/misc/zram.nix | 8 ++++++++ modules/nixos/config/nix/common.nix | 5 +++++ modules/nixos/config/security/default.nix | 1 + modules/nixos/config/services.nix | 4 ++++ 7 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 modules/nixos/config/misc/zram.nix diff --git a/README.md b/README.md index cc01e78..543c4e0 100644 --- a/README.md +++ b/README.md @@ -12,5 +12,6 @@ Configurations I took code/ideas from: - [github:TheMaxMur/NixOS-Configuration](https://github.com/TheMaxMur/NixOS-Configuration) - [github:nix-community/srvos](https://github.com/nix-community/srvos) - [github:cloud-gouv/securix](https://github.com/cloud-gouv/securix) +- [GLF OS](https://www.gaminglinux.fr/glf-os/en) Thx a lot <3 diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index 24e4527..c2c985b 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -1,5 +1,6 @@ { inputs, + lib, pkgs, ... }: { @@ -18,7 +19,6 @@ hostName = "sarien"; }; - boot.loader.systemd-boot.enable = true; environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; @@ -29,7 +29,6 @@ user = "user"; }; - zramSwap.enable = true; swapDevices = [ { device = "/swap/swapfile"; @@ -39,7 +38,7 @@ { device = "/swap/hibernate"; size = 16 * 1024; - priority = 0; + priority = 1; } ]; diff --git a/modules/nixos/config/misc/default.nix b/modules/nixos/config/misc/default.nix index 8f1c59a..82640cb 100644 --- a/modules/nixos/config/misc/default.nix +++ b/modules/nixos/config/misc/default.nix @@ -1,3 +1,3 @@ { - imports = [./slim.nix]; + imports = [./slim.nix ./zram.nix]; } diff --git a/modules/nixos/config/misc/zram.nix b/modules/nixos/config/misc/zram.nix new file mode 100644 index 0000000..ff44dcc --- /dev/null +++ b/modules/nixos/config/misc/zram.nix @@ -0,0 +1,8 @@ +{ + zramSwap = { + enable = true; + algorithm = "zstd"; + memoryPercent = 25; + priority = 5; + }; +} diff --git a/modules/nixos/config/nix/common.nix b/modules/nixos/config/nix/common.nix index 64784db..88f15b7 100644 --- a/modules/nixos/config/nix/common.nix +++ b/modules/nixos/config/nix/common.nix @@ -7,7 +7,12 @@ package = pkgs.lixPackageSets.latest.lix; channel.enable = false; daemonCPUSchedPolicy = "idle"; + optimise = { + automatic = true; + dates = ["weekly"]; + }; settings = { + auto-optimise-store = true; experimental-features = [ "nix-command" "flakes" diff --git a/modules/nixos/config/security/default.nix b/modules/nixos/config/security/default.nix index 559f12b..4275a90 100644 --- a/modules/nixos/config/security/default.nix +++ b/modules/nixos/config/security/default.nix @@ -56,6 +56,7 @@ in { "fs.protected_regular" = 2; "fs.suid_dumpable" = 0; "kernel.kptr_restrict" = 2; + "kernel_kexec_load_disabled" = 1; # "kernel.modules_disabled" = 1; "kernel.sysrq" = 0; "kernel.unprivileged_bpf_disabled" = 1; diff --git a/modules/nixos/config/services.nix b/modules/nixos/config/services.nix index 0ad6592..115ec2f 100644 --- a/modules/nixos/config/services.nix +++ b/modules/nixos/config/services.nix @@ -16,6 +16,10 @@ bootstrap_resolvers = ["9.9.9.11:53" "9.9.9.9:53"]; }; }; + fstrim = { + enable = true; + interval = "daily"; + }; opensnitch = { enable = false; settings = { From f8552a680cbd0194a9e3ddcae4a36335458529e3 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 11 May 2025 17:51:24 +0300 Subject: [PATCH 058/138] hosts/eldrid: update id's Signed-off-by: unexplrd --- hosts/eldrid/configuration.nix | 6 +++--- hosts/eldrid/disko/default.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts/eldrid/configuration.nix b/hosts/eldrid/configuration.nix index e5a3f13..c02f599 100644 --- a/hosts/eldrid/configuration.nix +++ b/hosts/eldrid/configuration.nix @@ -10,7 +10,7 @@ networking = { networkmanager.enable = true; - # hostId = ""; + hostId = "14f63637"; hostName = "eldrid"; }; @@ -18,7 +18,7 @@ system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; - desktop.plasma.enable = true; + desktop.niri.enable = true; module = { config = { @@ -30,7 +30,7 @@ }; stylix = { enable = true; - theme = "helios"; + theme = "rose-pine-moon"; }; }; diff --git a/hosts/eldrid/disko/default.nix b/hosts/eldrid/disko/default.nix index aa8982a..3df18e9 100644 --- a/hosts/eldrid/disko/default.nix +++ b/hosts/eldrid/disko/default.nix @@ -1,5 +1,5 @@ {inputs, ...}: let - disk = "/dev/nvme0n1"; + disk = "/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a44022ad0"; in { imports = with inputs; [ disko.nixosModules.disko From 7383f5c540b7f9734f596e3314d7cb5b5dcebb57 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 12 Jun 2025 17:17:16 +0300 Subject: [PATCH 059/138] user/programs: enable zellij Signed-off-by: unexplrd --- hosts/dunamis/users/user/programs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/dunamis/users/user/programs.nix b/hosts/dunamis/users/user/programs.nix index f3cc57a..6cb3c7a 100644 --- a/hosts/dunamis/users/user/programs.nix +++ b/hosts/dunamis/users/user/programs.nix @@ -58,6 +58,7 @@ in { ripgrep.enable = true; # grep in rust zk.enable = true; zoxide.enable = true; # fuzzy cd in rust + zellij.enable = true; }; home.packages = with pkgs; From ebb7ef9fc9e8538cb4d22ed93cd01a12ac1da6b7 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 13 Jun 2025 00:15:32 +0300 Subject: [PATCH 060/138] modules/home/programs/editor: some lsp work Signed-off-by: unexplrd --- modules/home/programs/editor/helix.nix | 82 +++++++++++++++-------- modules/home/programs/editor/zed.nix | 92 +++++++++++++++----------- 2 files changed, 111 insertions(+), 63 deletions(-) diff --git a/modules/home/programs/editor/helix.nix b/modules/home/programs/editor/helix.nix index b0776c0..2d498af 100644 --- a/modules/home/programs/editor/helix.nix +++ b/modules/home/programs/editor/helix.nix @@ -62,44 +62,57 @@ in { }; languages = { language-server = { - clangd.command = "${pkgs.clang-tools}/bin/clangd"; # markdown-oxide.command = getExe pkgs.markdown-oxide; - nil.command = getExe pkgs.nil; # nixd.command = getExe pkgs.nixd; - # pyright.command = getExe pkgs.pyright; - # pyright.args = ["-"]; - ruff.command = getExe pkgs.ruff; - ruff.args = ["server"]; + # pyright = { + # command = getExe pkgs.pyright; + # args = ["-"]; + # }; # rust-analyzer.command = getExe pkgs.rust-analyzer; # texlab.command = getExe pkgs.texlab; + bash-language-server = { + command = getExe pkgs.bash-language-server; + environment = { + "SHELLCHECK_PATH" = getExe pkgs.shellcheck; + "SHFMT_PATH" = getExe pkgs.shfmt; + }; + }; + clangd.command = "${pkgs.clang-tools}/bin/clangd"; + fsac = { + command = getExe pkgs.fsautocomplete; + config = { + # editor.formatOnSave = true; + AutomaticWorkspaceInit = true; + FSharp.ExternalAutocomplete = true; + FSharp.linting.fsharplint.enabled = true; + FSharp.linting.fsharplint.configFile = "fsharplint.json"; + FSharp.formatting.fantomas.enabled = true; + }; + }; + nil = { + command = getExe pkgs.nil; + config = { + formatting.command = [(getExe pkgs.alejandra)]; + }; + }; + ruff = { + command = getExe pkgs.ruff; + args = ["server"]; + }; tinymist.command = getExe pkgs.tinymist; + vscode-json-language-server.command = getExe pkgs.nodePackages.vscode-json-languageserver; + yaml-language-server.command = getExe pkgs.yaml-language-server; zk = { command = getExe pkgs.zk; args = ["lsp"]; }; - fsac.command = getExe pkgs.fsautocomplete; - fsac.config = { - # editor.formatOnSave = true; - AutomaticWorkspaceInit = true; - FSharp.ExternalAutocomplete = true; - FSharp.linting.fsharplint.enabled = true; - FSharp.linting.fsharplint.configFile = "fsharplint.json"; - FSharp.formatting.fantomas.enabled = true; - }; }; language = [ { name = "nix"; auto-format = true; - formatter.command = getExe pkgs.alejandra; language-servers = ["nil"]; } - # { - # name = "latex"; - # auto-format = true; - # formatter.command = "${pkgs.texlivePackages.latexindent}/bin/latexindent"; - # language-servers = ["texlab"]; - # } { name = "typst"; auto-format = true; @@ -109,23 +122,21 @@ in { { name = "markdown"; # auto-format = true; - # formatter.command = "${pkgs.comrak}/bin/comrak"; language-servers = ["zk" "markdown-oxide"]; } { name = "c"; auto-format = true; - formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + # formatter.command = "${pkgs.clang-tools}/bin/clang-format"; } { name = "cpp"; auto-format = true; - formatter.command = "${pkgs.clang-tools}/bin/clang-format"; + # formatter.command = "${pkgs.clang-tools}/bin/clang-format"; } { name = "fsharp"; auto-format = true; - # formatter.command = getExe pkgs.fantomas; language-servers = ["fsac"]; scope = "source.fs"; roots = ["fsproj" "sln" ".git"]; @@ -136,6 +147,25 @@ in { # language-servers = ["rust-analyzer"]; # formatter.command = getExe pkgs.rustfmt; # } + { + name = "json"; + auto-format = true; + formatter.command = getExe pkgs.jq; + language-servers = ["vscode-json-language-server"]; + } + { + name = "yaml"; + auto-format = true; + formatter.command = getExe pkgs.yamlfmt; + formatter.args = ["-"]; + language-servers = ["yaml-language-server"]; + } + { + name = "bash"; + auto-format = true; + # formatter.command = getExe pkgs.shfmt; + # formatter.args = ["-"]; + } { name = "python"; auto-format = true; diff --git a/modules/home/programs/editor/zed.nix b/modules/home/programs/editor/zed.nix index 42b380a..d5d70fb 100644 --- a/modules/home/programs/editor/zed.nix +++ b/modules/home/programs/editor/zed.nix @@ -15,11 +15,11 @@ in { programs.zed-editor = { enable = true; extensions = [ - "nix" + "bash" "fsharp" - # "latex" - "typst" "justfile" + "nix" + "typst" ]; userSettings = { vim_mode = true; @@ -35,30 +35,29 @@ in { }; "Nix" = { language-servers = [ - "!nil" - "nixd" + "nil" ]; - formatter = { - external.command = getExe pkgs.alejandra; - }; - }; - "Rust" = { - formatter = { - external = { - command = getExe pkgs.rustfmt; - arguments = ["--edition" "2021"]; - }; - }; + # formatter = { + # external.command = getExe pkgs.alejandra; + # }; }; + # "Rust" = { + # formatter = { + # external = { + # command = getExe pkgs.rustfmt; + # arguments = ["--edition" "2021"]; + # }; + # }; + # }; "typst" = { language-servers = ["tinymist"]; format_on_save = "on"; - formatter = { - external = { - command = getExe pkgs.typstyle; - arguments = ["-i" "{buffer_path}"]; - }; - }; + # formatter = { + # external = { + # command = getExe pkgs.typstyle; + # arguments = ["-i" "{buffer_path}"]; + # }; + # }; }; "Python" = { format_on_save = "on"; @@ -73,6 +72,15 @@ in { }; }; lsp = { + bash-language-server = { + binary = { + path = getExe pkgs.bash-language-server; + env = { + "SHELLCHECK_PATH" = getExe pkgs.shellcheck; + "SHFMT_PATH" = getExe pkgs.shfmt; + }; + }; + }; fsautocomplete = { binary = { path = getExe pkgs.fsautocomplete; @@ -91,32 +99,32 @@ in { path = "${pkgs.clang-tools}/bin/clangd"; }; }; - rust-analyzer = { - binary = { - arguments = []; - path = getExe pkgs.rust-analyzer; - }; - }; + # rust-analyzer = { + # binary = { + # arguments = []; + # path = getExe pkgs.rust-analyzer; + # }; + # }; ruff = { binary = { arguments = []; path = getExe pkgs.ruff; }; }; - nixd = { - binary = { - arguments = []; - path = getExe pkgs.nixd; - }; - initialization_options.formatting.command = [(getExe pkgs.alejandra)]; - }; - # nil = { + # nixd = { # binary = { # arguments = []; - # path = getExe pkgs.nil; + # path = getExe pkgs.nixd; # }; # initialization_options.formatting.command = [(getExe pkgs.alejandra)]; # }; + nil = { + binary = { + arguments = []; + path = getExe pkgs.nil; + }; + settings.formatting.command = [(getExe pkgs.alejandra)]; + }; # texlab = { # binary = { # arguments = []; @@ -129,6 +137,16 @@ in { path = getExe pkgs.tinymist; }; }; + vscode-json-language-server = { + binary = { + path = getExe pkgs.nodePackages.vscode-json-languageserver; + }; + }; + yaml-language-server = { + binary = { + path = getExe pkgs.yaml-language-server; + }; + }; }; telemetry = { diagnostics = false; From f6fb822106646ba9007ef595dab425b18c1074e9 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 13 Jun 2025 00:15:32 +0300 Subject: [PATCH 061/138] desktop/niri: disable animations Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index b40047d..23b00a8 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -171,8 +171,8 @@ in { } background-color "transparent" - // default-column-width { proportion 0.9; } - default-column-width { proportion 0.5; } + default-column-width { proportion 1.0; } + // default-column-width { proportion 0.5; } tab-indicator { active-color "#${colors.base04}" inactive-color "#${colors.base03}" @@ -247,7 +247,8 @@ in { screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png" animations { - slowdown 0.8 + // slowdown 0.8 + off } window-rule { From b6b6a9de5b9c3ab29efd56d51cfc62a2b8fbc250 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 13 Jun 2025 00:15:32 +0300 Subject: [PATCH 062/138] config/boot/loader: set timeout to 0 Signed-off-by: unexplrd --- hosts/morphius/configuration.nix | 1 - modules/nixos/config/boot/loader.nix | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 980ca55..39dadea 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -19,7 +19,6 @@ hostName = "morphius"; }; - boot.loader.timeout = lib.mkForce 0; environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; diff --git a/modules/nixos/config/boot/loader.nix b/modules/nixos/config/boot/loader.nix index fa80e6a..338e389 100644 --- a/modules/nixos/config/boot/loader.nix +++ b/modules/nixos/config/boot/loader.nix @@ -4,7 +4,7 @@ ... }: { boot.loader = { - timeout = 3; + timeout = 0; efi.canTouchEfiVariables = true; systemd-boot = { consoleMode = "auto"; From 72d02732c1d0f72ef835d46f8eae6ecd3ef93650 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 13 Jun 2025 00:15:32 +0300 Subject: [PATCH 063/138] desktop/niri: use autoLogin module for greetd Signed-off-by: unexplrd --- modules/nixos/desktop/niri.nix | 41 +++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/modules/nixos/desktop/niri.nix b/modules/nixos/desktop/niri.nix index 0820def..ec62f17 100644 --- a/modules/nixos/desktop/niri.nix +++ b/modules/nixos/desktop/niri.nix @@ -11,23 +11,28 @@ in { desktop.niri.enable = mkEnableOption "enable niri desktop"; }; - config = mkIf cfg.enable { - module.desktop.displayManager = "greetd"; - module.desktop.gnome-keyring.enable = true; - sound.pipewire.enable = true; + config = lib.mkMerge [ + (mkIf cfg.enable { + module.desktop.displayManager = "greetd"; + module.desktop.gnome-keyring.enable = true; + sound.pipewire.enable = true; - security = { - soteria.enable = true; # polkit agent in rust - pam.services.gtklock = {}; - }; - programs.niri.enable = true; # wayland compositor in rust - xdg.portal = { - enable = true; - extraPortals = with pkgs; [ - xdg-desktop-portal-gnome - xdg-desktop-portal-gtk - ]; - config.niri.default = ["gnome" "gtk"]; - }; - }; + security = { + soteria.enable = true; # polkit agent in rust + pam.services.gtklock = {}; + }; + programs.niri.enable = true; # wayland compositor in rust + xdg.portal = { + enable = true; + extraPortals = with pkgs; [xdg-desktop-portal-gnome xdg-desktop-portal-gtk]; + config.niri.default = ["gnome" "gtk"]; + }; + }) + (mkIf config.services.displayManager.autoLogin.enable { + services.greetd.settings.initial_session = { + command = "niri-session"; + user = config.services.displayManager.autoLogin.user; + }; + }) + ]; } From d56ab68c8ff9f2ca938bba46ed4800b158848173 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 13 Jun 2025 00:15:32 +0300 Subject: [PATCH 064/138] desktop/niri: tweak copyq Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 23b00a8..916e3ce 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -263,6 +263,7 @@ in { } window-rule { match app-id="re.sonny.Junction" + match app-id="com.github.hluk.copyq" open-floating true open-focused true } @@ -320,7 +321,7 @@ in { Mod+BackSpace repeat=false { spawn "${launcher}"; } Mod+A repeat=false { spawn "${launcher}"; } Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; } - Mod+Ctrl+V repeat=false { spawn "copyq" "toggle"; } + Mod+Ctrl+V repeat=false { spawn "copyq" "menu"; } Mod+Shift+W repeat=false { spawn "walker" "-m" "windows"; } From a7e5cafc2c45d94cc0206a6b6e5ec14cc340d942 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 15 Jun 2025 16:42:44 +0300 Subject: [PATCH 065/138] move display config to kanshi Signed-off-by: unexplrd --- .../dunamis/users/user/home-configuration.nix | 54 +++++++++++++++++++ modules/home/desktop/niri/niri.nix | 19 ------- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/hosts/dunamis/users/user/home-configuration.nix b/hosts/dunamis/users/user/home-configuration.nix index 8499b4a..255a25a 100644 --- a/hosts/dunamis/users/user/home-configuration.nix +++ b/hosts/dunamis/users/user/home-configuration.nix @@ -4,4 +4,58 @@ ./flatpak.nix ./programs.nix ]; + services.kanshi = { + enable = true; + settings = [ + { + output = { + criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; + position = "0,0"; + scale = 1.33; + adaptiveSync = true; + }; + } + { + # eldrid built-in + output = { + criteria = "Chimei Innolux Corporation 0x1406 Unknown"; + position = "0,0"; + scale = 1.2; + # adaptiveSync = true; + }; + } + { + output = { + criteria = "Samsung Electric Company S24R65x H4TMA03291"; + mode = "1920x1080@74.973"; + position = "1920,0"; + transform = "90"; + adaptiveSync = true; + }; + } + { + profile.name = "desktop"; + profile.outputs = [ + { + criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; + } + { + criteria = "Samsung Electric Company S24R65x H4TMA03291"; + } + ]; + } + { + profile.name = "eldrid"; + profile.outputs = [ + { + criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; + } + { + criteria = "Chimei Innolux Corporation 0x1406 Unknown"; + position = "1920,0"; + } + ]; + } + ]; + }; } diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 916e3ce..9904f58 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -137,25 +137,6 @@ in { transform "normal" // position x=1920 y=0 } - output "Samsung Electric Company S24R65x H4TMA03291" { - position x=0 y=0 - variable-refresh-rate - } - output "Philips Consumer Electronics Company 27M2N5500 UK02418033254" { - mode "2560x1440@${ - if hostName == "legion" - then "144.001" - else "180.000" - }" - variable-refresh-rate - position x=0 y=0 - scale 1.33 - } - output "PNP(AOC) 27V2G5 0x0000026C" { - position x=1920 y=0 - mode "1920x1080@74.973" - variable-refresh-rate - } cursor { xcursor-theme "${cursor.name}" From f96f68b411e96fb1ee4036c70fdbd36cd055d1a6 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 14 Jun 2025 15:39:36 +0300 Subject: [PATCH 066/138] move kanshi to niri module Signed-off-by: unexplrd --- .../dunamis/users/user/home-configuration.nix | 54 --------------- .../home/desktop/niri/services/default.nix | 1 + .../desktop/niri/services/kanshi/default.nix | 66 +++++++++++++++++++ 3 files changed, 67 insertions(+), 54 deletions(-) create mode 100644 modules/home/desktop/niri/services/kanshi/default.nix diff --git a/hosts/dunamis/users/user/home-configuration.nix b/hosts/dunamis/users/user/home-configuration.nix index 255a25a..8499b4a 100644 --- a/hosts/dunamis/users/user/home-configuration.nix +++ b/hosts/dunamis/users/user/home-configuration.nix @@ -4,58 +4,4 @@ ./flatpak.nix ./programs.nix ]; - services.kanshi = { - enable = true; - settings = [ - { - output = { - criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; - position = "0,0"; - scale = 1.33; - adaptiveSync = true; - }; - } - { - # eldrid built-in - output = { - criteria = "Chimei Innolux Corporation 0x1406 Unknown"; - position = "0,0"; - scale = 1.2; - # adaptiveSync = true; - }; - } - { - output = { - criteria = "Samsung Electric Company S24R65x H4TMA03291"; - mode = "1920x1080@74.973"; - position = "1920,0"; - transform = "90"; - adaptiveSync = true; - }; - } - { - profile.name = "desktop"; - profile.outputs = [ - { - criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; - } - { - criteria = "Samsung Electric Company S24R65x H4TMA03291"; - } - ]; - } - { - profile.name = "eldrid"; - profile.outputs = [ - { - criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; - } - { - criteria = "Chimei Innolux Corporation 0x1406 Unknown"; - position = "1920,0"; - } - ]; - } - ]; - }; } diff --git a/modules/home/desktop/niri/services/default.nix b/modules/home/desktop/niri/services/default.nix index fcfaacc..aea9db5 100644 --- a/modules/home/desktop/niri/services/default.nix +++ b/modules/home/desktop/niri/services/default.nix @@ -6,6 +6,7 @@ ... }: { swaync = import ./swaync; + kanshi = import ./kanshi; network-manager-applet.enable = true; playerctld.enable = true; wpaperd.enable = true; diff --git a/modules/home/desktop/niri/services/kanshi/default.nix b/modules/home/desktop/niri/services/kanshi/default.nix new file mode 100644 index 0000000..a9e124b --- /dev/null +++ b/modules/home/desktop/niri/services/kanshi/default.nix @@ -0,0 +1,66 @@ +{ + enable = true; + settings = [ + { + output = { + criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; + position = "0,0"; + scale = 1.33; + adaptiveSync = true; + }; + } + { + # eldrid built-in + output = { + criteria = "Chimei Innolux Corporation 0x1406 Unknown"; + position = "0,0"; + scale = 1.2; + # adaptiveSync = true; + }; + } + { + output = { + criteria = "Samsung Electric Company S24R65x H4TMA03291"; + mode = "1920x1080@74.973"; + position = "1920,0"; + transform = "90"; + adaptiveSync = true; + }; + } + { + profile.name = "desktop"; + profile.outputs = [ + { + criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; + } + { + criteria = "Samsung Electric Company S24R65x H4TMA03291"; + } + ]; + } + { + profile.name = "eldrid-docked"; + profile.outputs = [ + { + criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; + position = "0,0"; + } + { + # some scaling quirks + criteria = "Chimei Innolux Corporation 0x1406 Unknown"; + position = "1933,0"; + } + ]; + } + { + profile.name = "eldrid-undocked"; + profile.outputs = [ + { + criteria = "Chimei Innolux Corporation 0x1406 Unknown"; + position = "0,0"; + } + ]; + } + ]; +} + From e654c5385323ab9044427b9c461502c07393c628 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 15 Jun 2025 16:42:44 +0300 Subject: [PATCH 067/138] desktop/niri: Mod+X to hide/show waybar Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 9904f58..06ae47b 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -277,6 +277,7 @@ in { Mod+Shift+T { set-column-width "67%"; } Mod+V { toggle-column-tabbed-display; } Mod+G { switch-focus-between-floating-and-tiling; } + Mod+X { spawn "pkill" "-SIGUSR1" "waybar"; } // hide/show waybar Mod+Ctrl+Comma { consume-or-expel-window-left; } Mod+Ctrl+Period { consume-or-expel-window-right; } From dad27b8f559402fcd475b4a9932c38911afc776c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 12:25:39 +0300 Subject: [PATCH 068/138] config/security: add pam.sshAgentAuth Signed-off-by: unexplrd --- modules/nixos/config/nix/distibuted-build.nix | 1 - modules/nixos/config/security/default.nix | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nixos/config/nix/distibuted-build.nix b/modules/nixos/config/nix/distibuted-build.nix index 28382f6..9ab9ffd 100644 --- a/modules/nixos/config/nix/distibuted-build.nix +++ b/modules/nixos/config/nix/distibuted-build.nix @@ -20,7 +20,6 @@ in { write = true; }; }; - security.pam.sshAgentAuth.enable = true; }) (lib.mkIf (!isBuildHost) { nix = let diff --git a/modules/nixos/config/security/default.nix b/modules/nixos/config/security/default.nix index 4275a90..2f8bcc8 100644 --- a/modules/nixos/config/security/default.nix +++ b/modules/nixos/config/security/default.nix @@ -31,6 +31,7 @@ in { }); ''; apparmor.enable = mkDefault true; + pam.sshAgentAuth.enable = true; }; environment.systemPackages = with pkgs; [ From 24f4e90a759f619f4275a796a38cc0983651131e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 12:19:39 +0300 Subject: [PATCH 069/138] modules/nixos: rename config to shared Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- hosts/eldrid/configuration.nix | 2 +- hosts/legion/configuration.nix | 2 +- hosts/morphius/configuration.nix | 2 +- hosts/sarien/configuration.nix | 6 ++++-- modules/nixos/{config => shared}/boot/default.nix | 0 modules/nixos/{config => shared}/boot/lanzaboote.nix | 0 modules/nixos/{config => shared}/boot/loader.nix | 0 modules/nixos/{config => shared}/default.nix | 0 modules/nixos/{config => shared}/hardware/default.nix | 0 modules/nixos/{config => shared}/hardware/facter.nix | 0 modules/nixos/{config => shared}/misc/default.nix | 0 modules/nixos/{config => shared}/misc/slim.nix | 0 modules/nixos/{config => shared}/misc/zram.nix | 0 modules/nixos/{config => shared}/networking/default.nix | 0 modules/nixos/{config => shared}/networking/hosts.nix | 0 modules/nixos/{config => shared}/nix/common.nix | 0 modules/nixos/{config => shared}/nix/default.nix | 0 modules/nixos/{config => shared}/nix/distibuted-build.nix | 0 modules/nixos/{config => shared}/nix/substituters.nix | 0 modules/nixos/{config => shared}/programs.nix | 0 modules/nixos/{config => shared}/security/default.nix | 0 modules/nixos/{config => shared}/services.nix | 0 modules/nixos/{config => shared}/sops.nix | 0 modules/nixos/{config => shared}/users.nix | 0 25 files changed, 8 insertions(+), 6 deletions(-) rename modules/nixos/{config => shared}/boot/default.nix (100%) rename modules/nixos/{config => shared}/boot/lanzaboote.nix (100%) rename modules/nixos/{config => shared}/boot/loader.nix (100%) rename modules/nixos/{config => shared}/default.nix (100%) rename modules/nixos/{config => shared}/hardware/default.nix (100%) rename modules/nixos/{config => shared}/hardware/facter.nix (100%) rename modules/nixos/{config => shared}/misc/default.nix (100%) rename modules/nixos/{config => shared}/misc/slim.nix (100%) rename modules/nixos/{config => shared}/misc/zram.nix (100%) rename modules/nixos/{config => shared}/networking/default.nix (100%) rename modules/nixos/{config => shared}/networking/hosts.nix (100%) rename modules/nixos/{config => shared}/nix/common.nix (100%) rename modules/nixos/{config => shared}/nix/default.nix (100%) rename modules/nixos/{config => shared}/nix/distibuted-build.nix (100%) rename modules/nixos/{config => shared}/nix/substituters.nix (100%) rename modules/nixos/{config => shared}/programs.nix (100%) rename modules/nixos/{config => shared}/security/default.nix (100%) rename modules/nixos/{config => shared}/services.nix (100%) rename modules/nixos/{config => shared}/sops.nix (100%) rename modules/nixos/{config => shared}/users.nix (100%) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 5a69c11..b480e04 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -5,7 +5,7 @@ ... }: { imports = with inputs; [ - self.nixosModules.config + self.nixosModules.shared self.nixosModules.desktop self.nixosModules.system ./disko diff --git a/hosts/eldrid/configuration.nix b/hosts/eldrid/configuration.nix index c02f599..f621707 100644 --- a/hosts/eldrid/configuration.nix +++ b/hosts/eldrid/configuration.nix @@ -1,6 +1,6 @@ {inputs, ...}: { imports = with inputs; [ - self.nixosModules.config + self.nixosModules.shared self.nixosModules.desktop self.nixosModules.system ./disko diff --git a/hosts/legion/configuration.nix b/hosts/legion/configuration.nix index f2e85f2..f6b7846 100644 --- a/hosts/legion/configuration.nix +++ b/hosts/legion/configuration.nix @@ -4,7 +4,7 @@ ... }: { imports = with inputs; [ - self.nixosModules.config + self.nixosModules.shared self.nixosModules.desktop self.nixosModules.system ./disko diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 39dadea..7fdcaf1 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -7,7 +7,7 @@ imports = with inputs; [ self.nixosModules.desktop self.nixosModules.system - self.nixosModules.config + self.nixosModules.shared ./disko ./hardware ./misc diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index c2c985b..b67d010 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -7,7 +7,7 @@ imports = with inputs; [ self.nixosModules.desktop self.nixosModules.system - self.nixosModules.config + self.nixosModules.shared ./disko ./hardware ./misc @@ -23,7 +23,9 @@ system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; - desktop.gnome.enable = true; + security.pam.sshAgentAuth.enable = true; + + desktop.niri.enable = true; services.displayManager.autoLogin = { enable = true; user = "user"; diff --git a/modules/nixos/config/boot/default.nix b/modules/nixos/shared/boot/default.nix similarity index 100% rename from modules/nixos/config/boot/default.nix rename to modules/nixos/shared/boot/default.nix diff --git a/modules/nixos/config/boot/lanzaboote.nix b/modules/nixos/shared/boot/lanzaboote.nix similarity index 100% rename from modules/nixos/config/boot/lanzaboote.nix rename to modules/nixos/shared/boot/lanzaboote.nix diff --git a/modules/nixos/config/boot/loader.nix b/modules/nixos/shared/boot/loader.nix similarity index 100% rename from modules/nixos/config/boot/loader.nix rename to modules/nixos/shared/boot/loader.nix diff --git a/modules/nixos/config/default.nix b/modules/nixos/shared/default.nix similarity index 100% rename from modules/nixos/config/default.nix rename to modules/nixos/shared/default.nix diff --git a/modules/nixos/config/hardware/default.nix b/modules/nixos/shared/hardware/default.nix similarity index 100% rename from modules/nixos/config/hardware/default.nix rename to modules/nixos/shared/hardware/default.nix diff --git a/modules/nixos/config/hardware/facter.nix b/modules/nixos/shared/hardware/facter.nix similarity index 100% rename from modules/nixos/config/hardware/facter.nix rename to modules/nixos/shared/hardware/facter.nix diff --git a/modules/nixos/config/misc/default.nix b/modules/nixos/shared/misc/default.nix similarity index 100% rename from modules/nixos/config/misc/default.nix rename to modules/nixos/shared/misc/default.nix diff --git a/modules/nixos/config/misc/slim.nix b/modules/nixos/shared/misc/slim.nix similarity index 100% rename from modules/nixos/config/misc/slim.nix rename to modules/nixos/shared/misc/slim.nix diff --git a/modules/nixos/config/misc/zram.nix b/modules/nixos/shared/misc/zram.nix similarity index 100% rename from modules/nixos/config/misc/zram.nix rename to modules/nixos/shared/misc/zram.nix diff --git a/modules/nixos/config/networking/default.nix b/modules/nixos/shared/networking/default.nix similarity index 100% rename from modules/nixos/config/networking/default.nix rename to modules/nixos/shared/networking/default.nix diff --git a/modules/nixos/config/networking/hosts.nix b/modules/nixos/shared/networking/hosts.nix similarity index 100% rename from modules/nixos/config/networking/hosts.nix rename to modules/nixos/shared/networking/hosts.nix diff --git a/modules/nixos/config/nix/common.nix b/modules/nixos/shared/nix/common.nix similarity index 100% rename from modules/nixos/config/nix/common.nix rename to modules/nixos/shared/nix/common.nix diff --git a/modules/nixos/config/nix/default.nix b/modules/nixos/shared/nix/default.nix similarity index 100% rename from modules/nixos/config/nix/default.nix rename to modules/nixos/shared/nix/default.nix diff --git a/modules/nixos/config/nix/distibuted-build.nix b/modules/nixos/shared/nix/distibuted-build.nix similarity index 100% rename from modules/nixos/config/nix/distibuted-build.nix rename to modules/nixos/shared/nix/distibuted-build.nix diff --git a/modules/nixos/config/nix/substituters.nix b/modules/nixos/shared/nix/substituters.nix similarity index 100% rename from modules/nixos/config/nix/substituters.nix rename to modules/nixos/shared/nix/substituters.nix diff --git a/modules/nixos/config/programs.nix b/modules/nixos/shared/programs.nix similarity index 100% rename from modules/nixos/config/programs.nix rename to modules/nixos/shared/programs.nix diff --git a/modules/nixos/config/security/default.nix b/modules/nixos/shared/security/default.nix similarity index 100% rename from modules/nixos/config/security/default.nix rename to modules/nixos/shared/security/default.nix diff --git a/modules/nixos/config/services.nix b/modules/nixos/shared/services.nix similarity index 100% rename from modules/nixos/config/services.nix rename to modules/nixos/shared/services.nix diff --git a/modules/nixos/config/sops.nix b/modules/nixos/shared/sops.nix similarity index 100% rename from modules/nixos/config/sops.nix rename to modules/nixos/shared/sops.nix diff --git a/modules/nixos/config/users.nix b/modules/nixos/shared/users.nix similarity index 100% rename from modules/nixos/config/users.nix rename to modules/nixos/shared/users.nix From c11eeb9d20c4f85a2fc2ca8390849282fe5b5301 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 12:45:52 +0300 Subject: [PATCH 070/138] restructure Signed-off-by: unexplrd --- .../dunamis/users/user/home-configuration.nix | 8 +- .../eldrid/users/user/home-configuration.nix | 8 +- .../legion/users/user/home-configuration.nix | 8 +- .../users/user/home-configuration.nix | 11 +- hosts/sarien/configuration.nix | 2 +- .../sarien/users/user/home-configuration.nix | 8 +- .../{cosmic.nix => cosmic/default.nix} | 0 modules/nixos/desktop/default.nix | 10 +- .../desktop/{gnome.nix => gnome/default.nix} | 0 .../{hyprland.nix => hyprland/default.nix} | 0 .../desktop/{niri.nix => niri/default.nix} | 0 .../{plasma.nix => plasma/default.nix} | 3 - modules/nixos/shared/security/default.nix | 119 ----------------- .../shared => shared/nixos}/boot/default.nix | 0 .../nixos}/boot/lanzaboote.nix | 0 .../shared => shared/nixos}/boot/loader.nix | 0 .../shared => shared/nixos}/default.nix | 21 +-- .../nixos}/hardware/default.nix | 0 .../nixos}/hardware/facter.nix | 0 .../shared => shared/nixos}/misc/default.nix | 0 .../shared => shared/nixos}/misc/slim.nix | 0 .../shared => shared/nixos}/misc/zram.nix | 0 .../nixos}/networking/default.nix | 0 .../nixos}/networking/hosts.nix | 0 .../shared => shared/nixos}/nix/common.nix | 0 .../shared => shared/nixos}/nix/default.nix | 0 .../nixos}/nix/distibuted-build.nix | 0 .../nixos}/nix/substituters.nix | 0 .../shared => shared/nixos}/programs.nix | 0 modules/shared/nixos/security/default.nix | 123 ++++++++++++++++++ .../shared => shared/nixos}/services.nix | 29 ++--- .../{nixos/shared => shared/nixos}/sops.nix | 0 .../{nixos/shared => shared/nixos}/users.nix | 4 +- .../users => modules/shared}/user/common.nix | 0 modules/shared/user/default.nix | 7 + .../users => modules/shared}/user/flatpak.nix | 0 .../shared}/user/programs.nix | 0 37 files changed, 167 insertions(+), 194 deletions(-) rename modules/nixos/desktop/{cosmic.nix => cosmic/default.nix} (100%) rename modules/nixos/desktop/{gnome.nix => gnome/default.nix} (100%) rename modules/nixos/desktop/{hyprland.nix => hyprland/default.nix} (100%) rename modules/nixos/desktop/{niri.nix => niri/default.nix} (100%) rename modules/nixos/desktop/{plasma.nix => plasma/default.nix} (89%) delete mode 100644 modules/nixos/shared/security/default.nix rename modules/{nixos/shared => shared/nixos}/boot/default.nix (100%) rename modules/{nixos/shared => shared/nixos}/boot/lanzaboote.nix (100%) rename modules/{nixos/shared => shared/nixos}/boot/loader.nix (100%) rename modules/{nixos/shared => shared/nixos}/default.nix (73%) rename modules/{nixos/shared => shared/nixos}/hardware/default.nix (100%) rename modules/{nixos/shared => shared/nixos}/hardware/facter.nix (100%) rename modules/{nixos/shared => shared/nixos}/misc/default.nix (100%) rename modules/{nixos/shared => shared/nixos}/misc/slim.nix (100%) rename modules/{nixos/shared => shared/nixos}/misc/zram.nix (100%) rename modules/{nixos/shared => shared/nixos}/networking/default.nix (100%) rename modules/{nixos/shared => shared/nixos}/networking/hosts.nix (100%) rename modules/{nixos/shared => shared/nixos}/nix/common.nix (100%) rename modules/{nixos/shared => shared/nixos}/nix/default.nix (100%) rename modules/{nixos/shared => shared/nixos}/nix/distibuted-build.nix (100%) rename modules/{nixos/shared => shared/nixos}/nix/substituters.nix (100%) rename modules/{nixos/shared => shared/nixos}/programs.nix (100%) create mode 100644 modules/shared/nixos/security/default.nix rename modules/{nixos/shared => shared/nixos}/services.nix (86%) rename modules/{nixos/shared => shared/nixos}/sops.nix (100%) rename modules/{nixos/shared => shared/nixos}/users.nix (94%) rename {hosts/dunamis/users => modules/shared}/user/common.nix (100%) create mode 100644 modules/shared/user/default.nix rename {hosts/dunamis/users => modules/shared}/user/flatpak.nix (100%) rename {hosts/dunamis/users => modules/shared}/user/programs.nix (100%) diff --git a/hosts/dunamis/users/user/home-configuration.nix b/hosts/dunamis/users/user/home-configuration.nix index 8499b4a..8f13934 100644 --- a/hosts/dunamis/users/user/home-configuration.nix +++ b/hosts/dunamis/users/user/home-configuration.nix @@ -1,7 +1 @@ -{ - imports = [ - ./common.nix - ./flatpak.nix - ./programs.nix - ]; -} +{flake, ...}: {imports = [flake.modules.shared.user];} diff --git a/hosts/eldrid/users/user/home-configuration.nix b/hosts/eldrid/users/user/home-configuration.nix index b9f1b07..8f13934 100644 --- a/hosts/eldrid/users/user/home-configuration.nix +++ b/hosts/eldrid/users/user/home-configuration.nix @@ -1,7 +1 @@ -{lib, ...}: { - imports = [ - ../../../dunamis/users/user/common.nix - ../../../dunamis/users/user/programs.nix - ../../../dunamis/users/user/flatpak.nix - ]; -} +{flake, ...}: {imports = [flake.modules.shared.user];} diff --git a/hosts/legion/users/user/home-configuration.nix b/hosts/legion/users/user/home-configuration.nix index 9d61093..8f13934 100644 --- a/hosts/legion/users/user/home-configuration.nix +++ b/hosts/legion/users/user/home-configuration.nix @@ -1,7 +1 @@ -{ - imports = [ - ../../../dunamis/users/user/common.nix - ../../../dunamis/users/user/flatpak.nix - ../../../dunamis/users/user/programs.nix - ]; -} +{flake, ...}: {imports = [flake.modules.shared.user];} diff --git a/hosts/morphius/users/user/home-configuration.nix b/hosts/morphius/users/user/home-configuration.nix index ef509bb..8f13934 100644 --- a/hosts/morphius/users/user/home-configuration.nix +++ b/hosts/morphius/users/user/home-configuration.nix @@ -1,10 +1 @@ -{lib, ...}: { - imports = [ - ../../../dunamis/users/user/common.nix - ../../../dunamis/users/user/programs.nix - ../../../dunamis/users/user/flatpak.nix - ]; - systemd.user.settings.Manager.DefaultEnvironment = { - TERMINAL = lib.mkForce "ghostty"; - }; -} +{flake, ...}: {imports = [flake.modules.shared.user];} diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index b67d010..dd45bef 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -7,7 +7,7 @@ imports = with inputs; [ self.nixosModules.desktop self.nixosModules.system - self.nixosModules.shared + self.modules.shared.nixos ./disko ./hardware ./misc diff --git a/hosts/sarien/users/user/home-configuration.nix b/hosts/sarien/users/user/home-configuration.nix index 93ccd24..8f13934 100644 --- a/hosts/sarien/users/user/home-configuration.nix +++ b/hosts/sarien/users/user/home-configuration.nix @@ -1,7 +1 @@ -{ - imports = [ - ../../../dunamis/users/user/common.nix - ../../../dunamis/users/user/programs.nix - ../../../dunamis/users/user/flatpak.nix - ]; -} +{flake, ...}: {imports = [flake.modules.shared.user];} diff --git a/modules/nixos/desktop/cosmic.nix b/modules/nixos/desktop/cosmic/default.nix similarity index 100% rename from modules/nixos/desktop/cosmic.nix rename to modules/nixos/desktop/cosmic/default.nix diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index ca85196..17ea96f 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,10 +1,10 @@ { imports = [ ./common - ./cosmic.nix - ./gnome.nix - ./hyprland.nix - ./niri.nix - ./plasma.nix + ./cosmic + ./gnome + ./hyprland + ./niri + ./plasma ]; } diff --git a/modules/nixos/desktop/gnome.nix b/modules/nixos/desktop/gnome/default.nix similarity index 100% rename from modules/nixos/desktop/gnome.nix rename to modules/nixos/desktop/gnome/default.nix diff --git a/modules/nixos/desktop/hyprland.nix b/modules/nixos/desktop/hyprland/default.nix similarity index 100% rename from modules/nixos/desktop/hyprland.nix rename to modules/nixos/desktop/hyprland/default.nix diff --git a/modules/nixos/desktop/niri.nix b/modules/nixos/desktop/niri/default.nix similarity index 100% rename from modules/nixos/desktop/niri.nix rename to modules/nixos/desktop/niri/default.nix diff --git a/modules/nixos/desktop/plasma.nix b/modules/nixos/desktop/plasma/default.nix similarity index 89% rename from modules/nixos/desktop/plasma.nix rename to modules/nixos/desktop/plasma/default.nix index 9cc28bb..9e29323 100644 --- a/modules/nixos/desktop/plasma.nix +++ b/modules/nixos/desktop/plasma/default.nix @@ -7,9 +7,6 @@ with lib; let cfg = config.desktop.plasma; in { - imports = [ - ./common/pipewire.nix - ]; options = { desktop.plasma = { enable = mkEnableOption "enable plasma desktop"; diff --git a/modules/nixos/shared/security/default.nix b/modules/nixos/shared/security/default.nix deleted file mode 100644 index 2f8bcc8..0000000 --- a/modules/nixos/shared/security/default.nix +++ /dev/null @@ -1,119 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit (lib) mkIf mkDefault; -in { - security = { - sudo.enable = false; - # doas.enable = true; - sudo-rs = { - enable = true; - execWheelOnly = true; - }; - polkit.enable = true; - polkit.extraConfig = '' - polkit.addRule(function(action, subject) { - if ( - subject.isInGroup("users") - && ( - action.id == "org.freedesktop.login1.reboot" || - action.id == "org.freedesktop.login1.reboot-multiple-sessions" || - action.id == "org.freedesktop.login1.power-off" || - action.id == "org.freedesktop.login1.power-off-multiple-sessions" - ) - ) - { - return polkit.Result.YES; - } - }); - ''; - apparmor.enable = mkDefault true; - pam.sshAgentAuth.enable = true; - }; - - environment.systemPackages = with pkgs; [ - (mkIf config.security.doas.enable doas-sudo-shim) # if doas install doas sudo shim - ]; - - services.dbus = { - apparmor = "enabled"; - implementation = "broker"; - }; - services.ntpd-rs = { - enable = true; - #settings = { - # server = { - # require-nts = true; - # }; - #}; - }; - - boot.kernel.sysctl = { - "dev.tty.ldisc_autoload" = 0; - "fs.protected_fifos" = 2; - "fs.protected_regular" = 2; - "fs.suid_dumpable" = 0; - "kernel.kptr_restrict" = 2; - "kernel_kexec_load_disabled" = 1; - # "kernel.modules_disabled" = 1; - "kernel.sysrq" = 0; - "kernel.unprivileged_bpf_disabled" = 1; - "net.ipv4.conf.all.forwarding" = 0; - "net.ipv4.conf.all.log_martians" = 1; - "net.ipv4.conf.all.rp_filter" = 1; - "net.ipv4.conf.all.send_redirects" = 0; - "net.ipv4.conf.default.accept_redirects" = 0; - "net.ipv4.conf.default.log_martians" = 1; - "net.ipv6.conf.all.accept_redirects" = 0; - "net.ipv6.conf.default.accept_redirects" = 0; - }; - boot.kernelParams = [ - "amd_iommu=force_isolation" - "debugfs=off" - "efi=disable_early_pci_dma" - "gather_data_sampling=force" - "intel_iommu=on" - "iommu.passthrough=0" - "iommu.strict=1" - "iommu=force" - "page_alloc.shuffle=1" - "vsyscall=none" - # "ia32_emulation=0" - # "lockdown=confidentiality" - # "module.sig_enforce=1" - ]; - - boot.blacklistedKernelModules = [ - # Obscure network protocols - "ax25" - "netrom" - "rose" - # Old or rare or insufficiently audited filesystems - "adfs" - "affs" - "bfs" - "befs" - "cramfs" - "efs" - "erofs" - "exofs" - "freevxfs" - "f2fs" - "hfs" - "hpfs" - "jfs" - "minix" - "nilfs2" - "ntfs" - "omfs" - "qnx4" - "qnx6" - "sysv" - "ufs" - ]; - - nix.settings.allowed-users = mkDefault ["@users"]; -} diff --git a/modules/nixos/shared/boot/default.nix b/modules/shared/nixos/boot/default.nix similarity index 100% rename from modules/nixos/shared/boot/default.nix rename to modules/shared/nixos/boot/default.nix diff --git a/modules/nixos/shared/boot/lanzaboote.nix b/modules/shared/nixos/boot/lanzaboote.nix similarity index 100% rename from modules/nixos/shared/boot/lanzaboote.nix rename to modules/shared/nixos/boot/lanzaboote.nix diff --git a/modules/nixos/shared/boot/loader.nix b/modules/shared/nixos/boot/loader.nix similarity index 100% rename from modules/nixos/shared/boot/loader.nix rename to modules/shared/nixos/boot/loader.nix diff --git a/modules/nixos/shared/default.nix b/modules/shared/nixos/default.nix similarity index 73% rename from modules/nixos/shared/default.nix rename to modules/shared/nixos/default.nix index b5a9712..bcff798 100644 --- a/modules/nixos/shared/default.nix +++ b/modules/shared/nixos/default.nix @@ -44,15 +44,18 @@ in { keyboards = { internal = { ids = ["0001:0001" "048d:c101"]; - settings.main = { - a = "lettermod(alt, a, 200, 150)"; - s = "lettermod(meta, s, 200, 150)"; - d = "lettermod(control, d, 200, 150)"; - f = "lettermod(shift, f, 200, 150)"; - j = "lettermod(shift, j, 200, 150)"; - k = "lettermod(control, k, 200, 150)"; - l = "lettermod(meta, l, 200, 150)"; - ";" = "lettermod(alt, ;, 200, 150)"; + settings.main = let + idleTimeout = toString 220; + holdTimeout = toString 170; + in { + a = "lettermod(alt, a, ${idleTimeout}, ${holdTimeout})"; + s = "lettermod(meta, s, ${idleTimeout}, ${holdTimeout})"; + d = "lettermod(control, d, ${idleTimeout}, ${holdTimeout})"; + f = "lettermod(shift, f, ${idleTimeout}, ${holdTimeout})"; + j = "lettermod(shift, j, ${idleTimeout}, ${holdTimeout})"; + k = "lettermod(control, k, ${idleTimeout}, ${holdTimeout})"; + l = "lettermod(meta, l, ${idleTimeout}, ${holdTimeout})"; + ";" = "lettermod(alt, ;, ${idleTimeout}, ${holdTimeout})"; }; }; }; diff --git a/modules/nixos/shared/hardware/default.nix b/modules/shared/nixos/hardware/default.nix similarity index 100% rename from modules/nixos/shared/hardware/default.nix rename to modules/shared/nixos/hardware/default.nix diff --git a/modules/nixos/shared/hardware/facter.nix b/modules/shared/nixos/hardware/facter.nix similarity index 100% rename from modules/nixos/shared/hardware/facter.nix rename to modules/shared/nixos/hardware/facter.nix diff --git a/modules/nixos/shared/misc/default.nix b/modules/shared/nixos/misc/default.nix similarity index 100% rename from modules/nixos/shared/misc/default.nix rename to modules/shared/nixos/misc/default.nix diff --git a/modules/nixos/shared/misc/slim.nix b/modules/shared/nixos/misc/slim.nix similarity index 100% rename from modules/nixos/shared/misc/slim.nix rename to modules/shared/nixos/misc/slim.nix diff --git a/modules/nixos/shared/misc/zram.nix b/modules/shared/nixos/misc/zram.nix similarity index 100% rename from modules/nixos/shared/misc/zram.nix rename to modules/shared/nixos/misc/zram.nix diff --git a/modules/nixos/shared/networking/default.nix b/modules/shared/nixos/networking/default.nix similarity index 100% rename from modules/nixos/shared/networking/default.nix rename to modules/shared/nixos/networking/default.nix diff --git a/modules/nixos/shared/networking/hosts.nix b/modules/shared/nixos/networking/hosts.nix similarity index 100% rename from modules/nixos/shared/networking/hosts.nix rename to modules/shared/nixos/networking/hosts.nix diff --git a/modules/nixos/shared/nix/common.nix b/modules/shared/nixos/nix/common.nix similarity index 100% rename from modules/nixos/shared/nix/common.nix rename to modules/shared/nixos/nix/common.nix diff --git a/modules/nixos/shared/nix/default.nix b/modules/shared/nixos/nix/default.nix similarity index 100% rename from modules/nixos/shared/nix/default.nix rename to modules/shared/nixos/nix/default.nix diff --git a/modules/nixos/shared/nix/distibuted-build.nix b/modules/shared/nixos/nix/distibuted-build.nix similarity index 100% rename from modules/nixos/shared/nix/distibuted-build.nix rename to modules/shared/nixos/nix/distibuted-build.nix diff --git a/modules/nixos/shared/nix/substituters.nix b/modules/shared/nixos/nix/substituters.nix similarity index 100% rename from modules/nixos/shared/nix/substituters.nix rename to modules/shared/nixos/nix/substituters.nix diff --git a/modules/nixos/shared/programs.nix b/modules/shared/nixos/programs.nix similarity index 100% rename from modules/nixos/shared/programs.nix rename to modules/shared/nixos/programs.nix diff --git a/modules/shared/nixos/security/default.nix b/modules/shared/nixos/security/default.nix new file mode 100644 index 0000000..9dfd561 --- /dev/null +++ b/modules/shared/nixos/security/default.nix @@ -0,0 +1,123 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkIf mkDefault; +in { + security = { + sudo.enable = false; + # doas.enable = true; + sudo-rs = { + enable = true; + execWheelOnly = true; + }; + polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if ( + subject.isInGroup("users") + && ( + action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.reboot-multiple-sessions" || + action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.power-off-multiple-sessions" + ) + ) + { + return polkit.Result.YES; + } + }); + ''; + }; + apparmor.enable = mkDefault true; + pam.sshAgentAuth.enable = true; + }; + + environment.systemPackages = with pkgs; [ + (mkIf config.security.doas.enable doas-sudo-shim) # if doas install doas sudo shim + ]; + services = { + dbus = { + apparmor = "enabled"; + implementation = "broker"; + }; + ntpd-rs = { + enable = true; + #settings = { + # server = { + # require-nts = true; + # }; + #}; + }; + }; + boot = { + kernel.sysctl = { + "dev.tty.ldisc_autoload" = 0; + "fs.protected_fifos" = 2; + "fs.protected_regular" = 2; + "fs.suid_dumpable" = 0; + "kernel.kptr_restrict" = 2; + "kernel_kexec_load_disabled" = 1; + # "kernel.modules_disabled" = 1; + "kernel.sysrq" = 0; + "kernel.unprivileged_bpf_disabled" = 1; + "net.ipv4.conf.all.forwarding" = 0; + "net.ipv4.conf.all.log_martians" = 1; + "net.ipv4.conf.all.rp_filter" = 1; + "net.ipv4.conf.all.send_redirects" = 0; + "net.ipv4.conf.default.accept_redirects" = 0; + "net.ipv4.conf.default.log_martians" = 1; + "net.ipv6.conf.all.accept_redirects" = 0; + "net.ipv6.conf.default.accept_redirects" = 0; + }; + kernelParams = [ + "amd_iommu=force_isolation" + "debugfs=off" + "efi=disable_early_pci_dma" + "gather_data_sampling=force" + "intel_iommu=on" + "iommu.passthrough=0" + "iommu.strict=1" + "iommu=force" + "page_alloc.shuffle=1" + "vsyscall=none" + # "ia32_emulation=0" + # "lockdown=confidentiality" + # "module.sig_enforce=1" + ]; + + blacklistedKernelModules = [ + # Obscure network protocols + "ax25" + "netrom" + "rose" + # Old or rare or insufficiently audited filesystems + "adfs" + "affs" + "bfs" + "befs" + "cramfs" + "efs" + "erofs" + "exofs" + "freevxfs" + "f2fs" + "hfs" + "hpfs" + "jfs" + "minix" + "nilfs2" + "ntfs" + "omfs" + "qnx4" + "qnx6" + "sysv" + "ufs" + ]; + }; + + nix.settings.allowed-users = mkDefault ["@users"]; +} diff --git a/modules/nixos/shared/services.nix b/modules/shared/nixos/services.nix similarity index 86% rename from modules/nixos/shared/services.nix rename to modules/shared/nixos/services.nix index 115ec2f..86fef1d 100644 --- a/modules/nixos/shared/services.nix +++ b/modules/shared/nixos/services.nix @@ -1,25 +1,25 @@ -{lib, ...}: { +{ services = { # hardware.openrgb.enable = true; avahi.enable = true; - flatpak.enable = true; - fwupd.enable = true; - openssh.enable = true; - speechd.enable = lib.mkForce false; - syncthing.openDefaultPorts = true; - userborn.enable = true; dnscrypt-proxy2 = { enable = true; settings = { + bootstrap_resolvers = ["9.9.9.11:53" "9.9.9.9:53"]; require_dnssec = true; server_names = ["mullvad-doh"]; - bootstrap_resolvers = ["9.9.9.11:53" "9.9.9.9:53"]; }; }; + flatpak.enable = true; fstrim = { enable = true; interval = "daily"; }; + fwupd.enable = true; + logind = { + lidSwitch = "ignore"; + powerKey = "suspend"; + }; opensnitch = { enable = false; settings = { @@ -29,13 +29,10 @@ ProcMonitorMethod = "ebpf"; }; }; - scx = { - enable = true; - scheduler = "scx_flash"; - }; - logind = { - lidSwitch = "ignore"; - powerKey = "suspend"; - }; + openssh.enable = true; + scx.enable = true; + scx.scheduler = "scx_flash"; + syncthing.openDefaultPorts = true; + userborn.enable = true; }; } diff --git a/modules/nixos/shared/sops.nix b/modules/shared/nixos/sops.nix similarity index 100% rename from modules/nixos/shared/sops.nix rename to modules/shared/nixos/sops.nix diff --git a/modules/nixos/shared/users.nix b/modules/shared/nixos/users.nix similarity index 94% rename from modules/nixos/shared/users.nix rename to modules/shared/nixos/users.nix index 7f5605b..b346816 100644 --- a/modules/nixos/shared/users.nix +++ b/modules/shared/nixos/users.nix @@ -17,9 +17,7 @@ in { hashedPasswordFile = secrets."user-password-hashed".path; extraGroups = ["wheel" "video" "libvirtd" "dialout"] - /* - for lisgd - */ + # for lisgd ++ lib.optional (hostName == "morphius" && config.desktop.niri.enable) "input"; isNormalUser = true; shell = pkgs.fish; diff --git a/hosts/dunamis/users/user/common.nix b/modules/shared/user/common.nix similarity index 100% rename from hosts/dunamis/users/user/common.nix rename to modules/shared/user/common.nix diff --git a/modules/shared/user/default.nix b/modules/shared/user/default.nix new file mode 100644 index 0000000..8499b4a --- /dev/null +++ b/modules/shared/user/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./common.nix + ./flatpak.nix + ./programs.nix + ]; +} diff --git a/hosts/dunamis/users/user/flatpak.nix b/modules/shared/user/flatpak.nix similarity index 100% rename from hosts/dunamis/users/user/flatpak.nix rename to modules/shared/user/flatpak.nix diff --git a/hosts/dunamis/users/user/programs.nix b/modules/shared/user/programs.nix similarity index 100% rename from hosts/dunamis/users/user/programs.nix rename to modules/shared/user/programs.nix From 4debffe903e0ce7e3417ea96f4ce74d26368d5da Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 13:41:21 +0300 Subject: [PATCH 071/138] niri/services/kanshi: some more config Signed-off-by: unexplrd --- .../desktop/niri/services/kanshi/default.nix | 110 ++++++++++++------ modules/shared/nixos/default.nix | 4 +- 2 files changed, 77 insertions(+), 37 deletions(-) diff --git a/modules/home/desktop/niri/services/kanshi/default.nix b/modules/home/desktop/niri/services/kanshi/default.nix index a9e124b..4ba50f7 100644 --- a/modules/home/desktop/niri/services/kanshi/default.nix +++ b/modules/home/desktop/niri/services/kanshi/default.nix @@ -1,18 +1,25 @@ { enable = true; - settings = [ + settings = let + main = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; + second = "Samsung Electric Company S24R65x H4TMA03291"; + builtin = { + eldrid = "Chimei Innolux Corporation 0x1406 Unknown"; + sarien = "LG Display 0x068B Unknown"; + # morphius =; + }; + in [ { output = { - criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; + criteria = main; position = "0,0"; - scale = 1.33; + scale = 4.0 / 3.0; adaptiveSync = true; }; } { - # eldrid built-in output = { - criteria = "Chimei Innolux Corporation 0x1406 Unknown"; + criteria = builtin.eldrid; position = "0,0"; scale = 1.2; # adaptiveSync = true; @@ -20,7 +27,15 @@ } { output = { - criteria = "Samsung Electric Company S24R65x H4TMA03291"; + criteria = builtin.sarien; + position = "0,0"; + scale = 1.25; + # adaptiveSync = true; + }; + } + { + output = { + criteria = second; mode = "1920x1080@74.973"; position = "1920,0"; transform = "90"; @@ -28,39 +43,64 @@ }; } { - profile.name = "desktop"; - profile.outputs = [ - { - criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; - } - { - criteria = "Samsung Electric Company S24R65x H4TMA03291"; - } - ]; + profile = { + name = "dunamis"; + outputs = [{criteria = main;} {criteria = second;}]; + }; } { - profile.name = "eldrid-docked"; - profile.outputs = [ - { - criteria = "Philips Consumer Electronics Company 27M2N5500 UK02418033254"; - position = "0,0"; - } - { - # some scaling quirks - criteria = "Chimei Innolux Corporation 0x1406 Unknown"; - position = "1933,0"; - } - ]; + profile = { + name = "eldrid-docked"; + outputs = [ + { + criteria = main; + position = "0,0"; + scale = 4.0 / 3.0; + } + { + criteria = builtin.eldrid; + position = "1920,0"; + } + ]; + }; } { - profile.name = "eldrid-undocked"; - profile.outputs = [ - { - criteria = "Chimei Innolux Corporation 0x1406 Unknown"; - position = "0,0"; - } - ]; + profile = { + name = "eldrid-undocked"; + outputs = [ + { + criteria = builtin.eldrid; + position = "0,0"; + } + ]; + }; + } + { + profile = { + name = "sarien-docked"; + outputs = [ + { + criteria = main; + position = "0,0"; + scale = 4.0 / 3.0; + } + { + criteria = builtin.sarien; + position = "1920,0"; + } + ]; + }; + } + { + profile = { + name = "sarien-undocked"; + outputs = [ + { + criteria = builtin.sarien; + position = "0,0"; + } + ]; + }; } ]; } - diff --git a/modules/shared/nixos/default.nix b/modules/shared/nixos/default.nix index bcff798..14c7903 100644 --- a/modules/shared/nixos/default.nix +++ b/modules/shared/nixos/default.nix @@ -45,8 +45,8 @@ in { internal = { ids = ["0001:0001" "048d:c101"]; settings.main = let - idleTimeout = toString 220; - holdTimeout = toString 170; + idleTimeout = toString 200; + holdTimeout = toString 150; in { a = "lettermod(alt, a, ${idleTimeout}, ${holdTimeout})"; s = "lettermod(meta, s, ${idleTimeout}, ${holdTimeout})"; From 4a6dce9b982f9f87726bd4e31659b3309b925bfb Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 14:31:28 +0300 Subject: [PATCH 072/138] hosts: rename module Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- hosts/eldrid/configuration.nix | 2 +- hosts/legion/configuration.nix | 2 +- hosts/morphius/configuration.nix | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index b480e04..3c8f8cf 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -5,7 +5,7 @@ ... }: { imports = with inputs; [ - self.nixosModules.shared + self.modules.shared.nixos self.nixosModules.desktop self.nixosModules.system ./disko diff --git a/hosts/eldrid/configuration.nix b/hosts/eldrid/configuration.nix index f621707..aa25d2d 100644 --- a/hosts/eldrid/configuration.nix +++ b/hosts/eldrid/configuration.nix @@ -1,6 +1,6 @@ {inputs, ...}: { imports = with inputs; [ - self.nixosModules.shared + self.modules.shared.nixos self.nixosModules.desktop self.nixosModules.system ./disko diff --git a/hosts/legion/configuration.nix b/hosts/legion/configuration.nix index f6b7846..f429cfb 100644 --- a/hosts/legion/configuration.nix +++ b/hosts/legion/configuration.nix @@ -4,7 +4,7 @@ ... }: { imports = with inputs; [ - self.nixosModules.shared + self.modules.shared.nixos self.nixosModules.desktop self.nixosModules.system ./disko diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 7fdcaf1..8639781 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -7,7 +7,7 @@ imports = with inputs; [ self.nixosModules.desktop self.nixosModules.system - self.nixosModules.shared + self.modules.shared.nixos ./disko ./hardware ./misc From c56a5166bc31222dd972a85930f92b5d7412a092 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 14:31:28 +0300 Subject: [PATCH 073/138] services/kanshi: change Signed-off-by: unexplrd --- .../desktop/niri/services/kanshi/default.nix | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/modules/home/desktop/niri/services/kanshi/default.nix b/modules/home/desktop/niri/services/kanshi/default.nix index 4ba50f7..1f505f0 100644 --- a/modules/home/desktop/niri/services/kanshi/default.nix +++ b/modules/home/desktop/niri/services/kanshi/default.nix @@ -17,6 +17,13 @@ adaptiveSync = true; }; } + { + output = { + criteria = second; + mode = "1920x1080@74.973"; + adaptiveSync = true; + }; + } { output = { criteria = builtin.eldrid; @@ -33,19 +40,19 @@ # adaptiveSync = true; }; } - { - output = { - criteria = second; - mode = "1920x1080@74.973"; - position = "1920,0"; - transform = "90"; - adaptiveSync = true; - }; - } { profile = { name = "dunamis"; - outputs = [{criteria = main;} {criteria = second;}]; + outputs = [ + {criteria = main;} + { + criteria = second; + position = "1920,180"; + scale = 1.2; + # transform = "90"; + adaptiveSync = true; + } + ]; }; } { From f3ae6681950e1e3ce68ec8c8b0e634c58e0cd431 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 14:31:28 +0300 Subject: [PATCH 074/138] move xdg.userDirs config to modules/shared/user Signed-off-by: unexplrd --- modules/home/desktop/common/default.nix | 1 - modules/home/desktop/common/xdg-userdirs.nix | 17 ------------- modules/home/desktop/default.nix | 2 +- modules/shared/user/common.nix | 25 ++++++++++++++++++-- 4 files changed, 24 insertions(+), 21 deletions(-) delete mode 100644 modules/home/desktop/common/xdg-userdirs.nix diff --git a/modules/home/desktop/common/default.nix b/modules/home/desktop/common/default.nix index 9974475..f7e9be4 100644 --- a/modules/home/desktop/common/default.nix +++ b/modules/home/desktop/common/default.nix @@ -1,5 +1,4 @@ { imports = [ - ./xdg-userdirs.nix ]; } diff --git a/modules/home/desktop/common/xdg-userdirs.nix b/modules/home/desktop/common/xdg-userdirs.nix deleted file mode 100644 index b9e6c16..0000000 --- a/modules/home/desktop/common/xdg-userdirs.nix +++ /dev/null @@ -1,17 +0,0 @@ -{config, ...}: let - inherit (config.home) homeDirectory; - home = f: "${homeDirectory}/${f}"; -in { - xdg.userDirs = { - enable = true; - createDirectories = true; - templates = home "temps"; - publicShare = home "pub"; - desktop = home "desktop"; - download = home "downloads"; - documents = home "docs"; - pictures = home "pics"; - videos = home "vids"; - music = home "music"; - }; -} diff --git a/modules/home/desktop/default.nix b/modules/home/desktop/default.nix index 17ea96f..d6b57d9 100644 --- a/modules/home/desktop/default.nix +++ b/modules/home/desktop/default.nix @@ -1,6 +1,6 @@ { imports = [ - ./common + # ./common ./cosmic ./gnome ./hyprland diff --git a/modules/shared/user/common.nix b/modules/shared/user/common.nix index 71c96e3..e8b74c5 100644 --- a/modules/shared/user/common.nix +++ b/modules/shared/user/common.nix @@ -1,4 +1,5 @@ { + config, inputs, osConfig, ... @@ -8,7 +9,27 @@ self.homeModules.desktop self.homeModules.programs ]; + inherit (osConfig) desktop; - home.stateVersion = osConfig.system.stateVersion; - home.sessionPath = ["$HOME/.local/bin"]; + + home = { + inherit (osConfig.system) stateVersion; + sessionPath = ["$HOME/.local/bin"]; + }; + + xdg.userDirs = let + inherit (config.home) homeDirectory; + homeDir = f: "${homeDirectory}/${f}"; + in { + enable = true; + createDirectories = true; + templates = homeDir "temps"; + publicShare = homeDir "pub"; + desktop = homeDir "desktop"; + download = homeDir "downloads"; + documents = homeDir "docs"; + pictures = homeDir "pics"; + videos = homeDir "vids"; + music = homeDir "music"; + }; } From 37582a436717734a56bbc61dc4c6c61ee5b5bdf4 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 5 Jun 2025 16:59:52 +0300 Subject: [PATCH 075/138] hosts/dunamis/configuration.nix: remove TODO hosts/legion: autologin, secure boot, tpm Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 5 ----- hosts/legion/configuration.nix | 11 ++++++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 3c8f8cf..ba43108 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -27,11 +27,6 @@ enable = true; user = "user"; }; - # TODO: make a module for autologin - # services.greetd.settings.initial_session = { - # user = "user"; - # command = "${pkgs.niri}/bin/niri-session"; - # }; module = { config = { diff --git a/hosts/legion/configuration.nix b/hosts/legion/configuration.nix index f429cfb..acd8142 100644 --- a/hosts/legion/configuration.nix +++ b/hosts/legion/configuration.nix @@ -23,17 +23,22 @@ desktop.niri.enable = true; + services.displayManager.autoLogin = { + enable = true; + user = "user"; + }; + module = { config = { laptop.homeRowMods = true; powerSave = true; - # secureBoot = true; - # tpmDiskUnlock = true; + secureBoot = true; + tpmDiskUnlock = true; vaapi = "nvidia"; }; stylix = { enable = true; - theme = "helios"; + theme = "gruvbox-dark-pale"; }; }; From c09ce303900a39facb0290f563a10d40c6b09ac7 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 5 Jun 2025 16:59:52 +0300 Subject: [PATCH 076/138] desktop/niri: enable animations Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 06ae47b..ede266e 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -228,8 +228,7 @@ in { screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png" animations { - // slowdown 0.8 - off + slowdown 0.5 } window-rule { From 379410d7ddaf21a258332b2d862881f5b150fe6d Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 13 Jun 2025 00:15:32 +0300 Subject: [PATCH 077/138] hosts/dunamis: switch to niri Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index ba43108..37b65b9 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -22,7 +22,7 @@ system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; - desktop.gnome.enable = true; + desktop.niri.enable = true; services.displayManager.autoLogin = { enable = true; user = "user"; From 2009e8be59939da7d3c9590900f34e4dfc9a1800 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 17:00:36 +0300 Subject: [PATCH 078/138] desktop/niri: nest programs Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 5f9cfc1..5ead0ec 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -66,8 +66,11 @@ in { platformTheme.name = "gtk3"; }; - programs.walker = import ./programs/walker {inherit config inputs pkgs;}; - programs.waybar = import ./programs/waybar {inherit config colors getExe ifLaptop pkgs;}; + programs = { + walker = import ./programs/walker {inherit config inputs pkgs;}; + waybar = import ./programs/waybar {inherit config colors getExe ifLaptop pkgs;}; + }; + xdg.configFile.niri = import ./niri.nix {inherit config hostName launcher lockscreen;}; services = import ./services {inherit pkgs lockscreen getExe perSystem;}; From 25f633936ddbfc68d823fddd26f7c9fc75e2c325 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 17:31:39 +0300 Subject: [PATCH 079/138] hosts: cleanup Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 10 ++-------- hosts/eldrid/configuration.nix | 23 +++++++++++++---------- hosts/legion/configuration.nix | 9 ++------- hosts/morphius/configuration.nix | 24 ++++++++---------------- hosts/sarien/configuration.nix | 12 ++---------- modules/nixos/system/common.nix | 10 +++++++--- 6 files changed, 34 insertions(+), 54 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 37b65b9..2c94999 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -1,9 +1,4 @@ -{ - config, - inputs, - pkgs, - ... -}: { +{inputs, ...}: { imports = with inputs; [ self.modules.shared.nixos self.nixosModules.desktop @@ -13,16 +8,15 @@ ]; networking = { - networkmanager.enable = true; hostId = "c7f6c4a1"; hostName = "dunamis"; }; - environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; desktop.niri.enable = true; + services.displayManager.autoLogin = { enable = true; user = "user"; diff --git a/hosts/eldrid/configuration.nix b/hosts/eldrid/configuration.nix index aa25d2d..c90c609 100644 --- a/hosts/eldrid/configuration.nix +++ b/hosts/eldrid/configuration.nix @@ -9,17 +9,27 @@ ]; networking = { - networkmanager.enable = true; hostId = "14f63637"; hostName = "eldrid"; }; - environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; desktop.niri.enable = true; + services.displayManager.autoLogin = { + enable = true; + user = "user"; + }; + + swapDevices = [ + { + device = "/swap/swapfile"; + size = 8 * 1024; # eight gigs + } + ]; + module = { config = { laptop.homeRowMods = true; @@ -30,7 +40,7 @@ }; stylix = { enable = true; - theme = "rose-pine-moon"; + theme = "gruvbox-dark-pale"; }; }; @@ -38,11 +48,4 @@ opentabletdriver.enable = false; qmk-vial.enable = true; virtual.libvirt.enable = false; - - swapDevices = [ - { - device = "/swap/swapfile"; - size = 8 * 1024; # eight gigs - } - ]; } diff --git a/hosts/legion/configuration.nix b/hosts/legion/configuration.nix index acd8142..70cfd28 100644 --- a/hosts/legion/configuration.nix +++ b/hosts/legion/configuration.nix @@ -1,8 +1,4 @@ -{ - config, - inputs, - ... -}: { +{inputs, ...}: { imports = with inputs; [ self.modules.shared.nixos self.nixosModules.desktop @@ -13,11 +9,10 @@ ]; networking = { - networkmanager.enable = true; + hostId = "45b00123"; hostName = "legion"; }; - environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 8639781..dfb4fc6 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -1,9 +1,4 @@ -{ - inputs, - # pkgs, - lib, - ... -}: { +{inputs, ...}: { imports = with inputs; [ self.nixosModules.desktop self.nixosModules.system @@ -14,23 +9,13 @@ ]; networking = { - networkmanager.enable = true; hostId = "bd1b5837"; hostName = "morphius"; }; - environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; - zramSwap.enable = true; - swapDevices = [ - { - device = "/swap/swapfile"; - size = 8 * 1024; - } - ]; - desktop.gnome.enable = true; services.displayManager.autoLogin = { @@ -38,6 +23,13 @@ user = "user"; }; + swapDevices = [ + { + device = "/swap/swapfile"; + size = 8 * 1024; + } + ]; + module = { config = { secureBoot = true; diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index dd45bef..b9589db 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -1,9 +1,4 @@ -{ - inputs, - lib, - pkgs, - ... -}: { +{inputs, ...}: { imports = with inputs; [ self.nixosModules.desktop self.nixosModules.system @@ -14,18 +9,15 @@ ]; networking = { - networkmanager.enable = true; hostId = "31150fae"; hostName = "sarien"; }; - environment.memoryAllocator.provider = "mimalloc"; system.stateVersion = "25.11"; time.timeZone = "Europe/Kyiv"; - security.pam.sshAgentAuth.enable = true; - desktop.niri.enable = true; + services.displayManager.autoLogin = { enable = true; user = "user"; diff --git a/modules/nixos/system/common.nix b/modules/nixos/system/common.nix index 35d1eac..70a0b9a 100644 --- a/modules/nixos/system/common.nix +++ b/modules/nixos/system/common.nix @@ -1,9 +1,13 @@ {lib, ...}: { - environment.variables = { - LESS = "-R --mouse"; + environment = { + ldso32 = null; + memoryAllocator.provider = "mimalloc"; + variables = { + LESS = "-R --mouse"; + }; }; - environment.ldso32 = null; + networking.networkmanager.enable = true; boot.tmp.cleanOnBoot = lib.mkDefault true; From 91c70ef4f54ee2a73ab4aab1e2340972875ca419 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 21:28:41 +0300 Subject: [PATCH 080/138] flake.nix: sort Signed-off-by: unexplrd --- flake.nix | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/flake.nix b/flake.nix index ec54245..bc49cc8 100644 --- a/flake.nix +++ b/flake.nix @@ -2,19 +2,25 @@ description = "unexplrd's personal configuration"; inputs = { - # lix.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-2.tar.gz"; - # neve.url = "git+https://gitea.linerds.us/unexplrd/Neve"; + # lix = { + # inputs.nixpkgs.follows = "nixpkgs"; + # url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-2.tar.gz"; + # }; + # neve = { + # inputs.nixvim.follows = "nixvim"; + # url = "git+https://gitea.linerds.us/unexplrd/Neve"; + # }; # nixvim.url = "github:nix-community/nixvim"; - # lix.inputs.nixpkgs.follows = "nixpkgs"; - # neve.inputs.nixvim.follows = "nixvim"; blueprint = { url = "github:numtide/blueprint"; inputs.nixpkgs.follows = "nixpkgs"; }; chaotic = { url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.home-manager.follows = "home-manager"; + inputs = { + home-manager.follows = "home-manager"; + nixpkgs.follows = "nixpkgs"; + }; }; disko = { url = "github:nix-community/disko/latest"; @@ -30,9 +36,11 @@ }; hyprsunset = { url = "github:hyprwm/hyprsunset"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.hyprland-protocols.follows = "hyprland/hyprland-protocols"; - inputs.hyprutils.follows = "hyprland/hyprutils"; + inputs = { + hyprland-protocols.follows = "hyprland/hyprland-protocols"; + hyprutils.follows = "hyprland/hyprutils"; + nixpkgs.follows = "nixpkgs"; + }; }; lanzaboote = { url = "github:nix-community/lanzaboote/v0.4.2"; @@ -42,24 +50,20 @@ url = "git+ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets"; flake = false; }; - nix-flatpak = { - url = "github:gmodena/nix-flatpak"; - }; + nix-flatpak.url = "github:gmodena/nix-flatpak"; nix-index-database = { url = "github:nix-community/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; nixos-cosmic = { url = "github:lilyinstarlight/nixos-cosmic"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.nixpkgs-stable.follows = "nixpkgs-stable"; - }; - nixos-facter-modules = { - url = "github:numtide/nixos-facter-modules"; - }; - nixpkgs-stable = { - url = "github:nixos/nixpkgs/nixos-24.11"; + inputs = { + nixpkgs-stable.follows = "nixpkgs-stable"; + nixpkgs.follows = "nixpkgs"; + }; }; + nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; + nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs = { # url = "github:NixOS/nixpkgs?ref=nixos-unstable"; # workaround for `unexpected Nix daemon error: error: serialised integer 7022364302122705765 is too large for type 'j'` @@ -71,8 +75,10 @@ }; stylix = { url = "github:danth/stylix"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.home-manager.follows = "home-manager"; + inputs = { + home-manager.follows = "home-manager"; + nixpkgs.follows = "nixpkgs"; + }; }; walker = { url = "github:abenz1267/walker"; From b2f148ffbe88e48d83b5be7ad7faec52ff81d96d Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 21:28:41 +0300 Subject: [PATCH 081/138] misc/stylix: new wallpaper Signed-off-by: unexplrd --- modules/nixos/system/misc/stylix/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/nixos/system/misc/stylix/default.nix b/modules/nixos/system/misc/stylix/default.nix index f65121d..2e4e5e6 100644 --- a/modules/nixos/system/misc/stylix/default.nix +++ b/modules/nixos/system/misc/stylix/default.nix @@ -60,6 +60,16 @@ name = "wallhaven-p9pd23.png"; sha256 = "7CMuETntiVUCKhUIdJzX+sf3F47GvuX2a61o4xbEzww="; }; + mountains-sepia = builtins.fetchurl { + url = "https://w.wallhaven.cc/full/k8/wallhaven-k89k81.jpg"; + name = "wallhaven-k89k81.jpg"; + sha256 = "C0lvJ0ff0mCC3i9mmeHZsj/n6Ehkp3jaslVr7VDUB3k="; + }; + jcurry-cloud = builtins.fetchurl { + url = "https://w.wallhaven.cc/full/7j/wallhaven-7j6wpy.jpg"; + name = "wallhaven-je8rwq.jpg"; + sha256 = "xsuCYc0mCDkrJZ+BUmEEclAfF17g1n39JHeubtZHP78="; + }; }; themes = { rose-pine-dawn = { @@ -109,7 +119,7 @@ gruvbox-dark-pale = { polarity = "dark"; scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-pale.yaml"; - wallpaper = wallpapers.nixos-rainbow; + wallpaper = wallpapers.mountains-sepia; serif = { # package = iosevkaPackage; From dc22bf05d70ea79ba7c94e184690b026df7e8b15 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 18 Jun 2025 16:48:34 +0300 Subject: [PATCH 082/138] hosts/sarien/disko/disk-main.nix: remove Signed-off-by: unexplrd --- hosts/sarien/disko/disk-main.nix | 76 -------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 hosts/sarien/disko/disk-main.nix diff --git a/hosts/sarien/disko/disk-main.nix b/hosts/sarien/disko/disk-main.nix deleted file mode 100644 index b3168d3..0000000 --- a/hosts/sarien/disko/disk-main.nix +++ /dev/null @@ -1,76 +0,0 @@ -{disk, ...}: { - type = "disk"; - device = disk; - content = { - type = "gpt"; - partitions = { - ESP = { - size = "2G"; - type = "EF00"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ - "umask=0077" - "fmask=0022" - "dmask=0022" - "noexec" - "nosuid" - "nodev" - ]; - }; - }; - luks = { - size = "100%"; - content = { - type = "luks"; - name = "luks-main"; - initrdUnlock = true; - settings.allowDiscards = true; - content = { - type = "btrfs"; - extraArgs = ["-f"]; - subvolumes = { - "@nixos-root" = { - mountpoint = "/"; - mountOptions = [ - "compress=zstd" - "noatime" - "noexec" - ]; - }; - "@home" = { - mountpoint = "/home"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - "@storage" = { - mountpoint = "/storage"; - mountOptions = [ - "compress=zstd" - "noatime" - ]; - }; - "@nix" = { - mountpoint = "/nix"; - mountOptions = [ - "compress-force=zstd" - "noatime" - ]; - }; - "@swap" = { - mountpoint = "/swap"; - mountOptions = [ - "noatime" - ]; - }; - }; - }; - }; - }; - }; - }; -} From e22a1b7f2174bfa02c7c0c06eaac78f5ebe555b8 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 18 Jun 2025 16:48:34 +0300 Subject: [PATCH 083/138] some options Signed-off-by: unexplrd --- modules/nixos/desktop/common/gnome-keyring.nix | 2 +- modules/nixos/system/common.nix | 12 +++++++++--- modules/shared/nixos/services.nix | 6 ++++-- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/modules/nixos/desktop/common/gnome-keyring.nix b/modules/nixos/desktop/common/gnome-keyring.nix index 246b9c7..e7da911 100644 --- a/modules/nixos/desktop/common/gnome-keyring.nix +++ b/modules/nixos/desktop/common/gnome-keyring.nix @@ -16,7 +16,7 @@ in { gcr_4 libsecret ]; - # programs.seahorse.enable = true; + programs.seahorse.enable = true; services.gnome.gnome-keyring.enable = true; xdg.portal.config.common = { "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; diff --git a/modules/nixos/system/common.nix b/modules/nixos/system/common.nix index 70a0b9a..8b0e2ce 100644 --- a/modules/nixos/system/common.nix +++ b/modules/nixos/system/common.nix @@ -1,4 +1,12 @@ -{lib, ...}: { +{ + lib, + pkgs, + ... +}: { + boot.tmp.cleanOnBoot = lib.mkDefault true; + + console.font = "${pkgs.spleen}/share/consolefonts/spleen-16x32.psfu"; + environment = { ldso32 = null; memoryAllocator.provider = "mimalloc"; @@ -9,8 +17,6 @@ networking.networkmanager.enable = true; - boot.tmp.cleanOnBoot = lib.mkDefault true; - services.openssh = { settings.X11Forwarding = false; settings.KbdInteractiveAuthentication = false; diff --git a/modules/shared/nixos/services.nix b/modules/shared/nixos/services.nix index 86fef1d..71d54c0 100644 --- a/modules/shared/nixos/services.nix +++ b/modules/shared/nixos/services.nix @@ -30,8 +30,10 @@ }; }; openssh.enable = true; - scx.enable = true; - scx.scheduler = "scx_flash"; + scx = { + enable = true; + scheduler = "scx_flash"; + }; syncthing.openDefaultPorts = true; userborn.enable = true; }; From f8dc107eaf4e2f534e7057e287f00b5d3f6b0d9d Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 18 Jun 2025 16:48:34 +0300 Subject: [PATCH 084/138] stylix: new theme Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- modules/nixos/system/misc/stylix/default.nix | 112 ++++++++++++------- 2 files changed, 75 insertions(+), 39 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 2c94999..2618a6c 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -30,7 +30,7 @@ }; stylix = { enable = true; - theme = "gruvbox-dark-pale"; + theme = "vesper"; }; }; diff --git a/modules/nixos/system/misc/stylix/default.nix b/modules/nixos/system/misc/stylix/default.nix index 2e4e5e6..27f14fc 100644 --- a/modules/nixos/system/misc/stylix/default.nix +++ b/modules/nixos/system/misc/stylix/default.nix @@ -5,71 +5,69 @@ pkgs, ... }: let + inherit (builtins) fetchurl; inherit (lib) mkEnableOption mkOption mkIf; inherit (lib) optionalAttrs; inherit (lib.types) bool str; - inherit (config.system) stateVersion; cfg = config.module.stylix; interPackage = pkgs.inter-nerdfont; - iosevkaPackage = - if stateVersion == "24.11" - then pkgs.nerdfonts.override {fonts = ["Iosevka"];} - else pkgs.nerd-fonts.iosevka; - iosevkaTermPackage = - if stateVersion == "24.11" - then pkgs.nerdfonts.override {fonts = ["Iosevka Term"];} - else pkgs.nerd-fonts.iosevka-term; - mesloLgPackage = - if stateVersion == "24.11" - then pkgs.nerdfonts.override {fonts = ["MesloLG"];} - else pkgs.nerd-fonts.meslo-lg; - jetBrainsMonoPackage = - if stateVersion == "24.11" - then pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];} - else pkgs.nerd-fonts.jetbrains-mono; - geistMonoPackage = - if stateVersion == "24.11" - then pkgs.nerdfonts.override {fonts = ["GeistMono"];} - else pkgs.nerd-fonts.geist-mono; + iosevkaPackage = pkgs.nerd-fonts.iosevka; + iosevkaTermPackage = pkgs.nerd-fonts.iosevka-term; + mesloLgPackage = pkgs.nerd-fonts.meslo-lg; + # jetBrainsMonoPackage = pkgs.nerd-fonts.jetbrains-mono; + geistMonoPackage = pkgs.nerd-fonts.geist-mono; + geistPackage = pkgs.geist-font; wallpapers = { - fern-outline = builtins.fetchurl { + abstract = { + squares = fetchurl { + url = "https://w.wallhaven.cc/full/p9/wallhaven-p91dym.jpg"; + name = "wallhaven-p91dym.jpg"; + sha256 = "wnsAhh0Soxm+lxahh+Xc/+CAw/abWgPIkeoOlzNGaDo="; + }; + }; + fern-outline = fetchurl { url = "https://w.wallhaven.cc/full/p9/wallhaven-p9m7ve.png"; name = "wallhaven-p9m7ve.png"; sha256 = "0r7dl4fjwv2p5q5ggr4sjsl2h5m0s98k9qhiwkvmwi010lyffkx7"; }; - mountains-pink = builtins.fetchurl { + mountains-pink = fetchurl { url = "https://w.wallhaven.cc/full/yq/wallhaven-yq7gox.jpg"; name = "wallhaven-yq7gox.jpg"; sha256 = "09s31spp9mq71fgkl1w80nzdc1458p1gjfyi3y6fy14wj2dza0pj"; }; - mountains-black = builtins.fetchurl { + mountains-black = fetchurl { url = "https://w.wallhaven.cc/full/9d/wallhaven-9djzww.jpg"; name = "wallhaven-9djzww.jpg"; sha256 = "1p2si922i9qs09h8c74lrvx0f284g0xvm7lh85gk1x7lqhn611zm"; }; - cyber-dawn = builtins.fetchurl { + cyber-dawn = fetchurl { url = "https://w.wallhaven.cc/full/ym/wallhaven-ymo2y7.png"; name = "wallhaven-ymo2y7.png"; sha256 = "1b3j0hxxy8m25scq42lxsxc99xvr15pha1j4wplgz761asrvxly3"; }; - nixos-rainbow = builtins.fetchurl { + nixos-rainbow = fetchurl { url = "https://w.wallhaven.cc/full/p9/wallhaven-p9pd23.png"; name = "wallhaven-p9pd23.png"; sha256 = "7CMuETntiVUCKhUIdJzX+sf3F47GvuX2a61o4xbEzww="; }; - mountains-sepia = builtins.fetchurl { + mountains-sepia = fetchurl { url = "https://w.wallhaven.cc/full/k8/wallhaven-k89k81.jpg"; name = "wallhaven-k89k81.jpg"; sha256 = "C0lvJ0ff0mCC3i9mmeHZsj/n6Ehkp3jaslVr7VDUB3k="; }; - jcurry-cloud = builtins.fetchurl { + jcurry-cloud = fetchurl { url = "https://w.wallhaven.cc/full/7j/wallhaven-7j6wpy.jpg"; name = "wallhaven-je8rwq.jpg"; sha256 = "xsuCYc0mCDkrJZ+BUmEEclAfF17g1n39JHeubtZHP78="; }; + vapor-moon = fetchurl { + url = "https://w.wallhaven.cc/full/lm/wallhaven-lm6d2r.png"; + name = "wallhaven-lm6d2r.png"; + sha256 = "V07kj2zwFHDwzIN8QE8IFrJMXxDOBoK9C11sQGgTjyQ="; + }; }; themes = { rose-pine-dawn = { @@ -99,9 +97,7 @@ wallpaper = wallpapers.cyber-dawn; serif = { - # package = iosevkaPackage; - # name = "Iosevka Nerd Font Propo"; - package = pkgs.geist-font; + package = geistPackage; name = "Geist Light"; }; @@ -122,9 +118,7 @@ wallpaper = wallpapers.mountains-sepia; serif = { - # package = iosevkaPackage; - # name = "Iosevka Nerd Font Propo"; - package = pkgs.geist-font; + package = geistPackage; name = "Geist"; }; @@ -142,7 +136,7 @@ nord = { polarity = "dark"; scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml"; - wallpaper = builtins.fetchurl { + wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png"; name = "wallhaven-l8l9gq.png"; sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z"; @@ -168,7 +162,7 @@ nord-light = { polarity = "light"; scheme = "${pkgs.base16-schemes}/share/themes/nord-light.yaml"; - wallpaper = builtins.fetchurl { + wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png"; name = "wallhaven-l8l9gq.png"; sha256 = "0ypr44sg0fn55m1b52dgr1nnscpi2p6rfkjsm7vvrdqw7bafbx2z"; @@ -194,7 +188,7 @@ helios = { polarity = "dark"; scheme = "${pkgs.base16-schemes}/share/themes/helios.yaml"; - wallpaper = builtins.fetchurl { + wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/lq/wallhaven-lqorw2.png"; name = "wallhaven-lqorw2.png"; sha256 = "sha256:1rjchjq4pc2jyq8dvpa17mmscv9qcm0h0zv468lsf8s51anpid6p"; @@ -220,7 +214,7 @@ sulphurpool = { polarity = "dark"; scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool.yaml"; - wallpaper = builtins.fetchurl { + wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/rd/wallhaven-rd5q3m.jpg"; name = "wallhaven-rd5q3m.jpg"; sha256 = "sha256:1sa2739vwwv1xafzjvxlg3kvq26xmcxg6hrwq29q40j617r63sy6"; @@ -258,6 +252,48 @@ name = "MesloLGM Nerd Font Mono"; }; + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + }; + vesper = { + polarity = "dark"; + scheme = "${pkgs.base16-schemes}/share/themes/vesper.yaml"; + wallpaper = wallpapers.abstract.squares; + + serif = { + package = geistPackage; + name = "Geist"; + }; + + monospace = { + package = geistMonoPackage; + name = "GeistMono Nerd Font"; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + }; + github = { + polarity = "light"; + scheme = "${pkgs.base16-schemes}/share/themes/github.yaml"; + wallpaper = wallpapers.abstract.squares; + + serif = { + package = geistPackage; + name = "Geist Light"; + }; + + monospace = { + package = geistMonoPackage; + name = "GeistMono Nerd Font"; + }; + cursor = { package = pkgs.bibata-cursors; name = "Bibata-Modern-Ice"; From ebc0a38f0041814232959bb9b71ae9bac6006959 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 17 Jun 2025 14:37:27 +0300 Subject: [PATCH 085/138] hosts/morphius: enable iio for autorotate Signed-off-by: unexplrd --- hosts/morphius/configuration.nix | 2 +- hosts/morphius/hardware/default.nix | 1 + hosts/morphius/hardware/laptop/default.nix | 5 ----- .../morphius/hardware/laptop/keyboard-fix.nix | 21 ------------------- 4 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 hosts/morphius/hardware/laptop/default.nix delete mode 100644 hosts/morphius/hardware/laptop/keyboard-fix.nix diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index dfb4fc6..231438e 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -40,7 +40,7 @@ }; stylix = { enable = true; - theme = "gruvbox-dark-pale"; + theme = "vesper"; }; }; diff --git a/hosts/morphius/hardware/default.nix b/hosts/morphius/hardware/default.nix index 40f8d46..948bf71 100644 --- a/hosts/morphius/hardware/default.nix +++ b/hosts/morphius/hardware/default.nix @@ -2,6 +2,7 @@ imports = [ # ./laptop ]; + hardware.sensor.iio.enable = true; services = { logind = { lidSwitch = "ignore"; diff --git a/hosts/morphius/hardware/laptop/default.nix b/hosts/morphius/hardware/laptop/default.nix deleted file mode 100644 index 86ed9a8..0000000 --- a/hosts/morphius/hardware/laptop/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - imports = [ - ./keyboard-fix.nix - ]; -} diff --git a/hosts/morphius/hardware/laptop/keyboard-fix.nix b/hosts/morphius/hardware/laptop/keyboard-fix.nix deleted file mode 100644 index d8119fd..0000000 --- a/hosts/morphius/hardware/laptop/keyboard-fix.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - services = { - udev.extraHwdb = '' - evdev:input:b0011v0001p0001eAB83* - KEYBOARD_KEY_d5=sysrq - KEYBOARD_KEY_d4=leftmeta - KEYBOARD_KEY_95=brightnessdown - KEYBOARD_KEY_91=brightnessup - ''; - keyd = { - enable = true; - keyboards.default = { - ids = ["0001:0001"]; - settings.main = { - camera = "brightnessdown"; - prog1 = "brightnessup"; - }; - }; - }; - }; -} From 56b4746dce7d0d2eb1338fb778c68c44ec9e0038 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 14 Jun 2025 15:39:36 +0300 Subject: [PATCH 086/138] hosts/eldrid/misc/undervolt.nix: add Signed-off-by: unexplrd --- hosts/eldrid/misc/default.nix | 1 + hosts/eldrid/misc/undervolt.nix | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 hosts/eldrid/misc/undervolt.nix diff --git a/hosts/eldrid/misc/default.nix b/hosts/eldrid/misc/default.nix index cbbe9ef..ccd02b9 100644 --- a/hosts/eldrid/misc/default.nix +++ b/hosts/eldrid/misc/default.nix @@ -1,5 +1,6 @@ { imports = [ # ./distributed-build.nix + ./undervolt.nix ]; } diff --git a/hosts/eldrid/misc/undervolt.nix b/hosts/eldrid/misc/undervolt.nix new file mode 100644 index 0000000..953b25f --- /dev/null +++ b/hosts/eldrid/misc/undervolt.nix @@ -0,0 +1,7 @@ +{ + services.undervolt = { + enable = true; + # coreOffset = -150; + turbo = 1; + }; +} From 0efe2321f74d7e8548d5c91f42b4fdf0667ba612 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 19 Jun 2025 10:22:49 +0300 Subject: [PATCH 087/138] rework modules Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 11 ++++++----- hosts/eldrid/configuration.nix | 11 +++++------ hosts/legion/configuration.nix | 5 ++--- hosts/morphius/configuration.nix | 4 +--- hosts/sarien/configuration.nix | 8 +++----- modules/nixos/system/default.nix | 4 +++- modules/nixos/system/{misc => }/locale.nix | 14 ++++++++------ modules/nixos/system/misc/default.nix | 2 -- modules/nixos/system/misc/opentabletdriver.nix | 4 ++-- modules/nixos/system/misc/qmk-vial.nix | 4 ++-- modules/nixos/system/{misc => }/stylix/default.nix | 0 modules/nixos/system/{virtual => virt}/default.nix | 0 modules/nixos/system/{virtual => virt}/docker.nix | 4 ++-- modules/nixos/system/{virtual => virt}/libvirt.nix | 4 ++-- modules/nixos/system/{virtual => virt}/podman.nix | 4 ++-- 15 files changed, 38 insertions(+), 41 deletions(-) rename modules/nixos/system/{misc => }/locale.nix (68%) rename modules/nixos/system/{misc => }/stylix/default.nix (100%) rename modules/nixos/system/{virtual => virt}/default.nix (100%) rename modules/nixos/system/{virtual => virt}/docker.nix (87%) rename modules/nixos/system/{virtual => virt}/libvirt.nix (89%) rename modules/nixos/system/{virtual => virt}/podman.nix (87%) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 2618a6c..d0b6633 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -32,10 +32,11 @@ enable = true; theme = "vesper"; }; + locale = "uk_UA.UTF-8"; + misc = { + opentabletdriver.enable = false; + qmk-vial.enable = true; + }; + virt.libvirt.enable = true; }; - - locale.ukrainian.enable = true; - opentabletdriver.enable = false; - qmk-vial.enable = true; - virtual.libvirt.enable = true; } diff --git a/hosts/eldrid/configuration.nix b/hosts/eldrid/configuration.nix index c90c609..0331b45 100644 --- a/hosts/eldrid/configuration.nix +++ b/hosts/eldrid/configuration.nix @@ -40,12 +40,11 @@ }; stylix = { enable = true; - theme = "gruvbox-dark-pale"; + theme = "vesper"; + }; + locale = "uk_UA.UTF-8"; + misc = { + qmk-vial.enable = true; }; }; - - locale.ukrainian.enable = true; - opentabletdriver.enable = false; - qmk-vial.enable = true; - virtual.libvirt.enable = false; } diff --git a/hosts/legion/configuration.nix b/hosts/legion/configuration.nix index 70cfd28..fb06add 100644 --- a/hosts/legion/configuration.nix +++ b/hosts/legion/configuration.nix @@ -35,8 +35,7 @@ enable = true; theme = "gruvbox-dark-pale"; }; + locale = "uk_UA.UTF-8"; + virt.libvirt.enable = true; }; - - locale.ukrainian.enable = true; - virtual.libvirt.enable = true; } diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 231438e..8c2f727 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -42,8 +42,6 @@ enable = true; theme = "vesper"; }; + locale = "uk_UA.UTF-8"; }; - - locale.ukrainian.enable = true; - opentabletdriver.enable = false; } diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index b9589db..c5cd681 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -47,10 +47,8 @@ enable = true; theme = "gruvbox-dark-pale"; }; + locale = "uk_UA.UTF-8"; + misc.qmk-vial.enable = true; + virt.libvirt.enable = true; }; - - locale.ukrainian.enable = true; - opentabletdriver.enable = false; - qmk-vial.enable = true; - virtual.libvirt.enable = true; } diff --git a/modules/nixos/system/default.nix b/modules/nixos/system/default.nix index 737257f..6d29c97 100644 --- a/modules/nixos/system/default.nix +++ b/modules/nixos/system/default.nix @@ -1,7 +1,9 @@ { imports = [ ./common.nix + ./locale.nix ./misc - ./virtual + ./stylix + ./virt ]; } diff --git a/modules/nixos/system/misc/locale.nix b/modules/nixos/system/locale.nix similarity index 68% rename from modules/nixos/system/misc/locale.nix rename to modules/nixos/system/locale.nix index 280a52c..f98f7d9 100644 --- a/modules/nixos/system/misc/locale.nix +++ b/modules/nixos/system/locale.nix @@ -3,16 +3,18 @@ lib, ... }: let - inherit (lib) mkIf mkEnableOption; - cfg = config.locale.ukrainian; + inherit (lib) types mkOption; in { options = { - locale.ukrainian.enable = - mkEnableOption "enables ukrainian locale"; + module.locale = mkOption { + type = types.strMatching "[a-z]{2}_[A-Z]{2}\\.UTF-8"; + default = "en_US.UTF-8"; + description = "set locale"; + }; }; - config = mkIf cfg.enable { + config = { i18n = let - locale = "uk_UA.UTF-8"; + inherit (config.module) locale; in { defaultLocale = locale; extraLocaleSettings = { diff --git a/modules/nixos/system/misc/default.nix b/modules/nixos/system/misc/default.nix index 1637305..5b2f67f 100644 --- a/modules/nixos/system/misc/default.nix +++ b/modules/nixos/system/misc/default.nix @@ -1,8 +1,6 @@ { imports = [ - ./locale.nix ./opentabletdriver.nix ./qmk-vial.nix - ./stylix ]; } diff --git a/modules/nixos/system/misc/opentabletdriver.nix b/modules/nixos/system/misc/opentabletdriver.nix index 5a0fa03..d2fcf65 100644 --- a/modules/nixos/system/misc/opentabletdriver.nix +++ b/modules/nixos/system/misc/opentabletdriver.nix @@ -6,10 +6,10 @@ inherit (lib) mkIf mkEnableOption; in { options = { - opentabletdriver.enable = + module.misc.opentabletdriver.enable = mkEnableOption "enables opentabletdriver"; }; - config = mkIf config.opentabletdriver.enable { + config = mkIf config.module.misc.opentabletdriver.enable { hardware.opentabletdriver = { enable = true; daemon.enable = true; diff --git a/modules/nixos/system/misc/qmk-vial.nix b/modules/nixos/system/misc/qmk-vial.nix index 3459611..8dd01a3 100644 --- a/modules/nixos/system/misc/qmk-vial.nix +++ b/modules/nixos/system/misc/qmk-vial.nix @@ -6,10 +6,10 @@ inherit (lib) mkIf mkEnableOption; in { options = { - qmk-vial.enable = + module.misc.qmk-vial.enable = mkEnableOption "adds a udev rule for vial keyboards"; }; - config = mkIf config.qmk-vial.enable { + config = mkIf config.module.misc.qmk-vial.enable { services.udev.extraRules = '' KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" ''; diff --git a/modules/nixos/system/misc/stylix/default.nix b/modules/nixos/system/stylix/default.nix similarity index 100% rename from modules/nixos/system/misc/stylix/default.nix rename to modules/nixos/system/stylix/default.nix diff --git a/modules/nixos/system/virtual/default.nix b/modules/nixos/system/virt/default.nix similarity index 100% rename from modules/nixos/system/virtual/default.nix rename to modules/nixos/system/virt/default.nix diff --git a/modules/nixos/system/virtual/docker.nix b/modules/nixos/system/virt/docker.nix similarity index 87% rename from modules/nixos/system/virtual/docker.nix rename to modules/nixos/system/virt/docker.nix index f35dce2..7333aa6 100644 --- a/modules/nixos/system/virtual/docker.nix +++ b/modules/nixos/system/virt/docker.nix @@ -5,10 +5,10 @@ ... }: with lib; let - cfg = config.virtual.docker; + cfg = config.module.virt.docker; in { options = { - virtual.docker.enable = + module.virt.docker.enable = mkEnableOption "enable docker"; }; config = mkIf cfg.enable { diff --git a/modules/nixos/system/virtual/libvirt.nix b/modules/nixos/system/virt/libvirt.nix similarity index 89% rename from modules/nixos/system/virtual/libvirt.nix rename to modules/nixos/system/virt/libvirt.nix index 2270b99..05c91bb 100644 --- a/modules/nixos/system/virtual/libvirt.nix +++ b/modules/nixos/system/virt/libvirt.nix @@ -5,10 +5,10 @@ ... }: with lib; let - cfg = config.virtual.libvirt; + cfg = config.module.virt.libvirt; in { options = { - virtual.libvirt.enable = + module.virt.libvirt.enable = mkEnableOption "enables virtualisation"; }; config = mkIf cfg.enable { diff --git a/modules/nixos/system/virtual/podman.nix b/modules/nixos/system/virt/podman.nix similarity index 87% rename from modules/nixos/system/virtual/podman.nix rename to modules/nixos/system/virt/podman.nix index 1100917..3d7a816 100644 --- a/modules/nixos/system/virtual/podman.nix +++ b/modules/nixos/system/virt/podman.nix @@ -5,10 +5,10 @@ ... }: with lib; let - cfg = config.virtual.podman; + cfg = config.module.virt.podman; in { options = { - virtual.podman.enable = + module.virt.podman.enable = mkEnableOption "enables podman"; }; config = mkIf cfg.enable { From ea9a51233186eea2e37cc6d6f7ae7f8391e5df84 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 18 Jun 2025 19:17:59 +0300 Subject: [PATCH 088/138] flake.lock: bump flake.nix: less repeated inputs Signed-off-by: unexplrd --- flake.lock | 248 +++++++++++++++++------------------------------------ flake.nix | 15 +++- 2 files changed, 93 insertions(+), 170 deletions(-) diff --git a/flake.lock b/flake.lock index 01b0e5e..aa29fc0 100644 --- a/flake.lock +++ b/flake.lock @@ -105,7 +105,9 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems" + "systems": [ + "systems" + ] }, "locked": { "lastModified": 1744632722, @@ -123,7 +125,6 @@ }, "chaotic": { "inputs": { - "fenix": "fenix", "flake-schemas": "flake-schemas", "home-manager": [ "home-manager" @@ -131,14 +132,15 @@ "jovian": "jovian", "nixpkgs": [ "nixpkgs" - ] + ], + "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1749559516, - "narHash": "sha256-lL1GFZnMjjo0Tx8u9C2Cv0+aogvF98CgUCwsUl2pTmE=", + "lastModified": 1750195929, + "narHash": "sha256-5gaf/9wuxtfKqAFnNlX74Vz2VMURa/UzyfuEyYv4tZw=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "b86053e6253c4b996bb81cc9fd490136da2f6aa6", + "rev": "419a1cfaf34100008ff5fa97ce9ef3b194472f71", "type": "github" }, "original": { @@ -184,28 +186,6 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": [ - "chaotic", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1749451322, - "narHash": "sha256-t53R3kSDl4Jie+Ooxi/aQFN2ODRp1tXQSJBevOt3IkQ=", - "owner": "nix-community", - "repo": "fenix", - "rev": "77de5067629e201436c76f14f96614a19368c4ae", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -473,11 +453,11 @@ ] }, "locked": { - "lastModified": 1749526396, - "narHash": "sha256-UL9F76abAk87llXOrcQRjhd5OaOclUd6MIltsqcUZmo=", + "lastModified": 1750263149, + "narHash": "sha256-VYSGDzq4ds4LIYvyEYG+RBqGMGBZhES2tvnmU4TJBn0=", "owner": "nix-community", "repo": "home-manager", - "rev": "427c96044f11a5da50faf6adaf38c9fa47e6d044", + "rev": "85e68c6a388ef1dfc799aaa01f00758c58e87d89", "type": "github" }, "original": { @@ -558,15 +538,17 @@ "nixpkgs" ], "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_2", + "systems": [ + "systems" + ], "xdph": "xdph" }, "locked": { - "lastModified": 1749540031, - "narHash": "sha256-11k6hq/4Tao2PNBFQpSNTlFFKmKGswL17caKuZIE0sM=", + "lastModified": 1750234582, + "narHash": "sha256-eulPalplIVzQYomlljpc/GZFDu2DvTMVAz2IVuTyDzc=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "6bdb1f413e4c592f73d91bef33dfb202503ef7ab", + "rev": "bef1321f00e260ee3031aecd02faf4f53bcb5c66", "type": "github" }, "original": { @@ -707,11 +689,17 @@ "hyprland", "hyprutils" ], - "hyprwayland-scanner": "hyprwayland-scanner_2", + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3" + "systems": [ + "hyprland", + "systems" + ] }, "locked": { "lastModified": 1749186395, @@ -739,11 +727,11 @@ ] }, "locked": { - "lastModified": 1749135356, - "narHash": "sha256-Q8mAKMDsFbCEuq7zoSlcTuxgbIBVhfIYpX0RjE32PS0=", + "lastModified": 1749819919, + "narHash": "sha256-7F/KG8dwSH9JXdlpOVrEEArS+PJSn0iEnx5eVCk89/I=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "e36db00dfb3a3d3fdcc4069cb292ff60d2699ccb", + "rev": "57ab2a867d8b554ad89f29060c15efd11631db91", "type": "github" }, "original": { @@ -777,31 +765,6 @@ "type": "github" } }, - "hyprwayland-scanner_2": { - "inputs": { - "nixpkgs": [ - "hyprsunset", - "nixpkgs" - ], - "systems": [ - "hyprsunset", - "systems" - ] - }, - "locked": { - "lastModified": 1749145760, - "narHash": "sha256-IHaGWpGrv7seFWdw/1A+wHtTsPlOGIKMrk1TUIYJEFI=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "817918315ea016cc2d94004bfb3223b5fd9dfcc6", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "type": "github" - } - }, "jovian": { "inputs": { "nix-github-actions": "nix-github-actions", @@ -811,11 +774,11 @@ ] }, "locked": { - "lastModified": 1749495634, - "narHash": "sha256-NPifVq2XZGRCsLBoUt6M5YUTiIh23+ubq57w7mSODt8=", + "lastModified": 1750172631, + "narHash": "sha256-XwqAqM1UmKahdCwzp2UQHTpjnY0b82/VTfA8VpZIR6g=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "c40d2f31f92571bf341497884174a132829ef0fc", + "rev": "7de24ceed8c7693191b74a7bda6d89c91f94c8f5", "type": "github" }, "original": { @@ -833,7 +796,7 @@ "nixpkgs" ], "pre-commit-hooks-nix": "pre-commit-hooks-nix", - "rust-overlay": "rust-overlay" + "rust-overlay": "rust-overlay_2" }, "locked": { "lastModified": 1737639419, @@ -911,11 +874,11 @@ ] }, "locked": { - "lastModified": 1749355504, - "narHash": "sha256-L17CdJMD+/FCBOHjREQLXbe2VUnc3rjffenBbu2Kwpc=", + "lastModified": 1749960154, + "narHash": "sha256-EWlr9MZDd+GoGtZB4QsDzaLyaDQPGnRY03MFp6u2wSg=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "40a6e15e44b11fbf8f2b1df9d64dbfc117625e94", + "rev": "424a40050cdc5f494ec45e46462d288f08c64475", "type": "github" }, "original": { @@ -933,14 +896,14 @@ "nixpkgs-stable": [ "nixpkgs-stable" ], - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1749511063, - "narHash": "sha256-LjH3btCZgZHGxLcAm1B9pjShQODF3mceFtu6+9KL9+g=", + "lastModified": 1750244952, + "narHash": "sha256-678XeoTKUT1tEKSXaGA/rwHYQ2cBntr1I3Xw2D5Onew=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "a812d36015622e8ca094685f069387468def4c97", + "rev": "fd677bef9e0172bc0cea0daccae3d28a74be882c", "type": "github" }, "original": { @@ -998,11 +961,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1749173751, - "narHash": "sha256-ENY3y3v6S9ZmLDDLI3LUT8MXmfXg/fSt2eA4GCnMVCE=", + "lastModified": 1750151854, + "narHash": "sha256-3za+1J9FifMetO7E/kwgyW+dp+8pPBNlWKfcBovnn6M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ed29f002b6d6e5e7e32590deb065c34a31dc3e91", + "rev": "ad5c70bcc5cc5178205161b7a7d61a6e80f6d244", "type": "github" }, "original": { @@ -1048,11 +1011,11 @@ ] }, "locked": { - "lastModified": 1747372754, - "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", + "lastModified": 1749636823, + "narHash": "sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", + "rev": "623c56286de5a3193aa38891a6991b28f9bab056", "type": "github" }, "original": { @@ -1106,27 +1069,32 @@ "nixpkgs-stable": "nixpkgs-stable_2", "sops-nix": "sops-nix", "stylix": "stylix", + "systems": "systems", "walker": "walker" } }, - "rust-analyzer-src": { - "flake": false, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "chaotic", + "nixpkgs" + ] + }, "locked": { - "lastModified": 1749419176, - "narHash": "sha256-Hs0vidgwvBiBuqNjR5oCQMMGUfUYwwnyxLShg3yzhWU=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "9fc1b9076cf49c7f54497df9cfa4485a63f14d3e", + "lastModified": 1750127910, + "narHash": "sha256-FIgEIS0RAlOyXGqoj/OufTfcKItYq668yPYL4SXdU0M=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "45418795a73b77b7726c62ce265d68cf541ffb49", "type": "github" }, "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", + "owner": "oxalica", + "repo": "rust-overlay", "type": "github" } }, - "rust-overlay": { + "rust-overlay_2": { "inputs": { "nixpkgs": [ "lanzaboote", @@ -1147,7 +1115,7 @@ "type": "github" } }, - "rust-overlay_2": { + "rust-overlay_3": { "inputs": { "nixpkgs": [ "nixos-cosmic", @@ -1155,11 +1123,11 @@ ] }, "locked": { - "lastModified": 1749436897, - "narHash": "sha256-OkDtaCGQQVwVFz5HWfbmrMJR99sFIMXHCHEYXzUJEJY=", + "lastModified": 1750214276, + "narHash": "sha256-1kniuhH70q4TAC/xIvjFYH46aHiLrbIlcr6fdrRwO1A=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "e7876c387e35dc834838aff254d8e74cf5bd4f19", + "rev": "f9b2b2b1327ff6beab4662b8ea41689e0a57b8d4", "type": "github" }, "original": { @@ -1175,11 +1143,11 @@ ] }, "locked": { - "lastModified": 1747603214, - "narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=", + "lastModified": 1750119275, + "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=", "owner": "mic92", "repo": "sops-nix", - "rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd", + "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2", "type": "github" }, "original": { @@ -1206,7 +1174,9 @@ "nixpkgs" ], "nur": "nur", - "systems": "systems_4", + "systems": [ + "systems" + ], "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -1214,11 +1184,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1749576521, - "narHash": "sha256-II57ap6MGkArooZFaSDrgNgi24T5Dkdkzhe+xUHdybQ=", + "lastModified": 1750205637, + "narHash": "sha256-49wV81h1jnHJky1XNHfgwxNA0oCwSTLMz4hhrtWCM8A=", "owner": "danth", "repo": "stylix", - "rev": "6d72fc259b6f595f5bcf9634bf2f82b76f939a0d", + "rev": "82323751bcd45579c8d3a5dd05531c3c2a78e347", "type": "github" }, "original": { @@ -1242,66 +1212,6 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -1410,7 +1320,9 @@ "nixpkgs": [ "nixpkgs" ], - "systems": "systems_5" + "systems": [ + "systems" + ] }, "locked": { "lastModified": 1748502384, @@ -1454,11 +1366,11 @@ ] }, "locked": { - "lastModified": 1749155346, - "narHash": "sha256-KIkJu3zF8MF3DuGwzAmo3Ww9wsWXolwV30SjJRTAxYE=", + "lastModified": 1749490041, + "narHash": "sha256-R9Dn9IyUdPaJHD2Oqd7XJnnxpka6M6UYw4Ld0iA46HM=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "44bf29f1df45786098920c655af523535a9191ae", + "rev": "3cf35e178bc192ee51e3fddfd69e531e2c106a30", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index bc49cc8..3458305 100644 --- a/flake.nix +++ b/flake.nix @@ -11,9 +11,11 @@ # url = "git+https://gitea.linerds.us/unexplrd/Neve"; # }; # nixvim.url = "github:nix-community/nixvim"; + systems.url = "github:nix-systems/default"; blueprint = { url = "github:numtide/blueprint"; inputs.nixpkgs.follows = "nixpkgs"; + inputs.systems.follows = "systems"; }; chaotic = { url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; @@ -32,14 +34,19 @@ }; hyprland = { url = "github:hyprwm/Hyprland"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs = { + systems.follows = "systems"; + nixpkgs.follows = "nixpkgs"; + }; }; hyprsunset = { url = "github:hyprwm/hyprsunset"; inputs = { hyprland-protocols.follows = "hyprland/hyprland-protocols"; hyprutils.follows = "hyprland/hyprutils"; + hyprwayland-scanner.follows = "hyprland/hyprwayland-scanner"; nixpkgs.follows = "nixpkgs"; + systems.follows = "hyprland/systems"; }; }; lanzaboote = { @@ -78,11 +85,15 @@ inputs = { home-manager.follows = "home-manager"; nixpkgs.follows = "nixpkgs"; + systems.follows = "systems"; }; }; walker = { url = "github:abenz1267/walker"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs = { + nixpkgs.follows = "nixpkgs"; + systems.follows = "systems"; + }; }; }; From b2ee4cf39e608a6558db85b934c06dd8b9dc15a3 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Wed, 18 Jun 2025 22:53:34 +0300 Subject: [PATCH 089/138] desktop/niri: change settings Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 75 ++++++++++++------------------ 1 file changed, 30 insertions(+), 45 deletions(-) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index ede266e..0febfe2 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -100,6 +100,7 @@ in { CLUTTER_BACKEND "wayland" SDL_VIDEODRIVER "wayland" } + input { keyboard { xkb { @@ -108,34 +109,23 @@ in { } repeat-delay 200 repeat-rate 50 - track-layout "global" + track-layout "window" } touchpad { - // off tap - // dwt - // dwtp natural-scroll accel-speed 0.2 accel-profile "flat" - // scroll-method "two-finger" - // disabled-on-external-mouse } mouse { - // off - // natural-scroll accel-speed 0.0 accel-profile "flat" - // scroll-method "no-scroll" + } + touch { + map-to-output "eDP-1" } warp-mouse-to-focus - // focus-follows-mouse - } - output "eDP-1" { - // off - scale 1.2 - transform "normal" - // position x=1920 y=0 + workspace-auto-back-and-forth } cursor { @@ -143,17 +133,36 @@ in { xcursor-size ${toString cursor.size} } + hotkey-overlay { + skip-at-startup + } + + prefer-no-csd + + screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png" + + animations { + slowdown 0.5 + } + layout { gaps 3 + + // background-color "#${colors.base02}" + background-color "transparent" center-focused-column "never" // "on-overflow" + default-column-width { proportion 1.0; } + preset-column-widths { proportion 0.33333 proportion 0.66667 } - background-color "transparent" - default-column-width { proportion 1.0; } - // default-column-width { proportion 0.5; } + struts { + left 33 + right 33 + } + tab-indicator { active-color "#${colors.base04}" inactive-color "#${colors.base03}" @@ -175,19 +184,10 @@ in { width 3 active-color "#${colors.base0D}" inactive-color "#${colors.base03}" - - } - struts { - left 33 - right 33 + urgent-color "#${colors.base08}" } } - prefer-no-csd - - hotkey-overlay { - skip-at-startup - } window-rule { geometry-corner-radius 12 clip-to-geometry true @@ -204,32 +204,17 @@ in { active-color "#${colors.base0F}" inactive-color "#${colors.base03}" } - shadow { - on - color "#${colors.base0F}" - inactive-color "#${colors.base03}" - } } - // Make the wallpaper stationary, rather than moving with workspaces. layer-rule { - // This is for swaybg; change for other wallpaper tools. - // Find the right namespace by running niri msg layers. - match namespace="^wallpaper$" + match namespace="^wpaperd.*$" place-within-backdrop true } - - // Optionally, disable the workspace shadows in the overview. overview { workspace-shadow { off } } - screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png" - - animations { - slowdown 0.5 - } window-rule { match title="Картинка в картинці" From 23e2a69d1a581969f36084bd40dff1bf2f1bfbd3 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 19 Jun 2025 11:16:09 +0300 Subject: [PATCH 090/138] modules/nixos/desktop/niri/default.nix: add gvfs Signed-off-by: unexplrd --- modules/nixos/desktop/niri/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/modules/nixos/desktop/niri/default.nix b/modules/nixos/desktop/niri/default.nix index ec62f17..f408248 100644 --- a/modules/nixos/desktop/niri/default.nix +++ b/modules/nixos/desktop/niri/default.nix @@ -13,15 +13,18 @@ in { }; config = lib.mkMerge [ (mkIf cfg.enable { - module.desktop.displayManager = "greetd"; - module.desktop.gnome-keyring.enable = true; + module.desktop = { + displayManager = "greetd"; + gnome-keyring.enable = true; + }; sound.pipewire.enable = true; - security = { - soteria.enable = true; # polkit agent in rust - pam.services.gtklock = {}; - }; programs.niri.enable = true; # wayland compositor in rust + security = { + pam.services.gtklock = {}; + soteria.enable = true; # polkit agent in rust + }; + services.gvfs.enable = true; xdg.portal = { enable = true; extraPortals = with pkgs; [xdg-desktop-portal-gnome xdg-desktop-portal-gtk]; From e596bf2be8650741814f8ecc02b765bb3606c6d1 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 19 Jun 2025 16:46:45 +0300 Subject: [PATCH 091/138] modules/shared/nixos/default.nix: refactor keyd Signed-off-by: unexplrd --- modules/shared/nixos/default.nix | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/modules/shared/nixos/default.nix b/modules/shared/nixos/default.nix index 14c7903..76605bc 100644 --- a/modules/shared/nixos/default.nix +++ b/modules/shared/nixos/default.nix @@ -45,17 +45,25 @@ in { internal = { ids = ["0001:0001" "048d:c101"]; settings.main = let - idleTimeout = toString 200; - holdTimeout = toString 150; + # finger = mod; + pinky = "alt"; + ring = "meta"; + middle = "control"; + index = "shift"; + # timeouts + idle = "200"; + hold = "150"; + # function takes finger and letter + homeRowMod = f: l: "lettermod(${f}, ${l}, ${idle}, ${hold})"; in { - a = "lettermod(alt, a, ${idleTimeout}, ${holdTimeout})"; - s = "lettermod(meta, s, ${idleTimeout}, ${holdTimeout})"; - d = "lettermod(control, d, ${idleTimeout}, ${holdTimeout})"; - f = "lettermod(shift, f, ${idleTimeout}, ${holdTimeout})"; - j = "lettermod(shift, j, ${idleTimeout}, ${holdTimeout})"; - k = "lettermod(control, k, ${idleTimeout}, ${holdTimeout})"; - l = "lettermod(meta, l, ${idleTimeout}, ${holdTimeout})"; - ";" = "lettermod(alt, ;, ${idleTimeout}, ${holdTimeout})"; + "a" = homeRowMod pinky "a"; + "s" = homeRowMod ring "s"; + "d" = homeRowMod middle "d"; + "f" = homeRowMod index "f"; + "j" = homeRowMod index "j"; + "k" = homeRowMod middle "k"; + "l" = homeRowMod ring "l"; + ";" = homeRowMod pinky ";"; }; }; }; From e3bc48203a77d8fd3a03ecd1951833f1b96c437f Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 19 Jun 2025 16:46:45 +0300 Subject: [PATCH 092/138] home/desktop/niri/programs/default.nix: remove nixos/desktop/niri/default.nix: fix Signed-off-by: unexplrd --- .../home/desktop/niri/programs/default.nix | 22 ------------------- modules/nixos/desktop/niri/default.nix | 3 ++- 2 files changed, 2 insertions(+), 23 deletions(-) delete mode 100644 modules/home/desktop/niri/programs/default.nix diff --git a/modules/home/desktop/niri/programs/default.nix b/modules/home/desktop/niri/programs/default.nix deleted file mode 100644 index 7ddbcb6..0000000 --- a/modules/home/desktop/niri/programs/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - osConfig, - config, - inputs, - pkgs, - lib, - ... -}: let - inherit (lib) mkIf mkDefault getExe; - inherit (config.lib.stylix) colors; - inherit (osConfig.networking) hostName; - ifLaptop = mkIf (hostName != "dunamis"); -in { - imports = with inputs; [ - walker.homeManagerModules.default - ]; - options = config.desktop.niri.enable { - # programs.fuzzel = import ./fuzzel {inherit config mkDefault;}; - programs.walker = import ./walker {inherit config inputs pkgs;}; - programs.waybar = import ./waybar {inherit colors config getExe ifLaptop pkgs;}; - }; -} diff --git a/modules/nixos/desktop/niri/default.nix b/modules/nixos/desktop/niri/default.nix index f408248..7df4c1e 100644 --- a/modules/nixos/desktop/niri/default.nix +++ b/modules/nixos/desktop/niri/default.nix @@ -31,7 +31,8 @@ in { config.niri.default = ["gnome" "gtk"]; }; }) - (mkIf config.services.displayManager.autoLogin.enable { + (mkIf (cfg.enable + && config.services.displayManager.autoLogin.enable) { services.greetd.settings.initial_session = { command = "niri-session"; user = config.services.displayManager.autoLogin.user; From 52bd26e615297204aa97228dc3154d5ffa199773 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 24 Jun 2025 11:52:01 +0300 Subject: [PATCH 093/138] desktop/niri/default.nix: force mimeapps.list Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 5ead0ec..8d9a643 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -71,7 +71,6 @@ in { waybar = import ./programs/waybar {inherit config colors getExe ifLaptop pkgs;}; }; - xdg.configFile.niri = import ./niri.nix {inherit config hostName launcher lockscreen;}; services = import ./services {inherit pkgs lockscreen getExe perSystem;}; home.packages = with pkgs; @@ -101,6 +100,10 @@ in { ]; xdg = { + configFile = { + niri = import ./niri.nix {inherit config hostName launcher lockscreen;}; + "mimeapps.list".force = true; + }; mime.enable = true; mimeApps = { enable = true; From ea29eefd798edd27ced763166a9a986c3c49f31a Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 24 Jun 2025 11:52:01 +0300 Subject: [PATCH 094/138] modules/nixos/system/common.nix: systemd Signed-off-by: unexplrd --- modules/nixos/system/common.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/nixos/system/common.nix b/modules/nixos/system/common.nix index 8b0e2ce..95d2b70 100644 --- a/modules/nixos/system/common.nix +++ b/modules/nixos/system/common.nix @@ -34,4 +34,12 @@ "sntrup761x25519-sha512@openssh.com" ]; }; + + services.journald.extraConfig = '' + SystemMaxUse=1G + ''; + systemd.coredump.extraConfig = '' + Storage=none + ProcessSizeMax=0 + ''; } From 34ed37fd855e1b3c357138d5586a598f7e703060 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 28 Jun 2025 17:34:42 +0300 Subject: [PATCH 095/138] hosts/dunamis/configuration.nix: rose-pine-moon modules/nixos/system/stylix/default.nix: change serif to inter Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- modules/nixos/system/stylix/default.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index d0b6633..99094cf 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -30,7 +30,7 @@ }; stylix = { enable = true; - theme = "vesper"; + theme = "rose-pine-moon"; }; locale = "uk_UA.UTF-8"; misc = { diff --git a/modules/nixos/system/stylix/default.nix b/modules/nixos/system/stylix/default.nix index 27f14fc..a8075e9 100644 --- a/modules/nixos/system/stylix/default.nix +++ b/modules/nixos/system/stylix/default.nix @@ -97,8 +97,8 @@ wallpaper = wallpapers.cyber-dawn; serif = { - package = geistPackage; - name = "Geist Light"; + package = interPackage; + name = "Inter Nerd Font"; }; monospace = { From 9c1a282310d67fee251936c4e1e2ad979703798b Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 29 Jun 2025 14:18:17 +0300 Subject: [PATCH 096/138] flake.lock: bump Signed-off-by: unexplrd --- flake.lock | 114 ++++++++++++++++++++++++++--------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/flake.lock b/flake.lock index aa29fc0..e93a613 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1749155310, - "narHash": "sha256-t0HfHg/1+TbSra5s6nNM0o4tnb3uqWedShSpZXsUMYY=", + "lastModified": 1750372185, + "narHash": "sha256-lVBKxd9dsZOH1fA6kSE5WNnt8e+09fN+NL/Q3BjTWHY=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "94981cf75a9f11da0b6dd6a1abbd7c50a36ab2d3", + "rev": "7cef49d261cbbe537e8cb662485e76d29ac4cbca", "type": "github" }, "original": { @@ -453,11 +453,11 @@ ] }, "locked": { - "lastModified": 1750263149, - "narHash": "sha256-VYSGDzq4ds4LIYvyEYG+RBqGMGBZhES2tvnmU4TJBn0=", + "lastModified": 1751146119, + "narHash": "sha256-gvjG95TCnUVJkvQvLMlnC4NqiqFyBdJk3o8/RwuHeaU=", "owner": "nix-community", "repo": "home-manager", - "rev": "85e68c6a388ef1dfc799aaa01f00758c58e87d89", + "rev": "76d0c31fce2aa0c71409de953e2f9113acd5b656", "type": "github" }, "original": { @@ -511,11 +511,11 @@ ] }, "locked": { - "lastModified": 1749238452, - "narHash": "sha256-8qiKEWcxUrjpUpK+WyFNg/72C8rp70LUuyTD23T+SdQ=", + "lastModified": 1750371717, + "narHash": "sha256-cNP+bVq8m5x2Rl6MTjwfQLCdwbVmKvTH7yqVc1SpiJM=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "c7225d73755a6c4c7c72f4d4f3925ea426e325a8", + "rev": "15c6f8f3a567fec9a0f732cd310a7ff456deef88", "type": "github" }, "original": { @@ -544,11 +544,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1750234582, - "narHash": "sha256-eulPalplIVzQYomlljpc/GZFDu2DvTMVAz2IVuTyDzc=", + "lastModified": 1751122874, + "narHash": "sha256-0biNUPDAN2RC+RFEdaJ5z3jt5zAP6wrKNyO1wxhwgjo=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "bef1321f00e260ee3031aecd02faf4f53bcb5c66", + "rev": "ab900d8752af11ada256ea6fca54d5404587405c", "type": "github" }, "original": { @@ -637,11 +637,11 @@ ] }, "locked": { - "lastModified": 1749155776, - "narHash": "sha256-t1PM0wxQLQwv2F2AW23uA7pm5giwmcgYEWbNIRct9r4=", + "lastModified": 1750371812, + "narHash": "sha256-D868K1dVEACw17elVxRgXC6hOxY+54wIEjURztDWLk8=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "396e8aa1c06274835b69da7f9a015fff9a9b7522", + "rev": "b13c7481e37856f322177010bdf75fccacd1adc8", "type": "github" }, "original": { @@ -666,11 +666,11 @@ ] }, "locked": { - "lastModified": 1749145882, - "narHash": "sha256-qr0KXeczF8Sma3Ae7+dR2NHhvG7YeLBJv19W4oMu6ZE=", + "lastModified": 1750371198, + "narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "1bfb84f54d50c7ae6558c794d3cfd5f6a7e6e676", + "rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b", "type": "github" }, "original": { @@ -702,11 +702,11 @@ ] }, "locked": { - "lastModified": 1749186395, - "narHash": "sha256-4PMO6bm0hHEOzGEhXRYSCLpkGT6lGwvax8GkLo+nK5w=", + "lastModified": 1751122848, + "narHash": "sha256-IJxNuudvBX+3WJpqG16DBaM6aDwgWAU9PchGYHSXoZM=", "owner": "hyprwm", "repo": "hyprsunset", - "rev": "4528cca4b2e4b44ed0a4e767a0ba493770d9d141", + "rev": "845f7e8e86cac5023cad4dc446fc120be80fe69a", "type": "github" }, "original": { @@ -727,11 +727,11 @@ ] }, "locked": { - "lastModified": 1749819919, - "narHash": "sha256-7F/KG8dwSH9JXdlpOVrEEArS+PJSn0iEnx5eVCk89/I=", + "lastModified": 1750703126, + "narHash": "sha256-zJHmLsiW6P8h9HaH5eMKhEh/gvym3k6/Ywr4UHKpJfc=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "57ab2a867d8b554ad89f29060c15efd11631db91", + "rev": "d46bd32da554c370f98180a1e465f052b9584805", "type": "github" }, "original": { @@ -752,11 +752,11 @@ ] }, "locked": { - "lastModified": 1749145760, - "narHash": "sha256-IHaGWpGrv7seFWdw/1A+wHtTsPlOGIKMrk1TUIYJEFI=", + "lastModified": 1750371869, + "narHash": "sha256-lGk4gLjgZQ/rndUkzmPYcgbHr8gKU5u71vyrjnwfpB4=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "817918315ea016cc2d94004bfb3223b5fd9dfcc6", + "rev": "aa38edd6e3e277ae6a97ea83a69261a5c3aab9fd", "type": "github" }, "original": { @@ -774,11 +774,11 @@ ] }, "locked": { - "lastModified": 1750172631, - "narHash": "sha256-XwqAqM1UmKahdCwzp2UQHTpjnY0b82/VTfA8VpZIR6g=", + "lastModified": 1750403547, + "narHash": "sha256-XDDINMbHTtKQeSRpX5mwq20z23Wg/I/G4JUinA3V8Xg=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "7de24ceed8c7693191b74a7bda6d89c91f94c8f5", + "rev": "52b86b86d925ec00c836ecc6d36f9c947bb15736", "type": "github" }, "original": { @@ -874,11 +874,11 @@ ] }, "locked": { - "lastModified": 1749960154, - "narHash": "sha256-EWlr9MZDd+GoGtZB4QsDzaLyaDQPGnRY03MFp6u2wSg=", + "lastModified": 1751170039, + "narHash": "sha256-3EKpUmyGmHYA/RuhZjINTZPU+OFWko0eDwazUOW64nw=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "424a40050cdc5f494ec45e46462d288f08c64475", + "rev": "9c932ae632d6b5150515e5749b198c175d8565db", "type": "github" }, "original": { @@ -899,11 +899,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1750244952, - "narHash": "sha256-678XeoTKUT1tEKSXaGA/rwHYQ2cBntr1I3Xw2D5Onew=", + "lastModified": 1751195306, + "narHash": "sha256-rcrO38Qo9gDDWkEF8ZePf1mPw+MM42DgiK66eDH8i+U=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "fd677bef9e0172bc0cea0daccae3d28a74be882c", + "rev": "0968e4f05337f6f2043b394b452ae0d38a4d5923", "type": "github" }, "original": { @@ -914,11 +914,11 @@ }, "nixos-facter-modules": { "locked": { - "lastModified": 1743671943, - "narHash": "sha256-7sYig0+RcrR3sOL5M+2spbpFUHyEP7cnUvCaqFOBjyU=", + "lastModified": 1750412875, + "narHash": "sha256-uP9Xxw5XcFwjX9lNoYRpybOnIIe1BHfZu5vJnnPg3Jc=", "owner": "numtide", "repo": "nixos-facter-modules", - "rev": "58ad9691670d293a15221d4a78818e0088d2e086", + "rev": "14df13c84552a7d1f33c1cd18336128fbc43f920", "type": "github" }, "original": { @@ -961,11 +961,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1750151854, - "narHash": "sha256-3za+1J9FifMetO7E/kwgyW+dp+8pPBNlWKfcBovnn6M=", + "lastModified": 1750877742, + "narHash": "sha256-OrCy70x59VaBHxPZnm6A1wvQSdJvTz4i8Ngx40UeApI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ad5c70bcc5cc5178205161b7a7d61a6e80f6d244", + "rev": "f25c1bd2a6b33a4b1aa7aff56a94e0daab3773f0", "type": "github" }, "original": { @@ -1081,11 +1081,11 @@ ] }, "locked": { - "lastModified": 1750127910, - "narHash": "sha256-FIgEIS0RAlOyXGqoj/OufTfcKItYq668yPYL4SXdU0M=", + "lastModified": 1751078221, + "narHash": "sha256-/SRmXIPxL7ixFLZgcDdgZDuIwt8eWQAamMYer0ODwbM=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "45418795a73b77b7726c62ce265d68cf541ffb49", + "rev": "1712a6d3430ca75353d366b7ddd1c79d6b243efc", "type": "github" }, "original": { @@ -1123,11 +1123,11 @@ ] }, "locked": { - "lastModified": 1750214276, - "narHash": "sha256-1kniuhH70q4TAC/xIvjFYH46aHiLrbIlcr6fdrRwO1A=", + "lastModified": 1751165203, + "narHash": "sha256-3QhlpAk2yn+ExwvRLtaixWsVW1q3OX3KXXe0l8VMLl4=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "f9b2b2b1327ff6beab4662b8ea41689e0a57b8d4", + "rev": "90f547b90e73d3c6025e66c5b742d6db51c418c3", "type": "github" }, "original": { @@ -1184,11 +1184,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1750205637, - "narHash": "sha256-49wV81h1jnHJky1XNHfgwxNA0oCwSTLMz4hhrtWCM8A=", + "lastModified": 1751145558, + "narHash": "sha256-OPlbpH64jzIspYqvJB96tnN9V9HBlAxROS5ijQwtN70=", "owner": "danth", "repo": "stylix", - "rev": "82323751bcd45579c8d3a5dd05531c3c2a78e347", + "rev": "3a09d3f5cb940fa4142a2f3415b508a8be92b721", "type": "github" }, "original": { @@ -1325,11 +1325,11 @@ ] }, "locked": { - "lastModified": 1748502384, - "narHash": "sha256-nmTVxvbENySXZryA+TOGZ9nRr3m/+Xqc07Sy3aSN5Nw=", + "lastModified": 1748677846, + "narHash": "sha256-3GD5xEMUUzCsbi9FmOhg7ZXZgc2NswnrCl+rRL8PsLE=", "owner": "abenz1267", "repo": "walker", - "rev": "ade63feb9f1d91f1b1bf709bb139060579126c19", + "rev": "1afd033ae3cbeb69e0debb2a0805fcbbd3d27bc1", "type": "github" }, "original": { @@ -1366,11 +1366,11 @@ ] }, "locked": { - "lastModified": 1749490041, - "narHash": "sha256-R9Dn9IyUdPaJHD2Oqd7XJnnxpka6M6UYw4Ld0iA46HM=", + "lastModified": 1750372504, + "narHash": "sha256-VBeZb1oqZM1cqCAZnFz/WyYhO8aF/ImagI7WWg/Z3Og=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "3cf35e178bc192ee51e3fddfd69e531e2c106a30", + "rev": "400308fc4f9d12e0a93e483c2e7a649e12af1a92", "type": "github" }, "original": { From 9defc272ae0a5c5af1d668f9034aca95869120fa Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 29 Jun 2025 14:40:01 +0300 Subject: [PATCH 097/138] switch to lix flake Signed-off-by: unexplrd --- flake.lock | 86 ++++++++++++++++++++++++++++- flake.nix | 8 +-- modules/shared/nixos/nix/common.nix | 6 +- 3 files changed, 93 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index e93a613..b31739c 100644 --- a/flake.lock +++ b/flake.lock @@ -321,6 +321,39 @@ "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" } }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flakey-profile": { + "locked": { + "lastModified": 1712898590, + "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", + "owner": "lf-", + "repo": "flakey-profile", + "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", + "type": "github" + }, + "original": { + "owner": "lf-", + "repo": "flakey-profile", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -813,6 +846,41 @@ "type": "github" } }, + "lix": { + "inputs": { + "flake-utils": "flake-utils", + "flakey-profile": "flakey-profile", + "lix": "lix_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1750776670, + "narHash": "sha256-EfA5K5EZAnspmraJrXQlziffVpaT+QDBiE6yKmuaNNQ=", + "rev": "c3c78a32273e89d28367d8605a4c880f0b6607e3", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/c3c78a32273e89d28367d8605a4c880f0b6607e3.tar.gz?rev=c3c78a32273e89d28367d8605a4c880f0b6607e3" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz" + } + }, + "lix_2": { + "flake": false, + "locked": { + "lastModified": 1750762203, + "narHash": "sha256-LmQhjQ7c+AOkwhvR9GFgJOy8oHW35MoQRELtrwyVnPw=", + "rev": "38b358ce27203f972faa2973cf44ba80c758f46e", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/38b358ce27203f972faa2973cf44ba80c758f46e.tar.gz?rev=38b358ce27203f972faa2973cf44ba80c758f46e" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/lix/archive/release-2.93.tar.gz" + } + }, "mysecrets": { "flake": false, "locked": { @@ -1060,6 +1128,7 @@ "hyprland": "hyprland", "hyprsunset": "hyprsunset", "lanzaboote": "lanzaboote", + "lix": "lix", "mysecrets": "mysecrets", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", @@ -1069,7 +1138,7 @@ "nixpkgs-stable": "nixpkgs-stable_2", "sops-nix": "sops-nix", "stylix": "stylix", - "systems": "systems", + "systems": "systems_2", "walker": "walker" } }, @@ -1212,6 +1281,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 3458305..deee960 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,10 @@ description = "unexplrd's personal configuration"; inputs = { - # lix = { - # inputs.nixpkgs.follows = "nixpkgs"; - # url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-2.tar.gz"; - # }; + lix = { + url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # neve = { # inputs.nixvim.follows = "nixvim"; # url = "git+https://gitea.linerds.us/unexplrd/Neve"; diff --git a/modules/shared/nixos/nix/common.nix b/modules/shared/nixos/nix/common.nix index 88f15b7..08497ce 100644 --- a/modules/shared/nixos/nix/common.nix +++ b/modules/shared/nixos/nix/common.nix @@ -1,10 +1,12 @@ { - pkgs, + # pkgs, + inputs, lib, ... }: { + imports = with inputs; [lix.nixosModules.default]; nix = { - package = pkgs.lixPackageSets.latest.lix; + # package = pkgs.lixPackageSets.latest.lix; channel.enable = false; daemonCPUSchedPolicy = "idle"; optimise = { From a972e393ee25ddf2bb7957dff7c25801ff07bd50 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 29 Jun 2025 16:19:04 +0300 Subject: [PATCH 098/138] niri/waybar: now pixel perfect Signed-off-by: unexplrd --- .../desktop/niri/programs/waybar/default.nix | 476 +++++++++--------- 1 file changed, 239 insertions(+), 237 deletions(-) diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index a91ec3f..0b688d3 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -11,191 +11,190 @@ enable = true; target = "graphical-session.target"; }; - settings = { - bar-0 = { - # layer = "top"; - position = "bottom"; - height = 24; - spacing = 6; - margin-left = 33 + 3; - margin-right = 33 + 3; - margin-bottom = 3; - reload_style_on_change = true; - modules-left = [ - "niri/language" - "niri/workspaces" - "wlr/taskbar" - ]; - modules-center = ["clock"]; - modules-right = [ - (ifLaptop "group/laptop") - "wireplumber" - "tray" - "privacy" - (ifLaptop "power-profiles-daemon") - "idle_inhibitor" - "custom/notification" - ]; - "niri/workspaces" = { - format = "{index}"; - format-icons = { - "1" = "൧"; - "2" = "൨"; - "3" = "൩"; - "4" = "൪"; - "5" = "൫"; - "6" = "൬"; - "7" = "൭"; - "8" = "൮"; - "9" = "൯"; - "10" = "൰"; - general = "󰘧"; - web = "󰖟"; - chat = "󰻞"; - code = "󰅩"; - uni = "󱆀"; - games = "󰺶"; - system = "󰢻"; - media = "󱜐"; - tray = "󱊖"; - }; - }; - "niri/language" = { - format = "{}"; - format-en = "🇺🇸"; - format-uk = "🇺🇦"; - }; - "custom/separator" = { - format = "󰝠"; - interval = "once"; - tooltip = false; - }; - "group/laptop" = { - orientation = "inherit"; - modules = [ - "battery" - "backlight" - ]; - }; - "backlight" = { - format = "{icon} {percent}%"; - format-icons = [ - "󰃚" - "󰃛" - "󰃜" - "󰃝" - "󰃞" - "󰃟" - "󰃠" - ]; - }; - "idle_inhibitor" = { - format = "{icon}"; - format-icons = { - activated = "󰅶"; - deactivated = "󰾪"; - }; - }; - "tray" = { - icon-size = 20; - spacing = 6; - }; - "clock" = { - interval = 1; - format = "{:%B %d - %H:%M - %A}"; - tooltip = false; - # tooltip-format = "{%y.%m.%d - %B %d, %A}"; - }; - battery = { - states = { - good = 95; - warning = 30; - critical = 15; - }; - format = "{icon} {capacity}%"; - format-full = "󱟢 {capacity}%"; - format-charging = "󰂄 {capacity}%"; - format-plugged = "󰚥 {capacity}%"; - format-alt = "{icon} {time}"; - format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; - }; - mpris = { - format = "{player_icon} {dynamic}"; - format-paused = "{status_icon} {dynamic}"; - playing-len = 30; - playing-paused = 30; - player-icons = { - default = "▶"; - mpv = "🎵"; - }; - status-icons = {paused = "⏸";}; - }; - "upower" = { - icon-size = 16; - format = "{percentage}"; - hide-if-empty = true; - tooltip = true; - tooltip-spacing = 20; - }; - "power-profiles-daemon" = { - format = "{icon}"; - tooltip-format = "Power profile: {profile}\nDriver: {driver}"; - tooltip = true; - format-icons = { - default = "󱡮"; - performance = "󱡮"; - balanced = ""; - power-saver = ""; - }; - }; - "wireplumber" = { - scroll-step = 3; - format = "{icon} {volume}%"; - format-muted = "󰖁"; - format-icons = ["󰕿" "󰖀" "󰕾"]; - on-click = getExe pkgs.pwvucontrol; - on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; - }; - "custom/notification" = { - tooltip = false; - format = "{icon}"; - format-icons = { - notification = "󱅫"; - none = "󰂚"; - dnd-notification = "󰂛"; - dnd-none = "󰂛"; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "swaync-client -t -sw"; - on-click-right = "swaync-client -d -sw"; - escape = true; - }; - "privacy" = { - icon-spacing = 2; - icon-size = 16; - transition-duration = 250; - screenshare = { - type = "screenshare"; - tooltip = true; - tooltip-icon-size = 24; - }; - audio-in = { - type = "audio-in"; - tooltip = true; - tooltip-icon-size = 24; - }; - }; - "wlr/taskbar" = { - format = "{icon}"; - icon-size = 20; - icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; - tooltip-format = "{title}"; - on-click = "activate"; + settings.bar-0 = { + # layer = "top"; + position = "bottom"; + height = 24; + spacing = 6; + margin-left = 33 + 3; + margin-right = 33 + 3; + margin-bottom = 3; + reload_style_on_change = true; + modules-left = [ + "niri/language" + "niri/workspaces" + "wlr/taskbar" + ]; + modules-center = ["clock"]; + modules-right = [ + "wireplumber" + (ifLaptop "group/laptop") + "privacy" + "tray" + "idle_inhibitor" + "custom/notification" + ]; + "niri/workspaces" = { + format = "{index}"; + format-icons = { + "1" = "൧"; + "2" = "൨"; + "3" = "൩"; + "4" = "൪"; + "5" = "൫"; + "6" = "൬"; + "7" = "൭"; + "8" = "൮"; + "9" = "൯"; + "10" = "൰"; + general = "󰘧"; + web = "󰖟"; + chat = "󰻞"; + code = "󰅩"; + uni = "󱆀"; + games = "󰺶"; + system = "󰢻"; + media = "󱜐"; + tray = "󱊖"; }; }; + "niri/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "custom/separator" = { + format = "󰝠"; + interval = "once"; + tooltip = false; + }; + "group/laptop" = { + orientation = "inherit"; + modules = [ + "backlight" + "battery" + "power-profiles-daemon" + ]; + }; + "backlight" = { + format = "{percent}% {icon}"; + format-icons = [ + "󰃚" + "󰃛" + "󰃜" + "󰃝" + "󰃞" + "󰃟" + "󰃠" + ]; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰅶"; + deactivated = "󰾪"; + }; + }; + "tray" = { + icon-size = 20; + spacing = 6; + }; + "clock" = { + interval = 1; + format = "{:%B %d - %H:%M - %A}"; + tooltip = false; + # tooltip-format = "{%y.%m.%d - %B %d, %A}"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + mpris = { + format = "{player_icon} {dynamic}"; + format-paused = "{status_icon} {dynamic}"; + playing-len = 30; + playing-paused = 30; + player-icons = { + default = "▶"; + mpv = "🎵"; + }; + status-icons = {paused = "⏸";}; + }; + "upower" = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + "power-profiles-daemon" = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + "wireplumber" = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = getExe pkgs.pwvucontrol; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = "󱅫"; + none = "󰂚"; + dnd-notification = "󰂛"; + dnd-none = "󰂛"; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + icon-spacing = 2; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon}"; + icon-size = 18; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; }; + style = '' @define-color base00 #${colors.base00}; @define-color base01 #${colors.base01}; @@ -214,13 +213,12 @@ @define-color base0E #${colors.base0E}; @define-color base0F #${colors.base0F}; * { - font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; - font-weight: 500; - font-size: 100%; + font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + font-weight: 500; + font-size: 18px; } window#waybar { - background-color: transparent; - color: @base05; + background-color: transparent; } .modules-center { background-color: transparent; @@ -231,100 +229,104 @@ .modules-left, .modules-center, .modules-right { - /* border-bottom-left-radius: 12px; - border-bottom-right-radius: 12px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; */ - background-color: @base00; - border-radius: 24px; - border: 3px solid @base0D; - color: @base05; - padding: 0 0.4em; + /* border-bottom-left-radius: 12px; + border-bottom-right-radius: 12px; + border-top-left-radius: 0px; + border-top-right-radius: 0px; */ + background-color: @base00; + border-radius: 24px; + border: 3px solid @base0D; + color: @base05; + padding: 0 3px; } tooltip { - background: @base01; - border: 1px solid @base0E; + background: @base01; + border: 1px solid @base0E; } tooltip label { - color: @base05; + color: @base05; } button { - box-shadow: inset 0 -3px transparent; - border-radius: 16px; + box-shadow: inset 0 -3px transparent; + border-radius: 16px; } button:hover { - background: inherit; - box-shadow: inset 0 -3px transparent; + background: inherit; + box-shadow: inset 0 -3px transparent; } #mode { - background-color: rgba(0, 0, 0, 0.2); - box-shadow: inset 0 -3px @base05; + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; } - #battery, #backlight, - /* #workspaces, - #taskbar, - #privacy, */ - #taskbar button, - #language, + #battery, #clock, - #battery, - #backlight, - #wireplumber, - #workspaces button, #custom-notification, + #custom-separator, #idle_inhibitor, + #language, #power-profiles-daemon, #privacy-item, - #custom-separator { - padding: 0 0.3em; + #taskbar button, + #taskbar, + #wireplumber, + #workspaces button { + padding: 0 6px; } - #tray button { - padding: 0 0.3em; - margin: 0 0.2em; + #backlight, + #custom-notification, + #idle_inhibitor, + #tray button, + #tray { + padding: 0 6px 0 0; + margin: 0 6px 0 0; + } + #power-profiles-daemon { + padding: 0 6px; + margin: 0 6px; } #workspaces button.active { color: @base0D; } #taskbar button:hover { - box-shadow: transparent; + box-shadow: transparent; } #taskbar.empty, window#empty { - background-color: transparent; + background-color: transparent; } #battery.critical:not(.charging) { - color: @base09; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; + color: @base09; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; } #power-profiles-daemon.performance { - color: @base0D; + color: @base0D; } #power-profiles-daemon.balanced { - color: @base0B; + color: @base0B; } #power-profiles-daemon.power-saver { - color: @base0A; + color: @base0A; } label:focus { - background-color: #000000; + background-color: #000000; } #tray > .passive { - -gtk-icon-effect: dim; + -gtk-icon-effect: dim; } #tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: @base08; + -gtk-icon-effect: highlight; + background-color: @base08; } #privacy-item.screenshare { - color: @base0C; + color: @base0C; } #privacy-item.audio-in { - color: @base0E; + color: @base0E; } ''; } From af1f745827948253eda0276c82c3b18d87ddb17b Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 29 Jun 2025 17:43:02 +0300 Subject: [PATCH 099/138] niri/waybar: now Signed-off-by: unexplrd --- modules/home/desktop/niri/programs/waybar/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 0b688d3..61a5ccb 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -276,8 +276,7 @@ #backlight, #custom-notification, #idle_inhibitor, - #tray button, - #tray { + #tray button { padding: 0 6px 0 0; margin: 0 6px 0 0; } From 5150c9b077b23f05144b31145dfca4d31c834895 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Mon, 30 Jun 2025 18:28:59 +0300 Subject: [PATCH 100/138] niri/waybar: initial rework Signed-off-by: unexplrd --- .../desktop/niri/programs/waybar/default.nix | 74 ++++++++++++++----- 1 file changed, 54 insertions(+), 20 deletions(-) diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 61a5ccb..d669650 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -14,8 +14,8 @@ settings.bar-0 = { # layer = "top"; position = "bottom"; - height = 24; - spacing = 6; + height = 36; + spacing = 0; margin-left = 33 + 3; margin-right = 33 + 3; margin-bottom = 3; @@ -96,7 +96,7 @@ }; }; "tray" = { - icon-size = 20; + icon-size = 24; spacing = 6; }; "clock" = { @@ -188,7 +188,7 @@ }; "wlr/taskbar" = { format = "{icon}"; - icon-size = 18; + icon-size = 24; icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; tooltip-format = "{title}"; on-click = "activate"; @@ -235,9 +235,8 @@ border-top-right-radius: 0px; */ background-color: @base00; border-radius: 24px; - border: 3px solid @base0D; + /* border: 3px solid @base0D; */ color: @base05; - padding: 0 3px; } tooltip { background: @base01; @@ -267,31 +266,66 @@ #language, #power-profiles-daemon, #privacy-item, - #taskbar button, #taskbar, #wireplumber, - #workspaces button { - padding: 0 6px; - } - #backlight, - #custom-notification, + #workspaces button, + #clock, + #language, + #taskbar, + #tray, + #privacy, #idle_inhibitor, - #tray button { - padding: 0 6px 0 0; - margin: 0 6px 0 0; - } - #power-profiles-daemon { + #custom-notification, + #workspaces { + border-radius: 24px; + background-color: @base01; + margin: 3px 3px 3px 0; padding: 0 6px; - margin: 0 6px; + } + #taskbar, + #workspaces { + padding: 0; + } + #privacy { + padding: 0 2px; + } + #language, + #clock, + #wireplumber { + margin: 3px; + } + #tray button, + #workspaces button { + padding: 0 4px; + margin: 3px; + } + #tray button { + padding: 0 6px; + margin: 3px; + } + #taskbar button { + padding: 0; + margin: 3px; + } + #wireplumber, + #idle_inhibitor, + #custom-notification { + padding: 0 14px 0 10px; + } + #backlight { + padding: 0 8px; } #workspaces button.active { - color: @base0D; + color: @base00; + background-color: @base0D; } #taskbar button:hover { - box-shadow: transparent; + background-color: @base0D; } #taskbar.empty, window#empty { + padding: 0; + margin: 0; background-color: transparent; } #battery.critical:not(.charging) { From 72fbe7195f57be305933d7505f0c3ebd2d274638 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Mon, 30 Jun 2025 22:12:37 +0300 Subject: [PATCH 101/138] niri/waybar: polished Signed-off-by: unexplrd --- .../desktop/niri/programs/waybar/default.nix | 92 ++++++++++--------- 1 file changed, 47 insertions(+), 45 deletions(-) diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index d669650..76f7a9c 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -24,12 +24,12 @@ "niri/language" "niri/workspaces" "wlr/taskbar" + "privacy" ]; modules-center = ["clock"]; modules-right = [ "wireplumber" (ifLaptop "group/laptop") - "privacy" "tray" "idle_inhibitor" "custom/notification" @@ -96,7 +96,7 @@ }; }; "tray" = { - icon-size = 24; + icon-size = 20; spacing = 6; }; "clock" = { @@ -172,8 +172,8 @@ escape = true; }; "privacy" = { - icon-spacing = 2; - icon-size = 16; + icon-spacing = 0; + icon-size = 18; transition-duration = 250; screenshare = { type = "screenshare"; @@ -188,7 +188,7 @@ }; "wlr/taskbar" = { format = "{icon}"; - icon-size = 24; + icon-size = 20; icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; tooltip-format = "{title}"; on-click = "activate"; @@ -217,12 +217,8 @@ font-weight: 500; font-size: 18px; } - window#waybar { - background-color: transparent; - } - .modules-center { - background-color: transparent; - } + window#waybar, + .modules-center, .mpris.stopped { background-color: transparent; } @@ -241,6 +237,7 @@ tooltip { background: @base01; border: 1px solid @base0E; + border-radius: 24px; } tooltip label { color: @base05; @@ -265,36 +262,28 @@ #idle_inhibitor, #language, #power-profiles-daemon, + #privacy, #privacy-item, #taskbar, + #tray, #wireplumber, #workspaces button, - #clock, - #language, - #taskbar, - #tray, - #privacy, - #idle_inhibitor, - #custom-notification, #workspaces { border-radius: 24px; background-color: @base01; margin: 3px 3px 3px 0; padding: 0 6px; } - #taskbar, - #workspaces { - padding: 0; - } - #privacy { - padding: 0 2px; - } + /* left modules */ #language, #clock, #wireplumber { margin: 3px; } - #tray button, + #taskbar button { + padding: 0 2px; + margin: 3px; + } #workspaces button { padding: 0 4px; margin: 3px; @@ -303,24 +292,23 @@ padding: 0 6px; margin: 3px; } - #taskbar button { - padding: 0; - margin: 3px; + #privacy-item { + padding: 0 4px; } - #wireplumber, + #backlight, + #battery, + #custom-notification, #idle_inhibitor, - #custom-notification { + #wireplumber { padding: 0 14px 0 10px; } - #backlight { - padding: 0 8px; + #power-profiles-daemon { + padding: 0 16px 0 8px; } - #workspaces button.active { - color: @base00; - background-color: @base0D; - } - #taskbar button:hover { - background-color: @base0D; + #privacy, + #taskbar, + #workspaces { + padding: 0; } #taskbar.empty, window#empty { @@ -328,8 +316,16 @@ margin: 0; background-color: transparent; } + #taskbar button:hover { + background-color: @base0D; + } + #workspaces button.active { + color: @base00; + background-color: @base0D; + } #battery.critical:not(.charging) { - color: @base09; + background-color: @base09; + color: @base00; animation-name: blink; animation-duration: 0.5s; animation-timing-function: steps(12); @@ -337,13 +333,15 @@ animation-direction: alternate; } #power-profiles-daemon.performance { - color: @base0D; + background-color: @base0D; + color: @base00; } #power-profiles-daemon.balanced { - color: @base0B; + color: @base05; } #power-profiles-daemon.power-saver { - color: @base0A; + background-color: @base0A; + color: @base00; } label:focus { background-color: #000000; @@ -356,10 +354,14 @@ background-color: @base08; } #privacy-item.screenshare { - color: @base0C; + background-color: @base0C; + color: @base00; + margin: 3px 0 3px 3px; } #privacy-item.audio-in { - color: @base0E; + background-color: @base0E; + color: @base00; + margin: 3px; } ''; } From 3e15fc9c8cfcc319f05046ed8110e2f9c8d408ff Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 1 Jul 2025 00:19:25 +0300 Subject: [PATCH 102/138] desktop/niri: 1px border Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 4 ++-- modules/home/desktop/niri/programs/waybar/default.nix | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 0febfe2..a3ab5db 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -181,7 +181,7 @@ in { inactive-color "#${colors.base03}" } border { - width 3 + width 1 active-color "#${colors.base0D}" inactive-color "#${colors.base03}" urgent-color "#${colors.base08}" @@ -189,7 +189,7 @@ in { } window-rule { - geometry-corner-radius 12 + geometry-corner-radius 18 clip-to-geometry true } window-rule { diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 76f7a9c..f7bf74b 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -14,7 +14,7 @@ settings.bar-0 = { # layer = "top"; position = "bottom"; - height = 36; + height = 40; spacing = 0; margin-left = 33 + 3; margin-right = 33 + 3; @@ -231,13 +231,12 @@ border-top-right-radius: 0px; */ background-color: @base00; border-radius: 24px; - /* border: 3px solid @base0D; */ + border: 1px solid @base0D; color: @base05; } tooltip { background: @base01; - border: 1px solid @base0E; - border-radius: 24px; + border: 1px solid @base0D; } tooltip label { color: @base05; From 152b53aa52bacac00c3a669065313fab6f5e969e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 1 Jul 2025 00:33:40 +0300 Subject: [PATCH 103/138] niri/waybar: some fixes, new module Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 2 +- modules/home/desktop/niri/niri.nix | 7 +++++ .../desktop/niri/programs/waybar/default.nix | 28 ++++++++++++++----- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 8d9a643..f334fa9 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -68,7 +68,7 @@ in { programs = { walker = import ./programs/walker {inherit config inputs pkgs;}; - waybar = import ./programs/waybar {inherit config colors getExe ifLaptop pkgs;}; + waybar = import ./programs/waybar {inherit config colors getExe ifLaptop launcher pkgs;}; }; services = import ./services {inherit pkgs lockscreen getExe perSystem;}; diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index a3ab5db..09dbbcb 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -215,6 +215,12 @@ in { off } } + layer-rule { + match namespace="waybar" + match at-startup=true + + opacity 0.99 // fixes the black fill + } window-rule { match title="Картинка в картинці" @@ -250,6 +256,7 @@ in { block-out-from "screencast" } + binds { Mod+Shift+Slash { show-hotkey-overlay; } diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index f7bf74b..2dee77e 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -3,6 +3,7 @@ config, getExe, ifLaptop, + launcher, pkgs, ... }: { @@ -21,6 +22,7 @@ margin-bottom = 3; reload_style_on_change = true; modules-left = [ + "custom/launcher" "niri/language" "niri/workspaces" "wlr/taskbar" @@ -101,7 +103,7 @@ }; "clock" = { interval = 1; - format = "{:%B %d - %H:%M - %A}"; + format = "{:%B %d - %R - %A}"; tooltip = false; # tooltip-format = "{%y.%m.%d - %B %d, %A}"; }; @@ -155,6 +157,11 @@ on-click = getExe pkgs.pwvucontrol; on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; }; + "custom/launcher" = { + format = ""; + on-click = launcher; + tooltip = false; + }; "custom/notification" = { tooltip = false; format = "{icon}"; @@ -217,11 +224,14 @@ font-weight: 500; font-size: 18px; } - window#waybar, .modules-center, .mpris.stopped { background-color: transparent; } + window#waybar { + background: @base00; + border-radius: 24px; + } .modules-left, .modules-center, .modules-right { @@ -231,12 +241,13 @@ border-top-right-radius: 0px; */ background-color: @base00; border-radius: 24px; - border: 1px solid @base0D; color: @base05; + /* margin: 1px; for the window#waybar border */ } tooltip { background: @base01; border: 1px solid @base0D; + border-radius: 24px; } tooltip label { color: @base05; @@ -256,6 +267,7 @@ #backlight, #battery, #clock, + #custom-launcher, #custom-notification, #custom-separator, #idle_inhibitor, @@ -274,17 +286,18 @@ padding: 0 6px; } /* left modules */ - #language, + #custom-launcher, + /* #language, */ #clock, #wireplumber { margin: 3px; } #taskbar button { - padding: 0 2px; + padding: 0 3px; margin: 3px; } #workspaces button { - padding: 0 4px; + padding: 0 5px; margin: 3px; } #tray button { @@ -301,8 +314,9 @@ #wireplumber { padding: 0 14px 0 10px; } + #custom-launcher, #power-profiles-daemon { - padding: 0 16px 0 8px; + padding: 0 17px 0 8px; } #privacy, #taskbar, From a83fb9fd95f7b917a38f5e232096f3e7c16222c5 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 1 Jul 2025 12:44:01 +0300 Subject: [PATCH 104/138] niri/walker: rework Signed-off-by: unexplrd --- .../desktop/niri/programs/walker/default.nix | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/modules/home/desktop/niri/programs/walker/default.nix b/modules/home/desktop/niri/programs/walker/default.nix index a318f7b..8fc0860 100644 --- a/modules/home/desktop/niri/programs/walker/default.nix +++ b/modules/home/desktop/niri/programs/walker/default.nix @@ -146,32 +146,30 @@ h_align = "center"; v_align = "center"; box = { - width = 450; h_align = "center"; v_align = "center"; - # spacing = 12; orientation = "vertical"; search = { - margins = { - start = 8; - top = 8; - end = 8; - bottom = 0; - }; h_align = "top"; + margins = { + start = 3; + top = 3; + end = 3; + bottom = 3; + }; }; scroll = { overlay_scrolling = true; list = { margins = { - bottom = 8; - top = 4; - start = 8; - end = 8; + bottom = 3; + top = 0; + start = 3; + end = 3; }; item = { icon.theme = "${config.gtk.iconTheme.name}"; - spacing = 4; + spacing = 3; activation_label = { x_align = 0.5; y_align = 0.5; @@ -233,7 +231,7 @@ background: @base00; color: @base05; border-radius: 20px; - border: 3px solid @base0D; + /* border: 1px solid @base0D; */ } #box { @@ -242,7 +240,7 @@ #search { background: @base01; - border-radius: 12px 12px 6px 6px; + border-radius: 17px; padding: 8px; } @@ -269,8 +267,8 @@ } #list { - padding: 8px; - border-radius: 6px 6px 12px 12px; + padding: 3px; + border-radius: 17px; background: @base01; } @@ -281,7 +279,7 @@ child:selected, child:hover { box-shadow: none; - border-radius: 8px; + border-radius: 14px; background: @base02; } From 8e783192e15f2d6945422017b94b650dcd608e58 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 29 Jun 2025 17:38:46 +0300 Subject: [PATCH 105/138] stylix: new theme Signed-off-by: unexplrd --- hosts/sarien/configuration.nix | 2 +- modules/home/desktop/niri/default.nix | 14 +++++--- modules/nixos/system/stylix/default.nix | 48 +++++++++++++++++++------ 3 files changed, 48 insertions(+), 16 deletions(-) diff --git a/hosts/sarien/configuration.nix b/hosts/sarien/configuration.nix index c5cd681..63f3cad 100644 --- a/hosts/sarien/configuration.nix +++ b/hosts/sarien/configuration.nix @@ -45,7 +45,7 @@ }; stylix = { enable = true; - theme = "gruvbox-dark-pale"; + theme = "sandcastle"; }; locale = "uk_UA.UTF-8"; misc.qmk-vial.enable = true; diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index f334fa9..63e1b55 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -51,13 +51,17 @@ in { else if config.stylix.polarity == "dark" then "Papirus-Dark" else "Papirus-Light"; - package = - if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) + package = let + inherit (osConfig.module.stylix) theme; + in + if (lib.strings.hasPrefix "gruvbox" theme) then pkgs.gruvbox-plus-icons - else if (lib.strings.hasPrefix "rose-pine" osConfig.module.stylix.theme) + else if (lib.strings.hasPrefix "rose-pine" theme) then pkgs.papirus-icon-theme.override {color = "indigo";} - else if (lib.strings.hasPrefix "nord" osConfig.module.stylix.theme) + else if (lib.strings.hasPrefix "nord" theme) then pkgs.papirus-icon-theme.override {color = "nordic";} + else if (lib.strings.hasPrefix "s" theme) + then pkgs.papirus-icon-theme.override {color = "teal";} else pkgs.papirus-icon-theme; in {inherit name package;}; }; @@ -71,7 +75,7 @@ in { waybar = import ./programs/waybar {inherit config colors getExe ifLaptop launcher pkgs;}; }; - services = import ./services {inherit pkgs lockscreen getExe perSystem;}; + services = import ./services {inherit pkgs lockscreen getExe perSystem osConfig;}; home.packages = with pkgs; [ diff --git a/modules/nixos/system/stylix/default.nix b/modules/nixos/system/stylix/default.nix index a8075e9..51e03c4 100644 --- a/modules/nixos/system/stylix/default.nix +++ b/modules/nixos/system/stylix/default.nix @@ -12,6 +12,8 @@ cfg = config.module.stylix; + fromBase16Schemes = f: "${pkgs.base16-schemes}/share/themes/${f}.yaml"; + interPackage = pkgs.inter-nerdfont; iosevkaPackage = pkgs.nerd-fonts.iosevka; iosevkaTermPackage = pkgs.nerd-fonts.iosevka-term; @@ -27,6 +29,11 @@ name = "wallhaven-p91dym.jpg"; sha256 = "wnsAhh0Soxm+lxahh+Xc/+CAw/abWgPIkeoOlzNGaDo="; }; + waves = fetchurl { + url = "https://w.wallhaven.cc/full/5y/wallhaven-5ydl93.png"; + name = "wallhaven-5ydl93.png"; + sha256 = "fTE2cyn2mkx05+Zn6qcs4+Rb7AYD0uyi6CNznuZYOjw="; + }; }; fern-outline = fetchurl { url = "https://w.wallhaven.cc/full/p9/wallhaven-p9m7ve.png"; @@ -72,7 +79,7 @@ themes = { rose-pine-dawn = { polarity = "light"; - scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-dawn.yaml"; + scheme = fromBase16Schemes "rose-pine-dawn"; wallpaper = wallpapers.cyber-dawn; serif = { @@ -93,7 +100,7 @@ }; rose-pine-moon = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/rose-pine-moon.yaml"; + scheme = fromBase16Schemes "rose-pine-moon"; wallpaper = wallpapers.cyber-dawn; serif = { @@ -112,9 +119,30 @@ size = 24; }; }; + sandcastle = { + polarity = "dark"; + scheme = fromBase16Schemes "sandcastle"; + wallpaper = wallpapers.abstract.waves; + + serif = { + package = iosevkaPackage; + name = "Iosevka Nerd Font"; + }; + + monospace = { + package = iosevkaTermPackage; + name = "IosevkaTerm Nerd Font Mono"; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + }; gruvbox-dark-pale = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-pale.yaml"; + scheme = fromBase16Schemes "gruvbox-dark-pale"; wallpaper = wallpapers.mountains-sepia; serif = { @@ -135,7 +163,7 @@ }; nord = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml"; + scheme = fromBase16Schemes "nord"; wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png"; name = "wallhaven-l8l9gq.png"; @@ -161,7 +189,7 @@ nord-light = { polarity = "light"; - scheme = "${pkgs.base16-schemes}/share/themes/nord-light.yaml"; + scheme = fromBase16Schemes "nord-light"; wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/l8/wallhaven-l8l9gq.png"; name = "wallhaven-l8l9gq.png"; @@ -187,7 +215,7 @@ helios = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/helios.yaml"; + scheme = fromBase16Schemes "helios"; wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/lq/wallhaven-lqorw2.png"; name = "wallhaven-lqorw2.png"; @@ -213,7 +241,7 @@ sulphurpool = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/atelier-sulphurpool.yaml"; + scheme = fromBase16Schemes "atelier-sulphurpool"; wallpaper = fetchurl { url = "https://w.wallhaven.cc/full/rd/wallhaven-rd5q3m.jpg"; name = "wallhaven-rd5q3m.jpg"; @@ -239,7 +267,7 @@ himalaya = { # lightly pink like himalayan salt polarity = "light"; - scheme = "${pkgs.base16-schemes}/share/themes/atelier-plateau-light.yaml"; + scheme = fromBase16Schemes "atelier-plateau-light"; wallpaper = wallpapers.mountains-pink; serif = { @@ -260,7 +288,7 @@ }; vesper = { polarity = "dark"; - scheme = "${pkgs.base16-schemes}/share/themes/vesper.yaml"; + scheme = fromBase16Schemes "vesper"; wallpaper = wallpapers.abstract.squares; serif = { @@ -281,7 +309,7 @@ }; github = { polarity = "light"; - scheme = "${pkgs.base16-schemes}/share/themes/github.yaml"; + scheme = fromBase16Schemes "github"; wallpaper = wallpapers.abstract.squares; serif = { From 5478b04ba8acd5ef62f116bbbb890e6ad550cbf1 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 29 Jun 2025 17:38:46 +0300 Subject: [PATCH 106/138] desktop/niri: blueman Signed-off-by: unexplrd --- modules/home/desktop/niri/services/default.nix | 4 +++- modules/nixos/desktop/niri/default.nix | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/home/desktop/niri/services/default.nix b/modules/home/desktop/niri/services/default.nix index aea9db5..b5ffc3c 100644 --- a/modules/home/desktop/niri/services/default.nix +++ b/modules/home/desktop/niri/services/default.nix @@ -1,10 +1,12 @@ { getExe, + lockscreen, + osConfig, perSystem, pkgs, - lockscreen, ... }: { + blueman-applet.enable = osConfig.services.blueman.enable; swaync = import ./swaync; kanshi = import ./kanshi; network-manager-applet.enable = true; diff --git a/modules/nixos/desktop/niri/default.nix b/modules/nixos/desktop/niri/default.nix index 7df4c1e..a68e78d 100644 --- a/modules/nixos/desktop/niri/default.nix +++ b/modules/nixos/desktop/niri/default.nix @@ -24,7 +24,10 @@ in { pam.services.gtklock = {}; soteria.enable = true; # polkit agent in rust }; - services.gvfs.enable = true; + services = { + blueman.enable = config.hardware.bluetooth.enable; + gvfs.enable = true; + }; xdg.portal = { enable = true; extraPortals = with pkgs; [xdg-desktop-portal-gnome xdg-desktop-portal-gtk]; From b9848196462a1110094e327c70ca7bd68d83adad Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 1 Jul 2025 10:36:33 +0300 Subject: [PATCH 107/138] finish niri rice Signed-off-by: unexplrd --- hosts/dunamis/configuration.nix | 2 +- modules/home/desktop/niri/niri.nix | 21 +- .../desktop/niri/programs/walker/default.nix | 14 +- .../desktop/niri/programs/waybar/default.nix | 191 +++++++++--------- 4 files changed, 110 insertions(+), 118 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 99094cf..f7bb637 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -30,7 +30,7 @@ }; stylix = { enable = true; - theme = "rose-pine-moon"; + theme = "sandcastle"; }; locale = "uk_UA.UTF-8"; misc = { diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 09dbbcb..65079ce 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -159,28 +159,29 @@ in { } struts { - left 33 - right 33 + left 43 + right 43 } tab-indicator { active-color "#${colors.base04}" inactive-color "#${colors.base03}" - corner-radius 4 - gap 6 + corner-radius 3 + gap 3 gaps-between-tabs 3 - length total-proportion=0.3 + // length total-proportion=0.3 place-within-column position "left" - width 6 + width 3 } focus-ring { - off - width 3 - active-gradient from="#${colors.base0D}" to="#${colors.base0F}" angle=40 relative-to="workspace-view" + width 1 + active-color "#${colors.base0D}" inactive-color "#${colors.base03}" + urgent-color "#${colors.base08}" } border { + off width 1 active-color "#${colors.base0D}" inactive-color "#${colors.base03}" @@ -189,7 +190,7 @@ in { } window-rule { - geometry-corner-radius 18 + geometry-corner-radius 9 clip-to-geometry true } window-rule { diff --git a/modules/home/desktop/niri/programs/walker/default.nix b/modules/home/desktop/niri/programs/walker/default.nix index 8fc0860..f461750 100644 --- a/modules/home/desktop/niri/programs/walker/default.nix +++ b/modules/home/desktop/niri/programs/walker/default.nix @@ -230,8 +230,8 @@ #window { background: @base00; color: @base05; - border-radius: 20px; - /* border: 1px solid @base0D; */ + border-radius: 9px; + border: 1px solid @base0D; } #box { @@ -240,7 +240,7 @@ #search { background: @base01; - border-radius: 17px; + border-radius: 6px; padding: 8px; } @@ -249,12 +249,12 @@ #typeahead { background: none; box-shadow: none; - border-radius: 12px; + border-radius: 3px; } #input > *:first-child, #typeahead > *:first-child { - margin-right: 12px; + margin-right: 3px; border-radius: 0px; } @@ -268,7 +268,7 @@ #list { padding: 3px; - border-radius: 17px; + border-radius: 6px; background: @base01; } @@ -279,7 +279,7 @@ child:selected, child:hover { box-shadow: none; - border-radius: 14px; + border-radius: 3px; background: @base02; } diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 2dee77e..fd2ec97 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -17,59 +17,38 @@ position = "bottom"; height = 40; spacing = 0; - margin-left = 33 + 3; - margin-right = 33 + 3; + # margin-left = 3; + # margin-right = 3; + margin-left = 43 + 3; + margin-right = 43 + 3; margin-bottom = 3; reload_style_on_change = true; modules-left = [ "custom/launcher" - "niri/language" - "niri/workspaces" + "clock" "wlr/taskbar" "privacy" ]; - modules-center = ["clock"]; + modules-center = [ + # "clock" + "niri/language" + "niri/workspaces" + "idle_inhibitor" + ]; modules-right = [ "wireplumber" (ifLaptop "group/laptop") "tray" - "idle_inhibitor" "custom/notification" ]; "niri/workspaces" = { format = "{index}"; - format-icons = { - "1" = "൧"; - "2" = "൨"; - "3" = "൩"; - "4" = "൪"; - "5" = "൫"; - "6" = "൬"; - "7" = "൭"; - "8" = "൮"; - "9" = "൯"; - "10" = "൰"; - general = "󰘧"; - web = "󰖟"; - chat = "󰻞"; - code = "󰅩"; - uni = "󱆀"; - games = "󰺶"; - system = "󰢻"; - media = "󱜐"; - tray = "󱊖"; - }; }; "niri/language" = { format = "{}"; format-en = "🇺🇸"; format-uk = "🇺🇦"; }; - "custom/separator" = { - format = "󰝠"; - interval = "once"; - tooltip = false; - }; "group/laptop" = { orientation = "inherit"; modules = [ @@ -103,9 +82,9 @@ }; "clock" = { interval = 1; - format = "{:%B %d - %R - %A}"; - tooltip = false; - # tooltip-format = "{%y.%m.%d - %B %d, %A}"; + format = "{:%R}"; + tooltip = true; + tooltip-format = "{:%B %d, %A}"; }; battery = { states = { @@ -219,57 +198,51 @@ @define-color base0D #${colors.base0D}; @define-color base0E #${colors.base0E}; @define-color base0F #${colors.base0F}; + * { font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; font-weight: 500; font-size: 18px; } - .modules-center, - .mpris.stopped { - background-color: transparent; - } + window#waybar { background: @base00; - border-radius: 24px; + border-radius: 9px; } + .modules-left, .modules-center, .modules-right { - /* border-bottom-left-radius: 12px; - border-bottom-right-radius: 12px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; */ background-color: @base00; - border-radius: 24px; + border-radius: 9px; color: @base05; - /* margin: 1px; for the window#waybar border */ } + tooltip { background: @base01; border: 1px solid @base0D; - border-radius: 24px; + border-radius: 12px; } + tooltip label { color: @base05; } + button { box-shadow: inset 0 -3px transparent; - border-radius: 16px; + border-radius: 3px; } + button:hover { background: inherit; box-shadow: inset 0 -3px transparent; } - #mode { - background-color: rgba(0, 0, 0, 0.2); - box-shadow: inset 0 -3px @base05; - } + #backlight, #battery, #clock, #custom-launcher, #custom-notification, - #custom-separator, #idle_inhibitor, #language, #power-profiles-daemon, @@ -280,33 +253,19 @@ #wireplumber, #workspaces button, #workspaces { - border-radius: 24px; + border-radius: 6px; background-color: @base01; margin: 3px 3px 3px 0; padding: 0 6px; } - /* left modules */ + + /* #clock, */ #custom-launcher, - /* #language, */ - #clock, + #language, #wireplumber { margin: 3px; } - #taskbar button { - padding: 0 3px; - margin: 3px; - } - #workspaces button { - padding: 0 5px; - margin: 3px; - } - #tray button { - padding: 0 6px; - margin: 3px; - } - #privacy-item { - padding: 0 4px; - } + #backlight, #battery, #custom-notification, @@ -314,28 +273,38 @@ #wireplumber { padding: 0 14px 0 10px; } + #custom-launcher, #power-profiles-daemon { padding: 0 17px 0 8px; } + #privacy, #taskbar, #workspaces { padding: 0; } - #taskbar.empty, - window#empty { - padding: 0; - margin: 0; - background-color: transparent; + + #privacy-item { + padding: 0 5px; } - #taskbar button:hover { - background-color: @base0D; + + #taskbar button { + padding: 0 3px; + margin: 3px; } - #workspaces button.active { - color: @base00; - background-color: @base0D; + + #tray button { + padding: 0 3px; + margin: 3px; } + + #workspaces button { + border-radius: 3px; + padding: 0 5px; + margin: 3px; + } + #battery.critical:not(.charging) { background-color: @base09; color: @base00; @@ -345,36 +314,58 @@ animation-iteration-count: infinite; animation-direction: alternate; } + + #mode { + background-color: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 -3px @base05; + } + + #power-profiles-daemon.balanced { + color: @base05; + } + #power-profiles-daemon.performance { background-color: @base0D; color: @base00; } - #power-profiles-daemon.balanced { - color: @base05; - } + #power-profiles-daemon.power-saver { background-color: @base0A; color: @base00; } - label:focus { - background-color: #000000; - } - #tray > .passive { - -gtk-icon-effect: dim; - } - #tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: @base08; - } - #privacy-item.screenshare { - background-color: @base0C; - color: @base00; - margin: 3px 0 3px 3px; - } + #privacy-item.audio-in { background-color: @base0E; color: @base00; margin: 3px; } + + #privacy-item.screenshare { + background-color: @base0C; + color: @base00; + margin: 3px 0 3px 3px; + } + + #taskbar button:hover { + background-color: @base0D; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @base08; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #workspaces button.active { + color: @base00; + background-color: @base0D; + } + + label:focus { + background-color: #000000; + } ''; } From 88622dfc96927ee1b4d51ef6b9c37998743cf6dc Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 4 Jul 2025 15:02:10 +0300 Subject: [PATCH 108/138] flake.nix: switch to nixpkgs/master Signed-off-by: unexplrd --- flake.lock | 112 ++++++++++++++++++++++++++--------------------------- flake.nix | 4 +- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/flake.lock b/flake.lock index b31739c..18a997a 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1750372185, - "narHash": "sha256-lVBKxd9dsZOH1fA6kSE5WNnt8e+09fN+NL/Q3BjTWHY=", + "lastModified": 1751569683, + "narHash": "sha256-PoQcCYTiN52PanxgWBN4Tqet1x4PCk6KtjaHNjELH88=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "7cef49d261cbbe537e8cb662485e76d29ac4cbca", + "rev": "c0c56dde3e471030edb135425a82107cf0057c6f", "type": "github" }, "original": { @@ -465,16 +465,16 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1744584021, - "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=", + "lastModified": 1748186689, + "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae", + "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", "type": "github" }, "original": { "owner": "GNOME", - "ref": "48.1", + "ref": "48.2", "repo": "gnome-shell", "type": "github" } @@ -486,11 +486,11 @@ ] }, "locked": { - "lastModified": 1751146119, - "narHash": "sha256-gvjG95TCnUVJkvQvLMlnC4NqiqFyBdJk3o8/RwuHeaU=", + "lastModified": 1751589297, + "narHash": "sha256-3q35cq6BPuwIRL3IoVKYPc72r3OleeuRyf4YAPjEqzA=", "owner": "nix-community", "repo": "home-manager", - "rev": "76d0c31fce2aa0c71409de953e2f9113acd5b656", + "rev": "83f978812c37511ef2ffaf75ffa72160483f738a", "type": "github" }, "original": { @@ -544,11 +544,11 @@ ] }, "locked": { - "lastModified": 1750371717, - "narHash": "sha256-cNP+bVq8m5x2Rl6MTjwfQLCdwbVmKvTH7yqVc1SpiJM=", + "lastModified": 1750621377, + "narHash": "sha256-8u6b5oAdX0rCuoR8wFenajBRmI+mzbpNig6hSCuWUzE=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "15c6f8f3a567fec9a0f732cd310a7ff456deef88", + "rev": "b3d628d01693fb9bb0a6690cd4e7b80abda04310", "type": "github" }, "original": { @@ -577,11 +577,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1751122874, - "narHash": "sha256-0biNUPDAN2RC+RFEdaJ5z3jt5zAP6wrKNyO1wxhwgjo=", + "lastModified": 1751582011, + "narHash": "sha256-dZgXFCU9gzw3MOSzlf/O0jdptESNkz9S71sDlEKaeMk=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "ab900d8752af11ada256ea6fca54d5404587405c", + "rev": "3c9447ca53f76abd1372bca5749c9ef701fb76c0", "type": "github" }, "original": { @@ -735,11 +735,11 @@ ] }, "locked": { - "lastModified": 1751122848, - "narHash": "sha256-IJxNuudvBX+3WJpqG16DBaM6aDwgWAU9PchGYHSXoZM=", + "lastModified": 1751567624, + "narHash": "sha256-tUVODSZhvafXmuN+5SwZpNWV+2cvhSd+5IJ5TXu3YgI=", "owner": "hyprwm", "repo": "hyprsunset", - "rev": "845f7e8e86cac5023cad4dc446fc120be80fe69a", + "rev": "4b2f0f9f46a6552930eecb979d18ac48d7079312", "type": "github" }, "original": { @@ -760,11 +760,11 @@ ] }, "locked": { - "lastModified": 1750703126, - "narHash": "sha256-zJHmLsiW6P8h9HaH5eMKhEh/gvym3k6/Ywr4UHKpJfc=", + "lastModified": 1751061882, + "narHash": "sha256-g9n8Vrbx+2JYM170P9BbvGHN39Wlkr4U+V2WLHQsXL8=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "d46bd32da554c370f98180a1e465f052b9584805", + "rev": "4737241eaf8a1e51671a2a088518071f9a265cf4", "type": "github" }, "original": { @@ -807,11 +807,11 @@ ] }, "locked": { - "lastModified": 1750403547, - "narHash": "sha256-XDDINMbHTtKQeSRpX5mwq20z23Wg/I/G4JUinA3V8Xg=", + "lastModified": 1751529406, + "narHash": "sha256-jwKDHyUycp678zDYa5Hyfq3msO73YMXdZPxp96dU7po=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "52b86b86d925ec00c836ecc6d36f9c947bb15736", + "rev": "b2e5ce654e4f5bf8905c2e07a96dcf4966e6277d", "type": "github" }, "original": { @@ -899,11 +899,11 @@ }, "nix-flatpak": { "locked": { - "lastModified": 1749394952, - "narHash": "sha256-WbWkzIvB0gqAdBLghdmUpGveY7MlAS2iMj3VEJnJ9yE=", + "lastModified": 1751276396, + "narHash": "sha256-oOYrnKStMsOXST+wKnzuSZ49h8Dr1Q3mIn2f5Kb5GAw=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "64c6e53a3999957c19ab95cda78bde466d8374cc", + "rev": "59adb9ad1cbd915494fc35cd0e0a9d582ca9de74", "type": "github" }, "original": { @@ -967,11 +967,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1751195306, - "narHash": "sha256-rcrO38Qo9gDDWkEF8ZePf1mPw+MM42DgiK66eDH8i+U=", + "lastModified": 1751591814, + "narHash": "sha256-A4lgvuj4v+Pr8MniXz1FBG0DXOygi8tTECR+j53FMhM=", "owner": "lilyinstarlight", "repo": "nixos-cosmic", - "rev": "0968e4f05337f6f2043b394b452ae0d38a4d5923", + "rev": "fef2d0c78c4e4d6c600a88795af193131ff51bdc", "type": "github" }, "original": { @@ -997,16 +997,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1749521202, - "narHash": "sha256-9SNHxww6HCKHPBg3h5u3dQqrxRqdGRlCl93PYhsNmOk=", + "lastModified": 1751630398, + "narHash": "sha256-A75SJvGnlIqEgl1Hh0v7HJgSffEaInAHl338PSDgJso=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b57e8a01883a0566ed6213694941ea7acc2093a0", + "rev": "55dc7f458587ec5714dafc71de09b55a88789130", "type": "github" }, "original": { "owner": "NixOS", - "ref": "pull/413627/head", + "ref": "master", "repo": "nixpkgs", "type": "github" } @@ -1029,11 +1029,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1750877742, - "narHash": "sha256-OrCy70x59VaBHxPZnm6A1wvQSdJvTz4i8Ngx40UeApI=", + "lastModified": 1751274312, + "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f25c1bd2a6b33a4b1aa7aff56a94e0daab3773f0", + "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", "type": "github" }, "original": { @@ -1079,11 +1079,11 @@ ] }, "locked": { - "lastModified": 1749636823, - "narHash": "sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4=", + "lastModified": 1750779888, + "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "623c56286de5a3193aa38891a6991b28f9bab056", + "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", "type": "github" }, "original": { @@ -1150,11 +1150,11 @@ ] }, "locked": { - "lastModified": 1751078221, - "narHash": "sha256-/SRmXIPxL7ixFLZgcDdgZDuIwt8eWQAamMYer0ODwbM=", + "lastModified": 1751510438, + "narHash": "sha256-m8PjOoyyCR4nhqtHEBP1tB/jF+gJYYguSZmUmVTEAQE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "1712a6d3430ca75353d366b7ddd1c79d6b243efc", + "rev": "7f415261f298656f8164bd636c0dc05af4e95b6b", "type": "github" }, "original": { @@ -1192,11 +1192,11 @@ ] }, "locked": { - "lastModified": 1751165203, - "narHash": "sha256-3QhlpAk2yn+ExwvRLtaixWsVW1q3OX3KXXe0l8VMLl4=", + "lastModified": 1751251399, + "narHash": "sha256-y+viCuy/eKKpkX1K2gDvXIJI/yzvy6zA3HObapz9XZ0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "90f547b90e73d3c6025e66c5b742d6db51c418c3", + "rev": "b22d5ee8c60ed1291521f2dde48784edd6bf695b", "type": "github" }, "original": { @@ -1212,11 +1212,11 @@ ] }, "locked": { - "lastModified": 1750119275, - "narHash": "sha256-Rr7Pooz9zQbhdVxux16h7URa6mA80Pb/G07T4lHvh0M=", + "lastModified": 1751606940, + "narHash": "sha256-KrDPXobG7DFKTOteqdSVeL1bMVitDcy7otpVZWDE6MA=", "owner": "mic92", "repo": "sops-nix", - "rev": "77c423a03b9b2b79709ea2cb63336312e78b72e2", + "rev": "3633fc4acf03f43b260244d94c71e9e14a2f6e0d", "type": "github" }, "original": { @@ -1253,11 +1253,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1751145558, - "narHash": "sha256-OPlbpH64jzIspYqvJB96tnN9V9HBlAxROS5ijQwtN70=", + "lastModified": 1751602277, + "narHash": "sha256-mlJeMDyj+B9QYNw/f9YdlBzvq6mcQ3dx5qjfepzV70I=", "owner": "danth", "repo": "stylix", - "rev": "3a09d3f5cb940fa4142a2f3415b508a8be92b721", + "rev": "3c73dee2dbdf242a16a6e929f3e574dd0694d85a", "type": "github" }, "original": { @@ -1409,11 +1409,11 @@ ] }, "locked": { - "lastModified": 1748677846, - "narHash": "sha256-3GD5xEMUUzCsbi9FmOhg7ZXZgc2NswnrCl+rRL8PsLE=", + "lastModified": 1751553554, + "narHash": "sha256-OR68SOZ38NrAzHj7/PNLg/++yHYL7cVhBXi3+ZqvQ80=", "owner": "abenz1267", "repo": "walker", - "rev": "1afd033ae3cbeb69e0debb2a0805fcbbd3d27bc1", + "rev": "9d5d964273a128c83ae74e9e3f6229ffac71db53", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index deee960..2be1274 100644 --- a/flake.nix +++ b/flake.nix @@ -72,9 +72,9 @@ nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs = { - # url = "github:NixOS/nixpkgs?ref=nixos-unstable"; + url = "github:NixOS/nixpkgs/master"; # workaround for `unexpected Nix daemon error: error: serialised integer 7022364302122705765 is too large for type 'j'` - url = "github:NixOS/nixpkgs/pull/413627/head"; + # url = "github:NixOS/nixpkgs/pull/413627/head"; }; sops-nix = { url = "github:mic92/sops-nix"; From e0b3f41692bc2fd2ebee5965383edba1aacbbe91 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 29 Jun 2025 17:38:46 +0300 Subject: [PATCH 109/138] modules/shared/nixos/nix/common.nix: use upstream lix Signed-off-by: unexplrd --- modules/shared/nixos/nix/common.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/shared/nixos/nix/common.nix b/modules/shared/nixos/nix/common.nix index 08497ce..ee6fb3b 100644 --- a/modules/shared/nixos/nix/common.nix +++ b/modules/shared/nixos/nix/common.nix @@ -1,12 +1,12 @@ { - # pkgs, - inputs, + pkgs, + # inputs, lib, ... }: { - imports = with inputs; [lix.nixosModules.default]; + # imports = with inputs; [lix.nixosModules.default]; nix = { - # package = pkgs.lixPackageSets.latest.lix; + package = pkgs.lixPackageSets.latest.lix; channel.enable = false; daemonCPUSchedPolicy = "idle"; optimise = { From b26caa656ec45bc31ea262b85b22e32a7dc06be2 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 4 Jul 2025 14:59:12 +0300 Subject: [PATCH 110/138] modules/home/desktop/niri/programs/waybar/default.nix Signed-off-by: unexplrd --- modules/home/desktop/niri/programs/waybar/default.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index fd2ec97..96b4fb9 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -271,7 +271,7 @@ #custom-notification, #idle_inhibitor, #wireplumber { - padding: 0 14px 0 10px; + padding: 0 15px 0 10px; } #custom-launcher, @@ -289,11 +289,7 @@ padding: 0 5px; } - #taskbar button { - padding: 0 3px; - margin: 3px; - } - + #taskbar button, #tray button { padding: 0 3px; margin: 3px; From 73d1f162ebf9b843809136773e30936d99f94af8 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Mon, 7 Jul 2025 11:55:57 +0300 Subject: [PATCH 111/138] change colorscheme Signed-off-by: unexplrd --- hosts/eldrid/configuration.nix | 2 +- hosts/legion/configuration.nix | 2 +- hosts/morphius/configuration.nix | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts/eldrid/configuration.nix b/hosts/eldrid/configuration.nix index 0331b45..0ddffbb 100644 --- a/hosts/eldrid/configuration.nix +++ b/hosts/eldrid/configuration.nix @@ -40,7 +40,7 @@ }; stylix = { enable = true; - theme = "vesper"; + theme = "sandcastle"; }; locale = "uk_UA.UTF-8"; misc = { diff --git a/hosts/legion/configuration.nix b/hosts/legion/configuration.nix index fb06add..6e26afb 100644 --- a/hosts/legion/configuration.nix +++ b/hosts/legion/configuration.nix @@ -33,7 +33,7 @@ }; stylix = { enable = true; - theme = "gruvbox-dark-pale"; + theme = "sandcastle"; }; locale = "uk_UA.UTF-8"; virt.libvirt.enable = true; diff --git a/hosts/morphius/configuration.nix b/hosts/morphius/configuration.nix index 8c2f727..df74812 100644 --- a/hosts/morphius/configuration.nix +++ b/hosts/morphius/configuration.nix @@ -40,7 +40,7 @@ }; stylix = { enable = true; - theme = "vesper"; + theme = "sandcastle"; }; locale = "uk_UA.UTF-8"; }; From dffe282a7fdef131f3b7fda4c30d6d6a2c78f04c Mon Sep 17 00:00:00 2001 From: unexplrd Date: Mon, 7 Jul 2025 11:55:57 +0300 Subject: [PATCH 112/138] flake.lock: bump flake.nix: add ghostty modules/home/programs/terminal/ghostty.nix: switch to ghostty flake Signed-off-by: unexplrd --- flake.lock | 254 ++++++++++----------- flake.nix | 14 +- modules/home/programs/terminal/ghostty.nix | 2 + 3 files changed, 126 insertions(+), 144 deletions(-) diff --git a/flake.lock b/flake.lock index 18a997a..555eada 100644 --- a/flake.lock +++ b/flake.lock @@ -136,11 +136,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1750195929, - "narHash": "sha256-5gaf/9wuxtfKqAFnNlX74Vz2VMURa/UzyfuEyYv4tZw=", + "lastModified": 1751777244, + "narHash": "sha256-/czsZlnHv8Sl/u2syCzucxfVFLBHXWxvgicYmlk5YEE=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "419a1cfaf34100008ff5fa97ce9ef3b194472f71", + "rev": "a0d66535286f557ccfb7c7c4c4ddc95cce96fc8b", "type": "github" }, "original": { @@ -205,11 +205,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -235,6 +235,22 @@ } }, "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { "flake": false, "locked": { "lastModified": 1746162366, @@ -250,21 +266,6 @@ "type": "github" } }, - "flake-compat_4": { - "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -339,21 +340,6 @@ "type": "github" } }, - "flakey-profile": { - "locked": { - "lastModified": 1712898590, - "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", - "owner": "lf-", - "repo": "flakey-profile", - "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", - "type": "github" - }, - "original": { - "owner": "lf-", - "repo": "flakey-profile", - "type": "github" - } - }, "fromYaml": { "flake": false, "locked": { @@ -370,29 +356,27 @@ "type": "github" } }, - "git-hooks": { + "ghostty": { "inputs": { - "flake-compat": [ - "stylix", - "flake-compat" - ], - "gitignore": "gitignore_3", + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", "nixpkgs": [ - "stylix", "nixpkgs" - ] + ], + "zig": "zig", + "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1747372754, - "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46", + "lastModified": 1751869689, + "narHash": "sha256-WRATlWALRFNnhqABLRtLHlL7a838oJhMRMbaTgjvXYk=", + "owner": "ghostty-org", + "repo": "ghostty", + "rev": "292d89dbe2ad246016411cc0f35dd0e3fffa44ca", "type": "github" }, "original": { - "owner": "cachix", - "repo": "git-hooks.nix", + "owner": "ghostty-org", + "repo": "ghostty", "type": "github" } }, @@ -440,28 +424,6 @@ "type": "github" } }, - "gitignore_3": { - "inputs": { - "nixpkgs": [ - "stylix", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "gnome-shell": { "flake": false, "locked": { @@ -486,11 +448,11 @@ ] }, "locked": { - "lastModified": 1751589297, - "narHash": "sha256-3q35cq6BPuwIRL3IoVKYPc72r3OleeuRyf4YAPjEqzA=", + "lastModified": 1751824240, + "narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=", "owner": "nix-community", "repo": "home-manager", - "rev": "83f978812c37511ef2ffaf75ffa72160483f738a", + "rev": "fd9e55f5fac45a26f6169310afca64d56b681935", "type": "github" }, "original": { @@ -577,11 +539,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1751582011, - "narHash": "sha256-dZgXFCU9gzw3MOSzlf/O0jdptESNkz9S71sDlEKaeMk=", + "lastModified": 1751714318, + "narHash": "sha256-nkoRnDkRGaCT0JTuHcDXPCMkdmhUFEtI1TMUiQcrxfs=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "3c9447ca53f76abd1372bca5749c9ef701fb76c0", + "rev": "6a5f4f5954a64bac718e3938f062d045256e7aeb", "type": "github" }, "original": { @@ -823,7 +785,7 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "flake-parts": "flake-parts", "nixpkgs": [ "nixpkgs" @@ -846,41 +808,6 @@ "type": "github" } }, - "lix": { - "inputs": { - "flake-utils": "flake-utils", - "flakey-profile": "flakey-profile", - "lix": "lix_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1750776670, - "narHash": "sha256-EfA5K5EZAnspmraJrXQlziffVpaT+QDBiE6yKmuaNNQ=", - "rev": "c3c78a32273e89d28367d8605a4c880f0b6607e3", - "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/c3c78a32273e89d28367d8605a4c880f0b6607e3.tar.gz?rev=c3c78a32273e89d28367d8605a4c880f0b6607e3" - }, - "original": { - "type": "tarball", - "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz" - } - }, - "lix_2": { - "flake": false, - "locked": { - "lastModified": 1750762203, - "narHash": "sha256-LmQhjQ7c+AOkwhvR9GFgJOy8oHW35MoQRELtrwyVnPw=", - "rev": "38b358ce27203f972faa2973cf44ba80c758f46e", - "type": "tarball", - "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/38b358ce27203f972faa2973cf44ba80c758f46e.tar.gz?rev=38b358ce27203f972faa2973cf44ba80c758f46e" - }, - "original": { - "type": "tarball", - "url": "https://git.lix.systems/lix-project/lix/archive/release-2.93.tar.gz" - } - }, "mysecrets": { "flake": false, "locked": { @@ -942,11 +869,11 @@ ] }, "locked": { - "lastModified": 1751170039, - "narHash": "sha256-3EKpUmyGmHYA/RuhZjINTZPU+OFWko0eDwazUOW64nw=", + "lastModified": 1751774635, + "narHash": "sha256-DuOznGdgMxeSlPpUu6Wkq0ZD5e2Cfv9XRZeZlHWMd1s=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "9c932ae632d6b5150515e5749b198c175d8565db", + "rev": "85686025ba6d18df31cc651a91d5adef63378978", "type": "github" }, "original": { @@ -957,7 +884,7 @@ }, "nixos-cosmic": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "nixpkgs": [ "nixpkgs" ], @@ -997,16 +924,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751630398, - "narHash": "sha256-A75SJvGnlIqEgl1Hh0v7HJgSffEaInAHl338PSDgJso=", + "lastModified": 1751792365, + "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "55dc7f458587ec5714dafc71de09b55a88789130", + "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", "type": "github" }, "original": { "owner": "NixOS", - "ref": "master", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -1071,7 +998,7 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "gitignore": "gitignore", "nixpkgs": [ "hyprland", @@ -1124,11 +1051,11 @@ "blueprint": "blueprint", "chaotic": "chaotic", "disko": "disko", + "ghostty": "ghostty", "home-manager": "home-manager", "hyprland": "hyprland", "hyprsunset": "hyprsunset", "lanzaboote": "lanzaboote", - "lix": "lix", "mysecrets": "mysecrets", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", @@ -1150,11 +1077,11 @@ ] }, "locked": { - "lastModified": 1751510438, - "narHash": "sha256-m8PjOoyyCR4nhqtHEBP1tB/jF+gJYYguSZmUmVTEAQE=", + "lastModified": 1751683029, + "narHash": "sha256-dYO5X5jK8bpQOeRAo8R5aUt6M/+Ji1cZgstZI7SQ2IA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7f415261f298656f8164bd636c0dc05af4e95b6b", + "rev": "9e5e62a33a929a67a5427fb7324a6f583dced0b2", "type": "github" }, "original": { @@ -1232,13 +1159,8 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-compat": "flake-compat_4", "flake-parts": "flake-parts_2", - "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", - "home-manager": [ - "home-manager" - ], "nixpkgs": [ "nixpkgs" ], @@ -1253,11 +1175,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1751602277, - "narHash": "sha256-mlJeMDyj+B9QYNw/f9YdlBzvq6mcQ3dx5qjfepzV70I=", + "lastModified": 1751840923, + "narHash": "sha256-4HZxn+PrWytrWVg5c5SEetv3m9/k7rngJq27zKuRIfo=", "owner": "danth", "repo": "stylix", - "rev": "3c73dee2dbdf242a16a6e929f3e574dd0694d85a", + "rev": "5259682ce58d935f248297bf1c9793a5cee0787e", "type": "github" }, "original": { @@ -1409,11 +1331,11 @@ ] }, "locked": { - "lastModified": 1751553554, - "narHash": "sha256-OR68SOZ38NrAzHj7/PNLg/++yHYL7cVhBXi3+ZqvQ80=", + "lastModified": 1751822129, + "narHash": "sha256-aI8JTRZHynKKJQpNP5TJuHsFQpKfDVJbW/u99lTpGyg=", "owner": "abenz1267", "repo": "walker", - "rev": "9d5d964273a128c83ae74e9e3f6229ffac71db53", + "rev": "2f16a48d6fa4f0f16c7b2173a1ff434005c8ed32", "type": "github" }, "original": { @@ -1462,6 +1384,60 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } + }, + "zig": { + "inputs": { + "flake-compat": [ + "ghostty" + ], + "flake-utils": [ + "ghostty", + "flake-utils" + ], + "nixpkgs": [ + "ghostty", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748261582, + "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=", + "owner": "mitchellh", + "repo": "zig-overlay", + "rev": "aafb1b093fb838f7a02613b719e85ec912914221", + "type": "github" + }, + "original": { + "owner": "mitchellh", + "repo": "zig-overlay", + "type": "github" + } + }, + "zon2nix": { + "inputs": { + "flake-utils": [ + "ghostty", + "flake-utils" + ], + "nixpkgs": [ + "ghostty", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1742104771, + "narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=", + "owner": "jcollie", + "repo": "zon2nix", + "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "type": "github" + }, + "original": { + "owner": "jcollie", + "repo": "zon2nix", + "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 2be1274..74bf653 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,10 @@ description = "unexplrd's personal configuration"; inputs = { - lix = { - url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + # lix = { + # url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.1.tar.gz"; + # inputs.nixpkgs.follows = "nixpkgs"; + # }; # neve = { # inputs.nixvim.follows = "nixvim"; # url = "git+https://gitea.linerds.us/unexplrd/Neve"; @@ -28,6 +28,10 @@ url = "github:nix-community/disko/latest"; inputs.nixpkgs.follows = "nixpkgs"; }; + ghostty = { + url = "github:ghostty-org/ghostty"; + inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; @@ -72,7 +76,7 @@ nixos-facter-modules.url = "github:numtide/nixos-facter-modules"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs = { - url = "github:NixOS/nixpkgs/master"; + url = "github:NixOS/nixpkgs/nixos-unstable"; # workaround for `unexpected Nix daemon error: error: serialised integer 7022364302122705765 is too large for type 'j'` # url = "github:NixOS/nixpkgs/pull/413627/head"; }; diff --git a/modules/home/programs/terminal/ghostty.nix b/modules/home/programs/terminal/ghostty.nix index 0f69e74..cb12821 100644 --- a/modules/home/programs/terminal/ghostty.nix +++ b/modules/home/programs/terminal/ghostty.nix @@ -1,6 +1,7 @@ { config, lib, + perSystem, ... }: with lib; let @@ -12,6 +13,7 @@ in { config = mkIf cfg.enable { programs.ghostty = { enable = true; + package = perSystem.ghostty.ghostty; settings = { gtk-single-instance = true; window-decoration = "client"; From 71f50cbdcc6655d616bf36d8afac18318fa737d2 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 10 Jul 2025 13:20:36 +0300 Subject: [PATCH 113/138] niri/swaync: still hate it Signed-off-by: unexplrd --- .../desktop/niri/services/swaync/default.nix | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/modules/home/desktop/niri/services/swaync/default.nix b/modules/home/desktop/niri/services/swaync/default.nix index fc2b35c..dc3d8fa 100644 --- a/modules/home/desktop/niri/services/swaync/default.nix +++ b/modules/home/desktop/niri/services/swaync/default.nix @@ -21,7 +21,7 @@ positionY = "top"; notification-2fa-action = true; notification-inline-replies = false; - notification-icon-size = 32; + notification-icon-size = 24; notification-body-image-height = 100; notification-body-image-width = 200; notification-window-width = 400; @@ -59,8 +59,12 @@ }; }; }; + # TODO: disable stylix, redo everything style = '' - /*** Global ***/ + * { + all: unset; + } + progress, progressbar, trough { @@ -73,17 +77,15 @@ } .notification-action { - border-radius: 12px; - margin: 0.5rem; + border-radius: 6px; + margin: 3px; } .close-button { - margin: 24px; - padding: 0.2rem; - border-radius: 16px; + margin: 12px; + border-radius: 3px; } - /*** Notifications ***/ .notification-group.collapsed .notification-row:not(:last-child) .notification-action, @@ -103,21 +105,21 @@ .notification.normal, .notification.critical, .control-center { - margin: 16px; - border-radius: 7px; + border-radius: 9px; + margin: 6px; } .floating-notifications, .notification-content { - border-radius: 7px; + margin: 3px; + border-radius: 6px; + border: none; } .control-center-list { background: transparent; } - /*** Widgets ***/ - /* Title widget */ .widget-title { margin: 0.5rem; } @@ -127,11 +129,10 @@ } .widget-title > button { - border-radius: 16px; + border-radius: 6px; padding: 0.5rem; } - /* DND Widget */ .widget-dnd { margin: 0.5rem; } @@ -141,23 +142,23 @@ } .widget-dnd > switch { - border-radius: 16px; + border-radius: 6px; } .widget-dnd > switch slider { - border-radius: 16px; - padding: 0.25rem; + margin: 3px; + border-radius: 3px; + padding: 6px; } - /* Mpris widget */ .widget-mpris .widget-mpris-player { - border-radius: 16px; - margin: 0.5rem; + border-radius: 9px; + margin: 3px; padding: 0.5rem; } .widget-mpris .widget-mpris-player .widget-mpris-album-art { - border-radius: 16px; + border-radius: 6px; } .widget-mpris .widget-mpris-player .widget-mpris-title { @@ -169,9 +170,8 @@ } .widget-mpris .widget-mpris-player > box > button { - border: 1px solid transparent; - border-radius: 16px; - padding: 0.25rem; + border-radius: 3px; + padding: 3px; } ''; } From 7571f743d199fb6ae0bc2056de324453d8d334e8 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 21 Jun 2025 16:28:16 +0300 Subject: [PATCH 114/138] use hostId for luks disks Signed-off-by: unexplrd --- hosts/dunamis/disko/default.nix | 9 +++++++-- hosts/dunamis/disko/disk-main.nix | 7 +++++-- hosts/eldrid/disko/default.nix | 9 +++++++-- hosts/eldrid/disko/disk-main.nix | 7 +++++-- hosts/legion/disko/default.nix | 11 ++++++++--- hosts/legion/disko/disk-main.nix | 7 +++++-- hosts/legion/disko/disk-second.nix | 7 +++++-- hosts/morphius/disko/default.nix | 9 +++++++-- hosts/morphius/disko/disk-main.nix | 8 ++++++-- hosts/sarien/disko/default.nix | 9 +++++++-- 10 files changed, 62 insertions(+), 21 deletions(-) diff --git a/hosts/dunamis/disko/default.nix b/hosts/dunamis/disko/default.nix index 881ae36..900a745 100644 --- a/hosts/dunamis/disko/default.nix +++ b/hosts/dunamis/disko/default.nix @@ -1,4 +1,9 @@ -{inputs, ...}: let +{ + config, + inputs, + ... +}: let + inherit (config.networking) hostId; disk = "/dev/disk/by-id/nvme-eui.000000000000000100a075244b5d6185"; in { imports = with inputs; [ @@ -10,5 +15,5 @@ in { mountOptions = ["rw" "nosuid" "nodev"]; }; }; - disko.devices.disk.main = import ./disk-main.nix {inherit disk;}; + disko.devices.disk.main = import ./disk-main.nix {inherit disk hostId;}; } diff --git a/hosts/dunamis/disko/disk-main.nix b/hosts/dunamis/disko/disk-main.nix index c076947..87c6555 100644 --- a/hosts/dunamis/disko/disk-main.nix +++ b/hosts/dunamis/disko/disk-main.nix @@ -1,4 +1,7 @@ -{disk, ...}: { +{ + disk, + hostId, +}: { type = "disk"; device = disk; content = { @@ -25,7 +28,7 @@ size = "100%"; content = { type = "luks"; - name = "luks-main"; + name = "luks-" + hostId; initrdUnlock = true; settings.allowDiscards = true; content = let diff --git a/hosts/eldrid/disko/default.nix b/hosts/eldrid/disko/default.nix index 3df18e9..87acebc 100644 --- a/hosts/eldrid/disko/default.nix +++ b/hosts/eldrid/disko/default.nix @@ -1,4 +1,9 @@ -{inputs, ...}: let +{ + config, + inputs, + ... +}: let + inherit (config.networking) hostId; disk = "/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b444a44022ad0"; in { imports = with inputs; [ @@ -10,5 +15,5 @@ in { mountOptions = ["rw" "nosuid" "nodev"]; }; }; - disko.devices.disk.main = import ./disk-main.nix {inherit disk;}; + disko.devices.disk.main = import ./disk-main.nix {inherit config disk hostId;}; } diff --git a/hosts/eldrid/disko/disk-main.nix b/hosts/eldrid/disko/disk-main.nix index b4a41b1..8992a18 100644 --- a/hosts/eldrid/disko/disk-main.nix +++ b/hosts/eldrid/disko/disk-main.nix @@ -1,4 +1,7 @@ -{disk, ...}: { +{ + disk, + hostId, +}: { type = "disk"; device = disk; content = { @@ -25,7 +28,7 @@ size = "100%"; content = { type = "luks"; - name = "luks-main"; + name = "luks-" + hostId; initrdUnlock = true; settings.allowDiscards = true; content = { diff --git a/hosts/legion/disko/default.nix b/hosts/legion/disko/default.nix index bf6d826..e78cf26 100644 --- a/hosts/legion/disko/default.nix +++ b/hosts/legion/disko/default.nix @@ -1,4 +1,9 @@ -{inputs, ...}: let +{ + config, + inputs, + ... +}: let + inherit (config.networking) hostId; disk-main = "/dev/disk/by-id/nvme-INTEL_SSDPEKKF256G8L_BTHH81460QC2256B"; disk-second = "/dev/disk/by-id/nvme-WDC_PC_SN730_SDBPNTY-1T00-1101_21114D802446"; in { @@ -11,6 +16,6 @@ in { mountOptions = ["rw" "nosuid" "nodev"]; }; }; - disko.devices.disk.main = import ./disk-main.nix {inherit disk-main;}; - disko.devices.disk.second = import ./disk-second.nix {inherit disk-second;}; + disko.devices.disk.main = import ./disk-main.nix {inherit disk-main hostId;}; + disko.devices.disk.second = import ./disk-second.nix {inherit disk-second hostId;}; } diff --git a/hosts/legion/disko/disk-main.nix b/hosts/legion/disko/disk-main.nix index 5736835..5ccd053 100644 --- a/hosts/legion/disko/disk-main.nix +++ b/hosts/legion/disko/disk-main.nix @@ -1,4 +1,7 @@ -{disk-main}: { +{ + disk-main, + hostId, +}: { type = "disk"; device = disk-main; content = { @@ -25,7 +28,7 @@ size = "100%"; content = { type = "luks"; - name = "luks-main"; + name = "luks-" + hostId; initrdUnlock = true; settings.allowDiscards = true; content = { diff --git a/hosts/legion/disko/disk-second.nix b/hosts/legion/disko/disk-second.nix index 2922e3e..ca4460a 100644 --- a/hosts/legion/disko/disk-second.nix +++ b/hosts/legion/disko/disk-second.nix @@ -1,4 +1,7 @@ -{disk-second}: { +{ + disk-second, + hostId, +}: { type = "disk"; device = disk-second; content = { @@ -8,7 +11,7 @@ size = "100%"; content = { type = "luks"; - name = "luks-second"; + name = "luks-${hostId}-second"; initrdUnlock = true; settings.allowDiscards = true; content = { diff --git a/hosts/morphius/disko/default.nix b/hosts/morphius/disko/default.nix index aa8982a..48f438b 100644 --- a/hosts/morphius/disko/default.nix +++ b/hosts/morphius/disko/default.nix @@ -1,4 +1,9 @@ -{inputs, ...}: let +{ + config, + inputs, + ... +}: let + inherit (config.networking) hostId; disk = "/dev/nvme0n1"; in { imports = with inputs; [ @@ -10,5 +15,5 @@ in { mountOptions = ["rw" "nosuid" "nodev"]; }; }; - disko.devices.disk.main = import ./disk-main.nix {inherit disk;}; + disko.devices.disk.main = import ./disk-main.nix {inherit disk hostId;}; } diff --git a/hosts/morphius/disko/disk-main.nix b/hosts/morphius/disko/disk-main.nix index cd67be2..cf82ffe 100644 --- a/hosts/morphius/disko/disk-main.nix +++ b/hosts/morphius/disko/disk-main.nix @@ -1,4 +1,8 @@ -{disk, ...}: { +{ + disk, + hostId, + ... +}: { type = "disk"; device = disk; content = { @@ -25,7 +29,7 @@ size = "100%"; content = { type = "luks"; - name = "luks-main"; + name = "luks-" + hostId; initrdUnlock = true; settings.allowDiscards = true; content = { diff --git a/hosts/sarien/disko/default.nix b/hosts/sarien/disko/default.nix index 8468027..f1c5e54 100644 --- a/hosts/sarien/disko/default.nix +++ b/hosts/sarien/disko/default.nix @@ -1,4 +1,9 @@ -{inputs, ...}: let +{ + config, + inputs, + ... +}: let + inherit (config.networking) hostId; disk = "/dev/disk/by-id/nvme-eui.0025385911b36714"; in { imports = with inputs; [ @@ -11,5 +16,5 @@ in { }; }; # same partitioning setup - disko.devices.disk.main = import ../../dunamis/disko/disk-main.nix {inherit disk;}; + disko.devices.disk.main = import ../../dunamis/disko/disk-main.nix {inherit disk hostId;}; } From fc0b522997a9ca8f327a5a1b764e3c19d6325f7d Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 12 Jul 2025 15:13:43 +0300 Subject: [PATCH 115/138] hosts/eldrid/cb-audio-fix: update Signed-off-by: unexplrd --- hosts/eldrid/hardware/laptop/cb-audio-fix.nix | 78 ++++++++++++++----- 1 file changed, 59 insertions(+), 19 deletions(-) diff --git a/hosts/eldrid/hardware/laptop/cb-audio-fix.nix b/hosts/eldrid/hardware/laptop/cb-audio-fix.nix index 61a16a6..a42986d 100644 --- a/hosts/eldrid/hardware/laptop/cb-audio-fix.nix +++ b/hosts/eldrid/hardware/laptop/cb-audio-fix.nix @@ -1,20 +1,47 @@ {pkgs, ...}: let - cb-ucm-conf = pkgs.alsa-ucm-conf.overrideAttrs { - wttsrc = pkgs.fetchFromGitHub { - owner = "WeirdTreeThing"; - repo = "chromebook-ucm-conf"; - rev = "b6ce2a7"; - hash = "sha256-QRUKHd3RQmg1tnZU8KCW0AmDtfw/daOJ/H3XU5qWTCc="; + cb-ucm-conf = with pkgs; + alsa-ucm-conf.overrideAttrs { + wttsrc = fetchFromGitHub { + owner = "WeirdTreeThing"; + repo = "alsa-ucm-conf-cros"; + rev = "a4f0ed6cf59163fb571c33a81a6b40b6f53ed57d"; + hash = "sha256-H0BsRzHSEJ6XCZB/Rvb3w+uGCzr+kAvAwcHWqYEtp6w="; + }; + unpackPhase = '' + runHook preUnpack + tar xf "$src" + runHook postUnpack + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/alsa + cp -r alsa-ucm*/ucm2 $out/share/alsa + runHook postInstall + ''; }; - postInstall = '' - cp -R $wttsrc/common/* $out/share/alsa/ucm2/common - cp -R $wttsrc/codecs/* $out/share/alsa/ucm2/codecs - cp -R $wttsrc/platforms/* $out/share/alsa/ucm2/platforms - cp -R $wttsrc/sof-rt5682 $out/share/alsa/ucm2/conf.d - cp -R $wttsrc/sof-cs42l42 $out/share/alsa/ucm2/conf.d - ''; - }; in { + environment = { + systemPackages = [pkgs.sof-firmware]; + sessionVariables.ALSA_CONFIG_UCM2 = "${cb-ucm-conf}/share/alsa/ucm2"; + etc = { + "wireplumber/main.lua.d/51-increase-headroom.lua".text = '' + rule = { + matches = { + { + { "node.name", "matches", "alsa_output.*" }, + }, + }, + apply_properties = { + ["api.alsa.headroom"] = 4096, + }, + } + + table.insert(alsa_monitor.rules,rule) + ''; + }; + }; + system.replaceDependencies.replacements = [ { original = pkgs.alsa-ucm-conf; @@ -22,6 +49,10 @@ in { } ]; + boot.extraModprobeConfig = '' + options snd-intel-dspcfg dsp_driver=3 + ''; + services.pipewire.wireplumber.configPackages = [ (pkgs.writeTextDir "share/wireplumber/main.lua.d/51-increase-headroom.lua" '' rule = { @@ -37,10 +68,19 @@ in { table.insert(alsa_monitor.rules,rule) '') + (pkgs.writeTextDir "share/wireplumber/main.lua.d/51-avs-dmic.lua" '' + rule = { + matches = { + { + { "node.nick", "equals", "Internal Microphone" }, + }, + }, + apply_properties = { + ["audio.format"] = "S16LE", + }, + } + + table.insert(alsa_monitor.rules, rule) + '') ]; - boot = { - extraModprobeConfig = '' - options snd-intel-dspcfg dsp_driver=3 - ''; - }; } From f0b9257bec7e07acac7f457a9bacee73400cdc73 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 11 Jul 2025 19:50:40 +0300 Subject: [PATCH 116/138] modules/home/desktop/niri/services/swaync/default.nix Signed-off-by: unexplrd --- modules/home/desktop/niri/services/swaync/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/home/desktop/niri/services/swaync/default.nix b/modules/home/desktop/niri/services/swaync/default.nix index dc3d8fa..91e244d 100644 --- a/modules/home/desktop/niri/services/swaync/default.nix +++ b/modules/home/desktop/niri/services/swaync/default.nix @@ -21,7 +21,7 @@ positionY = "top"; notification-2fa-action = true; notification-inline-replies = false; - notification-icon-size = 24; + notification-icon-size = 48; notification-body-image-height = 100; notification-body-image-width = 200; notification-window-width = 400; @@ -148,12 +148,12 @@ .widget-dnd > switch slider { margin: 3px; border-radius: 3px; - padding: 6px; + padding: 0px; } .widget-mpris .widget-mpris-player { border-radius: 9px; - margin: 3px; + margin: 0.5rem; padding: 0.5rem; } From c4f9950e4c936047b07432e3c5b91d2b4ff2f219 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 13 Jul 2025 11:48:25 +0300 Subject: [PATCH 117/138] unused stuff Signed-off-by: unexplrd --- flake.nix | 2 +- hosts/eldrid/disko/default.nix | 2 +- modules/shared/user/programs.nix | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 74bf653..50f2616 100644 --- a/flake.nix +++ b/flake.nix @@ -87,7 +87,7 @@ stylix = { url = "github:danth/stylix"; inputs = { - home-manager.follows = "home-manager"; + # home-manager.follows = "home-manager"; nixpkgs.follows = "nixpkgs"; systems.follows = "systems"; }; diff --git a/hosts/eldrid/disko/default.nix b/hosts/eldrid/disko/default.nix index 87acebc..95e36e9 100644 --- a/hosts/eldrid/disko/default.nix +++ b/hosts/eldrid/disko/default.nix @@ -15,5 +15,5 @@ in { mountOptions = ["rw" "nosuid" "nodev"]; }; }; - disko.devices.disk.main = import ./disk-main.nix {inherit config disk hostId;}; + disko.devices.disk.main = import ./disk-main.nix {inherit disk hostId;}; } diff --git a/modules/shared/user/programs.nix b/modules/shared/user/programs.nix index 6cb3c7a..4075cb4 100644 --- a/modules/shared/user/programs.nix +++ b/modules/shared/user/programs.nix @@ -20,7 +20,7 @@ in { }; services = { - pueue.enable = true; # process queue in rust + # pueue.enable = true; # process queue in rust ssh-agent.enable = true; }; @@ -76,7 +76,7 @@ in { dua # disk space usage in rust duf # better df in go fend # calculator in rust - mprocs # process runner in rust + # mprocs # process runner in rust ouch # archive manager in rust # procs # ps in rust rbw # bitwarden cli in rust From 095201d5bb8c3543c67d6b8a427c66dc261a82b9 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sun, 13 Jul 2025 12:02:59 +0300 Subject: [PATCH 118/138] cleanup the mess Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 76 ++++++------- modules/home/desktop/niri/niri.nix | 11 +- .../desktop/niri/programs/fuzzel/default.nix | 4 +- .../desktop/niri/programs/waybar/default.nix | 15 ++- .../home/desktop/niri/services/default.nix | 10 +- modules/shared/user/programs.nix | 103 +++++++++--------- 6 files changed, 106 insertions(+), 113 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 63e1b55..c9bb819 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -1,21 +1,24 @@ { - perSystem, - osConfig, config, inputs, - pkgs, lib, + osConfig, + # perSystem, + pkgs, ... }: let - # inherit (lib.strings) removeSuffix; inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe; - inherit (config.lib.stylix) colors; - # inherit (osConfig.module.stylix) theme; inherit (osConfig.networking) hostName; + cfg = config.desktop.niri; + ifLaptop = mkIf (hostName != "dunamis"); - launcher = getExe pkgs.walker; - lockscreen = getExe pkgs.gtklock; + + commonArgs = { + inherit config inputs lib osConfig pkgs; + launcher = getExe pkgs.walker; + lockscreen = getExe pkgs.gtklock; + }; in { imports = with inputs; [ walker.homeManagerModules.default @@ -30,6 +33,24 @@ in { wpaperd.enable = true; qt.enable = false; }; + stylix.iconTheme = { + enable = true; + light = "Papirus-Light"; + dark = "Papirus-Dark"; + package = let + inherit (lib.strings) hasPrefix; + inherit (osConfig.module.stylix) theme; + color = + if (hasPrefix "rose-pine" theme) + then "indigo" + else if (hasPrefix "nord" theme) + then "nordic" + else if (hasPrefix "s" theme) + then "teal" + else null; + in + pkgs.papirus-icon-theme.override {inherit color;}; + }; dconf.settings = { "org/gnome/desktop/wm/preferences" = { button-layout = "icon:close"; @@ -42,40 +63,14 @@ in { else lib.mkDefault "prefer-light"; }; }; - gtk = { - enable = true; - iconTheme = let - name = - if (lib.strings.hasPrefix "gruvbox" osConfig.module.stylix.theme) - then "Gruvbox-Plus-Dark" - else if config.stylix.polarity == "dark" - then "Papirus-Dark" - else "Papirus-Light"; - package = let - inherit (osConfig.module.stylix) theme; - in - if (lib.strings.hasPrefix "gruvbox" theme) - then pkgs.gruvbox-plus-icons - else if (lib.strings.hasPrefix "rose-pine" theme) - then pkgs.papirus-icon-theme.override {color = "indigo";} - else if (lib.strings.hasPrefix "nord" theme) - then pkgs.papirus-icon-theme.override {color = "nordic";} - else if (lib.strings.hasPrefix "s" theme) - then pkgs.papirus-icon-theme.override {color = "teal";} - else pkgs.papirus-icon-theme; - in {inherit name package;}; - }; qt = { enable = true; platformTheme.name = "gtk3"; }; - programs = { - walker = import ./programs/walker {inherit config inputs pkgs;}; - waybar = import ./programs/waybar {inherit config colors getExe ifLaptop launcher pkgs;}; - }; - - services = import ./services {inherit pkgs lockscreen getExe perSystem osConfig;}; + programs.walker = import ./programs/walker commonArgs; + programs.waybar = import ./programs/waybar commonArgs; + services = import ./services commonArgs; home.packages = with pkgs; [ @@ -85,13 +80,9 @@ in { helvum # pipewire patchbay in rust junction # app chooser loupe # image viewer and editor in rust - mission-center # task manager in rust (partly) nautilus # file manager - overskride # bluetooth gui in rust papers # pdf reader in rust - pika-backup # borg gui in rust pwvucontrol # pipewire gui in rust - sonusmix # pipewire routing tool in rust wdisplays # wlroots display configurator ] ++ [ @@ -105,7 +96,7 @@ in { xdg = { configFile = { - niri = import ./niri.nix {inherit config hostName launcher lockscreen;}; + niri = import ./niri.nix commonArgs; "mimeapps.list".force = true; }; mime.enable = true; @@ -136,7 +127,6 @@ in { }; systemd.user = { settings.Manager.DefaultEnvironment = { - QT_QPA_PLATFORM = "wayland"; DISPLAY = ":123"; }; targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 65079ce..c009478 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -1,12 +1,14 @@ { config, - hostName, + osConfig, launcher, lockscreen, ... }: let inherit (config.lib.stylix) colors; inherit (config.stylix) cursor; + inherit (osConfig.networking) hostName; + keyboard = if hostName == "eldrid" then "chromeos" @@ -91,14 +93,13 @@ in { in '' environment { DISPLAY ":123" - QT_QPA_PLATFORMTHEME "gtk3" + CLUTTER_BACKEND "wayland" + GDK_BACKEND "wayland" MOZ_ENABLE_WAYLAND "1" MOZ_WEBRENDER "1" - GDK_BACKEND "wayland" QT_QPA_PLATFORM "wayland" - XDG_SESSION_TYPE "wayland" - CLUTTER_BACKEND "wayland" SDL_VIDEODRIVER "wayland" + XDG_SESSION_TYPE "wayland" } input { diff --git a/modules/home/desktop/niri/programs/fuzzel/default.nix b/modules/home/desktop/niri/programs/fuzzel/default.nix index 392d616..0758613 100644 --- a/modules/home/desktop/niri/programs/fuzzel/default.nix +++ b/modules/home/desktop/niri/programs/fuzzel/default.nix @@ -1,6 +1,6 @@ { config, - mkDefault, + lib, }: { enable = true; settings = { @@ -15,7 +15,7 @@ match-mode = "fuzzy"; icon-theme = config.dconf.settings."org/gnome/desktop/interface".icon-theme; }; - border = mkDefault { + border = lib.mkDefault { width = 3; radius = 12; }; diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 96b4fb9..5a02b96 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -1,12 +1,17 @@ { - colors, config, - getExe, - ifLaptop, - launcher, + lib, + osConfig, pkgs, + launcher, ... -}: { +}: let + inherit (lib) mkIf getExe; + inherit (config.lib.stylix) colors; + inherit (osConfig.networking) hostName; + + ifLaptop = mkIf (hostName != "dunamis"); +in { enable = true; systemd = { enable = true; diff --git a/modules/home/desktop/niri/services/default.nix b/modules/home/desktop/niri/services/default.nix index b5ffc3c..3ffa80c 100644 --- a/modules/home/desktop/niri/services/default.nix +++ b/modules/home/desktop/niri/services/default.nix @@ -1,9 +1,9 @@ { - getExe, - lockscreen, + # perSystem, + lib, osConfig, - perSystem, pkgs, + lockscreen, ... }: { blueman-applet.enable = osConfig.services.blueman.enable; @@ -14,7 +14,7 @@ wpaperd.enable = true; copyq = { enable = true; - package = perSystem.nixpkgs-stable.copyq; + # package = perSystem.nixpkgs-stable.copyq; }; gnome-keyring = { enable = true; @@ -56,7 +56,7 @@ } { timeout = 601; - on-timeout = getExe pkgs.niri + " msg action power-off-monitors"; + on-timeout = lib.getExe pkgs.niri + " msg action power-off-monitors"; } ]; }; diff --git a/modules/shared/user/programs.nix b/modules/shared/user/programs.nix index 4075cb4..cbfaf6a 100644 --- a/modules/shared/user/programs.nix +++ b/modules/shared/user/programs.nix @@ -1,10 +1,13 @@ { config, lib, + osConfig, pkgs, ... }: let inherit (lib) mkIf; + inherit (osConfig.virtualisation) libvirtd; + inherit (osConfig.hardware) bluetooth; in { console.yazi.enable = true; editor.helix.enable = true; @@ -24,42 +27,42 @@ in { ssh-agent.enable = true; }; - programs = { - bat.enable = true; # cat in rust - btop = { - enable = true; - settings.update_ms = 200; - }; - # direnv.enable = true; - # direnv.silent = true; - eza.enable = true; # ls in rust - fd.enable = true; # find in rust - fzf.enable = true; # fuzzy finder in rust - git = { - enable = true; - delta.enable = true; # diff in rust - signing.format = "ssh"; - aliases = { - cl = "clone"; - co = "checkout"; - pom = "push origin main"; + programs = + lib.attrsets.recursiveUpdate + { + bat.enable = true; # cat in rust + btop.enable = true; + # direnv.enable = true; + eza.enable = true; # ls in rust + fd.enable = true; # find in rust + fzf.enable = true; # fuzzy finder in rust + git.enable = true; + gitui.enable = true; # git ui in rust + jujutsu.enable = true; # vcs in rust + keychain.enable = true; + nix-index-database.comma.enable = true; + nix-index.enable = true; + nix-your-shell.enable = true; + pay-respects.enable = true; # thefuck in rust + ripgrep.enable = true; # grep in rust + zellij.enable = true; + zk.enable = true; + zoxide.enable = true; # fuzzy cd in rust + } + { + btop.settings.update_ms = 200; + # direnv.silent = true; + git = { + delta.enable = true; # diff in rust + signing.format = "ssh"; + aliases = { + cl = "clone"; + co = "checkout"; + pom = "push origin main"; + }; }; + keychain.keys = ["id_ed25519"]; }; - gitui.enable = true; # git ui in rust - jujutsu.enable = true; # vcs in rust - keychain = { - enable = true; - keys = ["id_ed25519"]; - }; - nix-index-database.comma.enable = true; - nix-index.enable = true; - nix-your-shell.enable = true; - pay-respects.enable = true; # thefuck in rust - ripgrep.enable = true; # grep in rust - zk.enable = true; - zoxide.enable = true; # fuzzy cd in rust - zellij.enable = true; - }; home.packages = with pkgs; [ @@ -89,7 +92,7 @@ in { adwaita-icon-theme # vial # qmk keyboard configuring app pinentry-qt # pinentry for rbw - virt-manager # libvirt gui + (mkIf libvirtd.enable virt-manager) # libvirt gui # waycheck # check wayland protocols gpu-screen-recorder-gtk ] @@ -99,28 +102,22 @@ in { # gnome-text-editor helvum # pipewire patchbay in rust junction # app chooser - # loupe # image viewer and editor in rust mission-center # task manager in rust (partly) - # nautilus # file manager - overskride # bluetooth gui in rust - papers # pdf reader in rust + (mkIf bluetooth.enable overskride) # bluetooth gui in rust pika-backup # borg gui in rust pwvucontrol # pipewire gui in rust sonusmix # pipewire routing tool in rust - # wdisplays # wlroots display configurator ]; - xdg.desktopEntries = { - uni = { - actions."Copy".exec = "fish -c \"~/.local/bin/uni --copy\""; - categories = ["Utility" "X-Launch" "Network"]; - comment = "Select and open or copy URLs from a list."; - exec = "fish -c \"~/.local/bin/uni\""; - icon = "web-browser"; - name = "Uni URL Handler"; - startupNotify = true; - terminal = false; - type = "Application"; - }; - }; + # xdg.desktopEntries.uni = { + # actions."Copy".exec = "fish -c \"~/.local/bin/uni --copy\""; + # categories = ["Utility" "X-Launch" "Network"]; + # comment = "Select and open or copy URLs from a list."; + # exec = "fish -c \"~/.local/bin/uni\""; + # icon = "web-browser"; + # name = "Uni URL Handler"; + # startupNotify = true; + # terminal = false; + # type = "Application"; + # }; } From 22a7f5ed6c05f52ab04067f72c9be5e1e39cbb16 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 11 Jul 2025 19:50:40 +0300 Subject: [PATCH 119/138] flake.lock: bump Signed-off-by: unexplrd --- flake.lock | 166 +++++++++++++++++++++-------------------------------- flake.nix | 1 + 2 files changed, 66 insertions(+), 101 deletions(-) diff --git a/flake.lock b/flake.lock index 555eada..e778421 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1751569683, - "narHash": "sha256-PoQcCYTiN52PanxgWBN4Tqet1x4PCk6KtjaHNjELH88=", + "lastModified": 1751740947, + "narHash": "sha256-35040CHH7P3JGmhGVfEb2oJHL/A5mI2IXumhkxrBnao=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "c0c56dde3e471030edb135425a82107cf0057c6f", + "rev": "dfc1db15a08c4cd234288f66e1199c653495301f", "type": "github" }, "original": { @@ -136,11 +136,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1751777244, - "narHash": "sha256-/czsZlnHv8Sl/u2syCzucxfVFLBHXWxvgicYmlk5YEE=", + "lastModified": 1752318841, + "narHash": "sha256-/Vfi3vmpBDaEDCdPYEOgUIUTyt2lOTRWVj3ESBRIChY=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "a0d66535286f557ccfb7c7c4c4ddc95cce96fc8b", + "rev": "b342f1adfa040963c9b00f4f1755def9f8588a58", "type": "github" }, "original": { @@ -295,11 +295,11 @@ ] }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1751413152, + "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", "type": "github" }, "original": { @@ -324,7 +324,9 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": [ + "systems" + ] }, "locked": { "lastModified": 1731533236, @@ -367,11 +369,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1751869689, - "narHash": "sha256-WRATlWALRFNnhqABLRtLHlL7a838oJhMRMbaTgjvXYk=", + "lastModified": 1752293658, + "narHash": "sha256-p4I9YxndfMpcHg9EVcy5+BACLp2GBjpVMbXuJ/glYnw=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "292d89dbe2ad246016411cc0f35dd0e3fffa44ca", + "rev": "e67a62453d8e75e82b581a340e70896f722a7f0f", "type": "github" }, "original": { @@ -448,11 +450,11 @@ ] }, "locked": { - "lastModified": 1751824240, - "narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=", + "lastModified": 1752286566, + "narHash": "sha256-A4nftqiNz2bNihz0bKY94Hq/6ydR6UQOcGioeL7iymY=", "owner": "nix-community", "repo": "home-manager", - "rev": "fd9e55f5fac45a26f6169310afca64d56b681935", + "rev": "392ddb642abec771d63688c49fa7bcbb9d2a5717", "type": "github" }, "original": { @@ -506,11 +508,11 @@ ] }, "locked": { - "lastModified": 1750621377, - "narHash": "sha256-8u6b5oAdX0rCuoR8wFenajBRmI+mzbpNig6hSCuWUzE=", + "lastModified": 1751808145, + "narHash": "sha256-OXgL0XaKMmfX2rRQkt9SkJw+QNfv0jExlySt1D6O72g=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "b3d628d01693fb9bb0a6690cd4e7b80abda04310", + "rev": "b841473a0bd4a1a74a0b64f1ec2ab199035c349f", "type": "github" }, "original": { @@ -539,11 +541,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1751714318, - "narHash": "sha256-nkoRnDkRGaCT0JTuHcDXPCMkdmhUFEtI1TMUiQcrxfs=", + "lastModified": 1752270468, + "narHash": "sha256-SEFxC9q+BMn1FkeaBRCDb0h7hZ2B+MSi8+u85y4rgQY=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "6a5f4f5954a64bac718e3938f062d045256e7aeb", + "rev": "6821723b4421bdf163f1a1cc6fd472516d44b1e7", "type": "github" }, "original": { @@ -722,11 +724,11 @@ ] }, "locked": { - "lastModified": 1751061882, - "narHash": "sha256-g9n8Vrbx+2JYM170P9BbvGHN39Wlkr4U+V2WLHQsXL8=", + "lastModified": 1751888065, + "narHash": "sha256-F2SV9WGqgtRsXIdUrl3sRe0wXlQD+kRRZcSfbepjPJY=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "4737241eaf8a1e51671a2a088518071f9a265cf4", + "rev": "a8229739cf36d159001cfc203871917b83fdf917", "type": "github" }, "original": { @@ -747,11 +749,11 @@ ] }, "locked": { - "lastModified": 1750371869, - "narHash": "sha256-lGk4gLjgZQ/rndUkzmPYcgbHr8gKU5u71vyrjnwfpB4=", + "lastModified": 1751881472, + "narHash": "sha256-meB0SnXbwIe2trD041MLKEv6R7NZ759QwBcVIhlSBfE=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "aa38edd6e3e277ae6a97ea83a69261a5c3aab9fd", + "rev": "8fb426b3e5452fd9169453fd6c10f8c14ca37120", "type": "github" }, "original": { @@ -769,11 +771,11 @@ ] }, "locked": { - "lastModified": 1751529406, - "narHash": "sha256-jwKDHyUycp678zDYa5Hyfq3msO73YMXdZPxp96dU7po=", + "lastModified": 1752218319, + "narHash": "sha256-fEvLVaVduwVotOib8NqO0e4N3dMsdA04Jlfm2sZQH5Q=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "b2e5ce654e4f5bf8905c2e07a96dcf4966e6277d", + "rev": "d5da490d8c2553fc8d589b49f9c036973b9656a1", "type": "github" }, "original": { @@ -869,11 +871,11 @@ ] }, "locked": { - "lastModified": 1751774635, - "narHash": "sha256-DuOznGdgMxeSlPpUu6Wkq0ZD5e2Cfv9XRZeZlHWMd1s=", + "lastModified": 1752305182, + "narHash": "sha256-6i4Q68G7wzNq1m2+l3lJUYgGZ9PwULvSVJpRSTTC46o=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "85686025ba6d18df31cc651a91d5adef63378978", + "rev": "ad29e2961dd0d58372384563bf00d510fc9f2e15", "type": "github" }, "original": { @@ -924,11 +926,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751792365, - "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", + "lastModified": 1751984180, + "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1fd8bada0b6117e6c7eb54aad5813023eed37ccb", + "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0", "type": "github" }, "original": { @@ -979,15 +981,14 @@ "nixpkgs": [ "stylix", "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" + ] }, "locked": { - "lastModified": 1748730660, - "narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=", + "lastModified": 1751906969, + "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", "owner": "nix-community", "repo": "NUR", - "rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb", + "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", "type": "github" }, "original": { @@ -1065,7 +1066,7 @@ "nixpkgs-stable": "nixpkgs-stable_2", "sops-nix": "sops-nix", "stylix": "stylix", - "systems": "systems_2", + "systems": "systems", "walker": "walker" } }, @@ -1077,11 +1078,11 @@ ] }, "locked": { - "lastModified": 1751683029, - "narHash": "sha256-dYO5X5jK8bpQOeRAo8R5aUt6M/+Ji1cZgstZI7SQ2IA=", + "lastModified": 1752201818, + "narHash": "sha256-d8KczaVT8WFEZdWg//tMAbv8EDyn2YTWcJvSY8gqKBU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "9e5e62a33a929a67a5427fb7324a6f583dced0b2", + "rev": "bd8f8329780b348fedcd37b53dbbee48c08c496d", "type": "github" }, "original": { @@ -1175,11 +1176,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1751840923, - "narHash": "sha256-4HZxn+PrWytrWVg5c5SEetv3m9/k7rngJq27zKuRIfo=", + "lastModified": 1752250117, + "narHash": "sha256-zCPV1a8w9hRn5ukOQwaAggA3X5cMmVsZVBYo8wLfLuU=", "owner": "danth", "repo": "stylix", - "rev": "5259682ce58d935f248297bf1c9793a5cee0787e", + "rev": "0da583a359fd911d5cbfd2c789424b888b777a4b", "type": "github" }, "original": { @@ -1203,21 +1204,6 @@ "type": "github" } }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -1254,11 +1240,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1748180480, - "narHash": "sha256-7n0XiZiEHl2zRhDwZd/g+p38xwEoWtT0/aESwTMXWG4=", + "lastModified": 1750770351, + "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", "owner": "tinted-theming", "repo": "schemes", - "rev": "87d652edd26f5c0c99deda5ae13dfb8ece2ffe31", + "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", "type": "github" }, "original": { @@ -1270,11 +1256,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1748740859, - "narHash": "sha256-OEM12bg7F4N5WjZOcV7FHJbqRI6jtCqL6u8FtPrlZz4=", + "lastModified": 1751159871, + "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "57d5f9683ff9a3b590643beeaf0364da819aedda", + "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", "type": "github" }, "original": { @@ -1286,11 +1272,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1725758778, - "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=", + "lastModified": 1751158968, + "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9", + "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", "type": "github" }, "original": { @@ -1299,28 +1285,6 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "stylix", - "nur", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1733222881, - "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "49717b5af6f80172275d47a418c9719a31a78b53", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } - }, "walker": { "inputs": { "nixpkgs": [ @@ -1331,11 +1295,11 @@ ] }, "locked": { - "lastModified": 1751822129, - "narHash": "sha256-aI8JTRZHynKKJQpNP5TJuHsFQpKfDVJbW/u99lTpGyg=", + "lastModified": 1752245988, + "narHash": "sha256-t0Sg3HWhDIIQISLGt2cYnD28RUI3SKKTVE9bFL9M5Ok=", "owner": "abenz1267", "repo": "walker", - "rev": "2f16a48d6fa4f0f16c7b2173a1ff434005c8ed32", + "rev": "33c1ee26f675902b4404f64288ad1facb9ecec22", "type": "github" }, "original": { @@ -1372,11 +1336,11 @@ ] }, "locked": { - "lastModified": 1750372504, - "narHash": "sha256-VBeZb1oqZM1cqCAZnFz/WyYhO8aF/ImagI7WWg/Z3Og=", + "lastModified": 1751300244, + "narHash": "sha256-PFuv1TZVYvQhha0ac53E3YgdtmLShrN0t4T6xqHl0jE=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "400308fc4f9d12e0a93e483c2e7a649e12af1a92", + "rev": "6115f3fdcb2c1a57b4a80a69f3c797e47607b90a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 50f2616..4adaa19 100644 --- a/flake.nix +++ b/flake.nix @@ -31,6 +31,7 @@ ghostty = { url = "github:ghostty-org/ghostty"; inputs.nixpkgs.follows = "nixpkgs"; + inputs.flake-utils.inputs.systems.follows = "systems"; }; home-manager = { url = "github:nix-community/home-manager"; From e4cdf4deffbf3de9eee59df5519a82d400610fc1 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 12 Jul 2025 21:22:03 +0300 Subject: [PATCH 120/138] stylix: geist fonts for sandcastle Signed-off-by: unexplrd --- modules/nixos/system/stylix/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/nixos/system/stylix/default.nix b/modules/nixos/system/stylix/default.nix index 51e03c4..c2bae49 100644 --- a/modules/nixos/system/stylix/default.nix +++ b/modules/nixos/system/stylix/default.nix @@ -125,13 +125,13 @@ wallpaper = wallpapers.abstract.waves; serif = { - package = iosevkaPackage; - name = "Iosevka Nerd Font"; + package = geistPackage; + name = "Geist"; }; monospace = { - package = iosevkaTermPackage; - name = "IosevkaTerm Nerd Font Mono"; + package = geistMonoPackage; + name = "GeistMono NFM"; }; cursor = { From c6f798da8641883b633e820b387c5b0595aed1f5 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Fri, 11 Jul 2025 19:50:40 +0300 Subject: [PATCH 121/138] modules/shared/user: apps Signed-off-by: unexplrd --- modules/shared/user/flatpak.nix | 3 ++- modules/shared/user/programs.nix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/shared/user/flatpak.nix b/modules/shared/user/flatpak.nix index 284051f..6921809 100644 --- a/modules/shared/user/flatpak.nix +++ b/modules/shared/user/flatpak.nix @@ -69,7 +69,7 @@ "com.obsproject.Studio" "com.usebottles.bottles" # wine containers "de.capypara.FieldMonitor" # libvirt - "de.haeckerfelix.Fragments" # torrents + "org.qbittorrent.qBittorrent" # torrents "io.github.amit9838.mousam" # weather "io.github.finefindus.Hieroglyphic" # find latex symbols (in rust) "io.github.lainsce.Khronos" # log time for tasks @@ -129,6 +129,7 @@ "org.gimp.GIMP" = {inherit (homeNoNetwork) Context;}; "org.kde.kdenlive" = {inherit (homeNoNetwork) Context;}; "org.signal.Signal".Environment.SIGNAL_PASSWORD_STORE = "gnome-libsecret"; + "org.qbittorrent.qBittorrent".Context.filesystems = ["host"]; # evil }; }; } diff --git a/modules/shared/user/programs.nix b/modules/shared/user/programs.nix index cbfaf6a..4c86a09 100644 --- a/modules/shared/user/programs.nix +++ b/modules/shared/user/programs.nix @@ -86,6 +86,7 @@ in { sd # sed in rust systemctl-tui # systemctl tui in rust trashy # trash cli in rust + up # ultimate plumber in go ] ++ [ # misc apps From 30c5fd5bd0f3634c361cbac7715b7e48b8295396 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 12 Jul 2025 15:29:28 +0300 Subject: [PATCH 122/138] try to fix styling Signed-off-by: unexplrd --- modules/home/desktop/niri/niri.nix | 10 +- .../desktop/niri/programs/walker/default.nix | 10 +- .../desktop/niri/programs/waybar/default.nix | 125 ++++++++---------- .../desktop/niri/services/swaync/default.nix | 23 ++-- modules/nixos/system/stylix/default.nix | 1 + 5 files changed, 79 insertions(+), 90 deletions(-) diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index c009478..0f1106a 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -160,20 +160,20 @@ in { } struts { - left 43 - right 43 + left 36 + right 36 } tab-indicator { active-color "#${colors.base04}" inactive-color "#${colors.base03}" - corner-radius 3 + corner-radius 6 gap 3 gaps-between-tabs 3 // length total-proportion=0.3 place-within-column position "left" - width 3 + width 6 } focus-ring { width 1 @@ -191,7 +191,7 @@ in { } window-rule { - geometry-corner-radius 9 + geometry-corner-radius 12 clip-to-geometry true } window-rule { diff --git a/modules/home/desktop/niri/programs/walker/default.nix b/modules/home/desktop/niri/programs/walker/default.nix index f461750..08f772a 100644 --- a/modules/home/desktop/niri/programs/walker/default.nix +++ b/modules/home/desktop/niri/programs/walker/default.nix @@ -230,7 +230,7 @@ #window { background: @base00; color: @base05; - border-radius: 9px; + border-radius: 12px; border: 1px solid @base0D; } @@ -240,7 +240,7 @@ #search { background: @base01; - border-radius: 6px; + border-radius: 9px; padding: 8px; } @@ -249,7 +249,7 @@ #typeahead { background: none; box-shadow: none; - border-radius: 3px; + border-radius: 6px; } #input > *:first-child, @@ -268,7 +268,7 @@ #list { padding: 3px; - border-radius: 6px; + border-radius: 9px; background: @base01; } @@ -279,7 +279,7 @@ child:selected, child:hover { box-shadow: none; - border-radius: 3px; + border-radius: 6px; background: @base02; } diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 5a02b96..493159a 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -20,14 +20,13 @@ in { settings.bar-0 = { # layer = "top"; position = "bottom"; - height = 40; + height = 33; spacing = 0; # margin-left = 3; # margin-right = 3; - margin-left = 43 + 3; - margin-right = 43 + 3; + margin-left = 36 + 3; + margin-right = 36 + 3; margin-bottom = 3; - reload_style_on_change = true; modules-left = [ "custom/launcher" "clock" @@ -82,7 +81,7 @@ in { }; }; "tray" = { - icon-size = 20; + icon-size = 16; spacing = 6; }; "clock" = { @@ -164,7 +163,7 @@ in { }; "privacy" = { icon-spacing = 0; - icon-size = 18; + icon-size = 16; transition-duration = 250; screenshare = { type = "screenshare"; @@ -179,54 +178,43 @@ in { }; "wlr/taskbar" = { format = "{icon}"; - icon-size = 20; + icon-size = 18; icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; tooltip-format = "{title}"; on-click = "activate"; }; }; + # TODO: broken padding on taskbar button style = '' - @define-color base00 #${colors.base00}; - @define-color base01 #${colors.base01}; - @define-color base02 #${colors.base02}; - @define-color base03 #${colors.base03}; - @define-color base04 #${colors.base04}; - @define-color base05 #${colors.base05}; - @define-color base06 #${colors.base06}; - @define-color base07 #${colors.base07}; - @define-color base08 #${colors.base08}; - @define-color base09 #${colors.base09}; - @define-color base0A #${colors.base0A}; - @define-color base0B #${colors.base0B}; - @define-color base0C #${colors.base0C}; - @define-color base0D #${colors.base0D}; - @define-color base0E #${colors.base0E}; - @define-color base0F #${colors.base0F}; + @define-color base00 #${colors.base00}; @define-color base08 #${colors.base08}; + @define-color base01 #${colors.base01}; @define-color base09 #${colors.base09}; + @define-color base02 #${colors.base02}; @define-color base0A #${colors.base0A}; + @define-color base03 #${colors.base03}; @define-color base0B #${colors.base0B}; + @define-color base04 #${colors.base04}; @define-color base0C #${colors.base0C}; + @define-color base05 #${colors.base05}; @define-color base0D #${colors.base0D}; + @define-color base06 #${colors.base06}; @define-color base0E #${colors.base0E}; + @define-color base07 #${colors.base07}; @define-color base0F #${colors.base0F}; * { - font-family: ${config.stylix.fonts.sansSerif.name}, FontAwesome; + all: unset; + font-family: ${config.stylix.fonts.sansSerif.name}, Symbols Nerd Font, FontAwesome; font-weight: 500; - font-size: 18px; + font-size: 16px; + min-width: 1em; } - window#waybar { - background: @base00; - border-radius: 9px; - } - - .modules-left, - .modules-center, - .modules-right { + .modules-left, .modules-center, .modules-right, window#waybar { background-color: @base00; - border-radius: 9px; color: @base05; + border-radius: 12px; } tooltip { background: @base01; border: 1px solid @base0D; - border-radius: 12px; + border-radius: 16px; + padding: 2em; } tooltip label { @@ -235,7 +223,7 @@ in { button { box-shadow: inset 0 -3px transparent; - border-radius: 3px; + border-radius: 6px; } button:hover { @@ -258,10 +246,10 @@ in { #wireplumber, #workspaces button, #workspaces { - border-radius: 6px; + border-radius: 9px; background-color: @base01; margin: 3px 3px 3px 0; - padding: 0 6px; + padding: 0 0.42em; } /* #clock, */ @@ -273,15 +261,12 @@ in { #backlight, #battery, + #custom-launcher, #custom-notification, #idle_inhibitor, + #power-profiles-daemon, #wireplumber { - padding: 0 15px 0 10px; - } - - #custom-launcher, - #power-profiles-daemon { - padding: 0 17px 0 8px; + padding: 0 0.5em; } #privacy, @@ -290,39 +275,22 @@ in { padding: 0; } - #privacy-item { - padding: 0 5px; + #workspaces { + padding-left: 3px; } - #taskbar button, - #tray button { - padding: 0 3px; - margin: 3px; + #privacy-item { + padding: 0 0.3em; } #workspaces button { - border-radius: 3px; - padding: 0 5px; - margin: 3px; + border-radius: 6px; + min-width: 0.4em; } #battery.critical:not(.charging) { background-color: @base09; color: @base00; - animation-name: blink; - animation-duration: 0.5s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - } - - #mode { - background-color: rgba(0, 0, 0, 0.2); - box-shadow: inset 0 -3px @base05; - } - - #power-profiles-daemon.balanced { - color: @base05; } #power-profiles-daemon.performance { @@ -347,8 +315,27 @@ in { margin: 3px 0 3px 3px; } + #workspaces button.active, + #taskbar button.active { + background-color: @base02; + } + + #workspaces button:hover, + #workspaces button.active:hover, + #taskbar button.active:hover, #taskbar button:hover { background-color: @base0D; + color: @base00; + } + + #taskbar.empty { + background-color: transparent; + } + + #taskbar button, + #tray button { + min-width: 0.4em; + margin: 3px; } #tray > .needs-attention { @@ -360,10 +347,10 @@ in { -gtk-icon-effect: dim; } - #workspaces button.active { + /* #workspaces button.active { color: @base00; background-color: @base0D; - } + } */ label:focus { background-color: #000000; diff --git a/modules/home/desktop/niri/services/swaync/default.nix b/modules/home/desktop/niri/services/swaync/default.nix index 91e244d..dccdb67 100644 --- a/modules/home/desktop/niri/services/swaync/default.nix +++ b/modules/home/desktop/niri/services/swaync/default.nix @@ -74,16 +74,17 @@ .app-icon, .image { -gtk-icon-effect: none; + padding-right: 0.5rem; } .notification-action { - border-radius: 6px; + border-radius: 9px; margin: 3px; } .close-button { margin: 12px; - border-radius: 3px; + border-radius: 6px; } .notification-group.collapsed @@ -105,15 +106,15 @@ .notification.normal, .notification.critical, .control-center { - border-radius: 9px; + border-radius: 12px; margin: 6px; } .floating-notifications, .notification-content { + padding: 0.5rem; margin: 3px; - border-radius: 6px; - border: none; + border-radius: 9px; } .control-center-list { @@ -129,7 +130,7 @@ } .widget-title > button { - border-radius: 6px; + border-radius: 9px; padding: 0.5rem; } @@ -142,23 +143,23 @@ } .widget-dnd > switch { - border-radius: 6px; + border-radius: 9px; } .widget-dnd > switch slider { margin: 3px; - border-radius: 3px; + border-radius: 6px; padding: 0px; } .widget-mpris .widget-mpris-player { - border-radius: 9px; + border-radius: 12px; margin: 0.5rem; padding: 0.5rem; } .widget-mpris .widget-mpris-player .widget-mpris-album-art { - border-radius: 6px; + border-radius: 9px; } .widget-mpris .widget-mpris-player .widget-mpris-title { @@ -170,7 +171,7 @@ } .widget-mpris .widget-mpris-player > box > button { - border-radius: 3px; + border-radius: 6px; padding: 3px; } ''; diff --git a/modules/nixos/system/stylix/default.nix b/modules/nixos/system/stylix/default.nix index c2bae49..8a451e4 100644 --- a/modules/nixos/system/stylix/default.nix +++ b/modules/nixos/system/stylix/default.nix @@ -351,6 +351,7 @@ in { }; config = mkIf cfg.enable { + fonts.packages = [pkgs.nerd-fonts.symbols-only]; stylix = { enable = true; From ec6211cc54de4d58c605c7147ad1fc99d337ad99 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 19 Jul 2025 13:19:54 +0300 Subject: [PATCH 123/138] niri: redo a lot Signed-off-by: unexplrd --- modules/home/desktop/niri/default.nix | 70 +-- .../desktop/niri/programs/waybar/default.nix | 548 ++++++++++++------ .../home/desktop/niri/services/default.nix | 65 +-- .../desktop/niri/services/swaync/default.nix | 4 +- 4 files changed, 424 insertions(+), 263 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index c9bb819..c950c11 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -7,7 +7,7 @@ pkgs, ... }: let - inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe; + inherit (lib) mkIf mkEnableOption mkForce getExe; inherit (osConfig.networking) hostName; cfg = config.desktop.niri; @@ -131,7 +131,7 @@ in { }; targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie services = let - mkGraphicalService = config: graphicalService // config; + mkGraphicalService = config: lib.attrsets.recursiveUpdate graphicalService config; graphicalService = { Install.WantedBy = ["niri.service"]; Unit = { @@ -148,33 +148,25 @@ in { in lib.mkMerge [ { - udiskie = mkGraphicalService {}; - waybar = mkGraphicalService {}; + copyq = mkGraphicalService {Service.Environment = mkForce "QT_QPA_PLATFORM=wayland";}; network-manager-applet = mkGraphicalService {}; - copyq = mkGraphicalService { - Service = - graphicalService.Service - // { - Environment = mkForce "QT_QPA_PLATFORM=wayland"; - }; - }; - xwayland-satellite = mkGraphicalService { - Service = - graphicalService.Service - // { - Type = "simple"; - ExecStart = getExe pkgs.xwayland-satellite + " :123"; - }; - }; - wpaperd = mkGraphicalService { - Service = - mkDefault graphicalService.Service; - }; + udiskie = mkGraphicalService {}; walker = mkGraphicalService {}; + waybar = mkGraphicalService {}; + wpaperd = + mkGraphicalService {} + // { + Service.TimeoutStopSec = mkForce "1"; + Service.Restart = mkForce "always"; + }; + xwayland-satellite = mkGraphicalService { + Service = { + Type = "simple"; + ExecStart = getExe pkgs.xwayland-satellite + " :123"; + }; + }; # gnome-polkit-agent = mkGraphicalService { - # Service = - # graphicalService.Service - # // { + # Service = { # Type = "simple"; # ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1"; # }; @@ -182,20 +174,18 @@ in { } (lib.mkIf (hostName == "morphius") { lisgd = mkGraphicalService { - Service = - graphicalService.Service - // { - # Group = "input"; - Type = "simple"; - ExecStart = - "${pkgs.lisgd}/bin/lisgd" - + " -d /dev/input/by-path/pci-0000:00:15.1-platform-i2c_designware.1-event" - + " -g \"1,DU,TL,*,P,niri msg action toggle-overview\"" - + " -g \"3,UD,T,*,P,niri msg action focus-workspace-up\"" - + " -g \"3,DU,B,*,P,niri msg action focus-workspace-down\"" - + " -g \"3,LR,L,*,P,niri msg action focus-column-left\"" - + " -g \"3,RL,R,*,P,niri msg action focus-column-right\""; - }; + Service = { + # Group = "input"; + Type = "simple"; + ExecStart = + "${pkgs.lisgd}/bin/lisgd" + + " -d /dev/input/by-path/pci-0000:00:15.1-platform-i2c_designware.1-event" + + " -g \"1,DU,TL,*,P,niri msg action toggle-overview\"" + + " -g \"3,UD,T,*,P,niri msg action focus-workspace-up\"" + + " -g \"3,DU,B,*,P,niri msg action focus-workspace-down\"" + + " -g \"3,LR,L,*,P,niri msg action focus-column-left\"" + + " -g \"3,RL,R,*,P,niri msg action focus-column-right\""; + }; }; }) ]; diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 493159a..f3a51e6 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -6,44 +6,30 @@ launcher, ... }: let - inherit (lib) mkIf getExe; inherit (config.lib.stylix) colors; - inherit (osConfig.networking) hostName; - ifLaptop = mkIf (hostName != "dunamis"); + ifLaptop = lib.mkIf (osConfig.networking.hostName != "dunamis"); in { enable = true; systemd = { enable = true; target = "graphical-session.target"; }; - settings.bar-0 = { - # layer = "top"; + settings.bottom = { position = "bottom"; height = 33; spacing = 0; - # margin-left = 3; - # margin-right = 3; - margin-left = 36 + 3; - margin-right = 36 + 3; - margin-bottom = 3; + # margin-left = 36 + 3; + # margin-right = 36 + 3; + # margin-bottom = 3; modules-left = [ "custom/launcher" - "clock" "wlr/taskbar" - "privacy" - ]; - modules-center = [ - # "clock" - "niri/language" - "niri/workspaces" - "idle_inhibitor" + # "privacy" ]; modules-right = [ - "wireplumber" - (ifLaptop "group/laptop") - "tray" - "custom/notification" + "niri/workspaces" + "niri/language" ]; "niri/workspaces" = { format = "{index}"; @@ -61,7 +47,7 @@ in { "power-profiles-daemon" ]; }; - "backlight" = { + backlight = { format = "{percent}% {icon}"; format-icons = [ "󰃚" @@ -73,18 +59,18 @@ in { "󰃠" ]; }; - "idle_inhibitor" = { + idle_inhibitor = { format = "{icon}"; format-icons = { activated = "󰅶"; deactivated = "󰾪"; }; }; - "tray" = { + tray = { icon-size = 16; spacing = 6; }; - "clock" = { + clock = { interval = 1; format = "{:%R}"; tooltip = true; @@ -103,25 +89,29 @@ in { format-alt = "{icon} {time}"; format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; }; - mpris = { - format = "{player_icon} {dynamic}"; - format-paused = "{status_icon} {dynamic}"; - playing-len = 30; - playing-paused = 30; - player-icons = { - default = "▶"; - mpv = "🎵"; - }; - status-icons = {paused = "⏸";}; + memory = { + format = "{used:0.1f}G "; + tooltip-format = '' + RAM: {used:0.1f}G/{total:0.1f}G ({percentage}%) + Swap: {swapUsed:0.1f}G/{swapTotal:0.1f}G ({swapPercentage}%)''; }; - "upower" = { + network = { + format = "{bandwidthDownBits} 󰇚 | {bandwidthUpBits} 󰕒"; + interval = 3; + tooltip = false; + }; + cpu = { + format = "{usage}% 󰍛"; + interval = 3; + }; + upower = { icon-size = 16; format = "{percentage}"; hide-if-empty = true; tooltip = true; tooltip-spacing = 20; }; - "power-profiles-daemon" = { + power-profiles-daemon = { format = "{icon}"; tooltip-format = "Power profile: {profile}\nDriver: {driver}"; tooltip = true; @@ -132,12 +122,12 @@ in { power-saver = ""; }; }; - "wireplumber" = { + wireplumber = { scroll-step = 3; format = "{volume}% {icon}"; format-muted = "󰖁"; format-icons = ["󰕿" "󰖀" "󰕾"]; - on-click = getExe pkgs.pwvucontrol; + on-click = lib.getExe pkgs.pwvucontrol; on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; }; "custom/launcher" = { @@ -177,7 +167,172 @@ in { }; }; "wlr/taskbar" = { + format = "{icon} {name}"; + icon-size = 16; + icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; + tooltip-format = "{title}"; + on-click = "activate"; + }; + }; + settings.top = { + position = "top"; + height = 33; + spacing = 0; + # margin-left = 36 + 3; + # margin-right = 36 + 3; + # margin-top = 3; + modules-left = [ + "custom/notification" + "tray" + ]; + modules-center = ["clock"]; + modules-right = [ + "privacy" + "network" + "cpu" + "memory" + "wireplumber" + (ifLaptop "group/laptop") + # "tray" + "idle_inhibitor" + ]; + "niri/workspaces" = { + format = "{index}"; + }; + "niri/language" = { + format = "{}"; + format-en = "🇺🇸"; + format-uk = "🇺🇦"; + }; + "group/laptop" = { + orientation = "inherit"; + modules = [ + "backlight" + "battery" + "power-profiles-daemon" + ]; + }; + backlight = { + format = "{percent}% {icon}"; + format-icons = [ + "󰃚" + "󰃛" + "󰃜" + "󰃝" + "󰃞" + "󰃟" + "󰃠" + ]; + }; + idle_inhibitor = { format = "{icon}"; + format-icons = { + activated = "󰅶"; + deactivated = "󰾪"; + }; + }; + tray = { + icon-size = 16; + spacing = 6; + }; + clock = { + interval = 1; + format = "{:%R}"; + tooltip = true; + tooltip-format = "{:%B %d, %A}"; + }; + battery = { + states = { + good = 95; + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-full = "{capacity}% 󱟢"; + format-charging = "{capacity}% 󰂄"; + format-plugged = "{capacity}% 󰚥"; + format-alt = "{icon} {time}"; + format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + }; + memory = { + format = "{used:0.1f}G "; + tooltip-format = '' + RAM: {used:0.1f}G/{total:0.1f}G ({percentage}%) + Swap: {swapUsed:0.1f}G/{swapTotal:0.1f}G ({swapPercentage}%)''; + }; + network = { + format = "{bandwidthDownBits} 󰇚 | {bandwidthUpBits} 󰕒"; + interval = 3; + tooltip = false; + }; + cpu = { + format = "{usage}% 󰍛"; + interval = 3; + }; + upower = { + icon-size = 16; + format = "{percentage}"; + hide-if-empty = true; + tooltip = true; + tooltip-spacing = 20; + }; + power-profiles-daemon = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = "󱡮"; + performance = "󱡮"; + balanced = ""; + power-saver = ""; + }; + }; + wireplumber = { + scroll-step = 3; + format = "{volume}% {icon}"; + format-muted = "󰖁"; + format-icons = ["󰕿" "󰖀" "󰕾"]; + on-click = lib.getExe pkgs.pwvucontrol; + on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + }; + "custom/launcher" = { + format = ""; + on-click = launcher; + tooltip = false; + }; + "custom/notification" = { + tooltip = false; + format = "{icon}"; + format-icons = { + notification = "󱅫"; + none = "󰂚"; + dnd-notification = "󰂛"; + dnd-none = "󰂛"; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "swaync-client -t -sw"; + on-click-right = "swaync-client -d -sw"; + escape = true; + }; + "privacy" = { + icon-spacing = 0; + icon-size = 16; + transition-duration = 250; + screenshare = { + type = "screenshare"; + tooltip = true; + tooltip-icon-size = 24; + }; + audio-in = { + type = "audio-in"; + tooltip = true; + tooltip-icon-size = 24; + }; + }; + "wlr/taskbar" = { + format = "{icon} {name}"; icon-size = 18; icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; tooltip-format = "{title}"; @@ -185,175 +340,198 @@ in { }; }; - # TODO: broken padding on taskbar button - style = '' - @define-color base00 #${colors.base00}; @define-color base08 #${colors.base08}; - @define-color base01 #${colors.base01}; @define-color base09 #${colors.base09}; - @define-color base02 #${colors.base02}; @define-color base0A #${colors.base0A}; - @define-color base03 #${colors.base03}; @define-color base0B #${colors.base0B}; - @define-color base04 #${colors.base04}; @define-color base0C #${colors.base0C}; - @define-color base05 #${colors.base05}; @define-color base0D #${colors.base0D}; - @define-color base06 #${colors.base06}; @define-color base0E #${colors.base0E}; - @define-color base07 #${colors.base07}; @define-color base0F #${colors.base0F}; + # TODO: figure out magic waybar css styling (does it pick up `~/.config/gtk-3.0/gtk.css` ?) + style = + # css + '' + @define-color base00 #${colors.base00}; @define-color base08 #${colors.base08}; + @define-color base01 #${colors.base01}; @define-color base09 #${colors.base09}; + @define-color base02 #${colors.base02}; @define-color base0A #${colors.base0A}; + @define-color base03 #${colors.base03}; @define-color base0B #${colors.base0B}; + @define-color base04 #${colors.base04}; @define-color base0C #${colors.base0C}; + @define-color base05 #${colors.base05}; @define-color base0D #${colors.base0D}; + @define-color base06 #${colors.base06}; @define-color base0E #${colors.base0E}; + @define-color base07 #${colors.base07}; @define-color base0F #${colors.base0F}; - * { - all: unset; - font-family: ${config.stylix.fonts.sansSerif.name}, Symbols Nerd Font, FontAwesome; - font-weight: 500; - font-size: 16px; - min-width: 1em; - } + * { + /* all: unset; */ + font-family: Symbols Nerd Font, FontAwesome, ${config.stylix.fonts.sansSerif.name}; + font-weight: 500; + font-size: 16px; + } - .modules-left, .modules-center, .modules-right, window#waybar { - background-color: @base00; - color: @base05; - border-radius: 12px; - } + .modules-left, .modules-center, .modules-right, window#waybar { + background-color: @base00; + color: @base05; + border-radius: 12px; + } - tooltip { - background: @base01; - border: 1px solid @base0D; - border-radius: 16px; - padding: 2em; - } + window#waybar { + border-radius: 0; + } - tooltip label { - color: @base05; - } + /* for leftmost modules */ + .modules-left, .modules-center, .modules-right { + padding-left: 3px; + background-color: @base00; + color: @base05; + } + window#bottom.modules-center { + background-color: transparent + } + tooltip { + background: @base01; + border: 1px solid @base0D; + border-radius: 16px; + padding: 2em; + } - button { - box-shadow: inset 0 -3px transparent; - border-radius: 6px; - } + tooltip label { + color: @base05; + } - button:hover { - background: inherit; - box-shadow: inset 0 -3px transparent; - } + button { + box-shadow: inset 0 -3px transparent; + border-radius: 6px; + } - #backlight, - #battery, - #clock, - #custom-launcher, - #custom-notification, - #idle_inhibitor, - #language, - #power-profiles-daemon, - #privacy, - #privacy-item, - #taskbar, - #tray, - #wireplumber, - #workspaces button, - #workspaces { - border-radius: 9px; - background-color: @base01; - margin: 3px 3px 3px 0; - padding: 0 0.42em; - } + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } - /* #clock, */ - #custom-launcher, - #language, - #wireplumber { - margin: 3px; - } + #backlight, + #battery, + #clock, + #cpu, + #custom-launcher, + #custom-notification, + #idle_inhibitor, + #language, + #memory, + #network, + #power-profiles-daemon, + #privacy, + #privacy-item, + #taskbar button, + #taskbar, + #tray button, + #tray, + #wireplumber, + #workspaces button, + #workspaces { + all: unset; + border-radius: 9px; + background-color: @base01; + margin: 3px 3px 3px 0; + padding: 0 0.42em; + min-width: 1em; + } - #backlight, - #battery, - #custom-launcher, - #custom-notification, - #idle_inhibitor, - #power-profiles-daemon, - #wireplumber { - padding: 0 0.5em; - } + #backlight, + #battery, + #custom-launcher, + #custom-notification, + #idle_inhibitor, + #power-profiles-daemon, + #wireplumber { + padding: 0 0.5em; + } + #custom-notification, + #power-profiles-daemon { + min-width: 1em; + } - #privacy, - #taskbar, - #workspaces { - padding: 0; - } + #privacy, + #taskbar, + #workspaces { + padding: 0; + } - #workspaces { - padding-left: 3px; - } + #workspaces { + padding-left: 3px; + } - #privacy-item { - padding: 0 0.3em; - } + #privacy-item { + padding: 0 0.3em; + } - #workspaces button { - border-radius: 6px; - min-width: 0.4em; - } + #taskbar button { + padding-left: 0; + } + #taskbar button, + #tray button, + #workspaces button { + border-radius: 6px; + min-width: 0.8em; + } - #battery.critical:not(.charging) { - background-color: @base09; - color: @base00; - } + #battery.critical:not(.charging) { + background-color: @base09; + color: @base00; + } - #power-profiles-daemon.performance { - background-color: @base0D; - color: @base00; - } + #power-profiles-daemon.performance { + background-color: @base0D; + color: @base00; + } - #power-profiles-daemon.power-saver { - background-color: @base0A; - color: @base00; - } + #power-profiles-daemon.power-saver { + background-color: @base0A; + color: @base00; + } - #privacy-item.audio-in { - background-color: @base0E; - color: @base00; - margin: 3px; - } + #privacy-item.audio-in { + background-color: @base0E; + color: @base00; + margin: 3px; + } - #privacy-item.screenshare { - background-color: @base0C; - color: @base00; - margin: 3px 0 3px 3px; - } + #privacy-item.screenshare { + background-color: @base0C; + color: @base00; + margin: 3px 0 3px 3px; + } - #workspaces button.active, - #taskbar button.active { - background-color: @base02; - } + #taskbar button, + #tray button { + padding: 0 0.4em; + margin: 3px; + } - #workspaces button:hover, - #workspaces button.active:hover, - #taskbar button.active:hover, - #taskbar button:hover { - background-color: @base0D; - color: @base00; - } + #workspaces button.active, + #taskbar button.active { + background-color: @base02; + } - #taskbar.empty { - background-color: transparent; - } + #workspaces button:hover, + #workspaces button.active:hover, + #taskbar button.active:hover, + #taskbar button:hover { + background-color: @base0D; + color: @base00; + } - #taskbar button, - #tray button { - min-width: 0.4em; - margin: 3px; - } + #taskbar.empty { + background-color: transparent; + } - #tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: @base08; - } + #tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @base08; + } - #tray > .passive { - -gtk-icon-effect: dim; - } + #tray > .passive { + -gtk-icon-effect: dim; + } - /* #workspaces button.active { - color: @base00; - background-color: @base0D; - } */ + /* #workspaces button.active { + color: @base00; + background-color: @base0D; + } */ - label:focus { - background-color: #000000; - } - ''; + label:focus { + background-color: #000000; + } + ''; } diff --git a/modules/home/desktop/niri/services/default.nix b/modules/home/desktop/niri/services/default.nix index 3ffa80c..5f77a0c 100644 --- a/modules/home/desktop/niri/services/default.nix +++ b/modules/home/desktop/niri/services/default.nix @@ -1,27 +1,26 @@ { - # perSystem, lib, osConfig, pkgs, lockscreen, ... -}: { +}: +lib.attrsets.recursiveUpdate { blueman-applet.enable = osConfig.services.blueman.enable; - swaync = import ./swaync; + copyq.enable = true; + gammastep.enable = true; + gnome-keyring.enable = true; + hypridle.enable = true; kanshi = import ./kanshi; network-manager-applet.enable = true; playerctld.enable = true; + swaync = import ./swaync; + swayosd.enable = true; + udiskie.enable = true; wpaperd.enable = true; - copyq = { - enable = true; - # package = perSystem.nixpkgs-stable.copyq; - }; - gnome-keyring = { - enable = true; - components = ["secrets"]; - }; +} +{ gammastep = { - enable = true; provider = "manual"; latitude = 49.6; longitude = 36.1; @@ -31,34 +30,28 @@ night = 3000; }; }; - swayosd = { - enable = true; - topMargin = 0.8; + gnome-keyring.components = ["secrets"]; + hypridle.settings = { + general = { + before_sleep_cmd = "loginctl lock-session"; + lock_cmd = "pidof ${lockscreen} || ${lockscreen}"; + # unlock_cmd = "loginctl unlock-session"; + }; + listener = [ + { + timeout = 600; + on-timeout = "pidof ${lockscreen} || ${lockscreen}"; + } + { + timeout = 601; + on-timeout = lib.getExe pkgs.niri + " msg action power-off-monitors"; + } + ]; }; + swayosd.topMargin = 0.8; udiskie = { - enable = true; automount = false; notify = true; tray = "auto"; }; - hypridle = { - enable = true; - settings = { - general = { - before_sleep_cmd = "loginctl lock-session"; - lock_cmd = "pidof ${lockscreen} || ${lockscreen}"; - # unlock_cmd = "loginctl unlock-session"; - }; - listener = [ - { - timeout = 600; - on-timeout = "pidof ${lockscreen} || ${lockscreen}"; - } - { - timeout = 601; - on-timeout = lib.getExe pkgs.niri + " msg action power-off-monitors"; - } - ]; - }; - }; } diff --git a/modules/home/desktop/niri/services/swaync/default.nix b/modules/home/desktop/niri/services/swaync/default.nix index dccdb67..53969eb 100644 --- a/modules/home/desktop/niri/services/swaync/default.nix +++ b/modules/home/desktop/niri/services/swaync/default.nix @@ -17,7 +17,7 @@ control-center-layer = "overlay"; # Notification settings - positionX = "right"; + positionX = "left"; positionY = "top"; notification-2fa-action = true; notification-inline-replies = false; @@ -27,7 +27,7 @@ notification-window-width = 400; # Control center settings - control-center-positionX = "right"; + control-center-positionX = "left"; control-center-positionY = "top"; control-center-width = 500; control-center-exclusive-zone = true; From 099ac245aabe1d16f6b9e8919629552f525fe303 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Mon, 28 Jul 2025 17:16:42 +0300 Subject: [PATCH 124/138] another day another tweaking of waybar Signed-off-by: unexplrd --- .../desktop/niri/programs/waybar/default.nix | 332 +++++------------- 1 file changed, 88 insertions(+), 244 deletions(-) diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index f3a51e6..2298e79 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -6,8 +6,6 @@ launcher, ... }: let - inherit (config.lib.stylix) colors; - ifLaptop = lib.mkIf (osConfig.networking.hostName != "dunamis"); in { enable = true; @@ -19,15 +17,15 @@ in { position = "bottom"; height = 33; spacing = 0; - # margin-left = 36 + 3; - # margin-right = 36 + 3; - # margin-bottom = 3; + margin-left = 36 + 3; + margin-right = 36 + 3; + margin-bottom = 3; modules-left = [ "custom/launcher" "wlr/taskbar" - # "privacy" ]; modules-right = [ + "clock" "niri/workspaces" "niri/language" ]; @@ -39,133 +37,17 @@ in { format-en = "🇺🇸"; format-uk = "🇺🇦"; }; - "group/laptop" = { - orientation = "inherit"; - modules = [ - "backlight" - "battery" - "power-profiles-daemon" - ]; - }; - backlight = { - format = "{percent}% {icon}"; - format-icons = [ - "󰃚" - "󰃛" - "󰃜" - "󰃝" - "󰃞" - "󰃟" - "󰃠" - ]; - }; - idle_inhibitor = { - format = "{icon}"; - format-icons = { - activated = "󰅶"; - deactivated = "󰾪"; - }; - }; - tray = { - icon-size = 16; - spacing = 6; - }; clock = { - interval = 1; format = "{:%R}"; + interval = 1; tooltip = true; tooltip-format = "{:%B %d, %A}"; }; - battery = { - states = { - good = 95; - warning = 30; - critical = 15; - }; - format = "{capacity}% {icon}"; - format-full = "{capacity}% 󱟢"; - format-charging = "{capacity}% 󰂄"; - format-plugged = "{capacity}% 󰚥"; - format-alt = "{icon} {time}"; - format-icons = ["󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; - }; - memory = { - format = "{used:0.1f}G "; - tooltip-format = '' - RAM: {used:0.1f}G/{total:0.1f}G ({percentage}%) - Swap: {swapUsed:0.1f}G/{swapTotal:0.1f}G ({swapPercentage}%)''; - }; - network = { - format = "{bandwidthDownBits} 󰇚 | {bandwidthUpBits} 󰕒"; - interval = 3; - tooltip = false; - }; - cpu = { - format = "{usage}% 󰍛"; - interval = 3; - }; - upower = { - icon-size = 16; - format = "{percentage}"; - hide-if-empty = true; - tooltip = true; - tooltip-spacing = 20; - }; - power-profiles-daemon = { - format = "{icon}"; - tooltip-format = "Power profile: {profile}\nDriver: {driver}"; - tooltip = true; - format-icons = { - default = "󱡮"; - performance = "󱡮"; - balanced = ""; - power-saver = ""; - }; - }; - wireplumber = { - scroll-step = 3; - format = "{volume}% {icon}"; - format-muted = "󰖁"; - format-icons = ["󰕿" "󰖀" "󰕾"]; - on-click = lib.getExe pkgs.pwvucontrol; - on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; - }; "custom/launcher" = { format = ""; on-click = launcher; tooltip = false; }; - "custom/notification" = { - tooltip = false; - format = "{icon}"; - format-icons = { - notification = "󱅫"; - none = "󰂚"; - dnd-notification = "󰂛"; - dnd-none = "󰂛"; - }; - return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "swaync-client -t -sw"; - on-click-right = "swaync-client -d -sw"; - escape = true; - }; - "privacy" = { - icon-spacing = 0; - icon-size = 16; - transition-duration = 250; - screenshare = { - type = "screenshare"; - tooltip = true; - tooltip-icon-size = 24; - }; - audio-in = { - type = "audio-in"; - tooltip = true; - tooltip-icon-size = 24; - }; - }; "wlr/taskbar" = { format = "{icon} {name}"; icon-size = 16; @@ -178,32 +60,22 @@ in { position = "top"; height = 33; spacing = 0; - # margin-left = 36 + 3; - # margin-right = 36 + 3; - # margin-top = 3; + margin-left = 36 + 3; + margin-right = 36 + 3; + margin-top = 3; modules-left = [ "custom/notification" "tray" - ]; - modules-center = ["clock"]; - modules-right = [ "privacy" + ]; + modules-right = [ "network" "cpu" "memory" "wireplumber" (ifLaptop "group/laptop") - # "tray" "idle_inhibitor" ]; - "niri/workspaces" = { - format = "{index}"; - }; - "niri/language" = { - format = "{}"; - format-en = "🇺🇸"; - format-uk = "🇺🇦"; - }; "group/laptop" = { orientation = "inherit"; modules = [ @@ -225,6 +97,7 @@ in { ]; }; idle_inhibitor = { + tooltip = false; format = "{icon}"; format-icons = { activated = "󰅶"; @@ -235,12 +108,6 @@ in { icon-size = 16; spacing = 6; }; - clock = { - interval = 1; - format = "{:%R}"; - tooltip = true; - tooltip-format = "{:%B %d, %A}"; - }; battery = { states = { good = 95; @@ -269,17 +136,10 @@ in { format = "{usage}% 󰍛"; interval = 3; }; - upower = { - icon-size = 16; - format = "{percentage}"; - hide-if-empty = true; - tooltip = true; - tooltip-spacing = 20; - }; power-profiles-daemon = { format = "{icon}"; - tooltip-format = "Power profile: {profile}\nDriver: {driver}"; tooltip = true; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; format-icons = { default = "󱡮"; performance = "󱡮"; @@ -295,11 +155,6 @@ in { on-click = lib.getExe pkgs.pwvucontrol; on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; }; - "custom/launcher" = { - format = ""; - on-click = launcher; - tooltip = false; - }; "custom/notification" = { tooltip = false; format = "{icon}"; @@ -331,54 +186,62 @@ in { tooltip-icon-size = 24; }; }; - "wlr/taskbar" = { - format = "{icon} {name}"; - icon-size = 18; - icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}"; - tooltip-format = "{title}"; - on-click = "activate"; - }; }; # TODO: figure out magic waybar css styling (does it pick up `~/.config/gtk-3.0/gtk.css` ?) - style = + style = let + colors = config.lib.stylix.colors.withHashtag; + in # css '' - @define-color base00 #${colors.base00}; @define-color base08 #${colors.base08}; - @define-color base01 #${colors.base01}; @define-color base09 #${colors.base09}; - @define-color base02 #${colors.base02}; @define-color base0A #${colors.base0A}; - @define-color base03 #${colors.base03}; @define-color base0B #${colors.base0B}; - @define-color base04 #${colors.base04}; @define-color base0C #${colors.base0C}; - @define-color base05 #${colors.base05}; @define-color base0D #${colors.base0D}; - @define-color base06 #${colors.base06}; @define-color base0E #${colors.base0E}; - @define-color base07 #${colors.base07}; @define-color base0F #${colors.base0F}; + @define-color base00 ${colors.base00}; @define-color base08 ${colors.base08}; + @define-color base01 ${colors.base01}; @define-color base09 ${colors.base09}; + @define-color base02 ${colors.base02}; @define-color base0A ${colors.base0A}; + @define-color base03 ${colors.base03}; @define-color base0B ${colors.base0B}; + @define-color base04 ${colors.base04}; @define-color base0C ${colors.base0C}; + @define-color base05 ${colors.base05}; @define-color base0D ${colors.base0D}; + @define-color base06 ${colors.base06}; @define-color base0E ${colors.base0E}; + @define-color base07 ${colors.base07}; @define-color base0F ${colors.base0F}; * { - /* all: unset; */ font-family: Symbols Nerd Font, FontAwesome, ${config.stylix.fonts.sansSerif.name}; - font-weight: 500; font-size: 16px; + font-weight: 500; } - .modules-left, .modules-center, .modules-right, window#waybar { + .modules-left, + .modules-center, + .modules-right, + window#waybar { background-color: @base00; color: @base05; border-radius: 12px; } - window#waybar { - border-radius: 0; + .modules-left, + .modules-center, + .modules-right { + padding-left: 3px; + } /* for leftmost modules */ + + button { + border-radius: 6px; + box-shadow: inset 0 -3px transparent; } - /* for leftmost modules */ - .modules-left, .modules-center, .modules-right { - padding-left: 3px; - background-color: @base00; + button:hover { + background: inherit; + box-shadow: inset 0 -3px transparent; + } + + label:focus { + background-color: #000000; + } + + tooltip label { color: @base05; } - window#bottom.modules-center { - background-color: transparent - } + tooltip { background: @base01; border: 1px solid @base0D; @@ -386,18 +249,8 @@ in { padding: 2em; } - tooltip label { - color: @base05; - } - - button { - box-shadow: inset 0 -3px transparent; - border-radius: 6px; - } - - button:hover { - background: inherit; - box-shadow: inset 0 -3px transparent; + window#bottom.modules-center { + background-color: transparent } #backlight, @@ -415,7 +268,6 @@ in { #privacy-item, #taskbar button, #taskbar, - #tray button, #tray, #wireplumber, #workspaces button, @@ -425,7 +277,6 @@ in { background-color: @base01; margin: 3px 3px 3px 0; padding: 0 0.42em; - min-width: 1em; } #backlight, @@ -437,40 +288,21 @@ in { #wireplumber { padding: 0 0.5em; } - #custom-notification, - #power-profiles-daemon { - min-width: 1em; - } - - #privacy, - #taskbar, - #workspaces { - padding: 0; - } - - #workspaces { - padding-left: 3px; - } - - #privacy-item { - padding: 0 0.3em; - } - - #taskbar button { - padding-left: 0; - } - #taskbar button, - #tray button, - #workspaces button { - border-radius: 6px; - min-width: 0.8em; - } #battery.critical:not(.charging) { background-color: @base09; color: @base00; } + #custom-launcher, + #custom-notification, + #idle_inhibitor, + #language, + #power-profiles-daemon { + padding: 0; + min-width: 1.7em; + } + #power-profiles-daemon.performance { background-color: @base0D; color: @base00; @@ -481,6 +313,20 @@ in { color: @base00; } + #privacy, + #taskbar, + #workspaces { + padding: 0; + } + + #privacy-item, + #taskbar button, + #workspaces button { + border-radius: 6px; + min-width: 1.4em; + padding: 0; + } + #privacy-item.audio-in { background-color: @base0E; color: @base00; @@ -490,24 +336,27 @@ in { #privacy-item.screenshare { background-color: @base0C; color: @base00; - margin: 3px 0 3px 3px; + margin-right: 0; } - #taskbar button, - #tray button { + #taskbar button { + padding-left: 0; + } + + #taskbar button { padding: 0 0.4em; margin: 3px; } - #workspaces button.active, - #taskbar button.active { + #taskbar button.active, + #workspaces button.active { background-color: @base02; } - #workspaces button:hover, - #workspaces button.active:hover, #taskbar button.active:hover, - #taskbar button:hover { + #taskbar button:hover, + #workspaces button:hover, + #workspaces button.active:hover { background-color: @base0D; color: @base00; } @@ -516,22 +365,17 @@ in { background-color: transparent; } - #tray > .needs-attention { + #tray>.needs-attention { -gtk-icon-effect: highlight; background-color: @base08; } - #tray > .passive { + #tray>.passive { -gtk-icon-effect: dim; } - /* #workspaces button.active { - color: @base00; - background-color: @base0D; - } */ - - label:focus { - background-color: #000000; + #workspaces { + padding-left: 3px; } ''; } From e8e22f2691e518a87e958fd0c75421aaf7fe7842 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 29 Jul 2025 14:12:04 +0300 Subject: [PATCH 125/138] waybar: finally square centered modules Signed-off-by: unexplrd --- .../desktop/niri/programs/waybar/default.nix | 31 +++++++++++-------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 2298e79..19d3530 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -15,7 +15,7 @@ in { }; settings.bottom = { position = "bottom"; - height = 33; + height = 34; spacing = 0; margin-left = 36 + 3; margin-right = 36 + 3; @@ -25,17 +25,17 @@ in { "wlr/taskbar" ]; modules-right = [ - "clock" "niri/workspaces" + "clock" "niri/language" ]; "niri/workspaces" = { format = "{index}"; }; "niri/language" = { - format = "{}"; - format-en = "🇺🇸"; - format-uk = "🇺🇦"; + format = "{short}"; + # format-en = "🇺🇸"; + # format-uk = "🇺🇦"; }; clock = { format = "{:%R}"; @@ -58,7 +58,7 @@ in { }; settings.top = { position = "top"; - height = 33; + height = 34; spacing = 0; margin-left = 36 + 3; margin-right = 36 + 3; @@ -73,6 +73,7 @@ in { "cpu" "memory" "wireplumber" + "wireplumber#source" (ifLaptop "group/laptop") "idle_inhibitor" ]; @@ -148,12 +149,19 @@ in { }; }; wireplumber = { - scroll-step = 3; format = "{volume}% {icon}"; format-muted = "󰖁"; format-icons = ["󰕿" "󰖀" "󰕾"]; on-click = lib.getExe pkgs.pwvucontrol; on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle"; + scroll-step = 3; + }; + "wireplumber#source" = { + node-type = "Audio/Source"; + format = "{volume}% 󰍬"; + format-muted = "󰍭"; + on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; + scroll-step = 3; }; "custom/notification" = { tooltip = false; @@ -323,7 +331,7 @@ in { #taskbar button, #workspaces button { border-radius: 6px; - min-width: 1.4em; + min-width: 1.35em; padding: 0; } @@ -339,13 +347,9 @@ in { margin-right: 0; } - #taskbar button { - padding-left: 0; - } - #taskbar button { padding: 0 0.4em; - margin: 3px; + margin: 3px 3px 3px 0; } #taskbar button.active, @@ -374,6 +378,7 @@ in { -gtk-icon-effect: dim; } + #taskbar, #workspaces { padding-left: 3px; } From 8c5d8bdb509990b8302fbdf66a12b8303b3a764f Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 29 Jul 2025 14:12:04 +0300 Subject: [PATCH 126/138] misc module changes Signed-off-by: unexplrd --- .../desktop/niri/services/kanshi/default.nix | 6 ++++++ modules/nixos/desktop/common/pam-rtprio.nix | 2 +- modules/nixos/desktop/cosmic/default.nix | 14 +++++++------- modules/nixos/system/common.nix | 16 ++++++++-------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/modules/home/desktop/niri/services/kanshi/default.nix b/modules/home/desktop/niri/services/kanshi/default.nix index 1f505f0..2d2a018 100644 --- a/modules/home/desktop/niri/services/kanshi/default.nix +++ b/modules/home/desktop/niri/services/kanshi/default.nix @@ -43,6 +43,12 @@ { profile = { name = "dunamis"; + outputs = [{criteria = main;}]; + }; + } + { + profile = { + name = "dunamis-twomon"; outputs = [ {criteria = main;} { diff --git a/modules/nixos/desktop/common/pam-rtprio.nix b/modules/nixos/desktop/common/pam-rtprio.nix index 9d91437..0d55ce3 100644 --- a/modules/nixos/desktop/common/pam-rtprio.nix +++ b/modules/nixos/desktop/common/pam-rtprio.nix @@ -4,7 +4,7 @@ domain = "@users"; item = "rtprio"; type = "-"; - value = -1; + value = 1; } ]; } diff --git a/modules/nixos/desktop/cosmic/default.nix b/modules/nixos/desktop/cosmic/default.nix index dae4da9..d76da4b 100644 --- a/modules/nixos/desktop/cosmic/default.nix +++ b/modules/nixos/desktop/cosmic/default.nix @@ -8,9 +8,9 @@ inherit (lib) mkIf mkEnableOption; cfg = config.desktop.cosmic; in { - imports = with inputs; [ - nixos-cosmic.nixosModules.default - ]; + # imports = with inputs; [ + # nixos-cosmic.nixosModules.default + # ]; options = { desktop.cosmic.enable = mkEnableOption "enable cosmic desktop"; @@ -21,10 +21,10 @@ in { environment.sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1; services.desktopManager.cosmic.enable = true; - systemd = { - packages = [pkgs.observatory]; - services.monitord.wantedBy = ["multi-user.target"]; - }; + # systemd = { + # packages = [pkgs.observatory]; + # services.monitord.wantedBy = ["multi-user.target"]; + # }; xdg.portal = { enable = true; extraPortals = with pkgs; [ diff --git a/modules/nixos/system/common.nix b/modules/nixos/system/common.nix index 95d2b70..f02f145 100644 --- a/modules/nixos/system/common.nix +++ b/modules/nixos/system/common.nix @@ -9,7 +9,7 @@ environment = { ldso32 = null; - memoryAllocator.provider = "mimalloc"; + # memoryAllocator.provider = "mimalloc"; # weird memory consumption stuff variables = { LESS = "-R --mouse"; }; @@ -17,16 +17,16 @@ networking.networkmanager.enable = true; - services.openssh = { - settings.X11Forwarding = false; - settings.KbdInteractiveAuthentication = false; - settings.PasswordAuthentication = false; - settings.UseDns = false; + services.openssh.settings = { + X11Forwarding = false; + KbdInteractiveAuthentication = false; + PasswordAuthentication = false; + UseDns = false; # unbind gnupg sockets if they exists - settings.StreamLocalBindUnlink = true; + StreamLocalBindUnlink = true; # Use key exchange algorithms recommended by `nixpkgs#ssh-audit` - settings.KexAlgorithms = [ + KexAlgorithms = [ "curve25519-sha256" "curve25519-sha256@libssh.org" "diffie-hellman-group16-sha512" From 9502c22c5f13daf7c14f559bb4ed270b288f983e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 29 Jul 2025 14:12:04 +0300 Subject: [PATCH 127/138] add/change apps Signed-off-by: unexplrd --- modules/shared/user/flatpak.nix | 4 +++- modules/shared/user/programs.nix | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/shared/user/flatpak.nix b/modules/shared/user/flatpak.nix index 6921809..e64b645 100644 --- a/modules/shared/user/flatpak.nix +++ b/modules/shared/user/flatpak.nix @@ -25,6 +25,7 @@ # browsers "app.zen_browser.zen" # "com.vivaldi.Vivaldi" + "io.github.ungoogled_software.ungoogled_chromium" "net.mullvad.MullvadBrowser" "org.torproject.torbrowser-launcher" ] @@ -48,7 +49,7 @@ # "ca.edestcroix.Recordbox" # music player "com.github.neithern.g4music" # music player # "io.bassi.Amberol" # music player - "io.freetubeapp.FreeTube" # youtube client + "app.grayjay.Grayjay" # youtube client # "org.atheme.audacious" # music player ] ++ [ @@ -103,6 +104,7 @@ ELECTRON_OZONE_PLATFORM_HINT = "wayland"; }; }; + "app.grayjay.Grayjay".Context.sockets = ["x11" "!wayland" "!fallback-x11"]; # because CEF "ca.edestcroix.Recordbox".Context.filesystems = ["xdg-music"]; "com.valvesoftware.Steam" = { Context = { diff --git a/modules/shared/user/programs.nix b/modules/shared/user/programs.nix index 4c86a09..909e3bb 100644 --- a/modules/shared/user/programs.nix +++ b/modules/shared/user/programs.nix @@ -16,10 +16,10 @@ in { oh-my-posh.enable = true; }; syncthing.enable = true; - # terminal.wezterm.enable = true; - terminal.ghostty.enable = true; + terminal.wezterm.enable = true; + # terminal.ghostty.enable = true; systemd.user.settings.Manager.DefaultEnvironment = { - TERMINAL = "ghostty"; + TERMINAL = "wezterm"; }; services = { From 34e5cb884e11c8d99385103498458e701c273ead Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 29 Jul 2025 14:12:04 +0300 Subject: [PATCH 128/138] editor/helix: disable fsharp Signed-off-by: unexplrd --- modules/home/programs/editor/helix.nix | 36 +++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/modules/home/programs/editor/helix.nix b/modules/home/programs/editor/helix.nix index 2d498af..99aed25 100644 --- a/modules/home/programs/editor/helix.nix +++ b/modules/home/programs/editor/helix.nix @@ -78,17 +78,17 @@ in { }; }; clangd.command = "${pkgs.clang-tools}/bin/clangd"; - fsac = { - command = getExe pkgs.fsautocomplete; - config = { - # editor.formatOnSave = true; - AutomaticWorkspaceInit = true; - FSharp.ExternalAutocomplete = true; - FSharp.linting.fsharplint.enabled = true; - FSharp.linting.fsharplint.configFile = "fsharplint.json"; - FSharp.formatting.fantomas.enabled = true; - }; - }; + # fsac = { + # command = getExe pkgs.fsautocomplete; + # config = { + # editor.formatOnSave = true; + # AutomaticWorkspaceInit = true; + # FSharp.ExternalAutocomplete = true; + # FSharp.linting.fsharplint.enabled = true; + # FSharp.linting.fsharplint.configFile = "fsharplint.json"; + # FSharp.formatting.fantomas.enabled = true; + # }; + # }; nil = { command = getExe pkgs.nil; config = { @@ -134,13 +134,13 @@ in { auto-format = true; # formatter.command = "${pkgs.clang-tools}/bin/clang-format"; } - { - name = "fsharp"; - auto-format = true; - language-servers = ["fsac"]; - scope = "source.fs"; - roots = ["fsproj" "sln" ".git"]; - } + # { + # name = "fsharp"; + # auto-format = true; + # language-servers = ["fsac"]; + # scope = "source.fs"; + # roots = ["fsproj" "sln" ".git"]; + # } # { # name = "rust"; # auto-format = true; From 241b7565cbb12a650356c237717e6974129cbfa7 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 29 Jul 2025 14:12:04 +0300 Subject: [PATCH 129/138] flake.lock: bump flake.nix: add niri and xwst niri: move to flake packages Signed-off-by: unexplrd --- flake.lock | 288 ++++++++++++++++------- flake.nix | 16 +- modules/home/desktop/niri/default.nix | 22 +- modules/home/desktop/niri/niri.nix | 13 +- modules/nixos/desktop/common/greeter.nix | 3 +- modules/nixos/desktop/niri/default.nix | 8 +- 6 files changed, 253 insertions(+), 97 deletions(-) diff --git a/flake.lock b/flake.lock index e778421..e2a0a70 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1751740947, - "narHash": "sha256-35040CHH7P3JGmhGVfEb2oJHL/A5mI2IXumhkxrBnao=", + "lastModified": 1753216019, + "narHash": "sha256-zik7WISrR1ks2l6T1MZqZHb/OqroHdJnSnAehkE0kCk=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "dfc1db15a08c4cd234288f66e1199c653495301f", + "rev": "be166e11d86ba4186db93e10c54a141058bdce49", "type": "github" }, "original": { @@ -70,11 +70,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1748408240, - "narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=", + "lastModified": 1752979451, + "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e", + "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", "type": "github" }, "original": { @@ -110,11 +110,11 @@ ] }, "locked": { - "lastModified": 1744632722, - "narHash": "sha256-0chvqUV1Kzf8BMQ7MsH3CeicJEb2HeCpwliS77FGyfc=", + "lastModified": 1755332143, + "narHash": "sha256-jaiZPA5ND7HPJ4U/bzp+BKGOYR14+rIe9tC6XA4jBHU=", "owner": "numtide", "repo": "blueprint", - "rev": "49bbd5d072b577072f4a1d07d4b0621ecce768af", + "rev": "3c8bf84e28df2be19cc6623cb3ceeb6fc0839b91", "type": "github" }, "original": { @@ -136,11 +136,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1752318841, - "narHash": "sha256-/Vfi3vmpBDaEDCdPYEOgUIUTyt2lOTRWVj3ESBRIChY=", + "lastModified": 1755899135, + "narHash": "sha256-ewtYnDQL+p/Nonh2SviTSYMfOHYwFSPk3BkkzxWOA/Y=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "b342f1adfa040963c9b00f4f1755def9f8588a58", + "rev": "61032343b2c7717f8180309d883e1b80e4a6556b", "type": "github" }, "original": { @@ -221,11 +221,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1747046372, + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", "type": "github" }, "original": { @@ -342,6 +342,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -369,11 +387,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1752293658, - "narHash": "sha256-p4I9YxndfMpcHg9EVcy5+BACLp2GBjpVMbXuJ/glYnw=", + "lastModified": 1756026621, + "narHash": "sha256-dw1sAVXzHBb3ZRSjVucKXQe65u0k2lsZ9FB3l6evpRY=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "e67a62453d8e75e82b581a340e70896f722a7f0f", + "rev": "95bc181c986e91ea14db18eb9f300984e1f6ebdb", "type": "github" }, "original": { @@ -450,11 +468,11 @@ ] }, "locked": { - "lastModified": 1752286566, - "narHash": "sha256-A4nftqiNz2bNihz0bKY94Hq/6ydR6UQOcGioeL7iymY=", + "lastModified": 1756022458, + "narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=", "owner": "nix-community", "repo": "home-manager", - "rev": "392ddb642abec771d63688c49fa7bcbb9d2a5717", + "rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740", "type": "github" }, "original": { @@ -479,11 +497,11 @@ ] }, "locked": { - "lastModified": 1749155331, - "narHash": "sha256-XR9fsI0zwLiFWfqi/pdS/VD+YNorKb3XIykgTg4l1nA=", + "lastModified": 1753964049, + "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "45fcc10b4c282746d93ec406a740c43b48b4ef80", + "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", "type": "github" }, "original": { @@ -508,11 +526,11 @@ ] }, "locked": { - "lastModified": 1751808145, - "narHash": "sha256-OXgL0XaKMmfX2rRQkt9SkJw+QNfv0jExlySt1D6O72g=", + "lastModified": 1754305013, + "narHash": "sha256-u+M2f0Xf1lVHzIPQ7DsNCDkM1NYxykOSsRr4t3TbSM4=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "b841473a0bd4a1a74a0b64f1ec2ab199035c349f", + "rev": "4c1d63a0f22135db123fc789f174b89544c6ec2d", "type": "github" }, "original": { @@ -541,11 +559,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1752270468, - "narHash": "sha256-SEFxC9q+BMn1FkeaBRCDb0h7hZ2B+MSi8+u85y4rgQY=", + "lastModified": 1756022257, + "narHash": "sha256-BVYvquLQY3VjkqosOrLBPLUo2AwujQGS40DTuHYsYdg=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "6821723b4421bdf163f1a1cc6fd472516d44b1e7", + "rev": "ced38b1b0f46f9fbdf9d37644d27bdbd2a29af1d", "type": "github" }, "original": { @@ -634,11 +652,11 @@ ] }, "locked": { - "lastModified": 1750371812, - "narHash": "sha256-D868K1dVEACw17elVxRgXC6hOxY+54wIEjURztDWLk8=", + "lastModified": 1753819801, + "narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "b13c7481e37856f322177010bdf75fccacd1adc8", + "rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc", "type": "github" }, "original": { @@ -663,11 +681,11 @@ ] }, "locked": { - "lastModified": 1750371198, - "narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=", + "lastModified": 1753622892, + "narHash": "sha256-0K+A+gmOI8IklSg5It1nyRNv0kCNL51duwnhUO/B8JA=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b", + "rev": "23f0debd2003f17bd65f851cd3f930cff8a8c809", "type": "github" }, "original": { @@ -682,6 +700,10 @@ "hyprland", "hyprland-protocols" ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], "hyprutils": [ "hyprland", "hyprutils" @@ -699,11 +721,11 @@ ] }, "locked": { - "lastModified": 1751567624, - "narHash": "sha256-tUVODSZhvafXmuN+5SwZpNWV+2cvhSd+5IJ5TXu3YgI=", + "lastModified": 1755112136, + "narHash": "sha256-eYLtZJayWWbKBC3u/gvDSqVyffuD+egryr7zPWRAeyY=", "owner": "hyprwm", "repo": "hyprsunset", - "rev": "4b2f0f9f46a6552930eecb979d18ac48d7079312", + "rev": "1f9afca28fac5f490e5f232e6f1887a69ff34896", "type": "github" }, "original": { @@ -724,11 +746,11 @@ ] }, "locked": { - "lastModified": 1751888065, - "narHash": "sha256-F2SV9WGqgtRsXIdUrl3sRe0wXlQD+kRRZcSfbepjPJY=", + "lastModified": 1754481650, + "narHash": "sha256-6u6HdEFJh5gY6VfyMQbhP7zDdVcqOrCDTkbiHJmAtMI=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "a8229739cf36d159001cfc203871917b83fdf917", + "rev": "df6b8820c4a0835d83d0c7c7be86fbc555f1f7fd", "type": "github" }, "original": { @@ -749,11 +771,11 @@ ] }, "locked": { - "lastModified": 1751881472, - "narHash": "sha256-meB0SnXbwIe2trD041MLKEv6R7NZ759QwBcVIhlSBfE=", + "lastModified": 1751897909, + "narHash": "sha256-FnhBENxihITZldThvbO7883PdXC/2dzW4eiNvtoV5Ao=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "8fb426b3e5452fd9169453fd6c10f8c14ca37120", + "rev": "fcca0c61f988a9d092cbb33e906775014c61579d", "type": "github" }, "original": { @@ -771,11 +793,11 @@ ] }, "locked": { - "lastModified": 1752218319, - "narHash": "sha256-fEvLVaVduwVotOib8NqO0e4N3dMsdA04Jlfm2sZQH5Q=", + "lastModified": 1755670950, + "narHash": "sha256-x84lAqhbz752SU6zZY1yixm9Cbz6kdHtJs/5XE1LKGk=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "d5da490d8c2553fc8d589b49f9c036973b9656a1", + "rev": "7caed3afea56de2b68b74d7a3b580d5b8ca8f445", "type": "github" }, "original": { @@ -826,13 +848,34 @@ "url": "ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets" } }, + "niri": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_3" + }, + "locked": { + "lastModified": 1756040766, + "narHash": "sha256-rL1ipwogRz1EjvEw3YdF6isEUGFqWlLXkB57zs4sYOg=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "8b73910a11473ca9d06b204ccb7377360ced00db", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nix-flatpak": { "locked": { - "lastModified": 1751276396, - "narHash": "sha256-oOYrnKStMsOXST+wKnzuSZ49h8Dr1Q3mIn2f5Kb5GAw=", + "lastModified": 1754777568, + "narHash": "sha256-0bBqT+3XncgF8F03RFAamw9vdf0VmaDoIJLTGkjfQZs=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "59adb9ad1cbd915494fc35cd0e0a9d582ca9de74", + "rev": "62f636b87ef6050760a8cb325cadb90674d1e23e", "type": "github" }, "original": { @@ -871,11 +914,11 @@ ] }, "locked": { - "lastModified": 1752305182, - "narHash": "sha256-6i4Q68G7wzNq1m2+l3lJUYgGZ9PwULvSVJpRSTTC46o=", + "lastModified": 1756008611, + "narHash": "sha256-rfTBWuTXi9/X7GhtF562FKNXKh2kvKb6dwI5lV1SjPE=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "ad29e2961dd0d58372384563bf00d510fc9f2e15", + "rev": "52dec1cb33a614accb9e01307e17816be974d24d", "type": "github" }, "original": { @@ -893,7 +936,7 @@ "nixpkgs-stable": [ "nixpkgs-stable" ], - "rust-overlay": "rust-overlay_3" + "rust-overlay": "rust-overlay_4" }, "locked": { "lastModified": 1751591814, @@ -911,11 +954,11 @@ }, "nixos-facter-modules": { "locked": { - "lastModified": 1750412875, - "narHash": "sha256-uP9Xxw5XcFwjX9lNoYRpybOnIIe1BHfZu5vJnnPg3Jc=", + "lastModified": 1755678220, + "narHash": "sha256-Yvmm03o7Z7gTAOfCnIetHomaDDJVBdLBPHD9dZ5kUcc=", "owner": "numtide", "repo": "nixos-facter-modules", - "rev": "14df13c84552a7d1f33c1cd18336128fbc43f920", + "rev": "25122ee37b0c1f22b07c9fe5f970a7487093a4c0", "type": "github" }, "original": { @@ -926,11 +969,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1751984180, - "narHash": "sha256-LwWRsENAZJKUdD3SpLluwDmdXY9F45ZEgCb0X+xgOL0=", + "lastModified": 1755615617, + "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9807714d6944a957c2e036f84b0ff8caf9930bc0", + "rev": "20075955deac2583bb12f07151c2df830ef346b4", "type": "github" }, "original": { @@ -1007,11 +1050,11 @@ ] }, "locked": { - "lastModified": 1750779888, - "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", + "lastModified": 1754416808, + "narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864", "type": "github" }, "original": { @@ -1058,6 +1101,7 @@ "hyprsunset": "hyprsunset", "lanzaboote": "lanzaboote", "mysecrets": "mysecrets", + "niri": "niri", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", "nixos-cosmic": "nixos-cosmic", @@ -1067,7 +1111,8 @@ "sops-nix": "sops-nix", "stylix": "stylix", "systems": "systems", - "walker": "walker" + "walker": "walker", + "xwst": "xwst" } }, "rust-overlay": { @@ -1078,11 +1123,11 @@ ] }, "locked": { - "lastModified": 1752201818, - "narHash": "sha256-d8KczaVT8WFEZdWg//tMAbv8EDyn2YTWcJvSY8gqKBU=", + "lastModified": 1755830208, + "narHash": "sha256-fMa/Hcg+4O2h+kl3gNPjtGSWPI8NtCl3LYMsejK6qGA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "bd8f8329780b348fedcd37b53dbbee48c08c496d", + "rev": "802a7b97f8ff672ba2dec70c9e354f51f844e796", "type": "github" }, "original": { @@ -1113,6 +1158,27 @@ } }, "rust-overlay_3": { + "inputs": { + "nixpkgs": [ + "niri", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1756003222, + "narHash": "sha256-lmEMhIIbjt8Wp1EYbNqCojuU9ygyDFv8Tu0X1k8qIMc=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "88ceedecde53e809b4bf8b5fd10d181889d9bac7", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_4": { "inputs": { "nixpkgs": [ "nixos-cosmic", @@ -1133,6 +1199,27 @@ "type": "github" } }, + "rust-overlay_5": { + "inputs": { + "nixpkgs": [ + "xwst", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1739240901, + "narHash": "sha256-YDtl/9w71m5WcZvbEroYoWrjECDhzJZLZ8E68S3BYok=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "03473e2af8a4b490f4d2cdb2e4d3b75f82c8197c", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": [ @@ -1140,11 +1227,11 @@ ] }, "locked": { - "lastModified": 1751606940, - "narHash": "sha256-KrDPXobG7DFKTOteqdSVeL1bMVitDcy7otpVZWDE6MA=", + "lastModified": 1754988908, + "narHash": "sha256-t+voe2961vCgrzPFtZxha0/kmFSHFobzF00sT8p9h0U=", "owner": "mic92", "repo": "sops-nix", - "rev": "3633fc4acf03f43b260244d94c71e9e14a2f6e0d", + "rev": "3223c7a92724b5d804e9988c6b447a0d09017d48", "type": "github" }, "original": { @@ -1176,11 +1263,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1752250117, - "narHash": "sha256-zCPV1a8w9hRn5ukOQwaAggA3X5cMmVsZVBYo8wLfLuU=", + "lastModified": 1755997543, + "narHash": "sha256-/fejmCQ7AWa655YxyPxRDbhdU7c5+wYsFSjmEMXoBCM=", "owner": "danth", "repo": "stylix", - "rev": "0da583a359fd911d5cbfd2c789424b888b777a4b", + "rev": "f47c0edcf71e802378b1b7725fa57bb44fe85ee8", "type": "github" }, "original": { @@ -1204,6 +1291,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -1295,15 +1397,16 @@ ] }, "locked": { - "lastModified": 1752245988, - "narHash": "sha256-t0Sg3HWhDIIQISLGt2cYnD28RUI3SKKTVE9bFL9M5Ok=", + "lastModified": 1753363004, + "narHash": "sha256-nNq0+o6lPiKntuL9rOonxihfkCIPvQ+SszTbjoAftC0=", "owner": "abenz1267", "repo": "walker", - "rev": "33c1ee26f675902b4404f64288ad1facb9ecec22", + "rev": "0f366b1f556398d47459b0bd3a9e27e9a0d2c398", "type": "github" }, "original": { "owner": "abenz1267", + "ref": "0f366b1", "repo": "walker", "type": "github" } @@ -1336,11 +1439,11 @@ ] }, "locked": { - "lastModified": 1751300244, - "narHash": "sha256-PFuv1TZVYvQhha0ac53E3YgdtmLShrN0t4T6xqHl0jE=", + "lastModified": 1753633878, + "narHash": "sha256-js2sLRtsOUA/aT10OCDaTjO80yplqwOIaLUqEe0nMx0=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "6115f3fdcb2c1a57b4a80a69f3c797e47607b90a", + "rev": "371b96bd11ad2006ed4f21229dbd1be69bed3e8a", "type": "github" }, "original": { @@ -1349,10 +1452,33 @@ "type": "github" } }, + "xwst": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": "rust-overlay_5" + }, + "locked": { + "lastModified": 1755963545, + "narHash": "sha256-hGXzVhlk+gelqagKAgOHbilNYasM+jM3T8JPshDl2/M=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "d759c64681bab7cd34f48122037d7420d42f3024", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + }, "zig": { "inputs": { "flake-compat": [ - "ghostty" + "ghostty", + "flake-compat" ], "flake-utils": [ "ghostty", diff --git a/flake.nix b/flake.nix index 4adaa19..585a48f 100644 --- a/flake.nix +++ b/flake.nix @@ -48,6 +48,7 @@ url = "github:hyprwm/hyprsunset"; inputs = { hyprland-protocols.follows = "hyprland/hyprland-protocols"; + hyprlang.follows = "hyprland/hyprlang"; hyprutils.follows = "hyprland/hyprutils"; hyprwayland-scanner.follows = "hyprland/hyprwayland-scanner"; nixpkgs.follows = "nixpkgs"; @@ -62,6 +63,13 @@ url = "git+ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets"; flake = false; }; + niri = { + url = "github:YaLTeR/niri"; + inputs = { + nixpkgs-stable.follows = "nixpkgs-stable"; + nixpkgs.follows = "nixpkgs"; + }; + }; nix-flatpak.url = "github:gmodena/nix-flatpak"; nix-index-database = { url = "github:nix-community/nix-index-database"; @@ -94,12 +102,18 @@ }; }; walker = { - url = "github:abenz1267/walker"; + url = "github:abenz1267/walker/0f366b1"; inputs = { nixpkgs.follows = "nixpkgs"; systems.follows = "systems"; }; }; + xwst = { + url = "github:Supreeeme/xwayland-satellite"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; }; outputs = inputs: inputs.blueprint {inherit inputs;}; diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index c950c11..31a1fb3 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -3,7 +3,7 @@ inputs, lib, osConfig, - # perSystem, + perSystem, pkgs, ... }: let @@ -15,7 +15,7 @@ ifLaptop = mkIf (hostName != "dunamis"); commonArgs = { - inherit config inputs lib osConfig pkgs; + inherit config inputs lib osConfig perSystem pkgs; launcher = getExe pkgs.walker; lockscreen = getExe pkgs.gtklock; }; @@ -126,9 +126,9 @@ in { }; }; systemd.user = { - settings.Manager.DefaultEnvironment = { - DISPLAY = ":123"; - }; + # settings.Manager.DefaultEnvironment = { + # DISPLAY = ":123"; + # }; targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie services = let mkGraphicalService = config: lib.attrsets.recursiveUpdate graphicalService config; @@ -159,12 +159,12 @@ in { Service.TimeoutStopSec = mkForce "1"; Service.Restart = mkForce "always"; }; - xwayland-satellite = mkGraphicalService { - Service = { - Type = "simple"; - ExecStart = getExe pkgs.xwayland-satellite + " :123"; - }; - }; + # xwayland-satellite = mkGraphicalService { + # Service = { + # Type = "simple"; + # ExecStart = getExe pkgs.xwayland-satellite + " :123"; + # }; + # }; # gnome-polkit-agent = mkGraphicalService { # Service = { # Type = "simple"; diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 0f1106a..bb4fea0 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -1,6 +1,9 @@ { config, + lib, osConfig, + perSystem, + # pkgs, launcher, lockscreen, ... @@ -92,7 +95,6 @@ in { ''; in '' environment { - DISPLAY ":123" CLUTTER_BACKEND "wayland" GDK_BACKEND "wayland" MOZ_ENABLE_WAYLAND "1" @@ -138,6 +140,14 @@ in { skip-at-startup } + xwayland-satellite { + path "${lib.getExe perSystem.xwst.xwayland-satellite}" + } + + clipboard { + disable-primary + } + prefer-no-csd screenshot-path "${xdgPics}/screenshots/screenshot-%Y-%m-%d-%H-%M-%S.png" @@ -315,6 +325,7 @@ in { XF86AudioRaiseVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "raise"; } XF86AudioLowerVolume allow-when-locked=true { spawn "swayosd-client" "--output-volume" "lower"; } XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--output-volume" "mute-toggle"; } + Shift+XF86AudioMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; } XF86AudioMicMute allow-when-locked=true { spawn "swayosd-client" "--input-volume" "mute-toggle"; } XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; } XF86AudioPause allow-when-locked=true { spawn "playerctl" "pause"; } diff --git a/modules/nixos/desktop/common/greeter.nix b/modules/nixos/desktop/common/greeter.nix index bb2c30b..46ea550 100644 --- a/modules/nixos/desktop/common/greeter.nix +++ b/modules/nixos/desktop/common/greeter.nix @@ -33,10 +33,9 @@ in { programs.regreet.enable = true; services.greetd = { enable = true; - vt = 1; settings = { default_session = { - command = "${getExe pkgs.cage} -s -m last -- ${getExe pkgs.greetd.regreet}"; + command = "${getExe pkgs.cage} -s -m last -- ${getExe pkgs.regreet}"; }; }; }; diff --git a/modules/nixos/desktop/niri/default.nix b/modules/nixos/desktop/niri/default.nix index a68e78d..8658f2d 100644 --- a/modules/nixos/desktop/niri/default.nix +++ b/modules/nixos/desktop/niri/default.nix @@ -1,7 +1,9 @@ { config, - pkgs, + inputs, lib, + perSystem, + pkgs, ... }: let inherit (lib) mkIf mkEnableOption; @@ -19,7 +21,11 @@ in { }; sound.pipewire.enable = true; + nixpkgs.overlays = [inputs.niri.overlays.default]; + programs.niri.enable = true; # wayland compositor in rust + programs.niri.package = perSystem.niri.niri; + security = { pam.services.gtklock = {}; soteria.enable = true; # polkit agent in rust From fa7ffb1d082b3c8cdfca4b8cf0f7d193ee3d4dae Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 23 Oct 2025 12:16:15 +0300 Subject: [PATCH 130/138] flake.lock: bump --- flake.lock | 324 +++++++++++++++---------- flake.nix | 6 + modules/nixos/desktop/niri/default.nix | 3 + modules/nixos/system/virt/libvirt.nix | 20 +- modules/shared/nixos/nix/common.nix | 3 +- modules/shared/user/flatpak.nix | 4 +- modules/shared/user/programs.nix | 2 +- 7 files changed, 225 insertions(+), 137 deletions(-) diff --git a/flake.lock b/flake.lock index e2a0a70..a3cf918 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1753216019, - "narHash": "sha256-zik7WISrR1ks2l6T1MZqZHb/OqroHdJnSnAehkE0kCk=", + "lastModified": 1759499898, + "narHash": "sha256-UNzYHLWfkSzLHDep5Ckb5tXc0fdxwPIrT+MY4kpQttM=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "be166e11d86ba4186db93e10c54a141058bdce49", + "rev": "655e067f96fd44b3f5685e17f566b0e4d535d798", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1746562888, - "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=", + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", "type": "github" }, "original": { @@ -54,16 +54,17 @@ "base16-fish": { "flake": false, "locked": { - "lastModified": 1622559957, - "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=", + "lastModified": 1754405784, + "narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=", "owner": "tomyun", "repo": "base16-fish", - "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" }, "original": { "owner": "tomyun", "repo": "base16-fish", + "rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561", "type": "github" } }, @@ -110,11 +111,11 @@ ] }, "locked": { - "lastModified": 1755332143, - "narHash": "sha256-jaiZPA5ND7HPJ4U/bzp+BKGOYR14+rIe9tC6XA4jBHU=", + "lastModified": 1758687491, + "narHash": "sha256-sy8Q+MfBe+MZzYj4MJwBDe4lkLnmhy1POO86hWZgqO8=", "owner": "numtide", "repo": "blueprint", - "rev": "3c8bf84e28df2be19cc6623cb3ceeb6fc0839b91", + "rev": "7ecaeb70f63d14a397c73b38f57177894bb795c8", "type": "github" }, "original": { @@ -136,11 +137,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1755899135, - "narHash": "sha256-ewtYnDQL+p/Nonh2SviTSYMfOHYwFSPk3BkkzxWOA/Y=", + "lastModified": 1760395520, + "narHash": "sha256-4hVEyj3H4i0kwtO8dDIKee1WoZ0iMZxr3ageSdJ6Cck=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "61032343b2c7717f8180309d883e1b80e4a6556b", + "rev": "c438d72cee048fe6203df15c81a230efb16fa409", "type": "github" }, "original": { @@ -189,11 +190,11 @@ "firefox-gnome-theme": { "flake": false, "locked": { - "lastModified": 1748383148, - "narHash": "sha256-pGvD/RGuuPf/4oogsfeRaeMm6ipUIznI2QSILKjKzeA=", + "lastModified": 1758112371, + "narHash": "sha256-lizRM2pj6PHrR25yimjyFn04OS4wcdbc38DCdBVa2rk=", "owner": "rafaelmardojai", "repo": "firefox-gnome-theme", - "rev": "4eb2714fbed2b80e234312611a947d6cb7d70caf", + "rev": "0909cfe4a2af8d358ad13b20246a350e14c2473d", "type": "github" }, "original": { @@ -295,11 +296,11 @@ ] }, "locked": { - "lastModified": 1751413152, - "narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=", + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "77826244401ea9de6e3bac47c2db46005e1f30b5", + "rev": "4524271976b625a4a605beefd893f270620fd751", "type": "github" }, "original": { @@ -360,6 +361,24 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "fromYaml": { "flake": false, "locked": { @@ -387,11 +406,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1756026621, - "narHash": "sha256-dw1sAVXzHBb3ZRSjVucKXQe65u0k2lsZ9FB3l6evpRY=", + "lastModified": 1760452291, + "narHash": "sha256-VkVxtS1As8qHlp5zlL2jeyvaZMLWWPsu8aEeUap2Gy0=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "95bc181c986e91ea14db18eb9f300984e1f6ebdb", + "rev": "3d837cbbce254f0169602119e7b3fc33179c954d", "type": "github" }, "original": { @@ -468,11 +487,11 @@ ] }, "locked": { - "lastModified": 1756022458, - "narHash": "sha256-J1i35r4HfNDdPpwL0vOBaZopQudAUVtartEerc1Jryc=", + "lastModified": 1760312644, + "narHash": "sha256-U9SkK45314urw9P7MmjhEgiQwwD/BTj+T3HTuz1JU1Q=", "owner": "nix-community", "repo": "home-manager", - "rev": "9e3a33c0bcbc25619e540b9dfea372282f8a9740", + "rev": "e121f3773fa596ecaba5b22e518936a632d72a90", "type": "github" }, "original": { @@ -526,11 +545,11 @@ ] }, "locked": { - "lastModified": 1754305013, - "narHash": "sha256-u+M2f0Xf1lVHzIPQ7DsNCDkM1NYxykOSsRr4t3TbSM4=", + "lastModified": 1759490292, + "narHash": "sha256-T6iWzDOXp8Wv0KQOCTHpBcmAOdHJ6zc/l9xaztW6Ivc=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "4c1d63a0f22135db123fc789f174b89544c6ec2d", + "rev": "9431db625cd9bb66ac55525479dce694101d6d7a", "type": "github" }, "original": { @@ -559,11 +578,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1756022257, - "narHash": "sha256-BVYvquLQY3VjkqosOrLBPLUo2AwujQGS40DTuHYsYdg=", + "lastModified": 1760445562, + "narHash": "sha256-jUlpBzdvP+eLxy3iGSy/ey7hJ4Phx3TsAMq1kxCKvtA=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "ced38b1b0f46f9fbdf9d37644d27bdbd2a29af1d", + "rev": "ee5d05f0fc03e65f50364f5b9f4315065f9f49c2", "type": "github" }, "original": { @@ -652,11 +671,11 @@ ] }, "locked": { - "lastModified": 1753819801, - "narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=", + "lastModified": 1759080228, + "narHash": "sha256-RgDoAja0T1hnF0pTc56xPfLfFOO8Utol2iITwYbUhTk=", "owner": "hyprwm", "repo": "hyprland-qtutils", - "rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc", + "rev": "629b15c19fa4082e4ce6be09fdb89e8c3312aed7", "type": "github" }, "original": { @@ -681,11 +700,11 @@ ] }, "locked": { - "lastModified": 1753622892, - "narHash": "sha256-0K+A+gmOI8IklSg5It1nyRNv0kCNL51duwnhUO/B8JA=", + "lastModified": 1758927902, + "narHash": "sha256-LZgMds7M94+vuMql2bERQ6LiFFdhgsEFezE4Vn+Ys3A=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "23f0debd2003f17bd65f851cd3f930cff8a8c809", + "rev": "4dafa28d4f79877d67a7d1a654cddccf8ebf15da", "type": "github" }, "original": { @@ -721,11 +740,11 @@ ] }, "locked": { - "lastModified": 1755112136, - "narHash": "sha256-eYLtZJayWWbKBC3u/gvDSqVyffuD+egryr7zPWRAeyY=", + "lastModified": 1760355856, + "narHash": "sha256-I+8JqBRrw53cvd9tSOwoPmyuMoL7dolow7Fp767/Ghw=", "owner": "hyprwm", "repo": "hyprsunset", - "rev": "1f9afca28fac5f490e5f232e6f1887a69ff34896", + "rev": "2b040e1d9d3bc32f68ad1655971422eb16f55753", "type": "github" }, "original": { @@ -746,11 +765,11 @@ ] }, "locked": { - "lastModified": 1754481650, - "narHash": "sha256-6u6HdEFJh5gY6VfyMQbhP7zDdVcqOrCDTkbiHJmAtMI=", + "lastModified": 1759619523, + "narHash": "sha256-r1ed7AR2ZEb2U8gy321/Xcp1ho2tzn+gG1te/Wxsj1A=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "df6b8820c4a0835d83d0c7c7be86fbc555f1f7fd", + "rev": "3df7bde01efb3a3e8e678d1155f2aa3f19e177ef", "type": "github" }, "original": { @@ -771,11 +790,11 @@ ] }, "locked": { - "lastModified": 1751897909, - "narHash": "sha256-FnhBENxihITZldThvbO7883PdXC/2dzW4eiNvtoV5Ao=", + "lastModified": 1755184602, + "narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "fcca0c61f988a9d092cbb33e906775014c61579d", + "rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d", "type": "github" }, "original": { @@ -793,11 +812,11 @@ ] }, "locked": { - "lastModified": 1755670950, - "narHash": "sha256-x84lAqhbz752SU6zZY1yixm9Cbz6kdHtJs/5XE1LKGk=", + "lastModified": 1760266702, + "narHash": "sha256-TP19RpzIyo1JeYAhKii13seYwmhkv7IOD+dCnQOrcgQ=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "7caed3afea56de2b68b74d7a3b580d5b8ca8f445", + "rev": "3d7e970d4cac5d3ee3fe7cafa17cc9868fa21fed", "type": "github" }, "original": { @@ -835,11 +854,11 @@ "mysecrets": { "flake": false, "locked": { - "lastModified": 1748355101, - "narHash": "sha256-2UO6Sg7rEJZ21v1gNKc9MGTknjDW35iGPcL78VnaDnw=", + "lastModified": 1760457736, + "narHash": "sha256-SGmJ73k4awSgiyGCePIU4nl39qJeuIHQPzrObFluPbQ=", "ref": "refs/heads/main", - "rev": "21808ec68bcbd97e0d942a1b09f90d0d1862ab77", - "revCount": 25, + "rev": "e2591ce1eba843404256d62af9fe7dcb6c38898d", + "revCount": 26, "type": "git", "url": "ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets" }, @@ -856,11 +875,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1756040766, - "narHash": "sha256-rL1ipwogRz1EjvEw3YdF6isEUGFqWlLXkB57zs4sYOg=", + "lastModified": 1760426302, + "narHash": "sha256-HEeX0wTT2DTRAgADnOmcyk7k/J8KlFosBpFp0yIVfm0=", "owner": "YaLTeR", "repo": "niri", - "rev": "8b73910a11473ca9d06b204ccb7377360ced00db", + "rev": "87dc96fa69738b5d57562a0a556efa7def138539", "type": "github" }, "original": { @@ -914,11 +933,11 @@ ] }, "locked": { - "lastModified": 1756008611, - "narHash": "sha256-rfTBWuTXi9/X7GhtF562FKNXKh2kvKb6dwI5lV1SjPE=", + "lastModified": 1760241904, + "narHash": "sha256-OD7QnaGEVNdukYEbJbUNWPsvnDrpbZOZxVIk6Pt9Jhw=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "52dec1cb33a614accb9e01307e17816be974d24d", + "rev": "c9f5ea45f25652ec2f771f9426ccacb21cbbaeaa", "type": "github" }, "original": { @@ -954,11 +973,11 @@ }, "nixos-facter-modules": { "locked": { - "lastModified": 1755678220, - "narHash": "sha256-Yvmm03o7Z7gTAOfCnIetHomaDDJVBdLBPHD9dZ5kUcc=", + "lastModified": 1756491981, + "narHash": "sha256-lXyDAWPw/UngVtQfgQ8/nrubs2r+waGEYIba5UX62+k=", "owner": "numtide", "repo": "nixos-facter-modules", - "rev": "25122ee37b0c1f22b07c9fe5f970a7487093a4c0", + "rev": "c1b29520945d3e148cd96618c8a0d1f850965d8c", "type": "github" }, "original": { @@ -969,18 +988,15 @@ }, "nixpkgs": { "locked": { - "lastModified": 1755615617, - "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "20075955deac2583bb12f07151c2df830ef346b4", - "type": "github" + "lastModified": 1758360447, + "narHash": "sha256-XDY3A83bclygHDtesRoaRTafUd80Q30D/Daf9KSG6bs=", + "rev": "8eaee110344796db060382e15d3af0a9fc396e0e", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre864002.8eaee1103447/nixexprs.tar.xz" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, "nixpkgs-stable": { @@ -1015,6 +1031,38 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1760284886, + "narHash": "sha256-TK9Kr0BYBQ/1P5kAsnNQhmWWKgmZXwUQr4ZMjCzWf2c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1759036355, + "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "inputs": { "flake-parts": [ @@ -1027,11 +1075,11 @@ ] }, "locked": { - "lastModified": 1751906969, - "narHash": "sha256-BSQAOdPnzdpOuCdAGSJmefSDlqmStFNScEnrWzSqKPw=", + "lastModified": 1758998580, + "narHash": "sha256-VLx0z396gDCGSiowLMFz5XRO/XuNV+4EnDYjdJhHvUk=", "owner": "nix-community", "repo": "NUR", - "rev": "ddb679f4131e819efe3bbc6457ba19d7ad116f25", + "rev": "ba8d9c98f5f4630bcb0e815ab456afd90c930728", "type": "github" }, "original": { @@ -1050,11 +1098,11 @@ ] }, "locked": { - "lastModified": 1754416808, - "narHash": "sha256-c6yg0EQ9xVESx6HGDOCMcyRSjaTpNJP10ef+6fRcofA=", + "lastModified": 1758108966, + "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "9c52372878df6911f9afc1e2a1391f55e4dfc864", + "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", "type": "github" }, "original": { @@ -1106,11 +1154,12 @@ "nix-index-database": "nix-index-database", "nixos-cosmic": "nixos-cosmic", "nixos-facter-modules": "nixos-facter-modules", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable_2", "sops-nix": "sops-nix", "stylix": "stylix", "systems": "systems", + "vicinae": "vicinae", "walker": "walker", "xwst": "xwst" } @@ -1123,11 +1172,11 @@ ] }, "locked": { - "lastModified": 1755830208, - "narHash": "sha256-fMa/Hcg+4O2h+kl3gNPjtGSWPI8NtCl3LYMsejK6qGA=", + "lastModified": 1760236527, + "narHash": "sha256-h9+WEQtUIZaZMvA1pnbZbMM+5X39OFnW92Q8hNoToD0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "802a7b97f8ff672ba2dec70c9e354f51f844e796", + "rev": "a38dd7f462825c75ce8567816ae38c2e7d826bfa", "type": "github" }, "original": { @@ -1165,11 +1214,11 @@ ] }, "locked": { - "lastModified": 1756003222, - "narHash": "sha256-lmEMhIIbjt8Wp1EYbNqCojuU9ygyDFv8Tu0X1k8qIMc=", + "lastModified": 1757989933, + "narHash": "sha256-9cpKYWWPCFhgwQTww8S94rTXgg8Q8ydFv9fXM6I8xQM=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "88ceedecde53e809b4bf8b5fd10d181889d9bac7", + "rev": "8249aa3442fb9b45e615a35f39eca2fe5510d7c3", "type": "github" }, "original": { @@ -1227,11 +1276,11 @@ ] }, "locked": { - "lastModified": 1754988908, - "narHash": "sha256-t+voe2961vCgrzPFtZxha0/kmFSHFobzF00sT8p9h0U=", + "lastModified": 1760393368, + "narHash": "sha256-8mN3kqyqa2PKY0wwZ2UmMEYMcxvNTwLaOrrDsw6Qi4E=", "owner": "mic92", "repo": "sops-nix", - "rev": "3223c7a92724b5d804e9988c6b447a0d09017d48", + "rev": "ab8d56e85b8be14cff9d93735951e30c3e86a437", "type": "github" }, "original": { @@ -1263,11 +1312,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1755997543, - "narHash": "sha256-/fejmCQ7AWa655YxyPxRDbhdU7c5+wYsFSjmEMXoBCM=", + "lastModified": 1760350849, + "narHash": "sha256-JqcM5Pkm5q1c9D5zpINJsN1yCB4Vq1cL12ZuFyo32T4=", "owner": "danth", "repo": "stylix", - "rev": "f47c0edcf71e802378b1b7725fa57bb44fe85ee8", + "rev": "7b4957d716f4fb615bf0e37d3b23c112579b1408", "type": "github" }, "original": { @@ -1306,6 +1355,21 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -1342,11 +1406,11 @@ "tinted-schemes": { "flake": false, "locked": { - "lastModified": 1750770351, - "narHash": "sha256-LI+BnRoFNRa2ffbe3dcuIRYAUcGklBx0+EcFxlHj0SY=", + "lastModified": 1757716333, + "narHash": "sha256-d4km8W7w2zCUEmPAPUoLk1NlYrGODuVa3P7St+UrqkM=", "owner": "tinted-theming", "repo": "schemes", - "rev": "5a775c6ffd6e6125947b393872cde95867d85a2a", + "rev": "317a5e10c35825a6c905d912e480dfe8e71c7559", "type": "github" }, "original": { @@ -1358,11 +1422,11 @@ "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1751159871, - "narHash": "sha256-UOHBN1fgHIEzvPmdNMHaDvdRMgLmEJh2hNmDrp3d3LE=", + "lastModified": 1757811970, + "narHash": "sha256-n5ZJgmzGZXOD9pZdAl1OnBu3PIqD+X3vEBUGbTi4JiI=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "bded5e24407cec9d01bd47a317d15b9223a1546c", + "rev": "d217ba31c846006e9e0ae70775b0ee0f00aa6b1e", "type": "github" }, "original": { @@ -1374,11 +1438,11 @@ "tinted-zed": { "flake": false, "locked": { - "lastModified": 1751158968, - "narHash": "sha256-ksOyv7D3SRRtebpXxgpG4TK8gZSKFc4TIZpR+C98jX8=", + "lastModified": 1757811247, + "narHash": "sha256-4EFOUyLj85NRL3OacHoLGEo0wjiRJzfsXtR4CZWAn6w=", "owner": "tinted-theming", "repo": "base16-zed", - "rev": "86a470d94204f7652b906ab0d378e4231a5b3384", + "rev": "824fe0aacf82b3c26690d14e8d2cedd56e18404e", "type": "github" }, "original": { @@ -1387,6 +1451,25 @@ "type": "github" } }, + "vicinae": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1760276212, + "narHash": "sha256-7It9jBYdT8lqJLkKN+i/9RplR2Fv3F7bH02gDVlEV0o=", + "owner": "vicinaehq", + "repo": "vicinae", + "rev": "6c583ff744ce0acf4f1af9c5f5af37057bfcde68", + "type": "github" + }, + "original": { + "owner": "vicinaehq", + "repo": "vicinae", + "type": "github" + } + }, "walker": { "inputs": { "nixpkgs": [ @@ -1439,11 +1522,11 @@ ] }, "locked": { - "lastModified": 1753633878, - "narHash": "sha256-js2sLRtsOUA/aT10OCDaTjO80yplqwOIaLUqEe0nMx0=", + "lastModified": 1755354946, + "narHash": "sha256-zdov5f/GcoLQc9qYIS1dUTqtJMeDqmBmo59PAxze6e4=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "371b96bd11ad2006ed4f21229dbd1be69bed3e8a", + "rev": "a10726d6a8d0ef1a0c645378f983b6278c42eaa0", "type": "github" }, "original": { @@ -1454,18 +1537,18 @@ }, "xwst": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "nixpkgs": [ "nixpkgs" ], "rust-overlay": "rust-overlay_5" }, "locked": { - "lastModified": 1755963545, - "narHash": "sha256-hGXzVhlk+gelqagKAgOHbilNYasM+jM3T8JPshDl2/M=", + "lastModified": 1759707084, + "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "d759c64681bab7cd34f48122037d7420d42f3024", + "rev": "a9188e70bd748118b4d56a529871b9de5adb9988", "type": "github" }, "original": { @@ -1490,11 +1573,11 @@ ] }, "locked": { - "lastModified": 1748261582, - "narHash": "sha256-3i0IL3s18hdDlbsf0/E+5kyPRkZwGPbSFngq5eToiAA=", + "lastModified": 1760401936, + "narHash": "sha256-/zj5GYO5PKhBWGzbHbqT+ehY8EghuABdQ2WGfCwZpCQ=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "aafb1b093fb838f7a02613b719e85ec912914221", + "rev": "365085b6652259753b598d43b723858184980bbe", "type": "github" }, "original": { @@ -1505,27 +1588,20 @@ }, "zon2nix": { "inputs": { - "flake-utils": [ - "ghostty", - "flake-utils" - ], - "nixpkgs": [ - "ghostty", - "nixpkgs" - ] + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1742104771, - "narHash": "sha256-LhidlyEA9MP8jGe1rEnyjGFCzLLgCdDpYeWggibayr0=", + "lastModified": 1758405547, + "narHash": "sha256-WgaDgvIZMPvlZcZrpPMjkaalTBnGF2lTG+62znXctWM=", "owner": "jcollie", "repo": "zon2nix", - "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "rev": "bf983aa90ff169372b9fa8c02e57ea75e0b42245", "type": "github" }, "original": { "owner": "jcollie", "repo": "zon2nix", - "rev": "56c159be489cc6c0e73c3930bd908ddc6fe89613", + "rev": "bf983aa90ff169372b9fa8c02e57ea75e0b42245", "type": "github" } } diff --git a/flake.nix b/flake.nix index 585a48f..2b59434 100644 --- a/flake.nix +++ b/flake.nix @@ -114,6 +114,12 @@ nixpkgs.follows = "nixpkgs"; }; }; + vicinae = { + url = "github:vicinaehq/vicinae"; + inputs = { + # nixpkgs.follows = "nixpkgs"; + }; + }; }; outputs = inputs: inputs.blueprint {inherit inputs;}; diff --git a/modules/nixos/desktop/niri/default.nix b/modules/nixos/desktop/niri/default.nix index 8658f2d..70c8533 100644 --- a/modules/nixos/desktop/niri/default.nix +++ b/modules/nixos/desktop/niri/default.nix @@ -26,6 +26,9 @@ in { programs.niri.enable = true; # wayland compositor in rust programs.niri.package = perSystem.niri.niri; + environment.variables = { + NIXOS_OZONE_WL = "1"; + }; security = { pam.services.gtklock = {}; soteria.enable = true; # polkit agent in rust diff --git a/modules/nixos/system/virt/libvirt.nix b/modules/nixos/system/virt/libvirt.nix index 05c91bb..ee70551 100644 --- a/modules/nixos/system/virt/libvirt.nix +++ b/modules/nixos/system/virt/libvirt.nix @@ -19,16 +19,16 @@ in { runAsRoot = false; swtpm.enable = true; vhostUserPackages = [pkgs.virtiofsd]; - ovmf = { - enable = true; - packages = [ - (pkgs.OVMF.override { - secureBoot = true; - tpmSupport = true; - }) - .fd - ]; - }; + # ovmf = { + # enable = true; + # packages = [ + # (pkgs.OVMF.override { + # secureBoot = true; + # tpmSupport = true; + # }) + # .fd + # ]; + # }; }; }; }; diff --git a/modules/shared/nixos/nix/common.nix b/modules/shared/nixos/nix/common.nix index ee6fb3b..ddd4692 100644 --- a/modules/shared/nixos/nix/common.nix +++ b/modules/shared/nixos/nix/common.nix @@ -6,7 +6,8 @@ }: { # imports = with inputs; [lix.nixosModules.default]; nix = { - package = pkgs.lixPackageSets.latest.lix; + package = pkgs.lixPackageSets.git.lix; + # package = pkgs.lixPackageSets.latest.lix; channel.enable = false; daemonCPUSchedPolicy = "idle"; optimise = { diff --git a/modules/shared/user/flatpak.nix b/modules/shared/user/flatpak.nix index e64b645..ae5cce2 100644 --- a/modules/shared/user/flatpak.nix +++ b/modules/shared/user/flatpak.nix @@ -39,7 +39,7 @@ # chatting "im.riot.Riot" # matrix client "io.github.kukuruzka165.materialgram" # telegram client - "io.github.spacingbat3.webcord" # discord client + "io.github.equicord.equibop" # discord client # "org.mozilla.Thunderbird" # mail client "org.signal.Signal" # "org.telegram.desktop" @@ -75,6 +75,7 @@ "io.github.finefindus.Hieroglyphic" # find latex symbols (in rust) "io.github.lainsce.Khronos" # log time for tasks "io.gitlab.news_flash.NewsFlash" # rss reader + "md.obsidian.Obsidian" "me.iepure.devtoolbox" # some cool utils "org.nicotine_plus.Nicotine" # soulseek ]; @@ -106,6 +107,7 @@ }; "app.grayjay.Grayjay".Context.sockets = ["x11" "!wayland" "!fallback-x11"]; # because CEF "ca.edestcroix.Recordbox".Context.filesystems = ["xdg-music"]; + "md.obsidian.Obsidian".Context.filesystems = ["xdg-docs"]; "com.valvesoftware.Steam" = { Context = { inherit (game) sockets; diff --git a/modules/shared/user/programs.nix b/modules/shared/user/programs.nix index 909e3bb..8bb920b 100644 --- a/modules/shared/user/programs.nix +++ b/modules/shared/user/programs.nix @@ -107,7 +107,7 @@ in { (mkIf bluetooth.enable overskride) # bluetooth gui in rust pika-backup # borg gui in rust pwvucontrol # pipewire gui in rust - sonusmix # pipewire routing tool in rust + # sonusmix # pipewire routing tool in rust ]; # xdg.desktopEntries.uni = { From 043b474e3aaad324d8b6b5f9801f86d316fa9945 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 29 Jul 2025 14:12:04 +0300 Subject: [PATCH 131/138] --- hosts/dunamis/configuration.nix | 24 +++++++++++++++++++++-- modules/home/desktop/niri/default.nix | 2 ++ modules/home/desktop/niri/niri.nix | 2 +- modules/nixos/system/stylix/default.nix | 26 +++++++++++++++++++++++++ modules/shared/nixos/boot/default.nix | 3 ++- 5 files changed, 53 insertions(+), 4 deletions(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index f7bb637..8ae9afe 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -1,4 +1,8 @@ -{inputs, ...}: { +{ + inputs, + lib, + ... +}: { imports = with inputs; [ self.modules.shared.nixos self.nixosModules.desktop @@ -22,6 +26,21 @@ user = "user"; }; + networking.firewall.allowedTCPPorts = [3923 3921 3990]; # for github:9001/copyparty + + networking.networkmanager.enable = lib.mkDefault false; + systemd.network.networks."10-wan" = { + matchConfig.Name = "enp8s0"; + networkConfig = { + # start a DHCP Client for IPv4 Addressing/Routing + DHCP = "ipv4"; + # accept Router Advertisements for Stateless IPv6 Autoconfiguraton (SLAAC) + IPv6AcceptRA = true; + }; + # make routing on this interface a dependency for network-online.target + linkConfig.RequiredForOnline = "routable"; + }; + module = { config = { secureBoot = true; @@ -30,7 +49,7 @@ }; stylix = { enable = true; - theme = "sandcastle"; + theme = "oxocarbon-dark"; }; locale = "uk_UA.UTF-8"; misc = { @@ -38,5 +57,6 @@ qmk-vial.enable = true; }; virt.libvirt.enable = true; + virt.podman.enable = true; }; } diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 31a1fb3..644c647 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -45,6 +45,8 @@ in { then "indigo" else if (hasPrefix "nord" theme) then "nordic" + else if (hasPrefix "oxocarbon" theme) + then "green" else if (hasPrefix "s" theme) then "teal" else null; diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index bb4fea0..45212c3 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -302,7 +302,7 @@ in { Mod+Ctrl+Space repeat=false { toggle-overview; } - Mod+Return repeat=false { spawn "sh" "-c" "$TERMINAL"; } + Mod+Return repeat=false { spawn "/bin/sh" "-c" "$TERMINAL"; } Mod+BackSpace repeat=false { spawn "${launcher}"; } Mod+A repeat=false { spawn "${launcher}"; } Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; } diff --git a/modules/nixos/system/stylix/default.nix b/modules/nixos/system/stylix/default.nix index 8a451e4..25be79e 100644 --- a/modules/nixos/system/stylix/default.nix +++ b/modules/nixos/system/stylix/default.nix @@ -55,6 +55,11 @@ name = "wallhaven-ymo2y7.png"; sha256 = "1b3j0hxxy8m25scq42lxsxc99xvr15pha1j4wplgz761asrvxly3"; }; + retro-deck = fetchurl { + url = "https://w.wallhaven.cc/full/1q/wallhaven-1q83qg.jpg"; + name = "wallhaven-1q83qg.jpg"; + sha256 = "QPmG4QTRvubuX6Fy5rmMwYKw4aQdBiH/zGL/PMmUZOk="; + }; nixos-rainbow = fetchurl { url = "https://w.wallhaven.cc/full/p9/wallhaven-p9pd23.png"; name = "wallhaven-p9pd23.png"; @@ -77,6 +82,27 @@ }; }; themes = { + oxocarbon-dark = { + polarity = "dark"; + scheme = fromBase16Schemes "porple"; + wallpaper = wallpapers.retro-deck; + + serif = { + package = iosevkaPackage; + name = "Iosevka Nerd Font Propo"; + }; + + monospace = { + package = iosevkaTermPackage; + name = "IosevkaTerm Nerd Font Mono"; + }; + + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + }; rose-pine-dawn = { polarity = "light"; scheme = fromBase16Schemes "rose-pine-dawn"; diff --git a/modules/shared/nixos/boot/default.nix b/modules/shared/nixos/boot/default.nix index 010eb4e..1a524ec 100644 --- a/modules/shared/nixos/boot/default.nix +++ b/modules/shared/nixos/boot/default.nix @@ -11,7 +11,8 @@ boot = { plymouth.enable = true; consoleLogLevel = 0; - kernelPackages = pkgs.linuxPackages_cachyos; + # kernelPackages = pkgs.linuxPackages_cachyos; + kernelPackages = pkgs.linuxPackages_latest; initrd = { systemd.enable = true; }; From 11b21ad337320edb705fedf38c2e9f265b90356a Mon Sep 17 00:00:00 2001 From: unexplrd Date: Mon, 25 Aug 2025 17:55:05 +0300 Subject: [PATCH 132/138] --- modules/shared/nixos/security/default.nix | 5 +- .../nixos/security/nix-mineral/default.nix | 3 + .../security/nix-mineral/nix-mineral.nix | 1135 +++++++++++++++++ .../security/nix-mineral/nm-overrides.nix | 228 ++++ .../nixos/security/nix-mineral/sources.toml | 57 + 5 files changed, 1426 insertions(+), 2 deletions(-) create mode 100644 modules/shared/nixos/security/nix-mineral/default.nix create mode 100644 modules/shared/nixos/security/nix-mineral/nix-mineral.nix create mode 100644 modules/shared/nixos/security/nix-mineral/nm-overrides.nix create mode 100644 modules/shared/nixos/security/nix-mineral/sources.toml diff --git a/modules/shared/nixos/security/default.nix b/modules/shared/nixos/security/default.nix index 9dfd561..7b579ea 100644 --- a/modules/shared/nixos/security/default.nix +++ b/modules/shared/nixos/security/default.nix @@ -6,6 +6,7 @@ }: let inherit (lib) mkIf mkDefault; in { + imports = [./nix-mineral]; security = { sudo.enable = false; # doas.enable = true; @@ -33,7 +34,7 @@ in { ''; }; apparmor.enable = mkDefault true; - pam.sshAgentAuth.enable = true; + # pam.sshAgentAuth.enable = true; }; environment.systemPackages = with pkgs; [ @@ -45,7 +46,7 @@ in { implementation = "broker"; }; ntpd-rs = { - enable = true; + enable = false; #settings = { # server = { # require-nts = true; diff --git a/modules/shared/nixos/security/nix-mineral/default.nix b/modules/shared/nixos/security/nix-mineral/default.nix new file mode 100644 index 0000000..fef44a8 --- /dev/null +++ b/modules/shared/nixos/security/nix-mineral/default.nix @@ -0,0 +1,3 @@ +{ + imports = [./nix-mineral.nix ./nm-overrides.nix]; +} diff --git a/modules/shared/nixos/security/nix-mineral/nix-mineral.nix b/modules/shared/nixos/security/nix-mineral/nix-mineral.nix new file mode 100644 index 0000000..f629604 --- /dev/null +++ b/modules/shared/nixos/security/nix-mineral/nix-mineral.nix @@ -0,0 +1,1135 @@ +# This file is part of nix-mineral (https://github.com/cynicsketch/nix-mineral/). +# Copyright (c) 2025 cynicsketch +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# This is the main module for nix-mineral, containing the default configuration. +### CREDITS ### +# Please, see the README and give your thanks and support to the people and projects +# which have helped this project's development! +# sysctl omitted from K4YT3X config that are out of scope of nix-mineral and +# hardening but may be useful anyways to some, see their repo for details: +# kernel.core_uses_pid = 1 +# kernel.pid_max = 4194304 +# kernel.panic = 10 +# fs.file-max = 9223372036854775807 +# fs.inotify.max_user_watches = 524288 +# net.core.netdev_max_backlog = 250000 +# net.core.rmem_default = 8388608 +# net.core.wmem_default = 8388608 +# net.core.rmem_max = 536870912 +# net.core.wmem_max = 536870912 +# net.core.optmem_max = 40960 +# net.ipv4.tcp_congestion_control = bbr +# net.ipv4.tcp_synack_retries = 5 +# net.ipv4.ip_local_port_range = 1024 65535 +# net.ipv4.tcp_slow_start_after_idle = 0 +# net.ipv4.tcp_mtu_probing = 1 +# net.ipv4.tcp_base_mss = 1024 +# net.ipv4.tcp_rmem = 8192 262144 536870912 +# net.ipv4.tcp_wmem = 4096 16384 536870912 +# net.ipv4.tcp_adv_win_scale = -2 +# net.ipv4.tcp_notsent_lowat = 131072 +# Sections from madaidan's guide that are IRRELEVANT/NON-APPLICABLE: +# 1. (Advice) +# 2.1 (Advice) +# 2.3.3 (Advice) +# 2.5.1 (Advice) +# 2.5.3 (Advice) +# 2.6 (Advice) +# 2.10 (Package is broken) +# 7 (Advice) +# 10.5.4 (The problem of NTP being unencrypted is fixed by using NTS instead. +# Note that this means using chrony, as in "Software Choice" in the overrides, +# which is not default behavior!) +# 11 (Partially, there seems to be no way to edit the permissions of /boot +# whether with mount options or through tmpfiles) +# 15 (Implemented by default) +# 19 (Advice) +# 20 (Not relevant) +# 21.7 (Advice, not in threat model) +# 22 (Advice) +# Sections from madaidan's guide requiring manual user intervention: +# 2.7 (systemd service hardening must be done manually) +# 2.9 (Paid software) +# 2.11 (Unique for all hardware, inconvenient) +# 4 (Sandboxing must be done manually) +# 6 (Compiling everything is inconvenient) +# 8.6 (No option, not for all systems) +# 8.7 (Inconvenient, depends on specific user behavior) +# 10.1 (Up to user to determine hostname and username) +# 10.2 (Up to user to determine timezone, locale, and keymap) +# 10.5.3 (Not packaged) +# 10.6 (Not packaged, inconvenient and not within threat model) +# 11.1 (Manual removal of SUID/SGID is manual) +# 11.2 (No known way to set umask declaratively systemwide, use your shellrc +# or home manager to do so) +# 14 (Rather than enforce password quality with PAM, expect user +# to enforce their own password quality; faildelay is, however, +# implemented here) +# 21.1 (Out of scope) +# 21.2 (See above) +# 21.3 (User's job to set passwords) +# 21.3.1 (See above) +# 21.3.2 (See above) +# 21.3.3 (See above) +# 21.4 (Non-declarative setup, experimental) +# ABOUT THE DEFAULTS: +# The default config harms performance and usability in many ways, focusing +# almost entirely on hardening alone. +# +# There are also some optional software substitutions and additions in the +# overrides that are recommended but *not enabled* by default: +# +# sudo ---> doas (For reduced attack surface; although less audited) +# systemd-timesyncd ---> chrony (For NTS support) +# linux_hardened kernel* +# +# As of Decemeber 26, 2024, linux_hardened is up to date with mainline linux in +# unstable NixOS. However, it is cautioned that users regularly check the +# status of the linux_hardened package in NixOS, because it has been left +# unupdated for long periods of time in the past, which would be a severe +# security risk since an outdated kernel means the existence of many known +# vulnerabilities in the most privileged component of the operating system. +# +# USBGuard is also *enabled* by default, which may inconvenience some users. +# +# All of this can, and should be addressed using the overrides file. +# "nm-overrides.nix" +{ + config, + lib, + pkgs, + ... +}: let + # l = lib // builtins; + inherit (lib) mkDefault mkForce mkIf mkMerge mkOption mkOverride types; + inherit (builtins) fromTOML readFile; + + sources = fromTOML (readFile ./sources.toml); + /* + helper function to fetch a file from a github repository + + example usage to fetch https://raw.githubusercontent.com/Kicksecure/security-misc/de6f3ea74a5a1408e4351c955ecb7010825364c5/usr/lib/issue.d/20_security-misc.issue + + fetchGhFile { + user = "Kicksecure"; + repo = "security-misc"; + rev = "de6f3ea74a5a1408e4351c955ecb7010825364c5"; + file = "usr/lib/issue.d/20_security-misc.issue"; + sha256 = "00ilswn1661h8rwfrq4w3j945nr7dqd1g519d3ckfkm0dr49f26b"; + } + */ + fetchGhFile = { + user, + repo, + rev, + file, + sha256, + ... + }: + builtins.fetchurl { + url = "https://raw.githubusercontent.com/${user}/${repo}/${rev}/${file}"; + inherit sha256; + }; + + cfg = config.nix-mineral; +in { + options.nix-mineral = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Enable all nix-mineral defaults. + ''; + }; + overrides = { + compatibility = { + allow-unsigned-modules = mkOption { + type = types.bool; + default = false; + description = '' + Allow loading unsigned kernel modules. + ''; + }; + allow-busmaster-bit = mkOption { + type = types.bool; + default = false; + description = '' + Reenable the busmaster bit at boot. + ''; + }; + allow-ip-forward = mkOption { + type = types.bool; + default = false; + description = '' + Reenable ip forwarding. + ''; + }; + no-lockdown = mkOption { + type = types.bool; + default = false; + description = '' + Disable Linux Kernel Lockdown. + ''; + }; + }; + desktop = { + allow-multilib = mkOption { + type = types.bool; + default = false; + description = '' + Reenable support for 32 bit applications. + ''; + }; + doas-sudo-wrapper = mkOption { + type = types.bool; + default = false; + description = '' + Enable doas-sudo wrapper, with nano to utilize rnano as a "safe" + editor for editing as root. + ''; + }; + hideproc-ptraceable = mkOption { + type = types.bool; + default = false; + description = '' + Allow processes that can ptrace a process to read its corresponding /proc + information. + ''; + }; + hideproc-off = mkOption { + type = types.bool; + default = false; + description = '' + Disable access restriction on /proc. + Fix Gnome/Wayland. + ''; + }; + home-exec = mkOption { + type = types.bool; + default = false; + description = '' + Allow programs to execute in /home. + ''; + }; + skip-restrict-home-permission = mkOption { + type = types.bool; + default = false; + description = '' + Disable recursively restricting permisions of /home directories, + as this can takes several minutes on large home directories. + ''; + }; + nix-allow-all = mkOption { + type = types.bool; + default = false; + description = '' + Allow all users to use nix. + ''; + }; + tmp-exec = mkOption { + type = types.bool; + default = false; + description = '' + Allow executing programs in /tmp. + ''; + }; + usbguard-gnome-integration = mkOption { + type = types.bool; + default = false; + description = '' + Enable USBGuard dbus daemon and polkit rules for integration with GNOME + Shell. + ''; + }; + var-lib-exec = mkOption { + type = types.bool; + default = false; + description = '' + Allow executing programs in /var/lib. + ''; + }; + }; + performance = { + allow-smt = mkOption { + type = types.bool; + default = false; + description = '' + Reenable symmetric multithreading. + ''; + }; + iommu-passthrough = mkOption { + type = types.bool; + default = false; + description = '' + Enable bypassing the IOMMU for direct memory access. + ''; + }; + no-mitigations = mkOption { + type = types.bool; + default = false; + description = '' + Disable all CPU vulnerability mitigations. + ''; + }; + no-pti = mkOption { + type = types.bool; + default = false; + description = '' + Disable page table isolation. + ''; + }; + }; + security = { + disable-bluetooth-kmodules = mkOption { + type = types.bool; + default = false; + description = '' + Disable bluetooth related kernel modules. + ''; + }; + disable-intelme-kmodules = mkOption { + type = types.bool; + default = false; + description = '' + Disable Intel ME related kernel modules and partially disable ME interface. + ''; + }; + disable-amd-iommu-forced-isolation = mkOption { + type = types.bool; + default = false; + description = '' + Do not set amd_iommu=force_isolation kernel parameter. + Workaround hanging issue on linux kernel 6.13. + ''; + }; + lock-root = mkOption { + type = types.bool; + default = false; + description = '' + Lock the root user. + ''; + }; + minimize-swapping = mkOption { + type = types.bool; + default = false; + description = '' + Reduce frequency of swapping to bare minimum. + ''; + }; + sysrq-sak = mkOption { + type = types.bool; + default = false; + description = '' + Enable Secure Attention Key with the sysrq key. + ''; + }; + }; + software-choice = { + doas-no-sudo = mkOption { + type = types.bool; + default = false; + description = '' + Replace sudo with doas. + ''; + }; + no-firewall = mkOption { + type = types.bool; + default = false; + description = '' + Disable default firewall as chosen by nix-mineral. + ''; + }; + secure-chrony = mkOption { + type = types.bool; + default = false; + description = '' + Replace systemd-timesyncd with chrony for NTP, and configure chrony for NTS + and to use the seccomp filter for security. + ''; + }; + }; + }; + }; + + config = mkIf cfg.enable (mkMerge [ + # Main module + + { + boot = { + kernel = { + sysctl = { + # NOTE: `mkOverride 900` is used when a default value is already defined in NixOS. + + # Yama restricts ptrace, which allows processes to read and modify the + # memory of other processes. This has obvious security implications. + # Default value is 1, to only allow parent processes to ptrace child + # processes. May be modified to restrict ptrace further. + # See overrides. + "kernel.yama.ptrace_scope" = mkDefault "1"; + + # Disables magic sysrq key. See overrides file regarding SAK (Secure + # attention key). + "kernel.sysrq" = mkDefault "0"; + + # Disable binfmt. Breaks Roseta, among other applications. + # See overrides file and https://en.wikipedia.org/wiki/Binfmt_misc for more info. + "fs.binfmt_misc.status" = mkDefault "0"; + + # Disable io_uring. May be desired for Proxmox, but is responsible + # for many vulnerabilities and is disabled on Android + ChromeOS. + # See overrides file. + "kernel.io_uring_disabled" = mkDefault "2"; + + # Disable ip forwarding to reduce attack surface. May be needed for + # VM networking. See overrides file. + "net.ipv4.ip_forward" = mkDefault "0"; + "net.ipv4.conf.all.forwarding" = mkOverride 900 "0"; + "net.ipv4.conf.default.forwarding" = mkDefault "0"; + "net.ipv6.conf.all.forwarding" = mkDefault "0"; + "net.ipv6.conf.default.forwarding" = mkDefault "0"; + + # Privacy/security split. + # By default, nix-mineral enables + # tcp-timestamps. Disabling prevents leaking system time, enabling protects + # against wrapped sequence numbers and improves performance. + # + # Read more about the issue here: + # URL: (In favor of disabling): https://madaidans-insecurities.github.io/guides/linux-hardening.html#tcp-timestamps + # URL: (In favor of enabling): https://access.redhat.com/sites/default/files/attachments/20150325_network_performance_tuning.pdf + "net.ipv4.tcp_timestamps" = mkDefault "1"; + + "dev.tty.ldisc_autoload" = mkDefault "0"; + "fs.protected_fifos" = mkDefault "2"; + "fs.protected_hardlinks" = mkDefault "1"; + "fs.protected_regular" = mkDefault "2"; + "fs.protected_symlinks" = mkDefault "1"; + "fs.suid_dumpable" = mkDefault "0"; + "kernel.dmesg_restrict" = mkDefault "1"; + "kernel.kexec_load_disabled" = mkOverride 900 "1"; + "kernel.kptr_restrict" = mkOverride 900 "2"; + "kernel.perf_event_paranoid" = mkDefault "3"; + "kernel.printk" = mkOverride 900 "3 3 3 3"; + "kernel.unprivileged_bpf_disabled" = mkDefault "1"; + "net.core.bpf_jit_harden" = mkDefault "2"; + + # Disable ICMP redirects to prevent some MITM attacks + # See https://askubuntu.com/questions/118273/what-are-icmp-redirects-and-should-they-be-blocked + "net.ipv4.conf.all.accept_redirects" = mkOverride 900 "0"; + "net.ipv4.conf.default.accept_redirects" = mkOverride 900 "0"; + "net.ipv4.conf.all.send_redirects" = mkOverride 900 "0"; + "net.ipv4.conf.default.send_redirects" = mkOverride 900 "0"; + "net.ipv6.conf.all.accept_redirects" = mkOverride 900 "0"; + "net.ipv6.conf.default.accept_redirects" = mkOverride 900 "0"; + + # Use secure ICMP redirects by default. Helpful if ICMP redirects are + # reenabled only. + "net.ipv4.conf.all.secure_redirects" = mkOverride 900 "1"; + "net.ipv4.conf.default.secure_redirects" = mkOverride 900 "1"; + + "net.ipv4.conf.all.accept_source_route" = mkDefault "0"; + "net.ipv4.conf.all.rp_filter" = mkOverride 900 "1"; + "net.ipv4.conf.default.accept_source_route" = mkDefault "0"; + "net.ipv4.conf.default.rp_filter" = mkOverride 900 "1"; + "net.ipv4.icmp_echo_ignore_all" = mkDefault "1"; + "net.ipv6.icmp_echo_ignore_all" = mkDefault "1"; + "net.ipv4.tcp_dsack" = mkDefault "0"; + "net.ipv4.tcp_fack" = mkDefault "0"; + "net.ipv4.tcp_rfc1337" = mkDefault "1"; + "net.ipv4.tcp_sack" = mkDefault "0"; + "net.ipv4.tcp_syncookies" = mkDefault "1"; + "net.ipv6.conf.all.accept_ra" = mkDefault "0"; + "net.ipv6.conf.all.accept_source_route" = mkDefault "0"; + "net.ipv6.conf.default.accept_source_route" = mkDefault "0"; + "net.ipv6.default.accept_ra" = mkDefault "0"; + "kernel.core_pattern" = mkDefault "|/bin/false"; + "vm.mmap_rnd_bits" = mkDefault "32"; + "vm.mmap_rnd_compat_bits" = mkDefault "16"; + "vm.unprivileged_userfaultfd" = mkDefault "0"; + "net.ipv4.icmp_ignore_bogus_error_responses" = mkDefault "1"; + + # enable ASLR + # turn on protection and randomize stack, vdso page and mmap + randomize brk base address + "kernel.randomize_va_space" = mkDefault "2"; + + # restrict perf subsystem usage (activity) further + "kernel.perf_cpu_time_max_percent" = mkDefault "1"; + "kernel.perf_event_max_sample_rate" = mkDefault "1"; + + # do not allow mmap in lower addresses + "vm.mmap_min_addr" = mkDefault "65536"; + + # log packets with impossible addresses to kernel log + # No active security benefit, just makes it easier to spot a DDOS/DOS by giving + # extra logs + "net.ipv4.conf.default.log_martians" = mkOverride 900 "1"; + "net.ipv4.conf.all.log_martians" = mkOverride 900 "1"; + + # disable sending and receiving of shared media redirects + # this setting overwrites net.ipv4.conf.all.secure_redirects + # refer to RFC1620 + "net.ipv4.conf.default.shared_media" = mkDefault "0"; + "net.ipv4.conf.all.shared_media" = mkDefault "0"; + + # always use the best local address for announcing local IP via ARP + # Seems to be most restrictive option + "net.ipv4.conf.default.arp_announce" = mkDefault "2"; + "net.ipv4.conf.all.arp_announce" = mkDefault "2"; + + # reply only if the target IP address is local address configured on the incoming interface + "net.ipv4.conf.default.arp_ignore" = mkDefault "1"; + "net.ipv4.conf.all.arp_ignore" = mkDefault "1"; + + # drop Gratuitous ARP frames to prevent ARP poisoning + # this can cause issues when ARP proxies are used in the network + "net.ipv4.conf.default.drop_gratuitous_arp" = mkDefault "1"; + "net.ipv4.conf.all.drop_gratuitous_arp" = mkDefault "1"; + + # ignore all ICMP echo and timestamp requests sent to broadcast/multicast + "net.ipv4.icmp_echo_ignore_broadcasts" = mkOverride 900 "1"; + + # number of Router Solicitations to send until assuming no routers are present + "net.ipv6.conf.default.router_solicitations" = mkDefault "0"; + "net.ipv6.conf.all.router_solicitations" = mkDefault "0"; + + # do not accept Router Preference from RA + "net.ipv6.conf.default.accept_ra_rtr_pref" = mkDefault "0"; + "net.ipv6.conf.all.accept_ra_rtr_pref" = mkDefault "0"; + + # learn prefix information in router advertisement + "net.ipv6.conf.default.accept_ra_pinfo" = mkDefault "0"; + "net.ipv6.conf.all.accept_ra_pinfo" = mkDefault "0"; + + # setting controls whether the system will accept Hop Limit settings from a router advertisement + "net.ipv6.conf.default.accept_ra_defrtr" = mkDefault "0"; + "net.ipv6.conf.all.accept_ra_defrtr" = mkDefault "0"; + + # router advertisements can cause the system to assign a global unicast address to an interface + "net.ipv6.conf.default.autoconf" = mkDefault "0"; + "net.ipv6.conf.all.autoconf" = mkDefault "0"; + + # number of neighbor solicitations to send out per address + "net.ipv6.conf.default.dad_transmits" = mkDefault "0"; + "net.ipv6.conf.all.dad_transmits" = mkDefault "0"; + + # number of global unicast IPv6 addresses can be assigned to each interface + "net.ipv6.conf.default.max_addresses" = mkDefault "1"; + "net.ipv6.conf.all.max_addresses" = mkDefault "1"; + + # enable IPv6 Privacy Extensions (RFC3041) and prefer the temporary address + # https://grapheneos.org/features#wifi-privacy + # GrapheneOS devs seem to believe it is relevant to use IPV6 privacy + # extensions alongside MAC randomization, so that's why we do both + # Commented, as this is already explicitly defined by default in NixOS + # "net.ipv6.conf.default.use_tempaddr" = mkForce "2"; + # "net.ipv6.conf.all.use_tempaddr" = mkForce "2"; + + # ignore all ICMPv6 echo requests + "net.ipv6.icmp.echo_ignore_all" = mkDefault "1"; + "net.ipv6.icmp.echo_ignore_anycast" = mkDefault "1"; + "net.ipv6.icmp.echo_ignore_multicast" = mkDefault "1"; + }; + }; + + kernelParams = + [ + # Requires all kernel modules to be signed. This prevents out-of-tree + # kernel modules from working unless signed. See overrides. + "module.sig_enforce=1" + + # May break some drivers, same reason as the above. Also breaks + # hibernation. See overrides. + "lockdown=confidentiality" + + # May prevent some systems from booting. See overrides. + "efi=disable_early_pci_dma" + + # Forces DMA to go through IOMMU to mitigate some DMA attacks. See + # overrides. + "iommu.passthrough=0" + + # Apply relevant CPU exploit mitigations, and disable symmetric + # multithreading. May harm performance. See overrides. + "mitigations=auto,nosmt" + + # Mitigates Meltdown, some KASLR bypasses. Hurts performance. See + # overrides. + "pti=on" + + # Gather more entropy on boot. Only works with the linux_hardened + # patchset, but does nothing if using another kernel. Slows down boot + # time by a bit. + "extra_latent_entropy" + + "slab_nomerge" + "init_on_alloc=1" + "init_on_free=1" + "page_alloc.shuffle=1" + "randomize_kstack_offset=on" + "vsyscall=none" + "debugfs=off" + "oops=panic" + "quiet" + "loglevel=0" + "random.trust_cpu=off" + "random.trust_bootloader=off" + "intel_iommu=on" + "iommu=force" + "iommu.strict=1" + ] + ++ lib.optional (!cfg.overrides.security.disable-amd-iommu-forced-isolation) + "amd_iommu=force_isolation"; + + # Disable the editor in systemd-boot, the default bootloader for NixOS. + # This prevents access to the root shell or otherwise weakening + # security by tampering with boot parameters. If you use a different + # boatloader, this does not provide anything. You may also want to + # consider disabling similar functions in your choice of bootloader. + loader.systemd-boot.editor = mkDefault false; + }; + environment.etc = { + # Empty /etc/securetty to prevent root login on tty. + securetty.text = '' + # /etc/securetty: list of terminals on which root is allowed to login. + # See securetty(5) and login(1). + ''; + + # Set machine-id to the Kicksecure machine-id, for privacy reasons. + # /var/lib/dbus/machine-id doesn't exist on dbus enabled NixOS systems, + # so we don't have to worry about that. + machine-id.text = '' + b08dfa6083e7567a1921a715000001fb + ''; + + # Borrow Kicksecure banner/issue. + issue.source = fetchGhFile sources.issue; + + # Borrow Kicksecure gitconfig, disabling git symlinks and enabling fsck + # by default for better git security. + gitconfig.source = fetchGhFile sources.gitconfig; + + # Borrow Kicksecure bluetooth configuration for better bluetooth privacy + # and security. Disables bluetooth automatically when not connected to + # any device. + "bluetooth/main.conf".source = mkForce (fetchGhFile sources.bluetooth); + + # Borrow Kicksecure module blacklist. + # "install "foobar" /bin/not-existent" prevents the module from being + # loaded at all. "blacklist "foobar"" prevents the module from being + # loaded automatically at boot, but it can still be loaded afterwards. + "modprobe.d/nm-module-blacklist.conf".source = fetchGhFile sources.module-blacklist; + }; + + ### Filesystem hardening + # Based on Kicksecure/security-misc's remount-secure + # Kicksecure/security-misc + # usr/bin/remount-secure - Last updated July 31st, 2024 + # Inapplicable: + # /sys (Already hardened by default in NixOS) + # /media, /mnt, /opt (Doesn't even exist on NixOS) + # /var/tmp, /var/log (Covered by toplevel hardening on /var,) + # Bind mounting /usr with nodev causes boot failure + # Bind mounting /boot/efi at all causes complete system failure + + fileSystems = { + # noexec on /home can be very inconvenient for desktops. See overrides. + "/home" = { + device = mkDefault "/home"; + options = [ + "bind" + "nosuid" + "noexec" + "nodev" + ]; + }; + + # You do not want to install applications here anyways. + "/root" = { + device = mkDefault "/root"; + options = [ + "bind" + "nosuid" + "noexec" + "nodev" + ]; + }; + + # Some applications may need to be executable in /tmp. See overrides. + "/tmp" = { + device = mkDefault "/tmp"; + options = [ + "bind" + "nosuid" + "noexec" + "nodev" + ]; + }; + + # noexec on /var(/lib) may cause breakage. See overrides. + "/var" = { + device = mkDefault "/var"; + options = [ + "bind" + "nosuid" + "noexec" + "nodev" + ]; + }; + + "/boot" = lib.mkIf (!config.boot.isContainer) { + options = [ + "nosuid" + "noexec" + "nodev" + ]; + }; + + "/srv" = { + device = mkDefault "/srv"; + options = [ + "bind" + "nosuid" + "noexec" + "nodev" + ]; + }; + + "/etc" = lib.mkIf (!config.boot.isContainer) { + device = mkDefault "/etc"; + options = [ + "bind" + "nosuid" + "nodev" + ]; + }; + }; + + # Harden special filesystems while maintaining NixOS defaults as outlined + # here: + # https://github.com/NixOS/nixpkgs/blob/e2dd4e18cc1c7314e24154331bae07df76eb582f/nixos/modules/tasks/filesystems.nix + boot.specialFileSystems = { + # Add noexec to /dev/shm + "/dev/shm" = { + options = [ + "noexec" + ]; + }; + + # Add noexec to /run + "/run" = { + options = [ + "noexec" + ]; + }; + + # Add noexec to /dev + "/dev" = { + options = [ + "noexec" + ]; + }; + + # Hide processes from other users except root, may cause breakage. + # See overrides, in desktop section. + "/proc" = { + device = mkDefault "proc"; + options = [ + "hidepid=2" + "gid=${toString config.users.groups.proc.gid}" + ]; + }; + }; + + # Add "proc" group to whitelist /proc access and allow systemd-logind to view + # /proc in order to unbreak it, as well as to user@ for similar reasons. + # See https://github.com/systemd/systemd/issues/12955, and https://github.com/Kicksecure/security-misc/issues/208 + users.groups.proc.gid = mkDefault config.ids.gids.proc; + systemd.services.systemd-logind.serviceConfig.SupplementaryGroups = ["proc"]; + systemd.services."user@".serviceConfig.SupplementaryGroups = ["proc"]; + + # Enables firewall. You may need to tweak your firewall rules depending on + # your usecase. On a desktop, this shouldn't cause problems. + networking = { + firewall = { + allowedTCPPorts = mkDefault []; + allowedUDPPorts = mkDefault []; + enable = mkDefault true; + }; + networkmanager = { + ethernet.macAddress = mkDefault "random"; + wifi = { + macAddress = mkDefault "random"; + scanRandMacAddress = mkDefault true; + }; + # Enable IPv6 privacy extensions in NetworkManager. + connectionConfig."ipv6.ip6-privacy" = mkDefault 2; + }; + }; + + # Enabling MAC doesn't magically make your system secure. You need to set up + # policies yourself for it to be effective. + security = { + apparmor = { + enable = mkDefault true; + killUnconfinedConfinables = mkDefault true; + }; + + pam = { + loginLimits = [ + { + domain = mkDefault "*"; + item = mkDefault "core"; + type = mkDefault "hard"; + value = mkDefault "0"; + } + ]; + services = { + # Increase hashing rounds for /etc/shadow; this doesn't automatically + # rehash your passwords, you'll need to set passwords for your accounts + # again for this to work. + passwd.rules.password."unix".settings.rounds = mkDefault 65536; + # Enable PAM support for securetty, to prevent root login. + # https://unix.stackexchange.com/questions/670116/debian-bullseye-disable-console-tty-login-for-root + login.rules.auth = { + "nologin" = { + enable = mkDefault true; + order = mkDefault 0; + control = mkDefault "requisite"; + modulePath = mkDefault "${config.security.pam.package}/lib/security/pam_nologin.so"; + }; + "securetty" = { + enable = mkDefault true; + order = mkDefault 1; + control = mkDefault "requisite"; + modulePath = mkDefault "${config.security.pam.package}/lib/security/pam_securetty.so"; + }; + }; + + su.requireWheel = mkDefault true; + su-l.requireWheel = mkDefault true; + system-login.failDelay.delay = mkDefault "4000000"; + }; + }; + }; + services = { + # Disallow root login over SSH. Doesn't matter on systems without SSH. + openssh.settings.PermitRootLogin = mkDefault "no"; + + # DNS connections will fail if not using a DNS server supporting DNSSEC. + resolved.dnssec = mkDefault "true"; + }; + + # Get extra entropy since we disabled hardware entropy sources + # Read more about why at the following URLs: + # https://github.com/smuellerDD/jitterentropy-rngd/issues/27 + # https://blogs.oracle.com/linux/post/rngd1 + services.jitterentropy-rngd.enable = mkDefault (!config.boot.isContainer); + boot.kernelModules = ["jitterentropy_rng"]; + + # Don't store coredumps from systemd-coredump. + systemd.coredump.extraConfig = '' + Storage=none + ''; + + # Enable IPv6 privacy extensions for systemd-networkd. + systemd.network.config.networkConfig.IPv6PrivacyExtensions = mkDefault "kernel"; + + systemd.tmpfiles.settings = + { + # Make all files in /etc/nixos owned by root, and only readable by root. + # /etc/nixos is not owned by root by default, and configuration files can + # on occasion end up also not owned by root. This can be hazardous as files + # that are included in the rebuild may be editable by unprivileged users, + # so this mitigates that. + "restrictetcnixos"."/etc/nixos/*".Z = { + mode = mkDefault "0000"; + user = mkDefault "root"; + group = mkDefault "root"; + }; + } + // lib.optionalAttrs (!cfg.overrides.desktop.skip-restrict-home-permission) { + # Restrict permissions of /home/$USER so that only the owner of the + # directory can access it (the user). systemd-tmpfiles also has the benefit + # of recursively setting permissions too, with the "Z" option as seen below. + "restricthome"."/home/*".Z.mode = mkDefault "~0700"; + }; + + # zram allows swapping to RAM by compressing memory. This reduces the chance + # that sensitive data is written to disk, and eliminates it if zram is used + # to completely replace swap to disk. Generally *improves* storage lifespan + # and performance, there usually isn't a need to disable this. + zramSwap.enable = mkDefault true; + + # Limit access to nix to users with the "wheel" group. ("sudoers") + nix.settings.allowed-users = mkDefault ["@wheel"]; + } + + # Compatibility + + (mkIf cfg.overrides.compatibility.allow-unsigned-modules { + boot.kernelParams = mkOverride 100 ["module.sig_enforce=0"]; + }) + + (mkIf cfg.overrides.compatibility.allow-busmaster-bit { + boot.kernelParams = mkOverride 100 ["efi=no_disable_early_pci_dma"]; + }) + + (mkIf cfg.overrides.compatibility.allow-ip-forward { + boot.kernel.sysctl."net.ipv4.ip_forward" = mkForce "1"; + boot.kernel.sysctl."net.ipv4.conf.all.forwarding" = mkForce "1"; + boot.kernel.sysctl."net.ipv4.conf.default.forwarding" = mkForce "1"; + boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = mkForce "1"; + boot.kernel.sysctl."net.ipv6.conf.default.forwarding" = mkForce "1"; + }) + + (mkIf cfg.overrides.compatibility.no-lockdown { + boot.kernelParams = mkOverride 100 ["lockdown="]; + }) + + # Desktop + + (mkIf cfg.overrides.desktop.allow-multilib { + boot.kernelParams = mkOverride 100 ["ia32_emulation=1"]; + }) + + (mkIf cfg.overrides.desktop.doas-sudo-wrapper { + environment.systemPackages = with pkgs; [ + (writeScriptBin "sudo" ''exec ${l.getExe doas} "$@"'') + (writeScriptBin "sudoedit" ''exec ${l.getExe doas} ${l.getExe' nano "rnano"} "$@"'') + (writeScriptBin "doasedit" ''exec ${l.getExe doas} ${l.getExe' nano "rnano"} "$@"'') + ]; + }) + + (mkIf cfg.overrides.desktop.hideproc-ptraceable { + boot.specialFileSystems."/proc" = { + options = mkForce [ + "nosuid" + "nodev" + "noexec" + "hidepid=4" + "gid=${toString config.users.groups.proc.gid}" + ]; + }; + }) + + (mkIf cfg.overrides.desktop.hideproc-off { + boot.specialFileSystems."/proc" = { + options = mkForce [ + "nosuid" + "nodev" + "noexec" + "gid=${toString config.users.groups.proc.gid}" + ]; + }; + }) + + (mkIf cfg.overrides.desktop.home-exec { + fileSystems."/home" = { + device = mkForce "/home"; + options = mkForce [ + "bind" + "nosuid" + "exec" + "nodev" + ]; + }; + }) + + (mkIf cfg.overrides.desktop.nix-allow-all {nix.settings.allowed-users = mkForce ["*"];}) + + (mkIf cfg.overrides.desktop.tmp-exec { + fileSystems."/tmp" = { + device = mkForce "/tmp"; + options = mkForce [ + "bind" + "nosuid" + "exec" + "nodev" + ]; + }; + }) + + (mkIf cfg.overrides.desktop.usbguard-gnome-integration { + services.usbguard.dbus.enable = mkForce true; + security.polkit = { + extraConfig = '' + polkit.addRule(function(action, subject) { + if ((action.id == "org.usbguard.Policy1.listRules" || + action.id == "org.usbguard.Policy1.appendRule" || + action.id == "org.usbguard.Policy1.removeRule" || + action.id == "org.usbguard.Devices1.applyDevicePolicy" || + action.id == "org.usbguard.Devices1.listDevices" || + action.id == "org.usbguard1.getParameter" || + action.id == "org.usbguard1.setParameter") && + subject.active == true && subject.local == true && + subject.isInGroup("wheel")) { return polkit.Result.YES; } + }); + ''; + }; + }) + + (mkIf cfg.overrides.desktop.var-lib-exec { + fileSystems."/var/lib" = { + device = mkForce "/var/lib"; + options = mkForce [ + "bind" + "nosuid" + "exec" + "nodev" + ]; + }; + }) + + # Performance + + (mkIf cfg.overrides.performance.allow-smt { + boot.kernelParams = mkOverride 100 ["mitigations=auto"]; + }) + + (mkIf cfg.overrides.performance.iommu-passthrough { + boot.kernelParams = mkOverride 100 ["iommu.passthrough=1"]; + }) + + (mkIf cfg.overrides.performance.no-mitigations { + boot.kernelParams = mkOverride 100 ["mitigations=off"]; + }) + + (mkIf cfg.overrides.performance.no-pti {boot.kernelParams = mkOverride 100 ["pti=off"];}) + + # Security + + (mkIf cfg.overrides.security.disable-bluetooth-kmodules { + environment.etc."modprobe.d/nm-disable-bluetooth.conf" = { + text = '' + install bluetooth /usr/bin/disabled-bluetooth-by-security-misc + install bluetooth_6lowpan /usr/bin/disabled-bluetooth-by-security-misc + install bt3c_cs /usr/bin/disabled-bluetooth-by-security-misc + install btbcm /usr/bin/disabled-bluetooth-by-security-misc + install btintel /usr/bin/disabled-bluetooth-by-security-misc + install btmrvl /usr/bin/disabled-bluetooth-by-security-misc + install btmrvl_sdio /usr/bin/disabled-bluetooth-by-security-misc + install btmtk /usr/bin/disabled-bluetooth-by-security-misc + install btmtksdio /usr/bin/disabled-bluetooth-by-security-misc + install btmtkuart /usr/bin/disabled-bluetooth-by-security-misc + install btnxpuart /usr/bin/disabled-bluetooth-by-security-misc + install btqca /usr/bin/disabled-bluetooth-by-security-misc + install btrsi /usr/bin/disabled-bluetooth-by-security-misc + install btrtl /usr/bin/disabled-bluetooth-by-security-misc + install btsdio /usr/bin/disabled-bluetooth-by-security-misc + install btusb /usr/bin/disabled-bluetooth-by-security-misc + install virtio_bt /usr/bin/disabled-bluetooth-by-security-misc + ''; + }; + }) + + (mkIf cfg.overrides.security.disable-intelme-kmodules { + environment.etc."modprobe.d/nm-disable-intelme-kmodules.conf" = { + text = '' + install mei /usr/bin/disabled-intelme-by-security-misc + install mei-gsc /usr/bin/disabled-intelme-by-security-misc + install mei_gsc_proxy /usr/bin/disabled-intelme-by-security-misc + install mei_hdcp /usr/bin/disabled-intelme-by-security-misc + install mei-me /usr/bin/disabled-intelme-by-security-misc + install mei_phy /usr/bin/disabled-intelme-by-security-misc + install mei_pxp /usr/bin/disabled-intelme-by-security-misc + install mei-txe /usr/bin/disabled-intelme-by-security-misc + install mei-vsc /usr/bin/disabled-intelme-by-security-misc + install mei-vsc-hw /usr/bin/disabled-intelme-by-security-misc + install mei_wdt /usr/bin/disabled-intelme-by-security-misc + install microread_mei /usr/bin/disabled-intelme-by-security-misc + ''; + }; + }) + + (mkIf cfg.overrides.security.lock-root { + users = { + users = { + root = { + hashedPassword = mkDefault "!"; + }; + }; + }; + }) + + (mkIf cfg.overrides.security.minimize-swapping { + boot.kernel.sysctl."vm.swappiness" = mkForce "1"; + }) + + (mkIf cfg.overrides.security.sysrq-sak {boot.kernel.sysctl."kernel.sysrq" = mkForce "4";}) + + # Software Choice + + (mkIf cfg.overrides.software-choice.doas-no-sudo { + security.sudo.enable = mkDefault false; + security.doas = { + enable = mkDefault true; + extraRules = [ + { + keepEnv = mkDefault true; + persist = mkDefault true; + users = mkDefault ["user"]; + } + ]; + }; + }) + + (mkIf cfg.overrides.software-choice.no-firewall {networking.firewall.enable = mkForce false;}) + + (mkIf cfg.overrides.software-choice.secure-chrony { + services.timesyncd = { + enable = mkDefault false; + }; + services.chrony = { + enable = mkDefault true; + + extraFlags = mkDefault [ + "-F 1" + "-r" + ]; + # Enable seccomp filter for chronyd (-F 1) and reload server history on + # restart (-r). The -r flag is added to match GrapheneOS's original + # chronyd configuration. + + enableRTCTrimming = mkDefault false; + # Disable 'rtcautotrim' so that 'rtcsync' can be used instead. Either + # this or 'rtcsync' must be disabled to complete a successful rebuild, + # or an error will be thrown due to these options conflicting with + # eachother. + + servers = mkDefault []; + # Since servers are declared by the fetched chrony config, set the + # NixOS option to [ ] to prevent the default values from interfering. + + initstepslew.enabled = mkDefault false; + # Initstepslew "is deprecated in favour of the makestep directive" + # according to: + # https://chrony-project.org/doc/4.6/chrony.conf.html#initstepslew. + # The fetched chrony config already has makestep enabled, so + # initstepslew is disabled (it is enabled by default). + + # The below config is borrowed from GrapheneOS server infrastructure. + # It enables NTS to secure NTP requests, among some other useful + # settings. + + extraConfig = '' + ${builtins.readFile (fetchGhFile sources.chrony)} + leapseclist ${pkgs.tzdata}/share/zoneinfo/leap-seconds.list + ''; + # Override the leapseclist path with the NixOS-compatible path to + # leap-seconds.list using the tzdata package. This is necessary because + # NixOS doesn't use standard FHS paths like /usr/share/zoneinfo. + }; + }) + ]); +} diff --git a/modules/shared/nixos/security/nix-mineral/nm-overrides.nix b/modules/shared/nixos/security/nix-mineral/nm-overrides.nix new file mode 100644 index 0000000..5f7732b --- /dev/null +++ b/modules/shared/nixos/security/nix-mineral/nm-overrides.nix @@ -0,0 +1,228 @@ +# This file is part of nix-mineral (https://github.com/cynicsketch/nix-mineral/). +# Copyright (c) 2025 cynicsketch +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# This is the overrides file for nix-mineral, containing a non-comprehensive +# list of options that one may wish to override for any number of reasons. +# +# The goal is primarily to provide a premade template for users to make +# nix-mineral work with any system and use case. +({ + config, + lib, + pkgs, + ... +}: (with lib; { + ## Compatibility + # Options to ensure compatibility with certain usecases and hardware, at the + # expense of overall security. + + # Set boot parameter "module.sig_enforce=0" to allow loading unsigned kernel + # modules, which may include certain drivers. Lockdown must also be disabled, + # see option below this one. + # nm-overrides.compatibility.allow-unsigned-modules.enable = true; + + # Disable Linux Kernel Lockdown to *permit* loading unsigned kernel modules + # and hibernation. + # nm-overrides.compatibility.no-lockdown.enable = true; + + # Enable binfmt_misc. This is required for Roseta to function. + # nm-overrides.compatibility.binfmt-misc.enable = true; + + # Reenable the busmaster bit at boot. This may help with low resource systems + # that are prevented from booting by the defaults of nix-mineral. + # nm-overrides.compatibility.busmaster-bit.enable = true; + + # Reenable io_uring, which is the cause of many vulnerabilities. This may + # be desired for specific environments concerning Proxmox. + # nm-overrides.compatibility.io-uring.enable = true; + + # Enable ip forwarding. Useful for certain VM networking and is required if + # the system is meant to function as a router. + # nm-overrides.compatibility.ip-forward.enable = true; + + ## Desktop + # Options that are useful to desktop experience and general convenience. Some + # of these may also be to specific server environments, too. Most of these + # options reduce security to a certain degree. + + # Reenable multilib, may be useful to playing certain games. + nm-overrides.desktop.allow-multilib.enable = true; + + # Reenable unprivileged userns. Although userns is the target of many + # exploits, it also used in the Chromium sandbox, unprivileged containers, + # and bubblewrap among many other applications. + nm-overrides.desktop.allow-unprivileged-userns.enable = true; + + # Enable doas-sudo wrapper, useful for scripts that use "sudo." Installs + # nano for rnano as a "safe" method of editing text as root. + # Use this when replacing sudo with doas, see "Software Choice." + # sudo = doas + # doasedit/sudoedit = doas rnano + # nm-overrides.desktop.doas-sudo-wrapper.enable = true; + + # Allow executing binaries in /home. Highly relevant for games and other + # programs executing in the /home folder. + nm-overrides.desktop.home-exec.enable = true; + + # Allow executing binaries in /tmp. Certain applications may need to execute + # in /tmp, Java being one example. + nm-overrides.desktop.tmp-exec.enable = true; + + # Allow executing binaries in /var/lib. LXC, and system-wide Flatpaks are + # among some examples of applications that requiring executing in /var/lib. + # nm-overrides.desktop.var-lib-exec.enable = true; + + # Allow all users to use nix, rather than just users of the "wheel" group. + # May be useful for allowing a non-wheel user to, for example, use devshell. + # nm-overrides.desktop.nix-allow-all-users.enable = true; + + # Automatically allow all connected devices at boot in USBGuard. Note that + # for laptop users, inbuilt speakers and bluetooth cards may be disabled + # by USBGuard by default, so whitelisting them manually or enabling this + # option may solve that. + # nm-overrides.desktop.usbguard-allow-at-boot.enable = true; + + # Enable USBGuard dbus daemon and add polkit rules to integrate USBGuard with + # GNOME Shell. If you use GNOME, this means that USBGuard automatically + # allows all newly connected devices while unlocked, and blacklists all + # newly connected devices while locked. This is obviously very convenient, + # and is similar behavior to handling USB as ChromeOS and GrapheneOS. + # nm-overrides.usbguard-gnome-integration.enable = true; + + # Completely disable USBGuard to avoid hassle with handling USB devices at + # all. + nm-overrides.desktop.usbguard-disable.enable = true; + + # Rather than disable ptrace entirely, restrict ptrace so that parent + # processes can ptrace descendants. May allow certain Linux game anticheats + # to function. + nm-overrides.desktop.yama-relaxed.enable = true; + + # Allow processes that can ptrace a process to read its process information. + # Requires ptrace to even be allowed in the first place, see above option. + # Note: While nix-mineral has made provisions to unbreak systemd, it is + # not supported by upstream, and breakage may still occur: + # https://github.com/systemd/systemd/issues/12955 + # nm-overrides.desktop.hideproc-relaxed.enable = true; + + ## Performance + # Options to revert some performance taxing tweaks by nix-mineral, at the cost + # of security. In general, it's recommended not to use these unless your system + # is otherwise unusable without tweaking these. + + # Allow symmetric multithreading and just use default CPU mitigations, to + # potentially improve performance. + nm-overrides.performance.allow-smt.enable = true; + + # Disable all CPU mitigations. Do not use with the above option. May improve + # performance further, but is even more dangerous! + # nm-overrides.performance.no-mitigations.enable = true; + + # Enable bypassing the IOMMU for direct memory access. Could increase I/O + # performance on ARM64 systems, with risk. See URL: https://wiki.ubuntu.com/ARM64/performance + # nm-overrides.performance.iommu-passthrough.enable = true; + + # Page table isolation mitigates some KASLR bypasses and the Meltdown CPU + # vulnerability. It may also tax performance, so this option disables it. + # nm-overrides.perforamcne.no-pti.enable = true; + + ## Security + # Other security related options that were not enabled by default for one + # reason or another. + + # Lock the root account. Requires another method of privilege escalation, i.e + # sudo or doas, and declarative accounts to work properly. + nm-overrides.security.lock-root.enable = true; + + # Reduce swappiness to bare minimum. May reduce risk of writing sensitive + # information to disk, but hampers zram performance. Also useless if you do + # not even use a swap file/partition, i.e zram only setup. + # nm-overrides.security.minimum-swappiness.enable = true; + + # Enable SAK (Secure Attention Key). SAK prevents keylogging, if used + # correctly. See URL: https://madaidans-insecurities.github.io/guides/linux-hardening.html#accessing-root-securely + # nm-overrides.security.sysrq-sak.enable = true; + + # Privacy/security split. + # This option disables TCP timestamps. By default, nix-mineral enables + # tcp-timestamps. Disabling prevents leaking system time, enabling protects + # against wrapped sequence numbers and improves performance. + # + # Read more about the issue here: + # URL: (In favor of disabling): https://madaidans-insecurities.github.io/guides/linux-hardening.html#tcp-timestamps + # URL: (In favor of enabling): https://access.redhat.com/sites/default/files/attachments/20150325_network_performance_tuning.pdf + # nm-overrides.security.tcp-timestamp-disable.enable = true; + + # Disable loading kernel modules (except those loaded at boot via kernel + # commandline) + # Very likely to cause breakage unless you can compile a list of every module + # you need and add that to your boot parameters manually. + # nm-overrides.security.disable-modules.enable = true; + + # Disable TCP window scaling. May help mitigate TCP reset DoS attacks, but + # may also harm network performance when at high latencies. + # nm-overrides.security.disable-tcp-window-scaling.enable = true; + + # Disable bluetooth entirely. nix-mineral borrows a privacy preserving + # bluetooth configuration file by default, but if you never use bluetooth + # at all, this can reduce attack surface further. + # nm-overrides.security.disable-bluetooth.enable = true; + + # Disable Intel ME related kernel modules. This is to avoid putting trust in + # the highly privilege ME system, but there are potentially other + # consequences. + # + # If you use an AMD system, you can enable this without negative consequence + # and reduce attack surface. + # + # Intel users should read more about the issue at the below links: + # https://www.kernel.org/doc/html/latest/driver-api/mei/mei.html + # https://en.wikipedia.org/wiki/Intel_Management_Engine#Security_vulnerabilities + # https://www.kicksecure.com/wiki/Out-of-band_Management_Technology#Intel_ME_Disabling_Disadvantages + # https://github.com/Kicksecure/security-misc/pull/236#issuecomment-2229092813 + # https://github.com/Kicksecure/security-misc/issues/239 + # + # nm-overrides.security.disable-intelme-kmodules.enable = true; + + # DO NOT USE THIS OPTION ON ANY PRODUCTION SYSTEM! FOR TESTING PURPOSES ONLY! + # Use hardened-malloc as default memory allocator for all processes. + # nm-overrides.security.hardened-malloc.enable = true; + + ## Software Choice + # Options to add (or remove) opinionated software replacements by nix-mineral. + + # Replace sudo with doas. doas has a lower attack surface, but is less + # audited. + # nm-overrides.software-choice.doas-no-sudo.enable = true; + + # Replace systemd-timesyncd with chrony, for NTS support and its seccomp + # filter. + nm-overrides.software-choice.secure-chrony.enable = true; + + # Use Linux Kernel with hardened patchset. Concurs a multitude of security + # benefits, but prevents hibernation.* + # + # (No longer recommended as of July 25, 2024. The patchset being behind by + # about a week or so is one thing, but the package as included in nixpkgs is + # way too infrequently updated, being several weeks or even months behind. + # Therefore, it is recommended to choose an LTS kernel like 5.15, 6.1, or 6.6 + # in your own system configuration.*) + # + # nm-overrides.software-choice.hardened-kernel.enable = true; + + # Dont use the nix-mineral default firewall, if you wish to use alternate + # applications for the same purpose. + # nm-overrides.software-choice.no-firewall.enable = true; +})) diff --git a/modules/shared/nixos/security/nix-mineral/sources.toml b/modules/shared/nixos/security/nix-mineral/sources.toml new file mode 100644 index 0000000..54ff6e6 --- /dev/null +++ b/modules/shared/nixos/security/nix-mineral/sources.toml @@ -0,0 +1,57 @@ +# This file is part of nix-mineral (https://github.com/cynicsketch/nix-mineral/). +# Copyright (c) 2025 cynicsketch +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + + +[issue] +user = "Kicksecure" +repo = "security-misc" +rev = "de6f3ea74a5a1408e4351c955ecb7010825364c5" +file = "usr/lib/issue.d/20_security-misc.issue" +sha256 = "00ilswn1661h8rwfrq4w3j945nr7dqd1g519d3ckfkm0dr49f26b" +modified = "2024/08/02" + +[gitconfig] +user = "Kicksecure" +repo = "security-misc" +rev = "de6f3ea74a5a1408e4351c955ecb7010825364c5" +file = "etc/gitconfig" +sha256 = "1p3adrbmv7fvy84v3i3m3xrzbc2zdrxzn6prac8f6418vwrdmyp7" +modified = "2024/08/02" + +[bluetooth] +user = "Kicksecure" +repo = "security-misc" +rev = "de6f3ea74a5a1408e4351c955ecb7010825364c5" +file = "etc/bluetooth/30_security-misc.conf" +sha256 = "0xyvvgmm0dhf0dfhfj4hdbyf2ma30bpd1m5zx6xnjdfvy2fr44na" +modified = "2024/08/02" + +[module-blacklist] +user = "Kicksecure" +repo = "security-misc" +rev = "de6f3ea74a5a1408e4351c955ecb7010825364c5" +file = "etc/modprobe.d/30_security-misc_disable.conf" +sha256 = "1mab9cnnwpc4a0x1f5n45yn4yhhdy1affdmmimmslg8rcw65ajh2" +modified = "2024/08/02" + +[chrony] +user = "GrapheneOS" +repo = "infrastructure" +rev = "1f4d7316b8bd42476fc8e98224f67ce8d150527d" +file = "etc/chrony.conf" +sha256 = "sha256:0cfd5dwimiv4sadmknnc4l4zm7y49bmdnjdk7wc8wvnhfri3mick" +modified = "2025/04/16" From 41da4762d924150c2f802b8f33af5f06ef004554 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 30 Aug 2025 00:16:25 +0300 Subject: [PATCH 133/138] --- modules/home/desktop/niri/default.nix | 4 +++ .../desktop/niri/programs/waybar/default.nix | 31 ++++++++++++++++--- .../home/desktop/niri/services/default.nix | 2 +- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 644c647..041b3ab 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -94,6 +94,7 @@ in { libnotify playerctl wl-clipboard-rs # wl-clipboard in rust + xfce.xfconf ]; xdg = { @@ -161,6 +162,9 @@ in { Service.TimeoutStopSec = mkForce "1"; Service.Restart = mkForce "always"; }; + xfce4-notifyd = mkGraphicalService { + Service.ExecStart = pkgs.xfce.xfce4-notifyd + "/lib/xfce4/notifyd/xfce4-notifyd"; + }; # xwayland-satellite = mkGraphicalService { # Service = { # Type = "simple"; diff --git a/modules/home/desktop/niri/programs/waybar/default.nix b/modules/home/desktop/niri/programs/waybar/default.nix index 19d3530..933d31a 100644 --- a/modules/home/desktop/niri/programs/waybar/default.nix +++ b/modules/home/desktop/niri/programs/waybar/default.nix @@ -173,11 +173,34 @@ in { dnd-none = "󰂛"; }; return-type = "json"; - exec-if = "which swaync-client"; - exec = "swaync-client -swb"; - on-click = "swaync-client -t -sw"; - on-click-right = "swaync-client -d -sw"; + exec = + pkgs.writeShellApplication { + name = "xfce-notifyd-waybar"; + runtimeInputs = with pkgs; [sqlite xfce.xfconf coreutils]; + text = + # bash + '' + is_dnd=$(xfconf-query -c xfce4-notifyd -p /do-not-disturb) + notifications_count=$(sqlite3 ~/.cache/xfce4/notifyd/log.sqlite "SELECT count(*) FROM notifications WHERE NOT is_read") + + if [[ "$notifications_count" -ne 0 ]]; then + icon="notification" + else + icon="none" + fi + + if [[ "$is_dnd" == "true" ]]; then + icon="dnd-$icon" + fi + + printf '{"text": "%s", "alt": "%s"}' "$notifications_count" "$icon" + ''; + } + + "/bin/xfce-notifyd-waybar"; + on-click = "xfconf-query -c xfce4-notifyd -p /do-not-disturb -T"; + on-click-right = lib.getExe pkgs.xfce.xfce4-notifyd; escape = true; + signal = 1; }; "privacy" = { icon-spacing = 0; diff --git a/modules/home/desktop/niri/services/default.nix b/modules/home/desktop/niri/services/default.nix index 5f77a0c..66ab062 100644 --- a/modules/home/desktop/niri/services/default.nix +++ b/modules/home/desktop/niri/services/default.nix @@ -14,7 +14,7 @@ lib.attrsets.recursiveUpdate { kanshi = import ./kanshi; network-manager-applet.enable = true; playerctld.enable = true; - swaync = import ./swaync; + # swaync = import ./swaync; swayosd.enable = true; udiskie.enable = true; wpaperd.enable = true; From d8c0d2d0bde8ffd3c2d57b8941823242f595754b Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 30 Aug 2025 00:16:25 +0300 Subject: [PATCH 134/138] --- hosts/dunamis/configuration.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 8ae9afe..94f1e60 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -1,6 +1,7 @@ { inputs, lib, + pkgs, ... }: { imports = with inputs; [ @@ -26,6 +27,21 @@ user = "user"; }; + environment.systemPackages = [pkgs.labwc]; + services.xserver = { + enable = true; + desktopManager = { + xterm.enable = false; + xfce = { + enable = true; + noDesktop = true; + enableXfwm = false; + }; + }; + # windowManager.i3.enable = true; + }; + # services.displayManager.defaultSession = "xfce"; + networking.firewall.allowedTCPPorts = [3923 3921 3990]; # for github:9001/copyparty networking.networkmanager.enable = lib.mkDefault false; From 24c93189a1249b1a9224d9d63e2e4c7664481030 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Sat, 30 Aug 2025 00:16:25 +0300 Subject: [PATCH 135/138] --- hosts/dunamis/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/dunamis/configuration.nix b/hosts/dunamis/configuration.nix index 94f1e60..5c668ca 100644 --- a/hosts/dunamis/configuration.nix +++ b/hosts/dunamis/configuration.nix @@ -65,7 +65,7 @@ }; stylix = { enable = true; - theme = "oxocarbon-dark"; + theme = "sandcastle"; }; locale = "uk_UA.UTF-8"; misc = { From 40ebfb3b98b547e92d7315ee5f1c1f443a3208d5 Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 23 Oct 2025 12:22:17 +0300 Subject: [PATCH 136/138] From 0af2b0c81545bf8f2a5e35a10e0098fe25325acd Mon Sep 17 00:00:00 2001 From: unexplrd Date: Tue, 25 Nov 2025 21:22:00 +0200 Subject: [PATCH 137/138] lot of stuff --- flake.lock | 448 +++++++++++------- flake.nix | 2 +- modules/home/desktop/gnome/default.nix | 131 ++--- .../desktop/niri/services/vicinae/default.nix | 4 + modules/home/programs/shell/fish.nix | 5 +- modules/shared/nixos/default.nix | 138 ++++-- modules/shared/nixos/nix/common.nix | 1 + modules/shared/nixos/nix/substituters.nix | 2 + modules/shared/user/flatpak.nix | 6 +- modules/shared/user/programs.nix | 22 +- 10 files changed, 485 insertions(+), 274 deletions(-) create mode 100644 modules/home/desktop/niri/services/vicinae/default.nix diff --git a/flake.lock b/flake.lock index a3cf918..c84fca6 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1759499898, - "narHash": "sha256-UNzYHLWfkSzLHDep5Ckb5tXc0fdxwPIrT+MY4kpQttM=", + "lastModified": 1762356719, + "narHash": "sha256-qwd/xdoOya1m8FENle+4hWnydCtlXUWLAW/Auk6WL7s=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "655e067f96fd44b3f5685e17f566b0e4d535d798", + "rev": "6d0b3567584691bf9d8fedb5d0093309e2f979c7", "type": "github" }, "original": { @@ -111,11 +111,11 @@ ] }, "locked": { - "lastModified": 1758687491, - "narHash": "sha256-sy8Q+MfBe+MZzYj4MJwBDe4lkLnmhy1POO86hWZgqO8=", + "lastModified": 1761645416, + "narHash": "sha256-wTQzbbQ6XHtvNJVuhJj+ytZDRyNtwUKbrIfIvMvKNfQ=", "owner": "numtide", "repo": "blueprint", - "rev": "7ecaeb70f63d14a397c73b38f57177894bb795c8", + "rev": "633af1961cae8e02bc6195e6e599a6b09bf75217", "type": "github" }, "original": { @@ -137,11 +137,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1760395520, - "narHash": "sha256-4hVEyj3H4i0kwtO8dDIKee1WoZ0iMZxr3ageSdJ6Cck=", + "lastModified": 1763246168, + "narHash": "sha256-gUDJZGSOg5syHtQvLImOKL6Eaw4e1ybz4o5pid66kQg=", "owner": "chaotic-cx", "repo": "nyx", - "rev": "c438d72cee048fe6203df15c81a230efb16fa409", + "rev": "6476fbdd52621b4a532309d982d468dc08204151", "type": "github" }, "original": { @@ -187,6 +187,25 @@ "type": "github" } }, + "elephant": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1762962320, + "narHash": "sha256-4Bhteu6s5gMGcNSgniKH4ynmN5WcdDA58Vy2vFlHPdg=", + "owner": "abenz1267", + "repo": "elephant", + "rev": "b7acc4fe8a1b6552b071b6b6f2d3a93c8ddec823", + "type": "github" + }, + "original": { + "owner": "abenz1267", + "repo": "elephant", + "type": "github" + } + }, "firefox-gnome-theme": { "flake": false, "locked": { @@ -345,7 +364,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { "lastModified": 1731533236, @@ -363,7 +382,7 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -406,11 +425,11 @@ "zon2nix": "zon2nix" }, "locked": { - "lastModified": 1760452291, - "narHash": "sha256-VkVxtS1As8qHlp5zlL2jeyvaZMLWWPsu8aEeUap2Gy0=", + "lastModified": 1763265041, + "narHash": "sha256-5Pb+w+gKDVjpHY0wKB441WbPEE0qXgJYU2My4vAkrko=", "owner": "ghostty-org", "repo": "ghostty", - "rev": "3d837cbbce254f0169602119e7b3fc33179c954d", + "rev": "b76203bbb94a628b9a2323ebcc61d8d17b0e1c24", "type": "github" }, "original": { @@ -466,18 +485,20 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1748186689, - "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "host": "gitlab.gnome.org", + "lastModified": 1762869044, + "narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", - "type": "github" + "rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad", + "type": "gitlab" }, "original": { + "host": "gitlab.gnome.org", "owner": "GNOME", - "ref": "48.2", + "ref": "gnome-49", "repo": "gnome-shell", - "type": "github" + "type": "gitlab" } }, "home-manager": { @@ -487,11 +508,11 @@ ] }, "locked": { - "lastModified": 1760312644, - "narHash": "sha256-U9SkK45314urw9P7MmjhEgiQwwD/BTj+T3HTuz1JU1Q=", + "lastModified": 1763228015, + "narHash": "sha256-1rYieMVUyZ3kK/cBIr8mOusxrOEJ1/+2MsOg0oJ7b3A=", "owner": "nix-community", "repo": "home-manager", - "rev": "e121f3773fa596ecaba5b22e518936a632d72a90", + "rev": "96156a9e86281c4bfc451236bc2ddfe4317e6f39", "type": "github" }, "original": { @@ -545,11 +566,11 @@ ] }, "locked": { - "lastModified": 1759490292, - "narHash": "sha256-T6iWzDOXp8Wv0KQOCTHpBcmAOdHJ6zc/l9xaztW6Ivc=", + "lastModified": 1762462052, + "narHash": "sha256-6roLYzcDf4V38RUMSqycsOwAnqfodL6BmhRkUtwIgdA=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "9431db625cd9bb66ac55525479dce694101d6d7a", + "rev": "ffc999d980c7b3bca85d3ebd0a9fbadf984a8162", "type": "github" }, "original": { @@ -563,8 +584,8 @@ "aquamarine": "aquamarine", "hyprcursor": "hyprcursor", "hyprgraphics": "hyprgraphics", + "hyprland-guiutils": "hyprland-guiutils", "hyprland-protocols": "hyprland-protocols", - "hyprland-qtutils": "hyprland-qtutils", "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", @@ -578,11 +599,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1760445562, - "narHash": "sha256-jUlpBzdvP+eLxy3iGSy/ey7hJ4Phx3TsAMq1kxCKvtA=", + "lastModified": 1763294508, + "narHash": "sha256-181Rc5wuWKzCR2x8cDSwYKeYryJR19jq4hWepIXXAsQ=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "ee5d05f0fc03e65f50364f5b9f4315065f9f49c2", + "rev": "9b006b2c8533bae1e528bd123be209453787b9b7", "type": "github" }, "original": { @@ -591,6 +612,52 @@ "type": "github" } }, + "hyprland-guiutils": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": "hyprtoolkit", + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1762755186, + "narHash": "sha256-ZjjETUHtoEhVN7JI1Cbt3p/KcXpK8ZQaPHx7UkG1OgA=", + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "rev": "66356e20a8ed348aa49c1b9ceace786e224225b3", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "type": "github" + } + }, "hyprland-protocols": { "inputs": { "nixpkgs": [ @@ -603,11 +670,11 @@ ] }, "locked": { - "lastModified": 1749046714, - "narHash": "sha256-kymV5FMnddYGI+UjwIw8ceDjdeg7ToDVjbHCvUlhn14=", + "lastModified": 1759610243, + "narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "613878cb6f459c5e323aaafe1e6f388ac8a36330", + "rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", "type": "github" }, "original": { @@ -616,74 +683,6 @@ "type": "github" } }, - "hyprland-qt-support": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprland-qtutils", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "hyprland-qtutils", - "nixpkgs" - ], - "systems": [ - "hyprland", - "hyprland-qtutils", - "systems" - ] - }, - "locked": { - "lastModified": 1749154592, - "narHash": "sha256-DO7z5CeT/ddSGDEnK9mAXm1qlGL47L3VAHLlLXoCjhE=", - "owner": "hyprwm", - "repo": "hyprland-qt-support", - "rev": "4c8053c3c888138a30c3a6c45c2e45f5484f2074", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-qt-support", - "type": "github" - } - }, - "hyprland-qtutils": { - "inputs": { - "hyprland-qt-support": "hyprland-qt-support", - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprland-qtutils", - "hyprlang", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1759080228, - "narHash": "sha256-RgDoAja0T1hnF0pTc56xPfLfFOO8Utol2iITwYbUhTk=", - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "rev": "629b15c19fa4082e4ce6be09fdb89e8c3312aed7", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "type": "github" - } - }, "hyprlang": { "inputs": { "hyprutils": [ @@ -740,11 +739,11 @@ ] }, "locked": { - "lastModified": 1760355856, - "narHash": "sha256-I+8JqBRrw53cvd9tSOwoPmyuMoL7dolow7Fp767/Ghw=", + "lastModified": 1762891302, + "narHash": "sha256-0SpAxDdbuQamQKh2vnQ9oLr0k3ERF6xlnAsviT/6QEw=", "owner": "hyprwm", "repo": "hyprsunset", - "rev": "2b040e1d9d3bc32f68ad1655971422eb16f55753", + "rev": "a9243e37778cbe43b1e8566f26956cb3d20cf811", "type": "github" }, "original": { @@ -753,6 +752,58 @@ "type": "github" } }, + "hyprtoolkit": { + "inputs": { + "aquamarine": [ + "hyprland", + "hyprland-guiutils", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprland-guiutils", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprland-guiutils", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprland-guiutils", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprland-guiutils", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "hyprland-guiutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-guiutils", + "systems" + ] + }, + "locked": { + "lastModified": 1762463729, + "narHash": "sha256-2fYkU/mdz8WKY3dkDPlE/j6hTxIwqultsx4gMMsMns0=", + "owner": "hyprwm", + "repo": "hyprtoolkit", + "rev": "88483bdee5329ec985f0c8f834c519cd18cfe532", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprtoolkit", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -765,11 +816,11 @@ ] }, "locked": { - "lastModified": 1759619523, - "narHash": "sha256-r1ed7AR2ZEb2U8gy321/Xcp1ho2tzn+gG1te/Wxsj1A=", + "lastModified": 1762387740, + "narHash": "sha256-gQ9zJ+pUI4o+Gh4Z6jhJll7jjCSwi8ZqJIhCE2oqwhQ=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "3df7bde01efb3a3e8e678d1155f2aa3f19e177ef", + "rev": "926689ddb9c0a8787e58c02c765a62e32d63d1f7", "type": "github" }, "original": { @@ -812,11 +863,11 @@ ] }, "locked": { - "lastModified": 1760266702, - "narHash": "sha256-TP19RpzIyo1JeYAhKii13seYwmhkv7IOD+dCnQOrcgQ=", + "lastModified": 1762951919, + "narHash": "sha256-ma/xMEGf4J6n/RdZFdxXBJUQhP53HVEPQOC6Dp2TrkQ=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "3d7e970d4cac5d3ee3fe7cafa17cc9868fa21fed", + "rev": "3d248f6e8f877218dd2573fef8925ac997889922", "type": "github" }, "original": { @@ -830,23 +881,20 @@ "crane": "crane", "flake-compat": "flake-compat_3", "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": "nixpkgs_3", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1737639419, - "narHash": "sha256-AEEDktApTEZ5PZXNDkry2YV2k6t0dTgLPEmAZbnigXU=", + "lastModified": 1763154177, + "narHash": "sha256-LIIrMS2f2pPT2/BHs8dfGeupI23v5DNcoRz3W+iMsUA=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "a65905a09e2c43ff63be8c0e86a93712361f871e", + "rev": "70be03ab23d0988224e152f5b52e2fbf44a6d8ee", "type": "github" }, "original": { "owner": "nix-community", - "ref": "v0.4.2", "repo": "lanzaboote", "type": "github" } @@ -875,11 +923,11 @@ "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1760426302, - "narHash": "sha256-HEeX0wTT2DTRAgADnOmcyk7k/J8KlFosBpFp0yIVfm0=", + "lastModified": 1763286485, + "narHash": "sha256-noCCGXkqQxHT+Pk723/poMqkbLHPtgENwg/kntlh2mA=", "owner": "YaLTeR", "repo": "niri", - "rev": "87dc96fa69738b5d57562a0a556efa7def138539", + "rev": "9dad215b9f384310dea53fbd1aa8010e42f779f4", "type": "github" }, "original": { @@ -933,11 +981,11 @@ ] }, "locked": { - "lastModified": 1760241904, - "narHash": "sha256-OD7QnaGEVNdukYEbJbUNWPsvnDrpbZOZxVIk6Pt9Jhw=", + "lastModified": 1763265660, + "narHash": "sha256-Ad9Rd3ZAidrH01xP73S3CjPiyXo7ywZs3uCESjPwUdc=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "c9f5ea45f25652ec2f771f9426ccacb21cbbaeaa", + "rev": "469ef53571ea80890c9497952787920c79c1ee6e", "type": "github" }, "original": { @@ -973,11 +1021,11 @@ }, "nixos-facter-modules": { "locked": { - "lastModified": 1756491981, - "narHash": "sha256-lXyDAWPw/UngVtQfgQ8/nrubs2r+waGEYIba5UX62+k=", + "lastModified": 1762264948, + "narHash": "sha256-iaRf6n0KPl9hndnIft3blm1YTAyxSREV1oX0MFZ6Tk4=", "owner": "numtide", "repo": "nixos-facter-modules", - "rev": "c1b29520945d3e148cd96618c8a0d1f850965d8c", + "rev": "fa695bff9ec37fd5bbd7ee3181dbeb5f97f53c96", "type": "github" }, "original": { @@ -988,15 +1036,18 @@ }, "nixpkgs": { "locked": { - "lastModified": 1758360447, - "narHash": "sha256-XDY3A83bclygHDtesRoaRTafUd80Q30D/Daf9KSG6bs=", - "rev": "8eaee110344796db060382e15d3af0a9fc396e0e", - "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre864002.8eaee1103447/nixexprs.tar.xz" + "lastModified": 1760284886, + "narHash": "sha256-TK9Kr0BYBQ/1P5kAsnNQhmWWKgmZXwUQr4ZMjCzWf2c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "nixpkgs-stable": { @@ -1033,31 +1084,44 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1760284886, - "narHash": "sha256-TK9Kr0BYBQ/1P5kAsnNQhmWWKgmZXwUQr4ZMjCzWf2c=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43", - "type": "github" + "lastModified": 1758360447, + "narHash": "sha256-XDY3A83bclygHDtesRoaRTafUd80Q30D/Daf9KSG6bs=", + "rev": "8eaee110344796db060382e15d3af0a9fc396e0e", + "type": "tarball", + "url": "https://releases.nixos.org/nixos/unstable/nixos-25.11pre864002.8eaee1103447/nixexprs.tar.xz" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" } }, "nixpkgs_3": { "locked": { - "lastModified": 1759036355, - "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", - "owner": "nixos", + "lastModified": 1763187301, + "narHash": "sha256-VgArs7MjFH0XRjZ/dWrUA1bDiJTld9Q824HQdLD3eFU=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", + "rev": "66d930cb8792aea66f1bb2562f26f08d2ce8c3db", "type": "github" }, "original": { - "owner": "nixos", + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1763421233, + "narHash": "sha256-Stk9ZYRkGrnnpyJ4eqt9eQtdFWRRIvMxpNRf4sIegnw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "89c2b2330e733d6cdb5eae7b899326930c2c0648", + "type": "github" + }, + "original": { + "owner": "NixOS", "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" @@ -1098,11 +1162,11 @@ ] }, "locked": { - "lastModified": 1758108966, - "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", + "lastModified": 1762441963, + "narHash": "sha256-j+rNQ119ffYUkYt2YYS6rnd6Jh/crMZmbqpkGLXaEt0=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", + "rev": "8e7576e79b88c16d7ee3bbd112c8d90070832885", "type": "github" }, "original": { @@ -1143,6 +1207,7 @@ "blueprint": "blueprint", "chaotic": "chaotic", "disko": "disko", + "elephant": "elephant", "ghostty": "ghostty", "home-manager": "home-manager", "hyprland": "hyprland", @@ -1154,11 +1219,11 @@ "nix-index-database": "nix-index-database", "nixos-cosmic": "nixos-cosmic", "nixos-facter-modules": "nixos-facter-modules", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable_2", "sops-nix": "sops-nix", "stylix": "stylix", - "systems": "systems", + "systems": "systems_2", "vicinae": "vicinae", "walker": "walker", "xwst": "xwst" @@ -1172,11 +1237,11 @@ ] }, "locked": { - "lastModified": 1760236527, - "narHash": "sha256-h9+WEQtUIZaZMvA1pnbZbMM+5X39OFnW92Q8hNoToD0=", + "lastModified": 1763087910, + "narHash": "sha256-eB9Z1mWd1U6N61+F8qwDggX0ihM55s4E0CluwNukJRU=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "a38dd7f462825c75ce8567816ae38c2e7d826bfa", + "rev": "cf4a68749733d45c0420726596367acd708eb2e8", "type": "github" }, "original": { @@ -1276,11 +1341,11 @@ ] }, "locked": { - "lastModified": 1760393368, - "narHash": "sha256-8mN3kqyqa2PKY0wwZ2UmMEYMcxvNTwLaOrrDsw6Qi4E=", + "lastModified": 1763264763, + "narHash": "sha256-N0BEoJIlJ+M6sWZJ8nnfAjGY9VLvM6MXMitRenmhBkY=", "owner": "mic92", "repo": "sops-nix", - "rev": "ab8d56e85b8be14cff9d93735951e30c3e86a437", + "rev": "882e56c8293e44d57d882b800a82f8b2ee7a858f", "type": "github" }, "original": { @@ -1312,11 +1377,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1760350849, - "narHash": "sha256-JqcM5Pkm5q1c9D5zpINJsN1yCB4Vq1cL12ZuFyo32T4=", + "lastModified": 1763245881, + "narHash": "sha256-0q+4x1Gx3AMIRV8MIN2/WOJOAVMtfqnkY1m3k0iIDkI=", "owner": "danth", "repo": "stylix", - "rev": "7b4957d716f4fb615bf0e37d3b23c112579b1408", + "rev": "29dc3dd858c507bfd1038716197f84f40e41f28d", "type": "github" }, "original": { @@ -1327,16 +1392,16 @@ }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1370,6 +1435,21 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { @@ -1454,14 +1534,16 @@ "vicinae": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1760276212, - "narHash": "sha256-7It9jBYdT8lqJLkKN+i/9RplR2Fv3F7bH02gDVlEV0o=", + "lastModified": 1763205017, + "narHash": "sha256-83pwazMosqHwZaA/fAsnp5ZAogxWt8BNqzFWHBWDVK0=", "owner": "vicinaehq", "repo": "vicinae", - "rev": "6c583ff744ce0acf4f1af9c5f5af37057bfcde68", + "rev": "b7c7e8cee9126e53a3503750468358b6134c765d", "type": "github" }, "original": { @@ -1472,6 +1554,9 @@ }, "walker": { "inputs": { + "elephant": [ + "elephant" + ], "nixpkgs": [ "nixpkgs" ], @@ -1480,16 +1565,15 @@ ] }, "locked": { - "lastModified": 1753363004, - "narHash": "sha256-nNq0+o6lPiKntuL9rOonxihfkCIPvQ+SszTbjoAftC0=", + "lastModified": 1762788361, + "narHash": "sha256-72+WE0RGSW8TgzPijHU6TtLWfMb0G7ojraM5UifTLVg=", "owner": "abenz1267", "repo": "walker", - "rev": "0f366b1f556398d47459b0bd3a9e27e9a0d2c398", + "rev": "e87c8c36468bcf2042a21c6aa878e7f0cdadc8f0", "type": "github" }, "original": { "owner": "abenz1267", - "ref": "0f366b1", "repo": "walker", "type": "github" } @@ -1522,11 +1606,11 @@ ] }, "locked": { - "lastModified": 1755354946, - "narHash": "sha256-zdov5f/GcoLQc9qYIS1dUTqtJMeDqmBmo59PAxze6e4=", + "lastModified": 1761431178, + "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "a10726d6a8d0ef1a0c645378f983b6278c42eaa0", + "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9", "type": "github" }, "original": { @@ -1544,11 +1628,11 @@ "rust-overlay": "rust-overlay_5" }, "locked": { - "lastModified": 1759707084, - "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", + "lastModified": 1762747449, + "narHash": "sha256-Z1TKiux8K09a93w4PFDFsj8HFugXNy3iCC3Z8MpR5Rk=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "a9188e70bd748118b4d56a529871b9de5adb9988", + "rev": "6338574bc5c036487486acde264f38f39ea15fad", "type": "github" }, "original": { @@ -1588,7 +1672,7 @@ }, "zon2nix": { "inputs": { - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" }, "locked": { "lastModified": 1758405547, diff --git a/flake.nix b/flake.nix index 2b59434..cdbc3ab 100644 --- a/flake.nix +++ b/flake.nix @@ -117,7 +117,7 @@ vicinae = { url = "github:vicinaehq/vicinae"; inputs = { - # nixpkgs.follows = "nixpkgs"; + nixpkgs.follows = "nixpkgs"; }; }; }; diff --git a/modules/home/desktop/gnome/default.nix b/modules/home/desktop/gnome/default.nix index 0ae15d8..6a104d1 100644 --- a/modules/home/desktop/gnome/default.nix +++ b/modules/home/desktop/gnome/default.nix @@ -8,6 +8,9 @@ with lib; let cfg = config.desktop.gnome; inherit (config.lib.stylix) colors; + + getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}"; + rgb = color: ''rgb(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"})''; in { options = { desktop.gnome.enable = @@ -16,15 +19,16 @@ in { config = mkIf cfg.enable { home.packages = (with pkgs.gnomeExtensions; [ - # extensions alphabetical-app-grid app-icons-taskbar + appindicator caffeine - pano + # gnome-bedtime + quick-lang-switch removable-drive-menu space-bar - switcher tactile + vicinae window-is-ready-remover ]) ++ (with pkgs; [ @@ -39,12 +43,14 @@ in { programs.gnome-shell.extensions = [ {package = pkgs.gnomeExtensions.alphabetical-app-grid;} {package = pkgs.gnomeExtensions.app-icons-taskbar;} + {package = pkgs.gnomeExtensions.appindicator;} {package = pkgs.gnomeExtensions.caffeine;} - {package = pkgs.gnomeExtensions.pano;} + # {package = pkgs.gnomeExtensions.gnome-bedtime;} + {package = pkgs.gnomeExtensions.quick-lang-switch;} {package = pkgs.gnomeExtensions.removable-drive-menu;} {package = pkgs.gnomeExtensions.space-bar;} - {package = pkgs.gnomeExtensions.switcher;} {package = pkgs.gnomeExtensions.tactile;} + {package = pkgs.gnomeExtensions.vicinae;} {package = pkgs.gnomeExtensions.window-is-ready-remover;} ]; gtk = { @@ -68,7 +74,7 @@ in { }; qt = { enable = true; - platformTheme.name = lib.mkForce "adwaita"; + platformTheme.name = lib.mkForce "gtk3"; }; dconf.settings = with lib.hm.gvariant; { @@ -76,13 +82,6 @@ in { screen-reader-enabled = false; }; - "org/gnome/desktop/app-folders/folders/Utilities" = { - apps = ["org.gnome.baobab.desktop" "org.gnome.FileRoller.desktop" "org.gnome.DiskUtility.desktop" "org.gnome.Connections.desktop" "org.gnome.seahorse.Application.desktop" "org.gnome.Loupe.desktop" "org.gnome.Evince.desktop" "org.gnome.font-viewer.desktop" "org.freedesktop.GnomeAbrt.desktop" "nm-connection-editor.desktop" "org.gnome.DejaDup.desktop" "org.gnome.tweaks.desktop" "org.gnome.Usage.desktop"]; - categories = ["X-GNOME-Utilities"]; - name = "X-GNOME-Utilities.directory"; - translate = true; - }; - "org/gnome/desktop/input-sources" = { mru-sources = [(mkTuple ["xkb" "us"])]; # sources = [(mkTuple ["xkb" "us"]) (mkTuple ["xkb" "ua"]) (mkTuple ["xkb" "us+colemak_dh"])]; @@ -90,10 +89,9 @@ in { }; "org/gnome/desktop/interface" = { - # accent-color = "slate"; clock-show-seconds = true; - color-scheme = "prefer-dark"; - enable-animations = true; + # color-scheme = "prefer-dark"; + enable-animations = false; gtk-enable-primary-paste = false; scaling-factor = mkUint32 1; toolbar-style = "text"; @@ -103,9 +101,10 @@ in { "org/gnome/desktop/peripherals/mouse" = { accel-profile = "flat"; }; + "org/gnome/desktop/peripherals/keyboard" = { - delay = 250; - repeat-interval = 25; + delay = 200; + repeat-interval = 50; }; "org/gnome/desktop/peripherals/touchpad" = { @@ -114,11 +113,10 @@ in { "org/gnome/desktop/search-providers" = { disabled = ["org.gnome.Epiphany.desktop"]; - sort-order = ["org.gnome.Settings.desktop" "org.gnome.Contacts.desktop" "org.gnome.Nautilus.desktop"]; }; "org/gnome/desktop/wm/keybindings" = { - close = ["q"]; + close = ["q"]; move-to-monitor-down = ["Down"]; move-to-monitor-left = ["Left"]; move-to-monitor-right = ["Right"]; @@ -137,8 +135,8 @@ in { switch-to-workspace-2 = ["2"]; switch-to-workspace-3 = ["3"]; switch-to-workspace-4 = ["4"]; - switch-to-workspace-left = ["Left"]; - switch-to-workspace-right = ["Right"]; + switch-to-workspace-left = ["Left"]; + switch-to-workspace-right = ["Right"]; }; "org/gnome/desktop/wm/preferences" = { @@ -152,7 +150,7 @@ in { "org/gnome/mutter" = { dynamic-workspaces = true; - experimental-features = ["scale-monitor-framebuffer"]; + experimental-features = ["scale-monitor-framebuffer" "xwayland-native-scaling"]; workspaces-only-on-primary = true; }; @@ -172,61 +170,79 @@ in { "aztaskbar@aztaskbar.gitlab.com" "caffeine@patapon.info" "drive-menu@gnome-shell-extensions.gcampax.github.com" - "pano@elhan.io" + "focuscontrol@itsfernn" + "gnomebedtime@ionutbortis.gmail.com" + "just-perfection-desktop@just-perfection" + "quick-lang-switch@ankostis.gmail.com" "space-bar@luchrioh" "switcher@landau.fi" "tactile@lundal.io" "user-theme@gnome-shell-extensions.gcampax.github.com" + "vicinae@dagimg-dot" ]; }; - "org/gnome/shell/app-switcher" = { - current-workspace-only = true; + "org/gnome/shell/extensions/aztaskbar" = with lib.hm.gvariant; { + favorites = true; + icon-size = 20; + icon-style = "REGULAR"; + # intellihide = true; + indicator-color-focused = rgb "base0D"; + indicator-color-running = rgb "base05"; + main-panel-height = mkTuple [true 32]; + position-offset = 4; + prefs-visible-page = ""; + show-apps-button = mkTuple [false 0]; + show-panel-activities-button = true; + show-weather-by-clock = "LEFT"; + taskbar-spacing = 2; }; "org/gnome/shell/extensions/caffeine" = { indicator-position-max = 1; }; + # "org/gnome/shell/extensions/bedtime-mode" = { + # bedtime-mode-active = false; + # color-tone-preset = "grayscale"; + # ondemand-button-location = "'menu'"; + # }; + + "org/gnome/shell/extensions/focuscontrol" = { + border-color = "'rgba(0,0,0,0)'"; + border-width = 1; + corner-radius = 0; + focus-down = "['Down']"; + focus-left = "['Left']"; + focus-right = "['Right']"; + focus-up = "['Up']"; + highlight-duration = 1; + }; + "org/gnome/shell/extensions/space-bar/appearance" = { - application-styles = ".space-bar {n -natural-hpadding: 12px;n}nn.space-bar-workspace-label.active {n margin: 0 4px;n background-color: rgba(255,255,255,0.3);n color: rgba(255,255,255,1);n border-color: rgba(0,0,0,0);n font-weight: 700;n border-radius: 4px;n border-width: 0px;n padding: 3px 8px;n}nn.space-bar-workspace-label.inactive {n margin: 0 4px;n background-color: rgba(0,0,0,0);n color: rgba(255,255,255,1);n border-color: rgba(0,0,0,0);n font-weight: 700;n border-radius: 4px;n border-width: 0px;n padding: 3px 8px;n}nn.space-bar-workspace-label.inactive.empty {n margin: 0 4px;n background-color: rgba(0,0,0,0);n color: rgba(255,255,255,0.5);n border-color: rgba(0,0,0,0);n font-weight: 700;n border-radius: 4px;n border-width: 0px;n padding: 3px 8px;n}"; + active-workspace-background-color = "rgba(0,0,0,0)"; + inactive-workspace-background-color = "rgba(0,0,0,0)"; + active-workspace-text-color = rgb "base05"; + inactive-workspace-text-color = rgb "base03"; }; "org/gnome/shell/extensions/space-bar/behavior" = { + always-show-numbers = false; + custom-label-named = "{{number}}"; + custom-label-unnamed = "{{number}}"; + enable-custom-label = true; + indicator-style = "workspaces-bar"; + position = "right"; + position-index = 0; show-empty-workspaces = false; - }; - - "org/gnome/shell/extensions/switcher" = { - activate-after-ms = mkUint32 0; - activate-by-key = mkUint32 1; - fade-enable = true; - font-size = mkUint32 24; - icon-size = mkUint32 24; - max-width-percentage = mkUint32 60; - only-current-workspace = true; - show-executables = false; - show-switcher = ["space"]; - workspace-indicator = true; - }; - - "org/gnome/shell/extensions/aztaskbar" = with lib.hm.gvariant; { - favorites = true; - icon-size = 25; - icon-style = "REGULAR"; - # intellihide = true; - main-panel-height = mkTuple [true 40]; - position-offset = 4; - prefs-visible-page = ""; - show-apps-button = mkTuple [true 0]; - show-panel-activities-button = true; - show-weather-by-clock = "LEFT"; - taskbar-spacing = 2; - # update-notifier-project-version = 30; + smart-workspace-names = false; + system-workspace-indicator = false; }; "org/gnome/shell/extensions/tactile" = { background-color = "#${colors.base00}"; border-color = "#${colors.base0D}"; + text-color = "#${colors.base05}"; border-size = 3; col-3 = 0; gap-size = 6; @@ -237,7 +253,6 @@ in { layout-3-col-3 = 0; layout-3-row-2 = 0; monitor-1-layout = 3; - text-color = "#${colors.base05}"; tile-0-2 = ["z"]; tile-1-1 = ["r"]; tile-1-2 = ["x"]; @@ -249,6 +264,10 @@ in { tile-3-2 = ["d"]; }; + "org/gnome/shell/extensions/vicinae" = { + show-status-indicator = false; + }; + "org/gnome/software" = { download-updates = false; download-updates-notify = false; diff --git a/modules/home/desktop/niri/services/vicinae/default.nix b/modules/home/desktop/niri/services/vicinae/default.nix new file mode 100644 index 0000000..31999c5 --- /dev/null +++ b/modules/home/desktop/niri/services/vicinae/default.nix @@ -0,0 +1,4 @@ +{ + enable = true; + autoStart = true; +} diff --git a/modules/home/programs/shell/fish.nix b/modules/home/programs/shell/fish.nix index 1f801f5..d8c73ce 100644 --- a/modules/home/programs/shell/fish.nix +++ b/modules/home/programs/shell/fish.nix @@ -31,6 +31,7 @@ in { ll = "ls -lh"; p = "pueue"; s = "systemctl"; + stui = "systemctl-tui"; }; shellAbbrs = { pa = "pueue add --"; @@ -41,8 +42,8 @@ in { bind \cH backward-kill-word set fish_greeting set fish_cursor_default block blink - set EDITOR hx - ${getExe pkgs.bat-extras.batman} --export-env | source + # ${getExe pkgs.bat-extras.batman} --export-env | source + if test -e ~/.profile; source ~/.profile; end ''; }; }; diff --git a/modules/shared/nixos/default.nix b/modules/shared/nixos/default.nix index 76605bc..8fd2b5c 100644 --- a/modules/shared/nixos/default.nix +++ b/modules/shared/nixos/default.nix @@ -39,35 +39,115 @@ in { boot.loader.systemd-boot.enable = mkDefault (!cfg.secureBoot); } (mkIf (cfg.laptop.homeRowMods) { - services.keyd = { - enable = true; - keyboards = { - internal = { - ids = ["0001:0001" "048d:c101"]; - settings.main = let - # finger = mod; - pinky = "alt"; - ring = "meta"; - middle = "control"; - index = "shift"; - # timeouts - idle = "200"; - hold = "150"; - # function takes finger and letter - homeRowMod = f: l: "lettermod(${f}, ${l}, ${idle}, ${hold})"; - in { - "a" = homeRowMod pinky "a"; - "s" = homeRowMod ring "s"; - "d" = homeRowMod middle "d"; - "f" = homeRowMod index "f"; - "j" = homeRowMod index "j"; - "k" = homeRowMod middle "k"; - "l" = homeRowMod ring "l"; - ";" = homeRowMod pinky ";"; - }; - }; - }; - }; + services.kanata.keyboards.internal.config = '' + ;; Kanata Configuration File for Graphite Anglemod Layout + + ;; Add a default configuration section to define unmapped key behavior. + (defcfg + process-unmapped-keys no ;; Ensure unmapped keys are passed to the OS unchanged. + ) + + ;; Define the source keys Kanata will intercept. + (defsrc + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e r t y u i o p [ ] \ + caps a s d f g h j k l ; ' ret + lsft z x c v b n m , . / rsft + lctl lmet lalt spc ralt rmet rctl + ) + + (defvar + tap-time 150 + hold-time 200 + ) + + ;; Default QWERTY Layout + (deflayer qwerty + grv 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e r t y u i o p [ ] \ + caps a s d f g h j k l ; ' ret + lsft z x c v b n m , . / rsft + lctl lmet lalt spc ralt rmet rctl + ) + + (defalias + escctrl (tap-hold 100 100 esc lctl) + a (multi f24 (tap-hold $tap-time $hold-time a lalt)) + s (multi f24 (tap-hold $tap-time $hold-time s lmet)) + d (multi f24 (tap-hold $tap-time $hold-time d lctl)) + f (multi f24 (tap-hold $tap-time $hold-time f lsft)) + x (multi f24 (tap-hold $tap-time $hold-time x ralt)) + j (multi f24 (tap-hold $tap-time $hold-time j lsft)) + k (multi f24 (tap-hold $tap-time $hold-time k lctl)) + l (multi f24 (tap-hold $tap-time $hold-time l lmet)) + ; (multi f24 (tap-hold $tap-time $hold-time ; lalt)) + . (multi f24 (tap-hold $tap-time $hold-time . ralt)) + ) + + ;; QWERTY Layout with home row mods + (deflayer qwerty-home-mod + @grl 1 2 3 4 5 6 7 8 9 0 - = bspc + tab q w e r t y u i o p [ ] \ + @esscctrl @a @s @d @f g h @j @k @l @; ' ret + lsft z @x c v b n m , @. / rsft + lctl lmet lalt spc ralt rmet rctl + ) + + (defalias + quote (fork ' S-- (lsft rsft)) ;; ' -> _ + comma (fork , S-/ (lsft rsft)) ;; , -> ? + hyphen (fork - S-' (lsft rsft)) ;; - -> " + slash (fork / S-, (lsft rsft)) ;; / -> < + ) + + (defalias + n (multi f24 (tap-hold $tap-time $hold-time n lalt)) + r (multi f24 (tap-hold $tap-time $hold-time r lmet)) + t (multi f24 (tap-hold $tap-time $hold-time t lctl)) + gs (multi f24 (tap-hold $tap-time $hold-time s lsft)) + m (multi f24 (tap-hold $tap-time $hold-time m ralt)) + h (multi f24 (tap-hold $tap-time $hold-time h lsft)) + ga (multi f24 (tap-hold $tap-time $hold-time a lctl)) + e (multi f24 (tap-hold $tap-time $hold-time e lmet)) + i (multi f24 (tap-hold $tap-time $hold-time i lalt)) + hyph (multi f24 (tap-hold $tap-time $hold-time @hyphen ralt)) + ) + + + ;; Graphite Anglemod Layout + (deflayer graphite-anglemod + @grl 1 2 3 4 5 6 7 8 9 0 [ ] bspc + tab b l d w z @quote f o u j ; = \ + @cap @n @r @t @gs g y @h @ga @e @i @comma ret + lsft x @m c v q p k . @hyph @slash rsft + lctl lmet lalt spc ralt rmet rctl + ) + + ;; Define layer-switching aliases for clean deflayer declarations + (defalias + ;; Tap: backtick (grave), Hold: toggles 'layers' for layer switching. + grl (tap-hold 200 200 grv (layer-toggle layers)) + + ;; Layer-switch aliases + gar (layer-switch graphite-anglemod) + qwr (layer-switch qwerty) + qwm (layer-switch qwerty-home-mod) + + ;; Tap for Caps Lock, Hold for Ctrl + cap (tap-hold 200 200 caps lctl) + ) + + ;; Layer-Switching Layer + ;; Keys 1 and 2 switch between QWERTY and Graphite Anglemod layouts + ;; The _ (underscore) indicates transparent behavior (passes through base layer). + (deflayer layers + _ @qwm @gar @qwr _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ _ _ _ _ _ + _ _ _ _ _ _ _ + ) + ''; }) (mkIf (cfg.powerSave) { powerManagement.enable = true; diff --git a/modules/shared/nixos/nix/common.nix b/modules/shared/nixos/nix/common.nix index ddd4692..301c89c 100644 --- a/modules/shared/nixos/nix/common.nix +++ b/modules/shared/nixos/nix/common.nix @@ -32,6 +32,7 @@ # Allow the use of the impure-env setting. # "configurable-impure-env" ]; + use-xdg-base-directories = true; }; }; # no longer need to pre-allocate build users for everything diff --git a/modules/shared/nixos/nix/substituters.nix b/modules/shared/nixos/nix/substituters.nix index fd4d5c1..19ea112 100644 --- a/modules/shared/nixos/nix/substituters.nix +++ b/modules/shared/nixos/nix/substituters.nix @@ -5,12 +5,14 @@ "https://chaotic-nyx.cachix.org/" "https://cosmic.cachix.org/" "https://nix-community.cachix.org/" + "https://vicinae.cachix.org" ]; trusted-public-keys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc=" ]; }; } diff --git a/modules/shared/user/flatpak.nix b/modules/shared/user/flatpak.nix index ae5cce2..35ca03e 100644 --- a/modules/shared/user/flatpak.nix +++ b/modules/shared/user/flatpak.nix @@ -39,8 +39,9 @@ # chatting "im.riot.Riot" # matrix client "io.github.kukuruzka165.materialgram" # telegram client - "io.github.equicord.equibop" # discord client + "org.equicord.equibop" # discord client # "org.mozilla.Thunderbird" # mail client + "com.tutanota.Tutanota" "org.signal.Signal" # "org.telegram.desktop" ] @@ -65,6 +66,7 @@ # misc "app.drey.Warp" # share files using magic wormhole "com.bitwarden.desktop" + "com.github.johnfactotum.Foliate" # book reader "com.github.tchx84.Flatseal" # control flatpak permissions "com.logseq.Logseq" "com.obsproject.Studio" @@ -107,7 +109,7 @@ }; "app.grayjay.Grayjay".Context.sockets = ["x11" "!wayland" "!fallback-x11"]; # because CEF "ca.edestcroix.Recordbox".Context.filesystems = ["xdg-music"]; - "md.obsidian.Obsidian".Context.filesystems = ["xdg-docs"]; + "md.obsidian.Obsidian".Context.filesystems = ["~/Obsidian"]; "com.valvesoftware.Steam" = { Context = { inherit (game) sockets; diff --git a/modules/shared/user/programs.nix b/modules/shared/user/programs.nix index 8bb920b..6c83853 100644 --- a/modules/shared/user/programs.nix +++ b/modules/shared/user/programs.nix @@ -3,12 +3,19 @@ lib, osConfig, pkgs, + inputs, ... }: let inherit (lib) mkIf; inherit (osConfig.virtualisation) libvirtd; inherit (osConfig.hardware) bluetooth; in { + imports = [ + inputs.vicinae.homeManagerModules.default + ]; + + services.vicinae.enable = true; + console.yazi.enable = true; editor.helix.enable = true; shell = { @@ -17,9 +24,18 @@ in { }; syncthing.enable = true; terminal.wezterm.enable = true; - # terminal.ghostty.enable = true; + terminal.ghostty.enable = true; systemd.user.settings.Manager.DefaultEnvironment = { - TERMINAL = "wezterm"; + TERMINAL = "ghostty"; + HISTFILE = ''"$XDG_STATE_HOME"/bash/history''; + CARGO_HOME = ''"$XDG_DATA_HOME"/cargo''; + DOTNET_CLI_HOME = ''"$XDG_DATA_HOME"/dotnet''; + GNUPGHOME = ''"$XDG_DATA_HOME"/gnupg''; + ICEAUTHORITY = ''"$XDG_CACHE_HOME"/ICEauthority''; + NUGET_PACKAGES = ''"$XDG_CACHE_HOME"/NuGetPackages''; + NPM_CONFIG_INIT_MODULE = ''"$XDG_CONFIG_HOME"/npm/config/npm-init.js''; + NPM_CONFIG_CACHE = ''"$XDG_CACHE_HOME"/npm''; + NPM_CONFIG_TMP = ''"$XDG_RUNTIME_DIR"/npm''; }; services = { @@ -110,6 +126,8 @@ in { # sonusmix # pipewire routing tool in rust ]; + xdg.configFile."vicinae/vicinae.json".enable = false; + # xdg.desktopEntries.uni = { # actions."Copy".exec = "fish -c \"~/.local/bin/uni --copy\""; # categories = ["Utility" "X-Launch" "Network"]; From 9c5c6cbd2fd290f0942e833f3e9046fa75cfe04e Mon Sep 17 00:00:00 2001 From: unexplrd Date: Thu, 27 Nov 2025 14:08:31 +0200 Subject: [PATCH 138/138] more stuff --- modules/home/desktop/niri/default.nix | 13 +++++--- modules/home/desktop/niri/niri.nix | 9 ++--- .../home/desktop/niri/services/default.nix | 4 ++- modules/home/programs/syncthing.nix | 33 ++----------------- 4 files changed, 19 insertions(+), 40 deletions(-) diff --git a/modules/home/desktop/niri/default.nix b/modules/home/desktop/niri/default.nix index 041b3ab..d3b2965 100644 --- a/modules/home/desktop/niri/default.nix +++ b/modules/home/desktop/niri/default.nix @@ -14,13 +14,16 @@ ifLaptop = mkIf (hostName != "dunamis"); - commonArgs = { + commonArgs = rec { inherit config inputs lib osConfig perSystem pkgs; - launcher = getExe pkgs.walker; + baseMenu = getExe perSystem.vicinae.default; + clipboard = baseMenu + " vicinae://extensions/vicinae/clipboard/history"; + launcher = baseMenu + " toggle"; lockscreen = getExe pkgs.gtklock; }; in { imports = with inputs; [ + # vicinae.homeManagerModules.default walker.homeManagerModules.default ]; options = { @@ -70,7 +73,7 @@ in { platformTheme.name = "gtk3"; }; - programs.walker = import ./programs/walker commonArgs; + # programs.walker = import ./programs/walker commonArgs; programs.waybar = import ./programs/waybar commonArgs; services = import ./services commonArgs; @@ -154,7 +157,7 @@ in { copyq = mkGraphicalService {Service.Environment = mkForce "QT_QPA_PLATFORM=wayland";}; network-manager-applet = mkGraphicalService {}; udiskie = mkGraphicalService {}; - walker = mkGraphicalService {}; + # walker = mkGraphicalService {}; waybar = mkGraphicalService {}; wpaperd = mkGraphicalService {} @@ -186,7 +189,7 @@ in { ExecStart = "${pkgs.lisgd}/bin/lisgd" + " -d /dev/input/by-path/pci-0000:00:15.1-platform-i2c_designware.1-event" - + " -g \"1,DU,TL,*,P,niri msg action toggle-overview\"" + + ''-g "1,DU,TL,*,P,niri msg action toggle-overview"'' + " -g \"3,UD,T,*,P,niri msg action focus-workspace-up\"" + " -g \"3,DU,B,*,P,niri msg action focus-workspace-down\"" + " -g \"3,LR,L,*,P,niri msg action focus-column-left\"" diff --git a/modules/home/desktop/niri/niri.nix b/modules/home/desktop/niri/niri.nix index 45212c3..17a2064 100644 --- a/modules/home/desktop/niri/niri.nix +++ b/modules/home/desktop/niri/niri.nix @@ -4,6 +4,7 @@ osConfig, perSystem, # pkgs, + clipboard, launcher, lockscreen, ... @@ -303,12 +304,12 @@ in { Mod+Ctrl+Space repeat=false { toggle-overview; } Mod+Return repeat=false { spawn "/bin/sh" "-c" "$TERMINAL"; } - Mod+BackSpace repeat=false { spawn "${launcher}"; } - Mod+A repeat=false { spawn "${launcher}"; } + Mod+BackSpace repeat=false { spawn "sh" "-c" "${launcher}"; } + Mod+D repeat=false { spawn "sh" "-c" "${launcher}"; } Mod+Ctrl+L repeat=false { spawn "${lockscreen}"; } - Mod+Ctrl+V repeat=false { spawn "copyq" "menu"; } + Mod+Ctrl+V repeat=false { spawn "sh" "-c" "${clipboard}"; } - Mod+Shift+W repeat=false { spawn "walker" "-m" "windows"; } + // Mod+Shift+W repeat=false { spawn "walker" "-m" "windows"; } Mod+Ctrl+Shift+BracketLeft { quit; } Mod+Ctrl+Shift+BracketRight { power-off-monitors; } diff --git a/modules/home/desktop/niri/services/default.nix b/modules/home/desktop/niri/services/default.nix index 66ab062..be7aadc 100644 --- a/modules/home/desktop/niri/services/default.nix +++ b/modules/home/desktop/niri/services/default.nix @@ -1,8 +1,9 @@ { + config, lib, + lockscreen, osConfig, pkgs, - lockscreen, ... }: lib.attrsets.recursiveUpdate { @@ -17,6 +18,7 @@ lib.attrsets.recursiveUpdate { # swaync = import ./swaync; swayosd.enable = true; udiskie.enable = true; + # vicinae = import ./vicinae; wpaperd.enable = true; } { diff --git a/modules/home/programs/syncthing.nix b/modules/home/programs/syncthing.nix index 4d17242..7d76707 100644 --- a/modules/home/programs/syncthing.nix +++ b/modules/home/programs/syncthing.nix @@ -10,44 +10,17 @@ in { syncthing.enable = mkEnableOption "enable syncthing"; }; config = mkIf cfg.enable { - systemd.user.services.syncthing.Environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder services.syncthing = { enable = true; + extraFlags = ["--no-default-folder"]; + overrideDevices = false; + overrideFolders = false; tray.enable = true; settings = { options = { urAccepted = -1; relaysEnabled = true; }; - devices = { - "dunamis".id = "72VRZFX-65SZUKP-2XL2WLG-75MMKLG-PQLDEZN-G5OI5U7-RLF4OHS-LNCXEQX"; - "eldrid".id = "VTSBNN6-W6UUT66-NDEQBNJ-DJJM5YE-PWU63IW-Y6CTJNN-Q3RHEQB-POBLCQH"; - "legion".id = "FDS73OW-BHRWDBO-AOFQX4D-FSCABP2-HN4575T-CSIO6TX-5CPJQLQ-L25TYQJ"; - "morphius".id = "VATWBD7-ZTMGGCT-XH6YDYD-5OMPILK-U43UYYW-OGC4BLB-IQGH35R-4X5HZQH"; - "sarien".id = "LUVZGFV-OV6FV5E-SDROWHZ-4BR5PFB-VP5Y326-AFEP6NL-ORUMJQQ-SSYCQQO"; - }; - folders = { - "kgWDuKXLwWm9dalD" = { - path = "/home/user/docs"; - devices = [ - "dunamis" - "eldrid" - "legion" - "morphius" - "sarien" - ]; - }; - "lPdfBZtxd6fATFp2" = { - path = "/home/user/programming"; - devices = [ - "dunamis" - "eldrid" - "morphius" - "legion" - "sarien" - ]; - }; - }; }; }; };