NixOS-Config/nixos/desktop/default.nix

198 lines
5 KiB
Nix
Raw Normal View History

# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
{
inputs,
outputs,
lib,
config,
pkgs,
pkgs-edge,
...
}: {
imports = [
# Import shared packages
2024-02-07 13:50:03 +01:00
../shared
2024-04-19 16:57:39 +02:00
./package-configs
];
nixpkgs = {
# You can add overlays here
overlays = [
2024-08-29 10:18:13 +02:00
#(final: prev: {
2024-08-29 14:46:04 +02:00
#bcachefs-tools = pkgs-edge.bcachefs-tools;
2024-08-29 10:18:13 +02:00
#})
# Add overlays your own flake exports (from overlays and pkgs dir):
2024-01-18 12:46:31 +01:00
outputs.overlays.additions
outputs.overlays.modifications
#outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
2024-04-18 15:07:28 +02:00
# Allow executing of anything on the system with a , eg: , python executes python from the nix store even if not in $PATH currently
programs.command-not-found.enable = lib.mkForce false;
2024-04-18 15:07:28 +02:00
programs.nix-index.enable = true;
2024-04-23 11:38:14 +02:00
programs.nix-index-database.comma.enable = true;
2024-04-18 15:07:28 +02:00
environment.systemPackages =
(with pkgs; [
# Custom tools
dvd
dvt
servo
restart
2024-01-30 12:07:57 +01:00
# System tools
aha
2024-08-29 10:18:13 +02:00
#bcachefs-tools
clinfo
comma
direnv
exfat
exfatprogs
git-filter-repo
gnupg
pciutils
podman
podman-compose
sbctl
tpm2-tools
tpm2-tss
virtualgl
vulkan-tools
# waydroid
waypipe
wayland-utils
xwaylandvideobridge
yubikey-personalization
zsh
# KDE/QT
krunner-translator
kdePackages.discover
2024-08-29 15:12:50 +02:00
kdePackages.filelight
kdePackages.kcalc
kdePackages.kdepim-addons
kdePackages.kirigami
kdePackages.kdeconnect-kde
2024-08-29 14:46:04 +02:00
kdePackages.konsole
# kdePackages.krunner-ssh
# kdePackages.krunner-symbols
kdePackages.packagekit-qt
kdePackages.plasma-pa
kdePackages.sddm-kcm
kdePackages.dolphin-plugins
2024-10-03 11:36:59 +02:00
kdePackages.qtstyleplugin-kvantum
libportal-qt5
libportal
# User tools
noisetorch
qjackctl
wireplumber
2024-08-17 20:09:13 +02:00
#rustdesk
])
++ (with pkgs-edge; [
# list of latest packages from nixpkgs master
# Can be used to install latest version of some packages
]);
programs.direnv = {
enable = true;
};
# Enable networking
networking.networkmanager.enable = true;
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
extest.enable = true;
};
hardware.graphics.enable32Bit = true; # Enables support for 32bit libs that steam uses
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
services.displayManager.defaultSession = "plasma";
services.desktopManager.plasma6.enable = true;
programs.kdeconnect.enable = true;
# Enable flatpak support
services.flatpak.enable = true;
services.packagekit.enable = true;
# Configure keymap in X11
2024-01-10 11:17:18 +01:00
services.xserver.xkb = {
layout = "us";
2024-01-11 14:10:24 +01:00
variant = "";
2024-01-10 11:17:18 +01:00
options = "terminate:ctrl_alt_bksp,compose:caps_toggle";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable bluetooth hardware
hardware.bluetooth.enable = true;
# Enable fwupd daemon and user space client
services.fwupd.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
2024-02-16 21:31:25 +01:00
jack.enable = true;
2024-02-16 14:41:36 +01:00
wireplumber.enable = true;
};
2023-11-17 19:25:12 +01:00
programs.noisetorch = {
enable = true;
};
2024-02-21 12:16:53 +01:00
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
security.tpm2.enable = true;
security.tpm2.pkcs11.enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so
security.tpm2.tctiEnvironment.enable = true; # TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables
users.users.lillian.extraGroups = ["tss"]; # tss group has access to TPM devices
# FIXME: re-enable virtual camera loopback when it build again.
2024-02-21 12:16:53 +01:00
boot.bootspec.enable = true;
2024-08-29 10:18:13 +02:00
#boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
#boot.supportedFilesystems = ["bcachefs"];
boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback.out];
2024-02-21 12:16:53 +01:00
boot.kernelModules = [
# Virtual Camera
"v4l2loopback"
2024-02-21 12:16:53 +01:00
# Virtual Microphone, built-in
"snd-aloop"
];
# Set initial kernel module settings
boot.extraModprobeConfig = ''
# exclusive_caps: Skype, Zoom, Teams etc. will only show device when actually streaming
# card_label: Name of virtual camera, how it'll show up in Skype, Zoom, Teams
# https://github.com/umlaeute/v4l2loopback
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
2024-02-21 12:16:53 +01:00
'';
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
}