dotfiles/servers/eisen/configuration.nix
2025-08-24 21:23:53 +02:00

144 lines
No EOL
3.3 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.

{ config, pkgs, lib, name ? "eisen", ... }:
{
deployment = {
buildOnTarget = true;
};
imports = [
./hardware-configuration.nix
];
nix = {
daemonCPUSchedPolicy = "idle";
daemonIOSchedClass = "idle";
};
networking = {
hostName = name;
nameservers = ["1.1.1.1"];
networkmanager.enable = true;
};
time.timeZone = lib.mkForce "Europe/Prague";
i18n.defaultLocale = "en_US.UTF-8";
services.dnsmasq.enable = true;
security = {
rtkit.enable = true;
polkit.enable = true;
};
services = {
logind.lidSwitchExternalPower = "ignore";
localtimed.enable = true;
openssh.enable = true;
tailscale = {
enable = true;
useRoutingFeatures = "both";
openFirewall = true;
extraUpFlags = [ "--advertise-exit-node" ];
};
avahi.enable = true;
lldpd.enable = true;
syncthing = {
enable = true;
openDefaultPorts = true;
};
};
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true";
virtualisation.docker = {
enable = true;
enableOnBoot = true;
};
# hardware.nvidia-container-toolkit.enable = true;
boot = {
kernelPackages = pkgs.linuxPackages_latest;
# Shortcuts for fixing things
# alt+sysrq (prtsc) + key
# h: Print help to the system log.
# f: Trigger the kernel oom killer.
# s: Sync data to disk before triggering the reset options below.
# e: SIGTERM all processes except PID 0.
# i: SIGKILL all processes except PID 0.
# b: Reboot the system.
kernel.sysctl."kernel.sysrq" = 1;
# zfs.enabled = false;
swraid.enable = false;
initrd.systemd.enable = true;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
# timeout = 0;
# grub.enable = true;
# grub.device = "/dev/disk/by-id/ata-Apacer_AS350_512GB_2021012802000028";
# grub.efiSupport = true;
};
};
users.users.dan = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "docker" "fuse" "video" "wireshark" "gamemode" "scanner" "lp" "kvm" "adbusers"];
shell = pkgs.nushell;
packages = with pkgs; [
];
};
nix.settings.trusted-users = [ "root" "@wheel" "dan" ];
environment.systemPackages = with pkgs; [
git
nvtopPackages.full
btop
lshw
bat
lsd
fastfetch
fish
nix-output-monitor
nh
duf
dust
cachix
qemu
ffmpeg
httpie
socat
websocat
];
nixpkgs.config.allowUnfree = true;
# nixpkgs.config.cudaSupport = true;
nix.settings = {
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
# 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. Its 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 = "25.05"; # Did you read the comment?
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# /etc/hosts :)
networking.extraHosts = ''
'';
}