This commit is contained in:
2025-11-19 19:30:42 +01:00
parent 710e39cc17
commit bc173875ae
7 changed files with 181 additions and 0 deletions

88
nixos/configuration.nix Normal file
View File

@@ -0,0 +1,88 @@
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./modules/users/users.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";
boot.loader.grub.useOSProber = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
# Networking
networking.hostName = "testVM"; # Define your hostname.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
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";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "de";
variant = "";
};
# Configure console keymap
console.keyMap = "de";
# Define a user account. Don't forget to set a password with passwd.
# users.users.cerberus = {
# isNormalUser = true;
# description = "cerberus";
# extraGroups = [ "networkmanager" "wheel" ];
# packages = with pkgs; [];
# };
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
wget
];
# 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;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
system.stateVersion = "25.05"; # Did you read the comment?
}

View File

@@ -0,0 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/d8739aa2-bc9a-400b-a2ac-81b102ae311d";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

View File

View File

@@ -0,0 +1,12 @@
{config, pkgs, ...}:
{
users.users.users.packages = with pkgs; [
btop
ncdu
tmux
curl
bat
nethogs
]
}

View File

@@ -0,0 +1,14 @@
{config, pkgs, ...}:
{
imports = [
./zsh.nix
];
# Define user account and dont forget to set a password with 'passwd'
users.users.cerberus = {
isNormalUser = true;
description = "cerberus";
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.zsh;
};
}

View File

@@ -0,0 +1,36 @@
{config, pkgs, ...}:
{
users.users.cerberus.packages = with pkgs; [
zoxide
fzf
];
# ZSH configuration
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
histSize = 10000;
histFile = "$HOME/.zsh_history";
setOptions = [
"HIST_IGNORE_ALL_DUPS"
"APPEND_HISTORY"
"SHARE_HISTORY"
"HIST_IGNORE_SPACE"
"EXTENDED_GLOB"
"CORRECT"
];
shellInit = ''
eval "$(zoxide init zsh)"
eval "$(fzf --zsh)"
'';
};
# Setting aliases
environment.shellAliases = {
ls = "ls -l --color --hyperlink=auto";
# ".." = "cd ..";
# "..." = "cd ../.."
};
}