yeet
This commit is contained in:
88
nixos/configuration.nix
Normal file
88
nixos/configuration.nix
Normal 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?
|
||||||
|
|
||||||
|
}
|
||||||
31
nixos/hardware-configuration.nix
Normal file
31
nixos/hardware-configuration.nix
Normal 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";
|
||||||
|
}
|
||||||
0
nixos/modules/system/locale.nix
Normal file
0
nixos/modules/system/locale.nix
Normal file
0
nixos/modules/system/networking.nix
Normal file
0
nixos/modules/system/networking.nix
Normal file
12
nixos/modules/users/packages.nix
Normal file
12
nixos/modules/users/packages.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{config, pkgs, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.users.users.packages = with pkgs; [
|
||||||
|
btop
|
||||||
|
ncdu
|
||||||
|
tmux
|
||||||
|
curl
|
||||||
|
bat
|
||||||
|
nethogs
|
||||||
|
]
|
||||||
|
}
|
||||||
14
nixos/modules/users/users.nix
Normal file
14
nixos/modules/users/users.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
||||||
36
nixos/modules/users/zsh.nix
Normal file
36
nixos/modules/users/zsh.nix
Normal 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 ../.."
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user