diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..f3d4b07 --- /dev/null +++ b/TODO.md @@ -0,0 +1,21 @@ +## Todo + +This is a list of all the things I still have to fix/achive in this +configuration: + +- [ ] Fix apparmor +- [ ] Lanzaboote +- [ ] Remove all `with` +- [ ] better documentation +- [ ] Fix greetd +- [ ] ClamAV +- [ ] +- [ ] +- [ ] +- [ ] +- [ ] +- [ ] +- [ ] +- [ ] +- [ ] +- [ ] diff --git a/flake.lock b/flake.lock index 51def11..749aafc 100644 --- a/flake.lock +++ b/flake.lock @@ -311,10 +311,10 @@ "nixpkgs_2": { "locked": { "lastModified": 315532800, - "narHash": "sha256-aW0rd3E6pilfWXcNrMwbA4ehW3BZJ0oep4LQbUgOrgg=", - "rev": "fa0ef8a6bb1651aa26c939aeb51b5f499e86b0ec", + "narHash": "sha256-X5WIcIkFxPhw7mS219TbEOgrugbMx/2cin09OlWobT8=", + "rev": "dab3a6e781554f965bde3def0aa2fda4eb8f1708", "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre831232.fa0ef8a6bb16/nixexprs.tar.xz" + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre830668.dab3a6e78155/nixexprs.tar.xz" }, "original": { "type": "tarball", @@ -354,11 +354,11 @@ ] }, "locked": { - "lastModified": 1752837946, - "narHash": "sha256-oLkH/Mr0cfrjD6WRf6GqJV6sizX0ZgYqD6gFdziyKVo=", + "lastModified": 1752701746, + "narHash": "sha256-OVqrNbAzMaVOBxdoLqbZyn0vOq9/XwcWVPVKJbHwz5Q=", "ref": "refs/heads/master", - "rev": "e55d519c280192d8d97695b6c5905a0d7a46f8fe", - "revCount": 647, + "rev": "986749cdb9ca9078b66297d60bbf21d48e33a6cf", + "revCount": 639, "type": "git", "url": "https://git.outfoxxed.me/outfoxxed/quickshell" }, @@ -374,6 +374,7 @@ "lanzaboote": "lanzaboote", "nixpkgs": "nixpkgs_2", "quickshell": "quickshell", + "rust-overlay": "rust-overlay_2", "systems": "systems", "watt": "watt" } @@ -399,6 +400,26 @@ "type": "github" } }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1752633862, + "narHash": "sha256-Bj7ozT1+5P7NmvDcuAXJvj56txcXuAhk3Vd9FdWFQzk=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "8668ca94858206ac3db0860a9dec471de0d995f8", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1689347949, diff --git a/flake.nix b/flake.nix index 2edf56f..2962416 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,12 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + # The things rust is making me do... + rust-overlay = { + url = "github:oxalica/rust-overlay"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # DetNix is doing too well these days not to use it. determinate = { url = "github:determinatesystems/determinate"; diff --git a/hosts/common.nix b/hosts/common.nix index 4042f4f..b94adb7 100644 --- a/hosts/common.nix +++ b/hosts/common.nix @@ -32,6 +32,7 @@ in { microfetch mprocs nmap + polkit ripgrep smartmontools television diff --git a/hosts/hermit/configuration.nix b/hosts/hermit/configuration.nix index bb970bf..fa00c43 100644 --- a/hosts/hermit/configuration.nix +++ b/hosts/hermit/configuration.nix @@ -8,6 +8,7 @@ # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "uk"; + security.polkit.enable = true; boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; services = { fstrim.enable = lib.mkDefault true; diff --git a/hosts/hermit/programs.nix b/hosts/hermit/programs.nix index b8f4afc..cdad6db 100644 --- a/hosts/hermit/programs.nix +++ b/hosts/hermit/programs.nix @@ -1,17 +1,17 @@ {pkgs, ...}: let # a newer nil version, for pipes support. - new-nil = pkgs.nil.overrideAttrs (_: { - version = "unstable-18-07-2025"; + newer-nil = pkgs.nil.overrideAttrs (_: { + version = "unstable-02-06-2025"; src = pkgs.fetchFromGitHub { owner = "oxalica"; repo = "nil"; - rev = "524ae2d67dd84d99a10f409ed6cd8e4e7b3cae3f"; - hash = "sha256-Uy2qzd+fMoBcp4NPSO7DavEC1pGMegmAqoEMvmXbIQU="; + rev = "577d160da311cc7f5042038456a0713e9863d09e"; + hash = "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c="; }; cargoDeps = pkgs.rustPlatform.fetchCargoVendor { - inherit (new-nil) src; - hash = "sha256-Sljr3ff8hl/qm/0wqc1GXsEr1wWn7NAXmdrd5wHzUX8="; + inherit (newer-nil) src; + hash = "sha256-uZsLlFU9GKLvFllF7Kf5Q7HfN26KQojf4rvOb9p7Rjs="; }; }); in { @@ -74,6 +74,7 @@ in { pdfpc pfetch playerctl + polkit presenterm pulsemixer ripgrep @@ -94,6 +95,6 @@ in { xournalpp zathura ; - inherit new-nil; + inherit newer-nil; }; } diff --git a/hosts/temperance/configuration.nix b/hosts/temperance/configuration.nix index 18d06af..2e74e8a 100644 --- a/hosts/temperance/configuration.nix +++ b/hosts/temperance/configuration.nix @@ -9,6 +9,7 @@ # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "us"; + security.polkit.enable = true; # boot.kernelPackages = pkgs.linuxPackagesFor xanmod_blox; boot.kernelPackages = pkgs.linuxPackages_latest; @@ -19,14 +20,15 @@ system76-scheduler = { enable = true; }; + gnome.gnome-keyring.enable = true; }; - + security.pam.services.login.enableGnomeKeyring = true; + environment.systemPackages = [pkgs.seahorse]; meta = { mainUser.gitSigningKey = ""; }; modules = { system = { - isGraphical = true; impermanence.enable = true; boot = { systemd-boot.enable = true; diff --git a/hosts/temperance/programs.nix b/hosts/temperance/programs.nix index ec30448..2ba5492 100644 --- a/hosts/temperance/programs.nix +++ b/hosts/temperance/programs.nix @@ -6,6 +6,8 @@ anki asciinema beets + bitwarden-cli + bitwarden-desktop bubblewrap cachix calc @@ -29,9 +31,9 @@ impala imv inetutils - inshellisense joplin-desktop jujutsu + julia just keepassxc lazygit @@ -48,6 +50,7 @@ pavucontrol pdfarranger picard + polkit pulsemixer python3 pwvucontrol @@ -61,6 +64,7 @@ spotify starship telegram-desktop + texliveFull thunderbird topiary tor-browser @@ -69,6 +73,7 @@ typst vesktop vivid + walker wayneko wireguard-tools xdg-utils @@ -77,13 +82,17 @@ zathura zotero zoxide - curl - git + # coreutils-full # All of the GNU coreutils + curl # I sometimes need to curl stuff + git # take a guess wget - unzip + unzip # zipping and unzipping stuff zip util-linux - zed-editor + ; + inherit + (pkgs.wineWowPackages) + waylandFull ; }; } diff --git a/hosts/tower/configuration.nix b/hosts/tower/configuration.nix index 83209ba..411ac2f 100644 --- a/hosts/tower/configuration.nix +++ b/hosts/tower/configuration.nix @@ -8,6 +8,7 @@ # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "uk"; + security.polkit.enable = true; boot.kernelPackages = pkgs.linuxPackages_latest; programs.nix-ld.enable = true; diff --git a/hosts/world/configuration.nix b/hosts/world/configuration.nix index 2d02091..a90fc5d 100644 --- a/hosts/world/configuration.nix +++ b/hosts/world/configuration.nix @@ -8,6 +8,7 @@ # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; console.keyMap = "uk"; + security.polkit.enable = true; programs.nix-ld.enable = false; boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; services = { diff --git a/hosts/world/programs.nix b/hosts/world/programs.nix index 4f29a7b..1400402 100644 --- a/hosts/world/programs.nix +++ b/hosts/world/programs.nix @@ -32,6 +32,7 @@ microfetch nmap pfetch + polkit ripgrep smartmontools util-linux diff --git a/modules/options/system/options.mod.nix b/modules/options/system/options.mod.nix index 4d308f4..cd77ba7 100644 --- a/modules/options/system/options.mod.nix +++ b/modules/options/system/options.mod.nix @@ -11,6 +11,16 @@ inherit (config.modules.system) systemType; in { options.modules.system = { + mainUser = mkOption { + type = enum config.modules.system.users; + default = elemAt config.modules.system.users 0; + description = '' + The username of the main user for your system. + + In case of a multiple systems, this will be the user with priority in ordered lists and enabled options. + ''; + }; + users = mkOption { type = listOf str; default = ["cr"]; diff --git a/modules/programs/gui/bitwarden.mod.nix b/modules/programs/gui/bitwarden.mod.nix deleted file mode 100644 index d5ebfd7..0000000 --- a/modules/programs/gui/bitwarden.mod.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit (config.modules.system) isGraphical; - inherit (lib.modules) mkIf; - - bitwarden-desktop-wrapped = pkgs.symlinkJoin { - name = "bitwarden-desktop-wrapped"; - paths = [pkgs.bitwarden-desktop]; - nativeBuildInputs = [pkgs.makeWrapper]; - postBuild = '' - wrapProgram $out/bin/bitwarden --set \ - BITWARDEN_SSH_AUTH_SOCK /run/user/1000/ssh-agent.sock - ''; - }; -in { - config = mkIf isGraphical { - environment = { - systemPackages = lib.attrValues { - inherit - (pkgs) - bitwarden-cli - ; - inherit bitwarden-desktop-wrapped; - }; - # Set the ssh socket globally. This alows all applications and shells to use - # the ssh-agent. - sessionVariables."SSH_AUTH_SOCK" = "/run/user/1000/ssh-agent.sock"; - }; - }; -} diff --git a/modules/programs/gui/brave.mod.nix b/modules/programs/gui/brave.mod.nix index 8ded1dd..3e6592d 100644 --- a/modules/programs/gui/brave.mod.nix +++ b/modules/programs/gui/brave.mod.nix @@ -9,13 +9,15 @@ # https://peter.sh/experiments/chromium-command-line-switches/ flags = concatStringsSep " " [ "--no-first-run" - "--enable-features=UseOzonePlatform" + "--use-vulkan" + "--enable-features=Vulkan,UseOzonePlatform" "--enable-gpu-rasterization" "--force-dark-mode" "--enable-smooth-scrolling" "--enable-features=UseOzonePlatform" "--ozone-platform=wayland" "--user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.3'" + "--use-angle=vulkan" ]; brave-wrapped = pkgs.symlinkJoin { name = "brave"; @@ -214,8 +216,6 @@ in { "mnjggcdmjocbbbhaepdhchncahnbgone" # Decentraleyes "ldpochfccmkkmhdbclfhpagapcfdljkj" - # Humble new tab page - "mfgdmpfihlmdekaclngibpjhdebndhdj" ]; }; diff --git a/modules/programs/gui/dolphin.mod.nix b/modules/programs/gui/dolphin.mod.nix deleted file mode 100644 index 6f13d56..0000000 --- a/modules/programs/gui/dolphin.mod.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit (lib.modules) mkIf; - inherit (config.modules.system) isGraphical; -in { - config = mkIf isGraphical { - environment.systemPackages = with pkgs; [ - kdePackages.dolphin - kdePackages.kio-fuse #to mount remote filesystems via FUSE - kdePackages.kio-extras #extra protocols support (sftp, fish and more) - ]; - }; -} diff --git a/modules/programs/gui/ghostty.mod.nix b/modules/programs/gui/ghostty.mod.nix index f588902..19e702b 100644 --- a/modules/programs/gui/ghostty.mod.nix +++ b/modules/programs/gui/ghostty.mod.nix @@ -26,7 +26,7 @@ # font-style-bold-italic = JetBrainsMono NF Italic; app-notifications = "no-clipboard-copy"; - background-opacity = 0.9; + background-opacity = 0.75; bold-is-bright = "true"; confirm-close-surface = "false"; cursor-style-blink = "false"; diff --git a/modules/programs/tui/btop.mod.nix b/modules/programs/tui/btop.mod.nix index 802080e..886b43f 100644 --- a/modules/programs/tui/btop.mod.nix +++ b/modules/programs/tui/btop.mod.nix @@ -24,16 +24,9 @@ log_level = "ERROR" ''; - btop-no-desktop-entry = pkgs.btop.overrideAttrs (prev: { - postInstall = '' - ${prev.postInstall or ""} - rm -rf $out/share/applications/*.desktop - ''; - }); - btop-wrapped = pkgs.symlinkJoin { name = "btop-wrapped"; - paths = [btop-no-desktop-entry]; + paths = [pkgs.btop]; nativeBuildInputs = [pkgs.makeWrapper]; postBuild = '' wrapProgram $out/bin/btop --set XDG_CONFIG_HOME "${btop-settings}" diff --git a/modules/services/spotifyd.mod.nix b/modules/services/spotifyd.mod.nix index 65a1906..396582f 100644 --- a/modules/services/spotifyd.mod.nix +++ b/modules/services/spotifyd.mod.nix @@ -10,7 +10,8 @@ in { services.spotifyd = mkIf isGraphical { enable = true; settings = { - backend = "pipe"; + }; + config = { }; }; } diff --git a/modules/services/ssh.mod.nix b/modules/services/ssh.mod.nix index 6fc4a76..248d54b 100644 --- a/modules/services/ssh.mod.nix +++ b/modules/services/ssh.mod.nix @@ -3,6 +3,11 @@ in { options.modules.programs.ssh.enable = mkEnableOption "ssh"; config = { + # set the ssh socket globally. This alows all applications and shells to use + # the ssh-agent. + environment.sessionVariables.SSH_AUTH_SOCK = "/run/user/1000/ssh-agent"; + programs.ssh.startAgent = true; + services.openssh = { enable = true; ports = [22]; diff --git a/modules/style/gtk.mod.nix b/modules/style/gtk.mod.nix index 82a0aab..c1b5983 100644 --- a/modules/style/gtk.mod.nix +++ b/modules/style/gtk.mod.nix @@ -82,6 +82,9 @@ in { GTK_THEME = cfg.theme.name; XCURSOR_THEME = "BreezeX-RosePine-Linux"; XCURSOR_SIZE = cursorSize; + + HYPRCURSOR_THEME = "BreezeX-RosePine-Linux"; + HYPRCURSOR_SIZE = cursorSize; }; etc = let css = import ./gtk-colors.nix {inherit (config.modules.style.colorScheme) colors;}; diff --git a/modules/style/qt.mod.nix b/modules/style/qt.mod.nix index 316c8cf..77413e4 100644 --- a/modules/style/qt.mod.nix +++ b/modules/style/qt.mod.nix @@ -34,10 +34,7 @@ in { }; }; - config = mkIf cfg.enable { - qt = { - enable = true; - platformTheme = "qt5ct"; + config = + mkIf cfg.enable { }; - }; } diff --git a/modules/style/quickshell/quickshell.mod.nix b/modules/style/quickshell/quickshell.mod.nix index 275bbfb..3c41f20 100644 --- a/modules/style/quickshell/quickshell.mod.nix +++ b/modules/style/quickshell/quickshell.mod.nix @@ -19,11 +19,6 @@ in { qt6.qt5compat qt6.qtmultimedia qt6.qtdeclarative - qt6.qtsvg - qt6.qtwayland - qt6.qtbase - kdePackages.breeze - kdePackages.breeze-icons ]; # taken from outfoxxed. diff --git a/modules/style/quickshell/shell/AudioPopup.qml b/modules/style/quickshell/shell/AudioPopup.qml index 383a9ef..b8e27ee 100644 --- a/modules/style/quickshell/shell/AudioPopup.qml +++ b/modules/style/quickshell/shell/AudioPopup.qml @@ -1,105 +1,103 @@ -pragma ComponentBehavior: Bound pragma Singleton +pragma ComponentBehavior: Bound import QtQuick import Quickshell import QtQuick.Layouts -import Quickshell.Services.Pipewire import Quickshell.Wayland - -import qs.config +import Quickshell.Services.Pipewire Singleton { - id: root + id: audioPopup + property bool popupOpen: true - property real volume: Pipewire.defaultAudioSink?.audio?.volume ?? 0 - property real popupOpacity: 0 + property var volume: sink.ready ? audioPopup.sink.audio.volume : 0 + property var visible: volume + + property PwNode sink: Pipewire.defaultAudioSink + + // bind the node so we can read its properties PwObjectTracker { - objects: [Pipewire.defaultAudioSink] + objects: [audioPopup.sink] } - onVolumeChanged: { - root.popupOpacity = 1; - loader.activeAsync = true; - timer.restart(); - timer_opacity.restart(); + Timer { + id: timer + interval: 3000 + running: false + repeat: false + + onTriggered: audioPopup.visible = false } LazyLoader { id: loader - activeAsync: false + activeAsync: audioPopup.popupOpen PanelWindow { id: popup + width: 400 + height: 30 visible: true - implicitWidth: rect.implicitWidth - implicitHeight: 50 - color: "transparent" + + // Give the window an empty click mask so all clicks pass through it. mask: Region {} - exclusionMode: ExclusionMode.Ignore + + // Use the wlroots specific layer property to ensure it displays over + // fullscreen windows. WlrLayershell.layer: WlrLayer.Overlay - anchors.bottom: true - margins.bottom: 100 + color: "transparent" + + anchors { + bottom: true + } + + margins { + bottom: 250 + } Rectangle { id: rect Layout.fillWidth: true - anchors.fill: parent - color: Colors.surface0 - implicitWidth: 300 - implicitHeight: parent.implicitHeight + anchors.verticalCenter: parent.verticalCenter + color: "white" + height: parent.height + width: parent.width radius: 5 - opacity: root.popupOpacity + opacity: 0 - Behavior on opacity { + anchors { + left: parent.left + } + + Behavior on width { NumberAnimation { - duration: 500 + duration: 200 easing.type: Easing.OutCubic } } Rectangle { - id: bar - color: Colors.blue - implicitWidth: rect.implicitWidth * root.volume - 20 - implicitHeight: 30 - topRightRadius: 5 - bottomRightRadius: 5 + color: "black" + height: 20 + radius: height / 2 anchors { left: parent.left - verticalCenter: parent.verticalCenter } - Behavior on implicitWidth { - NumberAnimation { - duration: 300 - easing.type: Easing.OutCubic - } - } + topLeftRadius: 0 + bottomLeftRadius: 0 + + anchors.verticalCenter: parent.verticalCenter + width: parent.width * audioPopup.sink.audio.volume } } } } - Timer { - id: timer - interval: 2000 - running: false - onTriggered: loader.activeAsync = false - } - - Timer { - id: timer_opacity - interval: 1500 - running: false - onTriggered: { - root.popupOpacity = 0; - } - } - function init() { } } diff --git a/modules/style/quickshell/shell/Launcher.qml b/modules/style/quickshell/shell/Launcher.qml index 0cfebfb..f434f81 100644 --- a/modules/style/quickshell/shell/Launcher.qml +++ b/modules/style/quickshell/shell/Launcher.qml @@ -49,9 +49,9 @@ Singleton { } } width: 450 - color: Colors.base + color: Config.catppuccin.base radius: 5 - border.color: Colors.mantle + border.color: Config.catppuccin.mantle border.width: 2 ColumnLayout { @@ -64,9 +64,9 @@ Singleton { id: searchContainer Layout.fillWidth: true implicitHeight: searchbox.implicitHeight + 10 - color: Colors.base + color: Config.catppuccin.base radius: 3 - border.color: Colors.mantle + border.color: Config.catppuccin.mantle RowLayout { id: searchbox @@ -76,7 +76,7 @@ Singleton { TextInput { id: search Layout.fillWidth: true - color: Colors.text + color: Config.catppuccin.text font.pointSize: 13 focus: true @@ -252,7 +252,7 @@ Singleton { highlight: Rectangle { radius: 5 color: "transparent" - border.color: Colors.lavender + border.color: Config.catppuccin.lavender border.width: 2 } keyNavigationEnabled: true @@ -293,7 +293,7 @@ Singleton { } Text { text: modelData.name - color: Colors.text + color: Config.catppuccin.text font.family: "JetBrainsMono Nerd Font Mono" font.pointSize: 13 Layout.alignment: Qt.AlignVCenter diff --git a/modules/style/quickshell/shell/ReloadPopup.qml b/modules/style/quickshell/shell/ReloadPopup.qml index 513f814..9c6e2fc 100644 --- a/modules/style/quickshell/shell/ReloadPopup.qml +++ b/modules/style/quickshell/shell/ReloadPopup.qml @@ -106,7 +106,7 @@ Scope { property: "width" from: rect.width to: 0 - duration: root.failed ? 10000 : 800 + duration: failed ? 10000 : 800 onFinished: popupLoader.active = false // Pause the animation when the mouse is hovering over the popup, diff --git a/modules/style/quickshell/shell/config/Colors.qml b/modules/style/quickshell/shell/config/Colors.qml deleted file mode 100644 index 8f77553..0000000 --- a/modules/style/quickshell/shell/config/Colors.qml +++ /dev/null @@ -1,25 +0,0 @@ -pragma Singleton - -import QtQuick -import Quickshell - -Singleton { - id: root - - readonly property color base: "#1e1e2e" - readonly property color mantle: "#181825" - readonly property color surface0: "#313244" - readonly property color surface1: "#45475a" - readonly property color surface2: "#585b70" - readonly property color text: "#cdd6f4" - readonly property color rosewater: "#f5e0dc" - readonly property color lavender: "#b4befe" - readonly property color red: "#f38ba8" - readonly property color peach: "#fab387" - readonly property color yellow: "#f9e2af" - readonly property color green: "#a6e3a1" - readonly property color teal: "#a6e3a1" - readonly property color blue: "#89b4fa" - readonly property color mauve: "#cba6f7" - readonly property color flamingo: "#f2cdcd" -} diff --git a/modules/style/quickshell/shell/config/Config.qml b/modules/style/quickshell/shell/config/Config.qml index 9e44e32..7b4c1b5 100644 --- a/modules/style/quickshell/shell/config/Config.qml +++ b/modules/style/quickshell/shell/config/Config.qml @@ -25,6 +25,24 @@ Singleton { readonly property int rounding: 0 } + readonly property QtObject catppuccin: QtObject { + readonly property color base: "#1e1e2e" + readonly property color mantle: "#181825" + readonly property color surface0: "#313244" + readonly property color surface1: "#45475a" + readonly property color surface2: "#585b70" + readonly property color text: "#cdd6f4" + readonly property color rosewater: "#f5e0dc" + readonly property color lavender: "#b4befe" + readonly property color red: "#f38ba8" + readonly property color peach: "#fab387" + readonly property color yellow: "#f9e2af" + readonly property color green: "#a6e3a1" + readonly property color teal: "#a6e3a1" + readonly property color blue: "#89b4fa" + readonly property color mauve: "#cba6f7" + readonly property color flamingo: "#f2cdcd" + } readonly property QtObject volumeslider: QtObject { readonly property int width: 50 } diff --git a/modules/style/quickshell/shell/modules/BackgroundImage.qml b/modules/style/quickshell/shell/modules/BackgroundImage.qml index b0710aa..600fb74 100644 --- a/modules/style/quickshell/shell/modules/BackgroundImage.qml +++ b/modules/style/quickshell/shell/modules/BackgroundImage.qml @@ -1,7 +1,6 @@ import QtQuick import Quickshell import Quickshell.Wayland -import Qt.labs.folderlistmodel 2.9 PanelWindow { id: root @@ -10,24 +9,6 @@ PanelWindow { WlrLayershell.layer: WlrLayer.Background WlrLayershell.namespace: "shell:background" - // property string basePath: "file:///home/cr/Documents/Backgrounds/" - // property var absPath: folderModel.get(Math.floor(Math.random() * folderModel.count), "filePath") - // property var finalPath: absPath - - // property bool _: log() - // function log() { - // console.log(absPath); - // console.log(folderModel.count); - // return true; - // } - FolderListModel { - id: folderModel - // folder: root.basePath - nameFilters: ["*.png"] - showDirs: false - showFiles: true - } - anchors { top: true bottom: true @@ -35,21 +16,13 @@ PanelWindow { right: true } - // Item { - // id: background - // anchors.fill: parent - // Image { - // id: image - // source: Qt.resolvedUrl(root.finalPath) - // } - // } - Timer { - id: timer - // 10 minutes - interval: 1000 * 60 * 10 - running: false - onTriggered: { - root.popupOpacity = 0; + Item { + id: background + anchors.fill: parent + Image { + id: image + asynchronous: true + source: "/home/cr/repos/projects/nichts/modules/style/wholefoods.png" } } } diff --git a/modules/style/quickshell/shell/modules/bar/components/Clock.qml b/modules/style/quickshell/shell/modules/bar/components/Clock.qml index 78d8c30..a6337fa 100644 --- a/modules/style/quickshell/shell/modules/bar/components/Clock.qml +++ b/modules/style/quickshell/shell/modules/bar/components/Clock.qml @@ -9,7 +9,7 @@ Rectangle { width: text.width + 5 height: text.height + 5 implicitWidth: width - border.color: Colors.rosewater + border.color: Config.catppuccin.rosewater border.width: 0 radius: 5 color: "transparent" @@ -24,7 +24,7 @@ Rectangle { font.family: "JetBrainsMono NF Mono" font.pointSize: 15 - color: Colors.text + color: Config.catppuccin.text } SystemClock { diff --git a/modules/style/quickshell/shell/modules/bar/components/Workspaces.qml b/modules/style/quickshell/shell/modules/bar/components/Workspaces.qml index 404f13e..1d8b254 100644 --- a/modules/style/quickshell/shell/modules/bar/components/Workspaces.qml +++ b/modules/style/quickshell/shell/modules/bar/components/Workspaces.qml @@ -36,7 +36,7 @@ Rectangle { // height: workspaces.length * root.wsItemHeight implicitWidth: list.implicitWidth color: "transparent" - border.color: Colors.rosewater + border.color: Config.catppuccin.rosewater border.width: 0 radius: 7 @@ -93,9 +93,9 @@ Rectangle { height: wsItem.height - 5 width: parent.width * wsItem.animActive radius: height / 2 - border.color: Colors.mantle + border.color: Config.catppuccin.mantle border.width: 0 - color: Colors.blue + color: Config.catppuccin.blue } } } diff --git a/modules/style/quickshell/shell/modules/drawers/Drawers.qml b/modules/style/quickshell/shell/modules/drawers/Drawers.qml index 466182c..2c6e920 100644 --- a/modules/style/quickshell/shell/modules/drawers/Drawers.qml +++ b/modules/style/quickshell/shell/modules/drawers/Drawers.qml @@ -5,10 +5,10 @@ import Quickshell.Wayland import QtQuick import QtQuick.Effects -import qs.modules.bar +import "../bar" -import qs.config -import qs.modules +import "../../config" +import "../" Variants { model: Quickshell.screens diff --git a/modules/style/quickshell/shell/shell.qml b/modules/style/quickshell/shell/shell.qml index 0ff4469..2835944 100644 --- a/modules/style/quickshell/shell/shell.qml +++ b/modules/style/quickshell/shell/shell.qml @@ -1,4 +1,5 @@ //@ pragma Env QS_NO_RELOAD_POPUP=1 +//@ pragma Env QT_QML_GENERATE_QMLLS_INI import Quickshell import QtQuick @@ -9,7 +10,10 @@ import qs ShellRoot { id: shellroot - Component.onCompleted: [Launcher.init(), AudioPopup.init()] + Component.onCompleted: [Launcher.init()] Drawers {} + // Background {}Popup + // + } diff --git a/modules/system/os/security/security.mod.nix b/modules/system/os/security/security.mod.nix index 06e0a7a..b609069 100644 --- a/modules/system/os/security/security.mod.nix +++ b/modules/system/os/security/security.mod.nix @@ -1,30 +1,14 @@ {pkgs, ...}: { security = { - # Enable Soteria, a GTK-based Polkit authentication agent. - soteria.enable = true; + polkit = { + enable = true; + package = pkgs.polkit; + }; + apparmor = { enable = true; killUnconfinedConfinables = true; packages = [pkgs.apparmor-profiles]; }; - - pam.services = { - login.kwallet = { - enable = true; - # package = pkgs.kdePackages.kwallet-pam; - }; - niri = { - allowNullPassword = true; - kwallet = { - enable = true; - package = pkgs.kdePackages.kwallet-pam; - }; - }; - }; }; - environment.systemPackages = with pkgs.kdePackages; [ - kwallet # provides helper service - kwallet-pam # provides helper service - kwalletmanager # provides KCMs and stuff - ]; } diff --git a/modules/system/system.mod.nix b/modules/system/system.mod.nix deleted file mode 100644 index 3a8451e..0000000 --- a/modules/system/system.mod.nix +++ /dev/null @@ -1,9 +0,0 @@ -{config, ...}: let - machine-id = builtins.substring 0 32 (builtins.hashString "sha256" config.networking.hostName); -in { - system = { - # My state version. - stateVersion = "23.11"; - }; - environment.etc."machine-id".text = "${machine-id}\n"; -} diff --git a/modules/wms/niri/config.kdl b/modules/wms/niri/config.kdl index 3867d35..d7fffb0 100644 --- a/modules/wms/niri/config.kdl +++ b/modules/wms/niri/config.kdl @@ -42,7 +42,9 @@ layout { active-gradient from="#E5989B" to="#FFB4A2" angle=45 relative-to="workspace-view" in="oklch longer hue" } border { - off + width 1 + active-color "#000" + inactive-color "#000" } tab-indicator { width 2 @@ -67,8 +69,10 @@ layout { background-color "transparent" } // xwayland stuff -// spawn-at-startup "xwayland-satellite" -spawn-at-startup "kwalletd6" +spawn-at-startup "xwayland-satellite" +spawn-at-startup "avizo-service" +spawn-at-startup "keepassxc" +spawn-at-startup "startxfce4" spawn-at-startup "bash" "-c" "quickshell --path ~/repos/projects/nichts/modules/style/quickshell/shell" environment { DISPLAY ":0" @@ -89,33 +93,7 @@ overview { backdrop-color "#777777" } animations { - window-close { - duration-ms 250 - curve "linear" - custom-shader r" - vec4 fall_and_rotate(vec3 coords_geo, vec3 size_geo) { - - float progress = niri_clamped_progress * niri_clamped_progress; - vec2 coords = (coords_geo.xy - vec2(0.5, 1.0)) * size_geo.xy; - coords.y -= progress * 1440.0; - float random = (niri_random_seed - 0.5) / 2.0; - random = sign(random) - random; - float max_angle = 0.5 * random; - float angle = progress * max_angle; - mat2 rotate = mat2(cos(angle), -sin(angle), sin(angle), cos(angle)); - coords = rotate * coords; - coords_geo = vec3(coords / size_geo.xy + vec2(0.5, 1.0), 1.0); - vec3 coords_tex = niri_geo_to_tex * coords_geo; - vec4 color = texture2D(niri_tex, coords_tex.st); - - return color; - } - - vec4 close_color(vec3 coords_geo, vec3 size_geo) { - return fall_and_rotate(coords_geo, size_geo); - } - " - } + // off } window-rule { match app-id="unset" @@ -152,9 +130,6 @@ binds { Mod+Return { spawn "ghostty" } - Mod+B { - spawn "brave" - } Mod+D { spawn "bash" "-c" "quickshell --path ~/repos/projects/nichts/modules/style/quickshell/shell msg launcher open" } diff --git a/modules/wms/portal.mod.nix b/modules/wms/portal.mod.nix index e37949e..527d2d3 100644 --- a/modules/wms/portal.mod.nix +++ b/modules/wms/portal.mod.nix @@ -15,19 +15,21 @@ in { # or with unexpected env vars set from wrappers. # See #160923 for more info. xdgOpenUsePortal = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - pkgs.kdePackages.xdg-desktop-portal-kde - pkgs.kdePackages.kwallet - pkgs.xdg-desktop-portal-gnome - ]; + extraPortals = + [ + pkgs.xdg-desktop-portal-gtk + pkgs.kdePackages.xdg-desktop-portal-kde + ] + ++ ( + optional config.programs.niri.enable + pkgs.xdg-desktop-portal-gnome + ) + ++ ( + optional config.programs.hyprland.enable + pkgs.xdg-desktop-portal-hyprland + ); config = { - common = { - "org.freedesktop.impl.portal.Secret" = [ - "kwallet" - ]; - "org.freedesktop.secrets" = ["kwalletd6"]; - }; + hyprland.default = mkIf config.programs.hyprland.enable ["*"]; niri = { default = [ "gnome" @@ -42,4 +44,6 @@ in { }; }; }; + environment.variables = { + }; } diff --git a/modules/wms/variables.mod.nix b/modules/wms/variables.mod.nix index efcb13a..0ed61cd 100644 --- a/modules/wms/variables.mod.nix +++ b/modules/wms/variables.mod.nix @@ -29,11 +29,11 @@ in { NIXOS_XDG_OPEN_USE_PORTAL = "1"; - XDG_CURRENT_DESKTOP = "niri"; - XDG_SESSION_DESKTOP = "niri"; + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_DESKTOP = "Hyprland"; XDG_SESSION_TYPE = "wayland"; - ELECTRON_OZONE_PLATFORM_HINT = "auto"; + ELECTRON_OZONE_PLATFORM_HINT = "wayland"; LIBSEAT_BACKEND = "logind"; }; diff --git a/packages/default.nix b/packages/default.nix index 375b3e7..8fb4dfb 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -3,7 +3,15 @@ pkgs, }: let inherit (pkgs) lib; - helix = pkgs.callPackage ./helix {}; + helix = let + latestNightly = (inputs.rust-overlay.lib.mkRustBin {} pkgs).nightly.latest.default; + rustPlatform = pkgs.makeRustPlatform { + rustc = latestNightly; + cargo = latestNightly; + stdenv = pkgs.clangStdenv; + }; + in + pkgs.callPackage ./helix {inherit rustPlatform;}; kakoune = pkgs.callPackage ./kakoune.nix {}; fish = pkgs.callPackage ./fish {inherit lib;}; in { diff --git a/packages/helix/default.nix b/packages/helix/default.nix index 4be0954..866684e 100644 --- a/packages/helix/default.nix +++ b/packages/helix/default.nix @@ -1,8 +1,12 @@ { + symlinkJoin, + makeWrapper, + callPackage, + fetchzip, + rustPlatform, alejandra, basedpyright, bash-language-server, - callPackage, clang-tools, clippy, cmake-format, @@ -10,55 +14,57 @@ deadnix, deno, dprint, - fetchzip, formats, gdb, golangci-lint-langserver, gopls, - helix, kdePackages, kdlfmt, lazygit, lib, lldb_19, - makeWrapper, nixd, ruff, rust-analyzer, - rustPlatform, rustfmt, shellcheck, shfmt, simple-completion-language-server, superhtml, - symlinkJoin, taplo, tinymist, typescript-language-server, vscode-langservers-extracted, zls, + helix, ... }: let inherit (lib.meta) getExe; custom-helix = - helix.overrideAttrs + (helix.override {inherit rustPlatform;}).overrideAttrs (finalAttrs: previousAttrs: { - version = "25.07.2"; + version = "25.07.1"; src = fetchzip { url = "https://github.com/bloxx12/helix/releases/download/${finalAttrs.version}/helix-${finalAttrs.version}-source.tar.xz"; - hash = "sha256-ZNsQwFfPXe6oewajx1tl68W60kVo7q2SuvTgy/o1HKk="; + hash = "sha256-OLCJPleRHhQbHOm8EnMWDBV5qG4PKGCUhr4y8mSkvpg="; stripRoot = false; }; + RUSTFLAGS = "-Ctarget-cpu=native"; + doInstallCheck = false; cargoDeps = rustPlatform.fetchCargoVendor { inherit (custom-helix) src; - hash = "sha256-3poZSvIrkx8lguxxDeNfngW6+4hH8TV/LHcZx5W5aXg="; + hash = "sha256-eVZVPyIk+kBq5hh+bzTveng6mb+6XAnCp0OAI1c+ObI="; }; }); + new-deadnix = deadnix.overrideAttrs (finalAttrs: previousAttrs: { + + }); + toml = formats.toml {}; helix-languages = callPackage ./languages.nix {inherit lib;}; @@ -87,10 +93,6 @@ mouse = true; bufferline = "multiple"; soft-wrap.enable = true; - word-completion = { - enable = true; - trigger-length = 2; - }; cursor-shape = { insert = "bar"; normal = "block"; diff --git a/packages/helix/languages.nix b/packages/helix/languages.nix index 5d51dd6..b585f6a 100644 --- a/packages/helix/languages.nix +++ b/packages/helix/languages.nix @@ -17,6 +17,7 @@ nil, ruff, shfmt, + simple-completion-language-server, typescript-language-server, vscode-langservers-extracted, zls, @@ -28,17 +29,17 @@ # a newer nil version, for pipes support. new-nil = nil.overrideAttrs (_: { - version = "unstable-18-07-2025"; + version = "unstable-02-06-2025"; src = fetchFromGitHub { owner = "oxalica"; repo = "nil"; - rev = "524ae2d67dd84d99a10f409ed6cd8e4e7b3cae3f"; - hash = "sha256-Uy2qzd+fMoBcp4NPSO7DavEC1pGMegmAqoEMvmXbIQU="; + rev = "577d160da311cc7f5042038456a0713e9863d09e"; + hash = "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit (new-nil) src; - hash = "sha256-Sljr3ff8hl/qm/0wqc1GXsEr1wWn7NAXmdrd5wHzUX8="; + hash = "sha256-uZsLlFU9GKLvFllF7Kf5Q7HfN26KQojf4rvOb9p7Rjs="; }; }); @@ -89,6 +90,12 @@ auto-format = true; language-servers = ["dprint" "typescript-language-server"]; } + { + name = "jjdescription"; + scope = "source.jjdescription"; + file-types = ["jjdescription"]; + language-servers = ["scls"]; + } { name = "json"; formatter = mark "json"; @@ -97,11 +104,11 @@ name = "markdown"; auto-format = true; formatter = mark "md"; - language-servers = ["taplo"]; + language-servers = ["scls" "taplo"]; } { name = "nix"; - language-servers = ["nil"]; + language-servers = ["nil" "scls" "deadnix"]; } { name = "qml"; @@ -165,27 +172,12 @@ }; rust-analyzer = { - config.rust-analyzer = { - checkOnSave.command = "clippy"; - procMacro.enable = true; - cargo = { - loadOutDirsFromCheck = true; - features = "all"; - }; - assist = { - preferSelf = true; - }; + config = { check = { command = "clippy"; extraArgs = ["--" "-W" "clippy::pedantic" "-W" "clippy::nursery" "-W" "clippy::perf"]; }; - lens = { - references = true; - methodReferences = true; - }; - completion.autoimport.enable = true; - experimental.procAttrMacros = true; - interpret.tests = true; + cargo.features = "all"; }; }; @@ -228,22 +220,26 @@ nil = { command = getExe new-nil; # alejandro - config.nil = { - formatting.command = ["${getExe alejandra}" "-q"]; - diagnostics = { - bindingEndHintMinLines = 3; - }; - nix.flake = { - autoArchive = true; - # autoEvalInputs = true; - nixpkgsInputName = "nixpkgs"; - }; - }; + config.nil.formatting.command = ["${getExe alejandra}" "-q"]; }; deadnix = { command = getExe new-deadnix; }; + scls = { + command = getExe simple-completion-language-server; + config = { + max_completion_items = 100; # set max completion results len for each group: words, snippets, unicode-input + feature_words = true; # enable completion by word + feature_snippets = true; # enable snippets + snippets_first = true; # completions will return before snippets by default + snippets_inline_by_word_tail = false; # suggest snippets by WORD tail, for example text `xsq|` become `x^2|` when snippet `sq` has body `^2` + feature_unicode_input = false; # enable "unicode input" + feature_paths = false; # enable path completion + feature_citations = false; # enable citation completion (only on `citation` feature enabled) + }; + }; + typescript-language-server = { command = getExe typescript-language-server; args = ["--stdio"];