{ pkgs, pkgs-unstable, background-image ? "pan-wire-3.png", use-display-manager, ... }: let start-plasma-shortcut = pkgs.writeScriptBin "desktop" '' ${pkgs.plasma-workspace}/libexec/plasma-dbus-run-session-if-needed ${pkgs.plasma-workspace}/bin/startplasma-wayland ''; # kicad is broken in 2411 # TODO: update to 2411 pkgs_2405 = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/e8c38b73aeb218e27163376a2d617e61a2ad9b59.tar.gz") {}; kicad-patch = pkgs.stdenv.mkDerivation { name = "kicad-patch"; version = pkgs_2405.kicad-small.version; src = pkgs_2405.kicad-small; buildInputs = [ pkgs.makeWrapper ]; buildPhase = '' mkdir $out cp -r $src/* $out chmod -R u+w $out # don't want the individual kicad things to show up as applications mv $out/share/applications $out/share/applications.0 mkdir $out/share/applications cp $out/share/applications.0/org.kicad.kicad.desktop $out/share/applications/ # https://github.com/NixOS/nixpkgs/issues/338062#issuecomment-2430847477 for prog in $out/bin/* ; do wrapProgram $prog \ --set GDK_BACKEND x11 done ''; }; in { services.xserver = { enable = true; displayManager.lightdm.enable = use-display-manager; xkb = { layout = "fox"; options = "caps:escape"; extraLayouts.fox = { description = "Layout suitable to be used by a fox"; languages = ["se"]; symbolsFile = ./kblayouts/fox-symbols.xkb; }; }; }; services.desktopManager.plasma6.enable = true; services.displayManager.defaultSession = "plasma"; services.mullvad-vpn.enable = true; hardware.opengl.enable = true; console.useXkbConfig = true; # sound.enable = false; # let pipewire handle sound services.pipewire = { enable = true; alsa.enable = true; pulse.enable = true; jack.enable = true; wireplumber.enable = true; }; hardware.bluetooth.enable = true; users.users.xenia = { isNormalUser = true; extraGroups = [ "wheel" "docker" ]; shell = pkgs.zsh; uid = 1002; }; environment.systemPackages = (with pkgs; [ stilo-themes thunderbird glxinfo start-plasma-shortcut remmina libreoffice kicad-patch ]) ++ (with pkgs_2405; [ firefox ]); }