config/hosts/noximilien/default.nix

262 lines
6.6 KiB
Nix
Raw Normal View History

2023-02-25 04:39:30 +01:00
{ config, pkgs, lib, ... }:
{
2023-03-01 02:21:24 +01:00
# Bootloader
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
2023-02-25 04:39:30 +01:00
imports = [
./hardware-configuration.nix
../../users # home-manager
../../users/pbsds
../../users/jornane
#../../users/all.nix # TODO: does not work?
../../hardware/opengl-intel.nix
2023-03-03 21:57:37 +01:00
../../profiles/tmate-server # opens port 42244
2023-03-03 21:42:29 +01:00
../../profiles/web
../../profiles/web/index
../../profiles/web/services/cinny
../../profiles/web/services/element
../../profiles/web/services/flexget
../../profiles/web/services/gitea
../../profiles/web/services/hydra
../../profiles/web/services/invidious
../../profiles/web/services/jellyfin
../../profiles/web/services/libreddit
../../profiles/web/services/mattermost
../../profiles/web/services/navidrome
../../profiles/web/services/netdata
../../profiles/web/services/nitter
../../profiles/web/services/ntopng
../../profiles/web/services/owncast
../../profiles/web/services/paperless
../../profiles/web/services/polaris
../../profiles/web/services/resilio
../../profiles/web/services/roundcube
../../profiles/web/services/thelounge
../../profiles/web/services/vaultwarden
../../profiles/web/services/webdav-zotero
#../../profiles/web/services/convos
#../../profiles/web/services/cryptpad
#../../profiles/web/services/galene
#../../profiles/web/services/graphana
#../../profiles/web/services/hedgedoc
#../../profiles/web/services/home-assistant
#../../profiles/web/services/jitsi-meet
#../../profiles/web/services/kukkee
#../../profiles/web/services/matrix-synapse
#../../profiles/web/services/shlink
#../../profiles/web/services/sourcegraph
#../../profiles/web/services/censordodge
#../../profiles/web/services/openspeedtest
2023-02-26 03:53:55 +01:00
../../profiles/web/docs
2023-02-26 06:11:55 +01:00
../../profiles/web/docs/pdoc.nix
../../profiles/web/docs/python-docs.nix
../../profiles/web/docs/nixpkgs.nix
2023-02-28 04:57:58 +01:00
../../profiles/web/docs/home-manager.nix
2023-02-26 06:11:55 +01:00
../../profiles/web/docs/linux-docs.nix
2023-02-28 04:57:58 +01:00
../../profiles/web/docs/programs.nix
2023-02-26 06:11:55 +01:00
../../profiles/web/docs/yagcd.nix
2023-02-26 03:53:55 +01:00
../../profiles/web/sites/linktree-pbsds
../../profiles/web/sites/refleksjon-no
../../profiles/web/sites/roroslyd-no
#../../profiles/web/services/trivial-gradios
../../profiles/domeneshop-dyndns # TODO: olavtr is hardcoded...
../../profiles/code-remote
../../profiles/remote-builders #
../../profiles/nfs/reidun.nix # NFS mounts
../../profiles/autossh-reverse-tunnels
#../../profiles/xrdp
2023-02-25 04:39:30 +01:00
];
# TODO: remove? Move to where relevant=
nixpkgs.overlays = [
/** /
(final: prev: {
mapcrafter = prev.callPackage /home/pbsds/repos/nixpkgs-mapcrafter/pkgs/tools/games/minecraft/mapcrafter/default.nix { };
mapcrafter-world112 = prev.callPackage /home/pbsds/repos/nixpkgs-mapcrafter/pkgs/tools/games/minecraft/mapcrafter/default.nix { world="world112"; };
})
/**/
];
# run/build weird binaries
2023-03-04 01:33:23 +01:00
# TODO: somehow make sure this is in sync with remote-builders
2023-02-25 04:39:30 +01:00
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;
# TODO: are these default since 22.11?
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.iwd.enable = true
networking.interfaces.eno1.ipv4.addresses = [
{ address = "192.168.1.9"; prefixLength = 24; }
];
networking.nameservers = [
"192.168.1.254"
"8.8.8.8"
"1.1.1.1"
];
networking.defaultGateway = {
address = "192.168.1.254";
interface = "eno1";
};
#networking.useDHCP = true;
#TODO: avahi? resolved? https://git.pvv.ntnu.no/Drift/pvv-nixos-config/src/main/base.nix#L15-L18
2023-02-25 04:39:30 +01:00
# 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
];
# TODO: remove? Move?
programs.dconf.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
#programs.mtr.enable = true;
#programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
#};
# OpenSSH
services.openssh.enable = true;
services.openssh.forwardX11 = true;
# TODO: should not be system-wide
#programs.ssh.extraConfig = ''
# Host *.ntnu.no *.pvv.org
# User pederbs
#'';
# 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
];
2023-02-25 04:39:30 +01:00
# 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 = "22.11"; # Did you read the comment?
}