dotfiles/nix/configuration.nix

242 lines
4.9 KiB
Nix
Raw Normal View History

2025-03-27 01:08:55 +03:00
{ hostname, config, lib, pkgs, ... }:
{
imports =
[
./hardware-${hostname}.nix
./${hostname}.nix
2025-03-27 01:08:55 +03:00
# <home-manager/nixos>
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
################################
# Hardware configuration #
################################
hardware = {
graphics = { enable = true; enable32Bit = true; };
bluetooth = { enable = true; powerOnBoot = true; };
};
####################
# Networking #
####################
networking = {
hostName = "${hostname}";
networkmanager.enable = true;
# proxy.default = "naiveproxy+https://fries:8.S%3ECi42%40h%2CF%7D%3EP@ruffling.org/#french_connection:443";
};
# The real world
time.timeZone = "Europe/Berlin";
location = {
latitude = 51.514244;
longitude = 7.468429;
provider = "geoclue2";
};
2025-03-27 01:08:55 +03:00
# Internationalisation
i18n = {
defaultLocale = "en_US.UTF-8";
inputMethod = {
enable = true;
type = "fcitx5";
};
};
console = {
font = "Lat2-Terminus16";
useXkbConfig = true;
};
# Enable rtkit so pipewire can aquire real-time priority
security.rtkit.enable = true;
# Exception for packages that are not free but we would still like to install.
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg)
[
"steam"
"steam-unwrapped"
"vintagestory"
];
nixpkgs.config.permittedInsecurePackages = [
"dotnet-runtime-7.0.20" # Required for vintagestory
];
###############################
# Documentation options #
# (man) #
###############################
documentation = {
enable = true;
dev.enable = true;
man = {
enable = true;
generateCaches = true;
man-db.enable = false;
mandoc.enable = true;
};
};
2025-03-27 01:08:55 +03:00
################################
# Packages for ALL users #
################################
environment.systemPackages = with pkgs; [
alacritty
asciidoctor-with-extensions
bat
dunst
eww
feh
file
fzf
git
git-lfs
helix
htop
joshuto
jujutsu
lazygit
2025-03-27 01:08:55 +03:00
linux-manual
maim
man-pages
man-pages-posix
mpv
mumble
nix-your-shell
openvpn
pass
pavucontrol
playerctl
python3
ripgrep
rofi
uutils-coreutils # TODO: Once satisfied switch to `uutils-coreutils-noprefix`
vim
wget
wine
winetricks
xarchiver
xclip
xdo
zathura
]
++ [
nur.repos.sn0wm1x.naiveproxy-bin
];
###############
# Fonts #
###############
fonts.packages = with pkgs; with nerd-fonts; [
agave
anonymice
courier-prime
2025-03-27 01:08:55 +03:00
daddy-time-mono
envy-code-r
fantasque-sans-mono
hurmit
icon-library
2025-03-27 01:08:55 +03:00
iosevka
iosevka-term-slab
jetbrains-mono
lmodern
2025-03-27 01:08:55 +03:00
source-han-mono
tamsyn
tamzen
];
##################
# Programs #
##################
programs = {
dconf.enable = true;
2025-03-27 01:08:55 +03:00
firefox = {
enable = true;
languagePacks = [ "de" "en-GB" ];
};
gamemode.enable = true;
2025-03-27 01:08:55 +03:00
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-curses;
};
mtr.enable = true;
nix-ld.enable = true;
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
thunar = {
enable = true;
plugins = with pkgs.xfce; [
tumbler
thunar-volman
thunar-media-tags-plugin
thunar-archive-plugin
];
};
2025-03-27 01:08:55 +03:00
};
##################
# Services #
##################
services = {
blueman.enable = true;
geoclue2.enable = true;
2025-03-27 01:08:55 +03:00
locate.enable = true;
pcscd.enable = true;
picom = {
enable = true;
backend = "glx";
};
pipewire = { enable = true; pulse.enable = true; };
printing.enable = true;
redshift = {
enable = true;
temperature.night = 4000;
temperature.day = 5500;
};
2025-03-27 01:08:55 +03:00
xserver = {
enable = true;
desktopManager.runXdgAutostartIfNone = true;
2025-03-27 01:08:55 +03:00
displayManager.startx.enable = true;
windowManager.leftwm.enable = true;
xkb.layout = "us";
xkb.variant = "dvp";
xkb.options = "caps:escape,compose:94";
};
};
##########################
# User definitions #
##########################
users.users.zentux = {
shell = pkgs.nushell;
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "video" "kvm" ];
packages = with pkgs; [
nixd
qpwgraph
2025-03-27 01:08:55 +03:00
vintagestory
element-desktop
signal-desktop
telegram-desktop
webcord
2025-03-27 01:08:55 +03:00
];
# home.stateVersion = "24.11";
};
# Respect your shit. Don't touch this.
system.stateVersion = "24.11";
}