2025.06.02

This commit is contained in:
2025-06-02 01:33:56 +02:00
parent 4f3b1f8857
commit 80068a5283
14 changed files with 58 additions and 26 deletions

View File

@ -1,4 +1,13 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
hostName = "wlin001-nixos";
userName = "zulumann";
userDescription = "Henrik Lutzmann";
userDir = "/home/zulumann";
userEmail = "zulumann_70@gmx.de";
stateVersion = "24.11";
in
{
imports = [
@ -23,6 +32,7 @@
kernelPackages = pkgs.linuxPackages_latest;
#kernelPackages = pkgs.linuxKernel.kernels.linux_xanmod;
# initrd.network.openvpn.enable = true;
initrd.systemd.enable = true;
};
# Enable Kernel same-page merging
@ -33,7 +43,7 @@
networkmanager.enable = true;
networkmanager.plugins = with pkgs; [ networkmanager-openvpn ];
usePredictableInterfaceNames = false;
hostName = "wlin001-nixos";
hostName = "${hostName}";
};
# Set your time zone
@ -53,13 +63,20 @@
LC_TIME = "de_DE.UTF-8";
};
# Configure console keymap
console.keyMap = "de";
# Configure console
console = {
enable = true;
earlySetup = true;
font = "Lat2-Terminus16";
packages = with pkgs; [terminus_font];
keyMap = "de";
#useXkbConfig = true; # use xkb.options in tty.
};
# Define a user account. Dont forget to set a password with passwd.
users.users.zulumann = {
users.users."${userName}" = {
isNormalUser = true;
description = "Henrik Lutzmann";
description = "${userDescription}";
extraGroups = [ "networkmanager" "wheel" "audio" "video" ];
openssh.authorizedKeys.keyFiles = [ /etc/nixos/config/home/ssh/authorized_keys ];
packages = with pkgs; [ ];
@ -93,7 +110,7 @@
system.autoUpgrade = {
enable = false;
allowReboot = false;
channel = "https://channels.nixos.org/nixos-24.11";
channel = "https://channels.nixos.org/nixos-${stateVersion}";
};
# NixOS Settings
@ -127,7 +144,7 @@
fileSystems."/".options = [ "noatime" "discard" ];
fileSystems."/home".options = [ "noatime" "discard" ];
fileSystems."/home/zulumann/VM-Image" = {
fileSystems."${userDir}/VM-Image" = {
device = "/dev/disk/by-uuid/3b47d34d-618a-4a33-9f65-cde6e0d6467e";
fsType = "ext4";
options = [ "discard" "noatime" "nofail" "x-systemd.device-timeout=3" ];
@ -152,6 +169,12 @@
settings.PasswordAuthentication = false;
};
# Enable cron service
services.cron = {
enable = true;
systemCronJobs = [ "@hourly ${userName} ${userDir}/.rsync-backup.sh" ];
};
# Enable sound with pipewire
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
@ -182,13 +205,13 @@
# Open ports in the firewall
# netstat -ntulp
networking.firewall = {
enable = false;
allowPing = true;
logRefusedConnections = true;
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
allowedTCPPortRanges = [ ];
allowedUDPPortRanges = [ ];
enable = false;
allowPing = true;
logRefusedConnections = true;
allowedTCPPorts = [ ];
allowedUDPPorts = [ ];
allowedTCPPortRanges = [ ];
allowedUDPPortRanges = [ ];
};
# Copy the NixOS configuration file and link it from the resulting system
@ -196,6 +219,6 @@
# accidentally delete configuration.nix.
system.copySystemConfiguration = true;
system.stateVersion = "24.11";
system.stateVersion = "${stateVersion}";
}