initial commit
This commit is contained in:
commit
c4dc2e0f36
25 changed files with 558 additions and 0 deletions
14
mod/audio.nix
Normal file
14
mod/audio.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
pavucontrol
|
||||
alsa-utils
|
||||
];
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
||||
10
mod/boot.nix
Normal file
10
mod/boot.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ ... }: {
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
}
|
||||
16
mod/collections/pc-common.nix
Normal file
16
mod/collections/pc-common.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ mod, ... }: {
|
||||
imports = with mod; [
|
||||
audio
|
||||
boot
|
||||
fonts
|
||||
locale
|
||||
network
|
||||
nix
|
||||
security
|
||||
services
|
||||
shell
|
||||
software
|
||||
users
|
||||
window-manager
|
||||
];
|
||||
}
|
||||
16
mod/default.nix
Normal file
16
mod/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
walk = path:
|
||||
let dir = builtins.readDir path;
|
||||
in lib.mapAttrs' (name: value: {
|
||||
name = lib.removeSuffix ".nix" name;
|
||||
value = if value == "regular" then
|
||||
import (path + "/${name}")
|
||||
else if value == "directory" then
|
||||
walk (path + "/${name}")
|
||||
else
|
||||
builtins.throw "Cannot handle item of type ${value}";
|
||||
}) dir;
|
||||
|
||||
in walk ./.
|
||||
10
mod/fonts.nix
Normal file
10
mod/fonts.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }: {
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
nerd-fonts.noto
|
||||
];
|
||||
fonts.fontDir.enable = true;
|
||||
fonts.fontconfig.defaultFonts.monospace = [ "Noto Nerd Font Mono" ];
|
||||
}
|
||||
7
mod/games.nix
Normal file
7
mod/games.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
runelite
|
||||
];
|
||||
|
||||
programs.steam.enable = true;
|
||||
}
|
||||
5
mod/keyboard.nix
Normal file
5
mod/keyboard.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
# hardware.keyboard.qmk.enable = true;
|
||||
environment.systemPackages = with pkgs; [ vial ];
|
||||
services.udev.packages = with pkgs; [ vial ];
|
||||
}
|
||||
24
mod/locale.nix
Normal file
24
mod/locale.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ ... }: {
|
||||
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";
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
variant = "";
|
||||
};
|
||||
}
|
||||
84
mod/network.nix
Normal file
84
mod/network.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
{ ... }: {
|
||||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager.wifi.macAddress = "random";
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "client";
|
||||
};
|
||||
|
||||
networking.networkmanager.ensureProfiles.profiles = {
|
||||
"tuda-vpn" = {
|
||||
connection = {
|
||||
autoconnect = "false";
|
||||
id = "tuda-vpn";
|
||||
type = "vpn";
|
||||
};
|
||||
ipv4 = {
|
||||
method = "auto";
|
||||
};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "stable-privacy";
|
||||
method = "auto";
|
||||
};
|
||||
vpn = {
|
||||
authtype = "password";
|
||||
autoconnect-flags = "0";
|
||||
certsigs-flags = "0";
|
||||
cookie-flags = "2";
|
||||
disable_udp = "no";
|
||||
enable_csd_trojan = "no";
|
||||
gateway = "vpn.hrz.tu-darmstadt.de";
|
||||
gateway-flags = "2";
|
||||
gwcert-flags = "2";
|
||||
lasthost-flags = "0";
|
||||
pem_passphrase_fsid = "no";
|
||||
prevent_invalid_cert = "no";
|
||||
protocol = "anyconnect";
|
||||
resolve-flags = "2";
|
||||
service-type = "org.freedesktop.NetworkManager.openconnect";
|
||||
stoken_source = "disabled";
|
||||
xmlconfig-flags = "0";
|
||||
password-flags = 0;
|
||||
};
|
||||
};
|
||||
|
||||
"thielelab" = {
|
||||
connection = {
|
||||
autoconnect = "false";
|
||||
id = "thielelab";
|
||||
type = "vpn";
|
||||
};
|
||||
ipv4 = {
|
||||
method = "auto";
|
||||
};
|
||||
ipv6 = {
|
||||
addr-gen-mode = "stable-privacy";
|
||||
method = "auto";
|
||||
};
|
||||
vpn = {
|
||||
authtype = "password";
|
||||
autoconnect-flags = "0";
|
||||
certsigs-flags = "0";
|
||||
cookie-flags = "2";
|
||||
disable_udp = "no";
|
||||
enable_csd_trojan = "no";
|
||||
gateway = "fwchemie4.net.hrz.tu-darmstadt.de";
|
||||
gateway-flags = "2";
|
||||
gwcert-flags = "2";
|
||||
lasthost-flags = "0";
|
||||
pem_passphrase_fsid = "no";
|
||||
prevent_invalid_cert = "no";
|
||||
protocol = "anyconnect";
|
||||
resolve-flags = "2";
|
||||
service-type = "org.freedesktop.NetworkManager.openconnect";
|
||||
stoken_source = "disabled";
|
||||
xmlconfig-flags = "0";
|
||||
password-flags = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
21
mod/nix.nix
Normal file
21
mod/nix.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, ... }: {
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = false;
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
||||
"nvidia-x11"
|
||||
"nvidia-settings"
|
||||
"vscode"
|
||||
"obsidian"
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
"gateway" # jetbrains
|
||||
"rust-rover"
|
||||
];
|
||||
}
|
||||
26
mod/nvidia-gpu.nix
Normal file
26
mod/nvidia-gpu.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, ... }: {
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = true;
|
||||
|
||||
open = false;
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
finegrained = false;
|
||||
};
|
||||
};
|
||||
|
||||
boot.kernelParams = [
|
||||
"nvidia-drm.fbdev=1"
|
||||
"nvidia-drm.modeset=1"
|
||||
];
|
||||
}
|
||||
3
mod/security.nix
Normal file
3
mod/security.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
9
mod/services.nix
Normal file
9
mod/services.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ ... }: {
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
services.printing.enable = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
||||
45
mod/shell.nix
Normal file
45
mod/shell.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.shells = with pkgs; [
|
||||
fish
|
||||
bashInteractive
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
htop
|
||||
bc
|
||||
gh
|
||||
gnumake
|
||||
killall
|
||||
stow
|
||||
docker-compose
|
||||
starship
|
||||
unzip
|
||||
];
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
git.enable = true;
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
};
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
};
|
||||
|
||||
# --- Excludes ---
|
||||
programs.nano.enable = false;
|
||||
|
||||
# Enabled by fish but takes soooo long.
|
||||
# This is apparently used by some of fish's
|
||||
# autocomplete features.
|
||||
documentation.man.generateCaches = false;
|
||||
|
||||
# To stop the annoying error on entering wrong commands
|
||||
programs.command-not-found.enable = false;
|
||||
}
|
||||
56
mod/software.nix
Normal file
56
mod/software.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
environment.systemPackages = let
|
||||
editors = with pkgs; [
|
||||
vscode
|
||||
jetbrains.gateway
|
||||
jetbrains.rust-rover
|
||||
];
|
||||
|
||||
messengers = with pkgs; [
|
||||
signal-desktop
|
||||
element-desktop
|
||||
zulip
|
||||
vesktop
|
||||
];
|
||||
|
||||
util = with pkgs; [
|
||||
wireguard-tools
|
||||
bitwarden
|
||||
kitty
|
||||
];
|
||||
|
||||
media = with pkgs; [
|
||||
vlc
|
||||
];
|
||||
|
||||
productivity = with pkgs; [
|
||||
zotero
|
||||
obsidian
|
||||
];
|
||||
|
||||
dev = with pkgs; [
|
||||
rustup
|
||||
python313
|
||||
gcc
|
||||
binutils
|
||||
];
|
||||
|
||||
in editors
|
||||
++ messengers
|
||||
++ util
|
||||
++ media
|
||||
++ productivity
|
||||
++ dev;
|
||||
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
firefox.enable = true;
|
||||
};
|
||||
|
||||
# Some excludes
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
}
|
||||
9
mod/users.nix
Normal file
9
mod/users.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }: {
|
||||
users.users.hd = {
|
||||
description = "Henri";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
packages = [];
|
||||
};
|
||||
}
|
||||
8
mod/window-manager.nix
Normal file
8
mod/window-manager.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }: {
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue