From 95608f2bfabcd288206a51d6a1af1137e48531df Mon Sep 17 00:00:00 2001 From: worble Date: Thu, 22 May 2025 15:18:30 +0100 Subject: [PATCH] add pipewire auto gain control block; update to 25.05; add wireshark gui; ryubing->stable; nerd-fonts new packaging; godot-mono->stable; update vscode --- configuration/base.nix | 24 +++++ devices/tuxedo/configuration.nix | 5 +- flake.nix | 12 ++- home-manager/base/fonts.nix | 2 +- home-manager/base/terminal.nix | 3 +- home-manager/development/games.nix | 20 ++-- home-manager/development/vscode.nix | 144 ++++++++++++++-------------- home-manager/gaming.nix | 4 +- 8 files changed, 123 insertions(+), 91 deletions(-) diff --git a/configuration/base.nix b/configuration/base.nix index c3b2826..6adae77 100644 --- a/configuration/base.nix +++ b/configuration/base.nix @@ -51,6 +51,30 @@ services.pipewire = { enable = true; pulse.enable = true; + extraConfig.pipewire-pulse = { + "10-prevent-agc" = { + "pulse.rules" = [ + { + matches = [ + { "application.process.binary" = "chrome"; } + { "application.process.binary" = "Discord"; } + { "application.process.binary" = "teams"; } + { "application.process.binary" = "electron"; } + { "application.process.binary" = "skypeforlinux"; } + { "application.process.binary" = "telegram-desktop"; } + { "application.process.binary" = "vivaldi"; } + { "application.process.binary" = "chromium"; } + { "application.process.binary" = "zoom"; } + ]; + actions = { + quirks = [ + "block-source-volume" + ]; + }; + } + ]; + }; + }; }; services.fstrim.enable = true; diff --git a/devices/tuxedo/configuration.nix b/devices/tuxedo/configuration.nix index de52e87..eed5e4b 100644 --- a/devices/tuxedo/configuration.nix +++ b/devices/tuxedo/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ inputs, ... }: +{ inputs, pkgs, ... }: { imports = @@ -42,9 +42,10 @@ hardware.tuxedo-drivers.enable = true; - programs.nix-ld.enable = true; programs.wireshark = { enable = true; + package = pkgs.wireshark; + dumpcap.enable = true; }; # Define a user account. Don't forget to set a password with ‘passwd’. diff --git a/flake.nix b/flake.nix index d377ddf..a8a895a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,17 +1,21 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11?shallow=1"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05?shallow=1"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable?shallow=1"; - nixos-hardware.url = "github:NixOS/nixos-hardware/master?shallow=1"; - nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions?shallow=1"; + # use by inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".[package name] home-manager = { - url = "github:nix-community/home-manager/release-24.11?shallow=1"; + url = "github:nix-community/home-manager/release-25.05?shallow=1"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nixos-hardware.url = "github:NixOS/nixos-hardware/master?shallow=1"; disko = { url = "github:nix-community/disko?shallow=1"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions?shallow=1"; + system-manager = { url = "github:numtide/system-manager?shallow=1"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/home-manager/base/fonts.nix b/home-manager/base/fonts.nix index ab2385c..4d10e48 100644 --- a/home-manager/base/fonts.nix +++ b/home-manager/base/fonts.nix @@ -5,7 +5,7 @@ liberation_ttf ubuntu-sans ubuntu-sans-mono - (nerdfonts.override { fonts = [ "SpaceMono" ]; }) + nerd-fonts.space-mono ]; fonts.fontconfig = { diff --git a/home-manager/base/terminal.nix b/home-manager/base/terminal.nix index d5e13f2..fe78aae 100644 --- a/home-manager/base/terminal.nix +++ b/home-manager/base/terminal.nix @@ -24,7 +24,7 @@ with lib; config = { home.packages = with pkgs;[ blesh - (nerdfonts.override { fonts = [ "SpaceMono" ]; }) + nerd-fonts.space-mono ]; programs = { @@ -95,6 +95,7 @@ with lib; enableBashIntegration = true; settings = { theme = "dracula"; + show_startup_tips = false; }; }; diff --git a/home-manager/development/games.nix b/home-manager/development/games.nix index 425a69a..f6273fc 100644 --- a/home-manager/development/games.nix +++ b/home-manager/development/games.nix @@ -1,17 +1,17 @@ -{ pkgs, inputs, ... }: +{ pkgs, ... }: { home.packages = with pkgs;[ jetbrains.rider # Remove when https://github.com/NixOS/nixpkgs/issues/393332 resolved (likely when 25.05 is out) - # godot-mono - (symlinkJoin { - name = "godot-mono"; - paths = [ inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".godot-mono ]; - buildInputs = [ makeWrapper ]; - postBuild = '' - wrapProgram $out/bin/godot4-mono --set DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1 - ''; - }) + godot-mono + # (symlinkJoin { + # name = "godot-mono"; + # paths = [ inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".godot-mono ]; + # buildInputs = [ makeWrapper ]; + # postBuild = '' + # wrapProgram $out/bin/godot4-mono --set DOTNET_SYSTEM_GLOBALIZATION_INVARIANT 1 + # ''; + # }) ]; } diff --git a/home-manager/development/vscode.nix b/home-manager/development/vscode.nix index 8f70bb8..f9332cc 100644 --- a/home-manager/development/vscode.nix +++ b/home-manager/development/vscode.nix @@ -6,86 +6,88 @@ let in { home.packages = with pkgs;[ - (nerdfonts.override { fonts = [ "SpaceMono" ]; }) + nerd-fonts.space-mono ]; programs = { vscode = { enable = true; - package = inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".vscodium; + package = pkgs.vscodium; mutableExtensionsDir = false; - enableUpdateCheck = false; - enableExtensionUpdateCheck = false; - extensions = with openvsx;[ - biomejs.biome - mkhl.direnv - dracula-theme.theme-dracula - dbaeumer.vscode-eslint - eamodio.gitlens - pkief.material-icon-theme - jnoortheen.nix-ide - esbenp.prettier-vscode - humao.rest-client - loriscro.super - mads-hartmann.bash-ide-vscode - foxundermoon.shell-format - dart-code.flutter - ms-vscode.wasm-wasi-core - rust-lang.rust-analyzer - tamasfe.even-better-toml - mikestead.dotenv - ] ++ [ vscode-marketplace.bradlc.vscode-tailwindcss ]; - userSettings = with pkgs;{ - "workbench.iconTheme" = "material-icon-theme"; - "window.titleBarStyle" = "custom"; - "workbench.colorTheme" = "Dracula Theme"; - "explorer.compactFolders" = false; - "chat.commandCenter.enabled" = false; + profiles.default = { + enableUpdateCheck = false; + enableExtensionUpdateCheck = false; + extensions = (with openvsx;[ + biomejs.biome + mkhl.direnv + dracula-theme.theme-dracula + dbaeumer.vscode-eslint + eamodio.gitlens + pkief.material-icon-theme + jnoortheen.nix-ide + esbenp.prettier-vscode + humao.rest-client + loriscro.super + mads-hartmann.bash-ide-vscode + foxundermoon.shell-format + dart-code.flutter + ms-vscode.wasm-wasi-core + rust-lang.rust-analyzer + tamasfe.even-better-toml + mikestead.dotenv + ]) ++ (with vscode-marketplace;[ bradlc.vscode-tailwindcss ]); + userSettings = with pkgs;{ + "workbench.iconTheme" = "material-icon-theme"; + "window.titleBarStyle" = "custom"; + "workbench.colorTheme" = "Dracula Theme"; + "explorer.compactFolders" = false; + "chat.commandCenter.enabled" = false; - "editor.fontFamily" = "'SpaceMono Nerd Font', 'monospace', monospace"; - "editor.fontSize" = 16; - "editor.formatOnSave" = true; - "editor.codeActionsOnSave" = { - "source.organizeImports" = "always"; - }; - - "files.autoSave" = "onWindowChange"; - - "[typescript]" = { - "editor.defaultFormatter" = "biomejs.biome"; - }; - "[javascript]" = { - "editor.defaultFormatter" = "biomejs.biome"; - }; - "[javascriptreact]" = { - "editor.defaultFormatter" = "biomejs.biome"; - }; - "[typescriptreact]" = { - "editor.defaultFormatter" = "biomejs.biome"; - }; - "[json]" = { - "editor.defaultFormatter" = "biomejs.biome"; - }; - "[jsonc]" = { - "editor.defaultFormatter" = "biomejs.biome"; - }; - "biome.lsp.bin" = "${biome}/bin/biome"; - "biome.requireConfigFile" = true; - - "typescript.preferences.preferTypeOnlyAutoImports" = true; - - "nix.enableLanguageServer" = true; # Enable LSP. - "nix.serverPath" = "${nixd}/bin/nixd"; # The path to the LSP server executable. - "nix.serverSettings" = { - nixd = { - formatting.command = [ "${nixpkgs-fmt}/bin/nixpkgs-fmt" ]; + "editor.fontFamily" = "'SpaceMono Nerd Font', 'monospace', monospace"; + "editor.fontSize" = 16; + "editor.formatOnSave" = true; + "editor.codeActionsOnSave" = { + "source.organizeImports" = "always"; }; + + "files.autoSave" = "onWindowChange"; + + "[typescript]" = { + "editor.defaultFormatter" = "biomejs.biome"; + }; + "[javascript]" = { + "editor.defaultFormatter" = "biomejs.biome"; + }; + "[javascriptreact]" = { + "editor.defaultFormatter" = "biomejs.biome"; + }; + "[typescriptreact]" = { + "editor.defaultFormatter" = "biomejs.biome"; + }; + "[json]" = { + "editor.defaultFormatter" = "biomejs.biome"; + }; + "[jsonc]" = { + "editor.defaultFormatter" = "biomejs.biome"; + }; + "biome.lsp.bin" = "${biome}/bin/biome"; + "biome.requireConfigFile" = true; + + "typescript.preferences.preferTypeOnlyAutoImports" = true; + + "nix.enableLanguageServer" = true; # Enable LSP. + "nix.serverPath" = "${nixd}/bin/nixd"; # The path to the LSP server executable. + "nix.serverSettings" = { + nixd = { + formatting.command = [ "${nixpkgs-fmt}/bin/nixpkgs-fmt" ]; + }; + }; + + "bashIde.shellcheckPath" = "${shellcheck}/bin/shellcheck"; + "shellformat.path" = "${shfmt}/bin/shfmt"; + + "rust-analyzer.rustfmt.overrideCommand" = [ "${rustfmt}/bin/rustfmt" ]; }; - - "bashIde.shellcheckPath" = "${shellcheck}/bin/shellcheck"; - "shellformat.path" = "${shfmt}/bin/shfmt"; - - "rust-analyzer.rustfmt.overrideCommand" = [ "${rustfmt}/bin/rustfmt" ]; }; }; }; diff --git a/home-manager/gaming.nix b/home-manager/gaming.nix index a3eaae4..5f1e868 100644 --- a/home-manager/gaming.nix +++ b/home-manager/gaming.nix @@ -1,10 +1,10 @@ -{ inputs, pkgs, ... }: +{ pkgs, ... }: { home.packages = with pkgs;[ steamguard-cli bottles - inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".ryubing + ryubing mgba scanmem heroic