config/hosts/nord/default.nix

202 lines
4.5 KiB
Nix

{ config, pkgs, lib, ... }:
{
# Bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "pbsds";
# tmp: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
boot.kernelPackages = pkgs.linuxPackages_latest; # amdgpu audio fix when at 4k@60fps
services.flatpak.enable = true;
imports = [
./hardware-configuration.nix
../../hardware/rocm.nix
../../hardware/opengl-intel.nix
../../users # home-manager
../../users/pbsds
../../profiles/desktop/gnome # with gdm
#../../profiles/desktop/sound/pulseaudio.nix
../../profiles/desktop/sound/pipewire.nix
#../../profiles/desktop/sound/alsa.nix
../../profiles/desktop/steam.nix
../../profiles/nfs/reidun.nix
../../profiles/remote-builders
#../../profiles/autossh-reverse-tunnels
#../../profiles/domeneshop-dyndns # handled by noximilien
];
networking.firewall.allowedTCPPorts = [ 57621 ]; # spotify
# run/build weird binaries
# TODO: somehow make sure this is in sync with remote-builders
boot.binfmt.emulatedSystems = [
"wasm32-wasi"
"wasm64-wasi"
"x86_64-windows"
"aarch64-linux"
"riscv64-linux"
#"x86_64-darwin"
#"aarch64-darwin"
];
services.thermald.enable = true;
# Virtualization
#virtualisation.podman.enable = true;
#virtualisation.podman.dockerCompat = true; # alias docker to podman
#virtualisation.oci-containers.backend = "podman";
# Networking
networking.networkmanager.enable = true;
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.interfaces.eno1.ipv4.addresses = [
{ address = "192.168.1.8"; prefixLength = 24; }
];
networking.defaultGateway.address = "192.168.1.254";
networking.defaultGateway.interface = "eno1";
networking.nameservers = [
"192.168.1.254"
"8.8.8.8"
"1.1.1.1"
];
#networking.useDHCP = true;
#TODO: avahi? resolved? https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/base.nix#L15-L18
# Installed system packages
# TODO: prune this, make home-manager deal with the majority
environment.systemPackages = with pkgs; [
lsof
lshw
htop
file
tmux
#parallel # already provided by moreutils
pwgen
git
nmap
rsync
bind.dnsutils
graphviz
dialog
cowsay
gnused
gnumake
coreutils-full
moreutils
binutils
diffutils
findutils
usbutils
bash-completion
curl
wget
strace
killall
zip
unrar
unzip
atool
p7zip
bzip2
gzip
atool
micro
aspell aspellDicts.en aspellDicts.nb
vimv
dos2unix
#rmate # TODO: add to nixpkgs
pandoc
cargo
cargo-edit
sqlite
#sshuttle
visidata
weston
cage
vimix-gtk-themes
flat-remix-icon-theme
xclip
feh
sshfs
glances
zenith
tealdeer # tldr
entr
axel aria
bat
xe # xargs alternative
sd # sed alternative
fd # find alternative
silver-searcher # `ag`
ripgrep
jq
yq
htmlq
sysz
du-dust # du alternative
ncdu # Disk usage analyzer with an ncurses interface
gh
hub
cachix
nix-output-monitor
nix-prefetch
nix-top
#nix-index
nix-tree
nix-diff
nixfmt
alejandra
firefox
];
# TODO: remove? Move?
programs.dconf.enable = true;
# OpenSSH
services.openssh.enable = true;
services.openssh.forwardX11 = true;
# System fonts
# Nice to have when X-forwading on headless machines
# TODO: move?
fonts.fonts = with pkgs; [
noto-fonts # includes Cousine
noto-fonts-cjk
noto-fonts-emoji
noto-fonts-extra
dejavu_fonts
];
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# 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 = "22.11"; # Did you read the comment?
}