2023-11-13 21:26:22 +01:00
|
|
|
# This is your system's configuration file.
|
|
|
|
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
|
|
|
{
|
|
|
|
outputs,
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
2024-06-21 23:59:28 +02:00
|
|
|
pkgs-edge,
|
2023-11-13 21:26:22 +01:00
|
|
|
...
|
|
|
|
}: {
|
2024-01-09 13:19:42 +01:00
|
|
|
imports = [
|
2024-01-30 12:03:29 +01:00
|
|
|
# Import shared packages
|
2024-02-07 13:50:03 +01:00
|
|
|
../shared
|
2024-04-19 16:57:39 +02:00
|
|
|
./package-configs
|
2024-01-09 13:19:42 +01:00
|
|
|
];
|
2023-11-13 21:26:22 +01:00
|
|
|
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
|
|
|
#})
|
2023-11-13 21:26:22 +01: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
|
2024-01-23 10:52:23 +01:00
|
|
|
#outputs.overlays.unstable-packages
|
2023-11-13 21:26:22 +01:00
|
|
|
];
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-21 23:59:28 +02:00
|
|
|
environment.systemPackages =
|
|
|
|
(with pkgs; [
|
|
|
|
# Custom tools
|
|
|
|
dvd
|
|
|
|
dvt
|
|
|
|
servo
|
|
|
|
restart
|
2024-01-30 12:07:57 +01:00
|
|
|
|
2024-06-21 23:59:28 +02:00
|
|
|
# System tools
|
|
|
|
aha
|
2024-08-29 10:18:13 +02:00
|
|
|
#bcachefs-tools
|
2024-06-21 23:59:28 +02:00
|
|
|
clinfo
|
|
|
|
comma
|
|
|
|
direnv
|
2024-08-17 19:08:10 +02:00
|
|
|
exfat
|
|
|
|
exfatprogs
|
2024-06-21 23:59:28 +02:00
|
|
|
git-filter-repo
|
|
|
|
gnupg
|
|
|
|
pciutils
|
|
|
|
podman
|
|
|
|
podman-compose
|
|
|
|
sbctl
|
|
|
|
tpm2-tools
|
|
|
|
tpm2-tss
|
|
|
|
virtualgl
|
|
|
|
vulkan-tools
|
2024-10-27 19:05:36 +01:00
|
|
|
# waydroid
|
2024-06-21 23:59:28 +02:00
|
|
|
waypipe
|
|
|
|
wayland-utils
|
|
|
|
xwaylandvideobridge
|
|
|
|
yubikey-personalization
|
|
|
|
zsh
|
2024-01-09 10:02:46 +01:00
|
|
|
|
2024-06-21 23:59:28 +02:00
|
|
|
# KDE/QT
|
|
|
|
krunner-translator
|
|
|
|
kdePackages.discover
|
2024-08-29 15:12:50 +02:00
|
|
|
kdePackages.filelight
|
2024-06-21 23:59:28 +02:00
|
|
|
kdePackages.kcalc
|
|
|
|
kdePackages.kdepim-addons
|
|
|
|
kdePackages.kirigami
|
|
|
|
kdePackages.kdeconnect-kde
|
2024-08-29 14:46:04 +02:00
|
|
|
kdePackages.konsole
|
2024-06-21 23:59:28 +02:00
|
|
|
# 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
|
2024-11-10 16:26:52 +01:00
|
|
|
kdePackages.krdc
|
|
|
|
kdePackages.krfb
|
2024-06-21 23:59:28 +02:00
|
|
|
libportal-qt5
|
|
|
|
libportal
|
2024-01-09 10:02:46 +01:00
|
|
|
|
2024-06-21 23:59:28 +02:00
|
|
|
# User tools
|
|
|
|
noisetorch
|
|
|
|
qjackctl
|
|
|
|
wireplumber
|
2024-08-17 20:09:13 +02:00
|
|
|
#rustdesk
|
2024-06-21 23:59:28 +02:00
|
|
|
])
|
|
|
|
++ (with pkgs-edge; [
|
|
|
|
# list of latest packages from nixpkgs master
|
|
|
|
# Can be used to install latest version of some packages
|
|
|
|
]);
|
2024-12-22 22:48:13 +01:00
|
|
|
programs = {
|
|
|
|
# Allow executing of anything on the system with a , eg: , python executes python from the nix store even if not in $PATH currently
|
|
|
|
command-not-found.enable = lib.mkForce false;
|
|
|
|
nix-index.enable = true;
|
|
|
|
nix-index-database.comma.enable = true;
|
2023-11-13 21:26:22 +01:00
|
|
|
|
2024-12-22 22:48:13 +01:00
|
|
|
direnv = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2024-01-17 15:02:27 +01:00
|
|
|
|
2024-12-22 22:48:13 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
kdeconnect.enable = true;
|
2023-11-13 21:26:22 +01:00
|
|
|
|
2024-12-22 22:48:13 +01:00
|
|
|
noisetorch = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-11-13 21:26:22 +01:00
|
|
|
};
|
2024-12-22 22:48:13 +01:00
|
|
|
|
|
|
|
# Enable networking
|
|
|
|
networking.networkmanager.enable = true; # Enables support for 32bit libs that steam uses
|
2023-11-13 21:26:22 +01:00
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
time.timeZone = "Europe/Amsterdam";
|
2024-12-22 22:48:13 +01:00
|
|
|
services = {
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
xserver.enable = true;
|
2023-11-13 21:26:22 +01:00
|
|
|
|
2024-12-22 22:48:13 +01:00
|
|
|
# Enable the KDE Plasma Desktop Environment.
|
|
|
|
displayManager.sddm = {
|
|
|
|
enable = true;
|
|
|
|
wayland.enable = true;
|
|
|
|
};
|
|
|
|
displayManager.defaultSession = "plasma";
|
|
|
|
desktopManager.plasma6.enable = true;
|
|
|
|
|
|
|
|
# Enable flatpak support
|
|
|
|
flatpak.enable = true;
|
|
|
|
packagekit.enable = true;
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
|
|
xserver.xkb = {
|
|
|
|
layout = "us";
|
|
|
|
variant = "";
|
|
|
|
options = "terminate:ctrl_alt_bksp,compose:caps_toggle";
|
|
|
|
};
|
2023-11-13 21:26:22 +01:00
|
|
|
|
2024-12-22 22:48:13 +01:00
|
|
|
# Enable CUPS to print documents.
|
|
|
|
printing.enable = true;
|
2023-11-13 21:26:22 +01:00
|
|
|
|
2024-12-22 22:48:13 +01:00
|
|
|
# Enable fwupd daemon and user space client
|
|
|
|
fwupd.enable = true;
|
|
|
|
pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
wireplumber.enable = true;
|
|
|
|
};
|
2023-11-13 21:26:22 +01:00
|
|
|
|
2024-12-22 22:48:13 +01:00
|
|
|
avahi = {
|
|
|
|
nssmdns4 = true;
|
|
|
|
enable = true;
|
|
|
|
ipv4 = true;
|
|
|
|
ipv6 = true;
|
|
|
|
publish = {
|
|
|
|
enable = true;
|
|
|
|
addresses = true;
|
|
|
|
workstation = true;
|
|
|
|
};
|
|
|
|
};
|
2023-11-13 21:26:22 +01:00
|
|
|
};
|
2024-12-22 22:48:13 +01:00
|
|
|
hardware = {
|
|
|
|
graphics.enable32Bit = true;
|
2023-11-13 21:26:22 +01:00
|
|
|
|
2024-12-22 22:48:13 +01:00
|
|
|
# Enable bluetooth hardware
|
|
|
|
bluetooth.enable = true;
|
|
|
|
|
|
|
|
# Enable sound with pipewire.
|
|
|
|
pulseaudio.enable = false;
|
2023-11-17 19:25:12 +01:00
|
|
|
};
|
2024-12-22 22:48:13 +01:00
|
|
|
security.rtkit.enable = true;
|
2023-11-17 19:25:12 +01:00
|
|
|
|
2024-02-21 12:16:53 +01:00
|
|
|
virtualisation.podman = {
|
|
|
|
enable = true;
|
|
|
|
dockerCompat = true;
|
|
|
|
};
|
2024-12-22 22:48:13 +01:00
|
|
|
security.tpm2 = {
|
2024-12-01 01:40:11 +01:00
|
|
|
enable = true;
|
2024-12-22 22:48:13 +01:00
|
|
|
pkcs11.enable = true; # expose /run/current-system/sw/lib/libtpm2_pkcs11.so
|
|
|
|
tctiEnvironment.enable = true;
|
|
|
|
}; # TPM2TOOLS_TCTI and TPM2_PKCS11_TCTI env variables
|
|
|
|
users.users.lillian.extraGroups = ["tss"];
|
|
|
|
boot = {
|
|
|
|
# tss group has access to TPM devices
|
|
|
|
# FIXME: re-enable virtual camera loopback when it build again.
|
|
|
|
bootspec.enable = true;
|
|
|
|
#boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
|
|
|
|
#boot.supportedFilesystems = ["bcachefs"];
|
|
|
|
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback.out];
|
|
|
|
kernelModules = [
|
|
|
|
# Virtual Camera
|
|
|
|
"v4l2loopback"
|
|
|
|
# Virtual Microphone, built-in
|
|
|
|
"snd-aloop"
|
|
|
|
];
|
|
|
|
# Set initial kernel module settings
|
|
|
|
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"
|
|
|
|
'';
|
|
|
|
loader.systemd-boot.configurationLimit = 3;
|
|
|
|
loader.efi.canTouchEfiVariables = true;
|
2024-12-01 01:40:11 +01:00
|
|
|
};
|
2023-11-13 21:26:22 +01:00
|
|
|
}
|