From efecd38dbc7bb1bca4d5a62ef73969d142bd87be Mon Sep 17 00:00:00 2001 From: monologiq Date: Wed, 24 Dec 2025 14:42:10 +0100 Subject: [PATCH] Extract config related to Linux desktop machines --- machines/persephone.nix | 63 +++----------------------------------- profiles/desktop.linux.nix | 62 ++++++++++++++++++++++++++++++++++++- profiles/minimal.nix | 2 ++ 3 files changed, 67 insertions(+), 60 deletions(-) diff --git a/machines/persephone.nix b/machines/persephone.nix index a0b444b..792b5b8 100644 --- a/machines/persephone.nix +++ b/machines/persephone.nix @@ -104,17 +104,11 @@ in swapDevices = [ ]; environment.systemPackages = with pkgs; [ - sbctl - - libva-utils - vdpauinfo - adwaita-icon-theme - gsettings-desktop-schemas - - ddcutil mesa-demos ]; + + programs.regreet.enable = true; # BOOTLOADER boot.bootspec.enable = true; @@ -186,27 +180,10 @@ in VDPAU_DRIVER = "va_gl"; }; - # AUDIO - security.rtkit.enable = true; - - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - - # BLUETOOTH - hardware.bluetooth = { - enable = true; - settings = { - General.Experimental = true; - }; - }; + services.pipewire.enable = true; + hardware.bluetooth.enable = true; # MISC - boot.kernelPackages = pkgs.linuxPackages_6_17; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; @@ -223,38 +200,6 @@ in trusted-public-keys = [ "cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M=" ]; }; - programs._1password.enable = true; - programs._1password-gui = { - enable = true; - polkitPolicyOwners = [ "pml" ]; - }; - - environment.etc = { - "1password/custom_allowed_browsers" = { - text = '' - firefox - brave - ''; - mode = "0755"; - }; - }; - - # Enable regreet - programs.regreet = { - enable = true; - font.name = "SF Pro"; - font.size = 16; - font.package = pkgs.apple-fonts.sf-pro; - settings = { - GTK = { - font_name = lib.mkForce "SF Pro 16"; - }; - }; - }; - - programs.niri.enable = true; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - # FONTS fonts.fontconfig = { enable = true; diff --git a/profiles/desktop.linux.nix b/profiles/desktop.linux.nix index f2d4fdd..6593449 100644 --- a/profiles/desktop.linux.nix +++ b/profiles/desktop.linux.nix @@ -1,6 +1,66 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: +let + sessionVariables = { + NIXOS_OZONE_WL = "1"; + }; + systemPackages = with pkgs; [ + ddcutil + gsettings-desktop-schemas + libva-utils + sbctl + vdpauinfo + ]; +in { + environment = { + inherit sessionVariables systemPackages; + + etc = { + "1password/custom_allowed_browsers" = { + text = '' + firefox + brave + ''; + mode = "0755"; + }; + }; + }; + + hardware.bluetooth = { + settings = { + General.Experimental = true; + }; + }; + programs.dconf.enable = true; security.polkit.enable = true; + + programs._1password.enable = true; + programs._1password-gui = { + enable = true; + polkitPolicyOwners = [ "pml" ]; + }; + + programs.niri.enable = true; + + programs.regreet = { + font.name = "SF Pro"; + font.size = 16; + font.package = pkgs.apple-fonts.sf-pro; + settings = { + GTK = { + font_name = lib.mkForce "SF Pro 16"; + }; + }; + }; + + security.rtkit.enable = true; + + services.pipewire = { + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; } diff --git a/profiles/minimal.nix b/profiles/minimal.nix index a4f3120..0a68c4c 100644 --- a/profiles/minimal.nix +++ b/profiles/minimal.nix @@ -2,8 +2,10 @@ { environment.systemPackages = with pkgs; [ + curl git vim + wget ]; nix.package = pkgs.lixPackageSets.stable.lix;