2023-10-21 12:56:02 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
2024-11-17 15:55:55 +01:00
|
|
|
pkgs-unstable,
|
2023-10-21 12:56:02 +02:00
|
|
|
background-image ? "pan-wire-3.png",
|
2024-06-27 12:40:22 +02:00
|
|
|
use-display-manager,
|
2023-10-21 12:56:02 +02:00
|
|
|
...
|
|
|
|
}:
|
2024-06-27 12:40:22 +02:00
|
|
|
let start-plasma-shortcut = pkgs.writeScriptBin "desktop" ''
|
2024-11-19 13:10:06 +01:00
|
|
|
${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
|
|
|
|
'';
|
|
|
|
};
|
2024-06-27 12:40:22 +02:00
|
|
|
in
|
2023-10-21 12:56:02 +02:00
|
|
|
{
|
2023-10-27 23:40:45 +02:00
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
2024-06-27 12:40:22 +02:00
|
|
|
|
|
|
|
displayManager.lightdm.enable = use-display-manager;
|
2023-10-27 23:40:45 +02:00
|
|
|
|
2024-06-08 22:15:09 +02:00
|
|
|
xkb = {
|
|
|
|
layout = "fox";
|
2024-06-24 21:47:55 +02:00
|
|
|
|
2024-06-08 22:15:09 +02:00
|
|
|
options = "caps:escape";
|
|
|
|
extraLayouts.fox = {
|
|
|
|
description = "Layout suitable to be used by a fox";
|
|
|
|
languages = ["se"];
|
2024-06-23 22:46:52 +02:00
|
|
|
symbolsFile = ./kblayouts/fox-symbols.xkb;
|
2024-06-08 22:15:09 +02:00
|
|
|
};
|
2023-10-21 12:56:02 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-24 21:48:23 +02:00
|
|
|
services.desktopManager.plasma6.enable = true;
|
|
|
|
services.displayManager.defaultSession = "plasma";
|
|
|
|
|
2024-09-15 23:20:47 +02:00
|
|
|
services.mullvad-vpn.enable = true;
|
|
|
|
|
2024-06-27 12:40:22 +02:00
|
|
|
hardware.opengl.enable = true;
|
|
|
|
|
2023-10-28 11:21:02 +02:00
|
|
|
console.useXkbConfig = true;
|
|
|
|
|
2024-11-19 13:09:53 +01:00
|
|
|
# sound.enable = false; # let pipewire handle sound
|
2024-06-27 11:23:57 +02:00
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
wireplumber.enable = true;
|
|
|
|
};
|
2023-10-21 12:56:02 +02:00
|
|
|
|
|
|
|
hardware.bluetooth.enable = true;
|
|
|
|
|
|
|
|
users.users.xenia = {
|
|
|
|
isNormalUser = true;
|
|
|
|
extraGroups = [ "wheel" "docker" ];
|
|
|
|
shell = pkgs.zsh;
|
2024-07-03 18:59:55 +02:00
|
|
|
uid = 1002;
|
2023-10-21 12:56:02 +02:00
|
|
|
};
|
|
|
|
|
2024-11-17 15:55:55 +01:00
|
|
|
environment.systemPackages = (with pkgs; [
|
2023-10-21 12:56:02 +02:00
|
|
|
stilo-themes
|
|
|
|
|
2024-09-15 23:20:47 +02:00
|
|
|
thunderbird
|
2024-06-27 11:24:08 +02:00
|
|
|
glxinfo
|
2024-06-27 12:40:22 +02:00
|
|
|
start-plasma-shortcut
|
2024-10-04 21:34:14 +02:00
|
|
|
remmina
|
|
|
|
libreoffice
|
2024-11-19 13:10:06 +01:00
|
|
|
kicad-patch
|
|
|
|
]) ++ (with pkgs_2405; [
|
2024-11-17 15:55:55 +01:00
|
|
|
firefox
|
|
|
|
]);
|
2023-10-21 12:56:02 +02:00
|
|
|
}
|