From 4e0a480b1eaf81cdd1e0340b444587e3be0df33d Mon Sep 17 00:00:00 2001 From: Curt Spark Date: Sun, 3 Aug 2025 18:32:07 +0100 Subject: [PATCH] Update config --- flake.lock | 211 ++++++++++++++---- flake.nix | 5 + global.nix | 37 ++- modules/nixos/cspark-desktop-gnome/module.nix | 2 +- modules/nixos/cspark-desktop-niri/home.nix | 11 + modules/nixos/cspark-desktop-niri/module.nix | 3 +- .../home-manager/.config/niri/config.kdl | 11 +- 7 files changed, 213 insertions(+), 67 deletions(-) diff --git a/flake.lock b/flake.lock index 7f508c9e..b57ec18c 100644 --- a/flake.lock +++ b/flake.lock @@ -15,11 +15,11 @@ "sf-pro": "sf-pro" }, "locked": { - "lastModified": 1740961576, - "narHash": "sha256-9L6d3owtajM72YvUOpK1zYle2nM0BpsuopbF9lm9lJs=", + "lastModified": 1752383772, + "narHash": "sha256-I5Y0gUJS85lGEuuKr+tKSRUpJWeKavE+WmiAHRcyBaU=", "owner": "Lyndeno", "repo": "apple-fonts.nix", - "rev": "4df58996ed654f6ce9b71b41c1826484c6870739", + "rev": "875c694d7f0ec2020d7511264907a1f0e3262931", "type": "github" }, "original": { @@ -65,6 +65,24 @@ "inputs": { "systems": "systems" }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_3" + }, "locked": { "lastModified": 1731533236, "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", @@ -86,11 +104,11 @@ ] }, "locked": { - "lastModified": 1748227609, - "narHash": "sha256-SaSdslyo6UGDpPUlmrPA4dWOEuxCy2ihRN9K6BnqYsA=", + "lastModified": 1754174776, + "narHash": "sha256-Sp3FRM6xNwNtGzYH/HByjzJYHSQvwsW+lDMMZNF43PQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "d23d20f55d49d8818ac1f1b2783671e8a6725022", + "rev": "e6e2f43a62b7dbc8aa8b1adb7101b0d8b9395445", "type": "github" }, "original": { @@ -131,11 +149,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1748286492, - "narHash": "sha256-14bRczJErvDIyeHlOrdMcqGwW2VPUnyZCbuTFu8L/wE=", + "lastModified": 1754098183, + "narHash": "sha256-xiDTiBJlApXRiuTmOrdGaiJzs33lIdQepyCI8r9hy5w=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "88f4c38ccaf73691e738c758f149009d3266d0bd", + "rev": "f2a7b326dc420360a66a542f2262081763f0f9ab", "type": "github" }, "original": { @@ -145,23 +163,6 @@ } }, "niri-stable": { - "flake": false, - "locked": { - "lastModified": 1740117926, - "narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=", - "owner": "YaLTeR", - "repo": "niri", - "rev": "b94a5db8790339cf9134873d8b490be69e02ac71", - "type": "github" - }, - "original": { - "owner": "YaLTeR", - "ref": "v25.02", - "repo": "niri", - "type": "github" - } - }, - "niri-unstable": { "flake": false, "locked": { "lastModified": 1748151941, @@ -173,10 +174,48 @@ }, "original": { "owner": "YaLTeR", + "ref": "v25.05.1", "repo": "niri", "type": "github" } }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1753983552, + "narHash": "sha256-xnPPjASWt4/u+GmRdrHADBKKSCtIhTFY53CSKM+Xtfk=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "91b6a111cf228fadaabba706d8f4d155efc63b3a", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729742964, + "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "e04df33f62cdcf93d73e9a04142464753a16db67", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, "nixd": { "inputs": { "flake-parts": "flake-parts", @@ -187,11 +226,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1746955667, - "narHash": "sha256-VgVbPqZl8S09EGWFmgX++aFsz0Z7VmskSJGBXFE4eEs=", + "lastModified": 1754193386, + "narHash": "sha256-FHD7fXA77RIF0J/eQHL0MS2+E3sZeiKN1BWC2UpY6xE=", "owner": "nix-community", "repo": "nixd", - "rev": "7d19dfe5b65035aa255b83147375fdd8257459b9", + "rev": "89332c35fe968902f582e5c1a3b409f6da5f9315", "type": "github" }, "original": { @@ -202,11 +241,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748190013, - "narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=", + "lastModified": 1753939845, + "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", "owner": "nixos", "repo": "nixpkgs", - "rev": "62b852f6c6742134ade1abdd2a21685fd617a291", + "rev": "94def634a20494ee057c76998843c015909d6311", "type": "github" }, "original": { @@ -230,11 +269,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1748162331, - "narHash": "sha256-rqc2RKYTxP3tbjA+PB3VMRQNnjesrT0pEofXQTrMsS8=", + "lastModified": 1754028485, + "narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7c43f080a7f28b2774f3b3f43234ca11661bf334", + "rev": "59e69648d345d6e8fef86158c555730fa12af9de", "type": "github" }, "original": { @@ -272,6 +311,30 @@ "url": "https://devimages-cdn.apple.com/design/resources/download/NY.dmg" } }, + "poetry2nix": { + "inputs": { + "flake-utils": "flake-utils", + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_2", + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1743690424, + "narHash": "sha256-cX98bUuKuihOaRp8dNV1Mq7u6/CQZWTPth2IJPATBXc=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "ce2369db77f45688172384bbeb962bc6c2ea6f94", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "poetry2nix", + "type": "github" + } + }, "root": { "inputs": { "apple-fonts": "apple-fonts", @@ -281,6 +344,7 @@ "nixd": "nixd", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable_2", + "poetry2nix": "poetry2nix", "yt-x": "yt-x" } }, @@ -311,7 +375,7 @@ "sf-compact": { "flake": false, "locked": { - "narHash": "sha256-J72Lyt2wy83E46wN8w6/Rih9kilM9wEjtY6KnbF0DsA=", + "narHash": "sha256-VMCf2Mhmx/qhLRQxlTAsQWxtonS27kPW+oTYBBRWHMg=", "type": "file", "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Compact.dmg" }, @@ -359,7 +423,7 @@ "sf-pro": { "flake": false, "locked": { - "narHash": "sha256-Q/pOQ4MGhW/ZtLka+UUQcwSoZFDWW34XvutxL4GvzUY=", + "narHash": "sha256-RX6X2ltVE88Hp1g9tpSywMT3UfdLpRxgw92KRpiAues=", "type": "file", "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg" }, @@ -383,6 +447,36 @@ "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" + } + }, + "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" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -404,19 +498,40 @@ "type": "github" } }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1730120726, + "narHash": "sha256-LqHYIxMrl/1p3/kvm2ir925tZ8DkI0KA10djk8wecSk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "9ef337e492a5555d8e17a51c911ff1f02635be15", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "xwayland-satellite-stable": { "flake": false, "locked": { - "lastModified": 1739246919, - "narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=", + "lastModified": 1748488455, + "narHash": "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d", + "rev": "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73", "type": "github" }, "original": { "owner": "Supreeeme", - "ref": "v0.5.1", + "ref": "v0.6", "repo": "xwayland-satellite", "type": "github" } @@ -424,11 +539,11 @@ "xwayland-satellite-unstable": { "flake": false, "locked": { - "lastModified": 1748057133, - "narHash": "sha256-t9XPqehcZYDh4YVDq6w/c/L+MhoE/9MIQSYTQOwMwp8=", + "lastModified": 1752338000, + "narHash": "sha256-Fxlp/yKtynug0jyuauAmvZU2SzHCfwlwWf85j+IvQ0U=", "owner": "Supreeeme", "repo": "xwayland-satellite", - "rev": "572fa4a2bfe920daacdefc7e564b49115413306a", + "rev": "ba78881a68182ce338041846164cbfed0d70935c", "type": "github" }, "original": { @@ -439,17 +554,17 @@ }, "yt-x": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1742708823, - "narHash": "sha256-KjMYMDkFjY+I0qJbZuJv+YMg7/9gyR3SRw/UKLv1MTA=", + "lastModified": 1753976832, + "narHash": "sha256-efMn3Eq+D0E9oNkNE3gMILewkP07H+/aIAv7i1nLQpk=", "owner": "Benexl", "repo": "yt-x", - "rev": "0d1ead815c0c116530000d048922d50e712c9184", + "rev": "5e7d1bab53dfec99c7e04f2f25fcd11188057d20", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 6bec323b..590933b8 100644 --- a/flake.nix +++ b/flake.nix @@ -50,6 +50,11 @@ # inputs.nixpkgs.follows = "nixpkgs"; #}; + poetry2nix = { + url = "github:nix-community/poetry2nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; outputs = { self, nixpkgs, ... }@inputs: { diff --git a/global.nix b/global.nix index 948b35fc..d03c3643 100644 --- a/global.nix +++ b/global.nix @@ -5,7 +5,10 @@ { config, pkgs, lib, inputs, ... }: { - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + download-buffer-size = 524288000; # 500 MiB + }; # For USBIP Server configuration, to share USBKeys etc with my server (Which is the client) boot.extraModulePackages = with config.boot.kernelPackages; [ usbip ]; @@ -164,6 +167,7 @@ appimage-run imagemagick yt-dlp + spotdl cifs-utils exfatprogs usbutils @@ -203,14 +207,17 @@ ungoogled-chromium # nyxt qutebrowser - telegram-desktop - #(discord.override { - # # remove any overrides that you don't want - # withOpenASAR = true; - # withVencord = true; - #}) + #telegram-desktop + (discord.override { + # remove any overrides that you don't want + withOpenASAR = true; + withVencord = true; + }) (vesktop.override { withSystemVencord = false; }) # Discord Client Alternative - discordo # Discord terminal client + whatsie + nchat + #ripcord + #discordo # Discord terminal client element-desktop # cinny-desktop freetube @@ -265,8 +272,8 @@ #easyeffects rnnoise-plugin #lsp-plugins - #(yabridge.override { wine = wineWowPackages.waylandFull; }) - #(yabridgectl.override { wine = wineWowPackages.waylandFull; }) + (yabridge.override { wine = wineWowPackages.waylandFull; }) + (yabridgectl.override { wine = wineWowPackages.waylandFull; }) #(yabridge.override { wine = wineWowPackages.full; }) #(yabridgectl.override { wine = wineWowPackages.full; }) audacity @@ -297,7 +304,7 @@ gimp gimpPlugins.gmic - darktable + #darktable - Issue with osm-gps-map obs-studio prismlauncher @@ -317,7 +324,7 @@ ncdu # Just for utils - pulseaudio + # pulseaudio alsa-utils # For curl scripts @@ -551,6 +558,7 @@ # Enable the OpenSSH daemon. services.openssh.enable = true; programs.ssh.startAgent = true; + services.gnome.gcr-ssh-agent.enable = false; # Open ports in the firewall. # 3240 - USBIP Port @@ -575,6 +583,11 @@ networking.networkmanager.wifi.macAddress = "preserve"; networking.networkmanager.wifi.scanRandMacAddress = false; + programs.bash.shellAliases = { + "nixos-clean" = "sudo nix-collect-garbage && sudo nix-collect-garbage -d && nix-collect-garbage && nix-collect-garbage -d && sudo nix-store --optimise && nix-store --optimise"; + "nixos-upgrade" = "cd /etc/nixos && sudo nix flake update && sudo nixos-rebuild-system-flake && cd -"; + }; + services.udev.extraRules = '' ## Rules file for NetMD devices and HiMD devices in NetMD mode ## source: https://usb-ids.gowdy.us/read/UD/054c diff --git a/modules/nixos/cspark-desktop-gnome/module.nix b/modules/nixos/cspark-desktop-gnome/module.nix index 4bee868c..8bcc5208 100644 --- a/modules/nixos/cspark-desktop-gnome/module.nix +++ b/modules/nixos/cspark-desktop-gnome/module.nix @@ -69,8 +69,8 @@ in # Enable sound with pipewire. # sound.enable = true; # Apparently now deprecated - hardware.pulseaudio.enable = false; security.rtkit.enable = true; + services.pulseaudio.enable = lib.mkForce false; services.pipewire = { enable = true; alsa.enable = true; diff --git a/modules/nixos/cspark-desktop-niri/home.nix b/modules/nixos/cspark-desktop-niri/home.nix index 0d88b08c..1cc84207 100644 --- a/modules/nixos/cspark-desktop-niri/home.nix +++ b/modules/nixos/cspark-desktop-niri/home.nix @@ -39,6 +39,7 @@ in swaybg -i ${config.home.homeDirectory}/Pictures/Wallpapers/solarisdolphins_olive.png -m tile & wlsunset -l 51.5 -L 0.1 & kdeconnect-indicator & + udiskie & #pactl load-module module-null-sink media.class=Audio/Source/Virtual sink_name=processed-mic channel_map=front-left,front-right & qpwgraph & @@ -78,6 +79,16 @@ else notify-send "$pass_output" fi '') + (writeShellScriptBin "toggle-mic" + '' +if [[ $(wpctl get-volume @DEFAULT_AUDIO_SOURCE@) == *"MUTED"* ]]; then + notify-send "Unmuted mic!" + wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 0 +else + notify-send "Muted mic!" + wpctl set-mute @DEFAULT_AUDIO_SOURCE@ 1 +fi + '') ]; home.sessionVariables = { diff --git a/modules/nixos/cspark-desktop-niri/module.nix b/modules/nixos/cspark-desktop-niri/module.nix index 9384a6f5..56300c2e 100644 --- a/modules/nixos/cspark-desktop-niri/module.nix +++ b/modules/nixos/cspark-desktop-niri/module.nix @@ -34,6 +34,7 @@ in wev # Clone of X11 xev for wayland waybar # Status bar xwayland-satellite # Xwayland support outside your Wayland compositor + udiskie # Automount of removable media swayimg # Image viewer lxqt.pcmanfm-qt # File Manager @@ -105,8 +106,8 @@ in # Enable sound with pipewire. # sound.enable = true; Deprecated option - hardware.pulseaudio.enable = false; security.rtkit.enable = true; + services.pulseaudio.enable = lib.mkForce false; services.pipewire = { enable = true; alsa.enable = true; diff --git a/modules/nixos/cspark-desktop-niri/resources/home-manager/.config/niri/config.kdl b/modules/nixos/cspark-desktop-niri/resources/home-manager/.config/niri/config.kdl index 5e4cf2b9..e013d735 100644 --- a/modules/nixos/cspark-desktop-niri/resources/home-manager/.config/niri/config.kdl +++ b/modules/nixos/cspark-desktop-niri/resources/home-manager/.config/niri/config.kdl @@ -51,7 +51,7 @@ input { // Desktop monitor configuration -output "DP-2" { +output "DP-3" { // Uncomment this line to disable this output. // off @@ -61,7 +61,7 @@ output "DP-2" { // for the resolution. // If the mode is omitted altogether or is invalid, niri will pick one automatically. // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes. - mode "1920x1080@60.000" + mode "1920x1080@239.761" // Scale is a floating-point number, but at the moment only integer values work. scale 1.0 @@ -91,14 +91,14 @@ output "HDMI-A-1" { // for the resolution. // If the mode is omitted altogether or is invalid, niri will pick one automatically. // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes. - mode "1920x1080@60.000" + mode "1920x1080@74.973" // Scale is a floating-point number, but at the moment only integer values work. scale 1.0 // Transform allows to rotate the output counter-clockwise, valid values are: // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270. - transform "normal" + transform "270" // Position of the output in the global coordinate space. // This affects directional monitor actions like "focus-monitor-left", and cursor movement. @@ -312,7 +312,8 @@ binds { XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; } XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; } XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } - XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } + XF86AudioMicMute allow-when-locked=true { spawn "toggle-mic"; } + Alt+Delete allow-when-locked=true { spawn "toggle-mic"; } Alt+W { close-window; }