From 62a2847dfabd5483d45d4f6b44c7eece01256939 Mon Sep 17 00:00:00 2001 From: Roman Lubij Date: Fri, 26 Dec 2025 10:38:31 +0100 Subject: [PATCH] Cleanup --- configuration.nix | 69 +++++++++++++------------------------------- flake.lock | 6 ++-- modules/packages.nix | 24 +++++++++++++++ 3 files changed, 47 insertions(+), 52 deletions(-) diff --git a/configuration.nix b/configuration.nix index 536f11c..8bf6fc0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -23,7 +23,7 @@ boot = { initrd.kernelModules = [ ]; initrd.verbose = false; - kernelModules = [ "nct6683" ]; + kernelModules = [ "nct6683" "hid-logitech-dj" "hid-logiztech-hidpp" ]; blacklistedKernelModules = [ "k10temp" ]; kernelParams = [ "amdgpu.seamless=1" @@ -53,6 +53,11 @@ networking = { hostName = "epiquev2"; networkmanager.enable = true; + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + firewall.enable = false; }; # Set your time zone. @@ -81,7 +86,20 @@ xdg.portal.enable = true; - security.rtkit.enable = true; + security = { + rtkit.enable = true; + sudo.extraConfig = '' + Defaults insults + ''; + polkit.extraConfig = '' + polkit.addRule(function(action, subject) { + if (action.id == "org.libvirt.unix.manage" && + subject.isInGroup("qemu-libvirtd")) { + return polkit.Result.YES; + } + }); + ''; + }; virtualisation = { docker = { @@ -121,30 +139,6 @@ #packages = with pkgs; [ ]; }; - # Allow unfree packages - nixpkgs = { - config = { - allowUnfree = true; - permittedInsecurePackages = [ - "ventoy-gtk3-1.1.07" - ]; - }; - overlays = [ - (final: prev: { - nautilus = prev.nautilus.overrideAttrs (nprev: { - buildInputs = - nprev.buildInputs - ++ (with pkgs.gst_all_1; [ - gst-plugins-good - gst-plugins-bad - gst-plugins-ugly - gst-plugins-base - ]); - }); - }) - ]; - }; - environment = { sessionVariables = { NIXOS_OZONE_WL = "1"; @@ -204,21 +198,6 @@ enable = true; }; - security.polkit.extraConfig = '' - polkit.addRule(function(action, subject) { - if (action.id == "org.libvirt.unix.manage" && - subject.isInGroup("qemu-libvirtd")) { - return polkit.Result.YES; - } - }); - ''; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - networking.firewall.enable = false; - nix.settings = { auto-optimise-store = true; experimental-features = [ @@ -226,14 +205,6 @@ "nix-command" ]; warn-dirty = false; - /* - substituters = [ - "https://cache.nixos.org/" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59MDW/s82/h4RZcnxaz2bYcxoZb0qwYf5ED+w=" - ]; - */ }; system.stateVersion = "25.05"; diff --git a/flake.lock b/flake.lock index 4b0440d..e8d7a27 100644 --- a/flake.lock +++ b/flake.lock @@ -128,11 +128,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1766687550, - "narHash": "sha256-FGuhrdRvxp3DZfRZfA+1mKZIpgTU9Xboq1jVphKm9Go=", + "lastModified": 1766730473, + "narHash": "sha256-Tvfu5vn7y685n+e8mBWGeP8RjtXFPhsr/RFNSrAs5w8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a3a2ddee4adfb361bdfe2e915c7e85c2e71cfc5f", + "rev": "b554487235037f6e18df83617055c2ea4808c89f", "type": "github" }, "original": { diff --git a/modules/packages.nix b/modules/packages.nix index 67bae2c..37aba20 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -8,6 +8,30 @@ }: { + # Allow unfree packages + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "ventoy-gtk3-1.1.07" + ]; + }; + overlays = [ + (final: prev: { + nautilus = prev.nautilus.overrideAttrs (nprev: { + buildInputs = + nprev.buildInputs + ++ (with pkgs.gst_all_1; [ + gst-plugins-good + gst-plugins-bad + gst-plugins-ugly + gst-plugins-base + ]); + }); + }) + ]; + }; + environment.systemPackages = with pkgs; [ abootimg amdgpu_top