refactor
This commit is contained in:
parent
a992a7b701
commit
b61bb970a5
30 changed files with 69 additions and 34 deletions
|
|
@ -1,22 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
|
||||
# otherwise /tmp is on disk. This *may* be problematic as nix
|
||||
# builds in /tmp but I think my swap is large enough...
|
||||
tmp.useTmpfs = true;
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_6_13;
|
||||
kernel.sysctl."kernel.sysrq" = 1;
|
||||
|
||||
initrd.systemd.network.wait-online.enable = false;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
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 = "";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
trusted-users = [ "root" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = false;
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
environment.shells = with pkgs; [
|
||||
bashInteractive
|
||||
fish
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bc
|
||||
docker-compose
|
||||
fd
|
||||
gh
|
||||
htop
|
||||
killall
|
||||
ripgrep
|
||||
starship
|
||||
stow
|
||||
unzip
|
||||
wget
|
||||
wl-clipboard
|
||||
colmena
|
||||
unison
|
||||
];
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
options,
|
||||
var,
|
||||
...
|
||||
}:
|
||||
{
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users."hd" = {
|
||||
description = "Henri";
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
home = "/home/hd";
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.fish;
|
||||
packages = [ ];
|
||||
openssh.authorizedKeys.keys = var.ssh-keys.unprivileged;
|
||||
hashedPassword = "$y$jDT$dhvO.xqs8mopz.sFFul.q/$ud5642o7CnVetU6QEu0ctiVMFh7ngZznDf0wp4cXos8";
|
||||
};
|
||||
users.root = {
|
||||
hashedPassword = "!";
|
||||
openssh.authorizedKeys.keys = var.ssh-keys.priviliged;
|
||||
};
|
||||
};
|
||||
}
|
||||
1
mod/default.nix
Normal file
1
mod/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ ... }: { }
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{ 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" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ seahorse ];
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gtk2;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
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 = { };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
{
|
||||
host,
|
||||
var,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
systemd.network.wait-online.enable = false;
|
||||
|
||||
services = {
|
||||
tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "client";
|
||||
};
|
||||
mullvad-vpn.enable = true;
|
||||
blueman.enable = true;
|
||||
resolved = {
|
||||
enable = true;
|
||||
dnssec = "true";
|
||||
dnsovertls = "true";
|
||||
fallbackDns = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
nameservers = [
|
||||
"1.1.1.1#one.one.one.one"
|
||||
"1.0.0.1#one.one.one.one"
|
||||
];
|
||||
enableIPv6 = true;
|
||||
|
||||
wireguard.enable = true;
|
||||
wg-quick = {
|
||||
interfaces = {
|
||||
"onet" = {
|
||||
address = var.wg.wireguard-network.${host}.ips;
|
||||
privateKeyFile = var.wg.keyFile;
|
||||
peers = [ (lib.removeAttrs var.wg.wireguard-network."roam" [ "ips" ]) ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
firewall = {
|
||||
allowedUDPPorts = [ 51820 ];
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{ 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;
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
security.protectKernelImage = true;
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
services = {
|
||||
printing.enable = true;
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
udisks2.enable = true;
|
||||
emacs.enable = true;
|
||||
protonmail-bridge.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
vscode
|
||||
emacs
|
||||
jetbrains.gateway
|
||||
jetbrains.rust-rover
|
||||
];
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
{ 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;
|
||||
settings = {
|
||||
"mail.openpgp.allow_external_gnupg" = true;
|
||||
"mail.openpgp.fetch_pubkeys_from_gnupg" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Some excludes
|
||||
services.xserver.excludePackages = [ pkgs.xterm ];
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
}
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.services.unison = {
|
||||
enable = true;
|
||||
package = pkgs.unison;
|
||||
pairs = {
|
||||
"docs".roots = [
|
||||
"/home/hd/Documents"
|
||||
"ssh://roam//home/hd/Documents"
|
||||
];
|
||||
"desktop".roots = [
|
||||
"/home/hd/Desktop"
|
||||
"ssh://roam//home/hd/Desktop"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue