dotfiles/root-conf/nixos/nixMain/configuration.nix
2026-08-15 16:03:36 +02:00

265 lines
6.0 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, pkgs, pkgs-unstable, inputs, ... }:
let
optionalPkgs = import ../optional-packages.nix { inherit pkgs; };
in
{
imports =
[
./hardware-configuration.nix
./device-specific.nix
../shared-conf.nix
];
services.flatpak.enable = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.supportedFilesystems = [ "ntfs" ];
boot.kernelModules = [ "gpio-mockup" ];
boot.extraModprobeConfig = ''
options gpio-mockup gpio_mockup_ranges=-1,21
'';
# Enable emulation if Architecture:
boot.binfmt.emulatedSystems = [
"aarch64-linux"
];
# Allow user to ttyACM0
# Allow user to gpio
services.udev.extraRules = ''
KERNEL=="ttyACM0", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpio", KERNEL=="gpiochip*", GROUP="gpio", MODE="0660"
'';
# Enable openrgb
services.hardware.openrgb.enable = true;
networking.firewall = {
enable = true;
logRefusedPackets = true;
allowedTCPPorts = [
# Web
80
443
# development servers
5000
5001
# Sunshine Steam-related
47984
47989
47990
48010
];
allowedTCPPortRanges = [
# KDE Connect
{ from = 1714; to = 1764; }
];
allowedUDPPortRanges = [
{ from = 4000; to = 4007; }
{ from = 8000; to = 8010; }
{ from = 47998; to = 48000; } # Sunshine Steam-related
{ from = 1714; to = 1764; } # KDE Connect
];
};
users.groups.gpio = {};
users.groups.wireshark = {};
users.users.another = {
isNormalUser = true;
description = "another";
extraGroups = [];
packages = with pkgs; [];
shell = pkgs.bash;
};
# Use ly as display manager
services.displayManager = {
ly = {
enable = true;
settings = {
tty = 1;
};
};
autoLogin = {
enable = true;
user = "someone";
};
# Generated with home mgr
#sessionPackages = [
# config.home-manager.users.someone.wayland.windowManager.h#prland.package
# ];
defaultSession = "hyprland";
};
programs.hyprland = {
package = config.home-manager.users.someone.wayland.windowManager.hyprland.package;
withUWSM = false;
enable = true;
};
xdg.portal = {
enable = true;
configPackages = [
config.home-manager.users.someone.wayland.windowManager.hyprland.portalPackage
];
};
# Docker
virtualisation.docker.enable = true;
virtualisation.docker.storageDriver = "btrfs";
# Added docker group to user
# Additional steam settings
hardware.graphics.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
#localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
# Thunar file manager
programs.thunar.enable = true;
programs.xfconf.enable = true; # Neded to save preferances
programs.thunar.plugins = with pkgs; [
thunar-archive-plugin
];
services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images
programs.ausweisapp.enable = true;
# open firewall for communication with smartphone app
programs.ausweisapp.openFirewall = true;
environment.systemPackages = with pkgs; [
# System
polkit
libsecret # for gnome-keyring
xdg-desktop-portal-gtk
xdg-utils
shared-mime-info
xwayland
dconf
tree
unzip
bind # dig, nslookup
overskride # bluetooth gui
# Hyprland stuff
uwsm # might not be needet, test login without
kitty
dunst
waybar
rofi
nwg-drawer
swaylock
hyprpolkitagent
hyprpicker
hypridle
hyprpaper
playerctl
pwvucontrol
# Screenshots & clipboard
grim
slurp
swappy
copyq
python312Packages.pillow
# Files
yazi
file-roller
qimgv
# Media
vlc
rawtherapee
handbrake
svt-av1
tidal-hifi
# 3D / CAD
blender
freecad
# Comms
discord-ptb
kdePackages.kdeconnect-kde
seahorse
# Gaming
sunshine
heroic
prismlauncher
# Monitoring
mission-center
nethogs
# nvtopPackages.full
# btop
# Hardware
android-tools # adb, fastboot
# Theme
catppuccin-cursors.frappeMauve
libsForQt5.qt5ct
qt6Packages.qt6ct
lxappearance
adwaita-icon-theme
# Misc
pkgs-unstable.orca-slicer
pkgs-unstable.video-downloader
] ++ optionalPkgs;
# nerdfonts wher seperated into different packages, so nerdfonts dosnt work
fonts.packages = with pkgs; [] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
# Per process network information for mission-center
security.wrappers.nethogs = {
owner = "root";
group = "root";
capabilities = "cap_net_admin,cap_net_raw,cap_dac_read_search,cap_sys_ptrace+pe";
source = "${pkgs.nethogs}/bin/nethogs";
};
security.pam.services.swaylock = {};
#Enviormant
# needet for electron apps under wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Enable auth polkit
security.polkit.enable = true;
# Walet, needet for nextcloud login
services.gnome.gnome-keyring.enable = true;
# Otherwise keyring would automaticly reset password on login
security.pam.services.ly.enableGnomeKeyring = false;
security.pam.services.swaylock.enableGnomeKeyring = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}