This commit is contained in:
Henri Dohmen 2025-05-26 01:08:54 +02:00
parent dbd88aea66
commit 8fbd9d06b4
29 changed files with 130 additions and 101 deletions

15
mod/pc-common/audio.nix Normal file
View file

@ -0,0 +1,15 @@
{ 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;
};
}

13
mod/pc-common/fonts.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
fonts = {
packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
nerd-fonts.noto
];
fontDir.enable = true;
fontconfig.defaultFonts.monospace = [ "Noto Nerd Font Mono" ];
};
}

9
mod/pc-common/gpg.nix Normal file
View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ seahorse ];
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gtk2;
};
}

View file

@ -0,0 +1,30 @@
{
inputs,
lib,
options,
config,
...
}:
{
imports = [
inputs.home-manager.nixosModules.home-manager
{
home-manager.users."hd" = lib.mkAliasDefinitions options.home;
# install to /etc/profiles, not ~/.nix-profile
home-manager.useUserPackages = true;
# dont use home.nixpkgs
home-manager.useGlobalPkgs = true;
}
];
config = {
home.home.stateVersion = config.system.stateVersion;
};
options = {
home = lib.mkOption {
type = lib.types.attrs;
default = { };
};
};
}

55
mod/pc-common/network.nix Normal file
View file

@ -0,0 +1,55 @@
{ ... }:
{
hardware.bluetooth.enable = true;
services.blueman.enable = true;
systemd.services.NetworkManager-wait-online.enable = false;
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
};
networking = {
enableIPv6 = true;
networkmanager = {
enable = true;
wifi.macAddress = "random";
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;
};
};
};
};
};
}

18
mod/pc-common/nix.nix Normal file
View file

@ -0,0 +1,18 @@
{ lib, ... }:
{
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
"nvidia-settings"
"vscode"
"obsidian"
"steam"
"steam-unwrapped"
"gateway" # jetbrains
"spotify"
"rust-rover"
];
programs.nix-ld.enable = true;
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
security.protectKernelImage = true;
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
services = {
printing.enable = true;
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
udisks2.enable = true;
emacs.enable = true;
};
}

View file

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
documentation.dev.enable = true;
environment.systemPackages = with pkgs; [
rustup
python313
python313Packages.mypy
gcc
clang
gdb
gnumake
binutils
nixfmt-rfc-style
man-pages
man-pages-posix
];
}

View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
vscode
emacs
jetbrains.gateway
jetbrains.rust-rover
];
}

View file

@ -0,0 +1,41 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
signal-desktop
element-desktop
zulip
vesktop
wireguard-tools
bitwarden
kitty
nil
vlc
spotify
calibre
zotero
obsidian
];
virtualisation = {
docker.enable = true;
};
programs = {
firefox.enable = true;
};
home = {
programs.thunderbird = {
enable = true;
package = pkgs.thunderbird-latest;
profiles.default.isDefault = true;
profiles.default.settings = {
"mail.openpgp.allow_external_gnupg" = true;
"mail.openpgp.fetch_pubkeys_from_gnupg" = true;
};
};
};
# Some excludes
services.xserver.excludePackages = [ pkgs.xterm ];
}

View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
};
services.desktopManager.plasma6.enable = true;
}