nixos/configuration.nix
2026-07-27 22:53:42 +02:00

171 lines
4.2 KiB
Nix
Raw 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.

{
inputs,
pkgs,
...
}:
{
imports = [
./stylix.nix
./nixvim/nixvim.nix
];
boot.loader.systemd-boot = {
edk2-uefi-shell.enable = true;
configurationLimit = 5;
};
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nix.package = pkgs.lixPackageSets.stable.lix;
nix.settings.trusted-users = [ "lucy" ];
networking.hostName = "nixos"; # Define your hostname.
networking.networkmanager.enable = true;
networking.networkmanager.wifi.powersave = false;
time.timeZone = "Europe/Berlin";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
services.xserver.xkb = {
layout = "eu";
variant = "";
};
services.displayManager.ly.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
};
programs.hyprland = {
package = pkgs.hyprland;
enable = true;
withUWSM = true; # recommended for most users
xwayland.enable = true; # Xwayland can be disabled.
};
security.doas.enable = true;
security.sudo.enable = false;
security.doas.extraRules = [
{
users = [
"lucy"
"root"
];
groups = [ "wheel" ];
keepEnv = true;
persist = true; # Optional, only require password verification a single time
}
];
programs.bash = {
completion.enable = true;
shellAliases = {
"rebuild" = "doas nixos-rebuild switch --flake $HOME/nixos/ --impure";
};
promptInit = ''
PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
'';
interactiveShellInit = ''
complete -F _command doas
eval "$(devenv hook bash)"
'';
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
ohMyZsh.enable = true;
ohMyZsh.theme = "gentoo";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
programs.xppen = {
enable = true;
package = pkgs.xppen_4.overrideAttrs (old: {
src = pkgs.fetchurl {
url = "https://download01.xp-pen.com/file/2026/04/XPPenLinux4.0.15-260422.tar.gz";
hash = "sha256-Jady+pbqnzmVMuM0Io4/aE5B7dqNlDKPsnRj/Fbln6U=";
};
buildInputs = (old.buildInputs or [ ]) ++ [
pkgs.libXtst
pkgs.libXrandr
];
});
};
# Define a user account. Don't forget to set a password with ‘passwd’.
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
nerd-fonts.symbols-only
];
users.users."lucy" = {
shell = pkgs.zsh;
isNormalUser = true;
description = "lucy";
extraGroups = [
"networkmanager"
"wheel"
];
};
programs.direnv.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
wl-clipboard
btop
ripgrep
fd
bat
grimblast
git
blueman
devenv
inetutils
filezilla
];
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
FastConnectable = true;
};
Policy = {
AutoEnable = true;
};
};
};
# DO NOT CHANGE!!
system.stateVersion = "26.05"; # Did you read the comment?
}