feat: add nix configs for host neon with wayland, niri and nocitalia-shell

This commit is contained in:
2025-12-10 15:50:19 +01:00
parent bb8cbb2b10
commit f573e31d06
6 changed files with 313 additions and 10 deletions

View File

@@ -0,0 +1,132 @@
# 0x29a nixos conifg
{ pkgs, lib, ... }:
{
imports =
[
./hardware-configuration.nix
];
# use flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# configure bootloader
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# plymouth boot eye candy
boot.initrd.systemd.enable = true;
boot.plymouth.enable = true;
boot.plymouth.theme = "spinner";
# use latest kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
# networking
networking.hostName = "neon";
networking.networkmanager.enable = true;
# bluetooth
hardware.bluetooth.enable = true;
# time zone.
time.timeZone = "Europe/Amsterdam";
# select internationalisation properties
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
console = {
font = "Lat2-Terminus16";
keyMap = "de_CH-latin1";
};
# window manager configs
programs.niri.enable = true;
programs.xwayland.enable = true;
services.displayManager.gdm = {
enable = true;
wayland = true;
};
services.tuned.enable = true;
services.upower.enable = true;
environment.pathsToLink = [ "/libexec" ];
environment.variables.EDITOR = "vim";
# enable sound
services.pipewire = {
enable = true;
pulse.enable = true;
};
# define a user account
users.users.aaron = {
isNormalUser = true;
group = "users";
extraGroups = [ "wheel" ];
shell = pkgs.zsh;
packages = with pkgs; [
tree
fastfetch
];
};
# browser
programs.firefox.enable = true;
# zsh config
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
ohMyZsh = {
enable = true;
plugins = [ "git" "sudo" ];
theme = "gentoo";
};
};
# system packages
environment.systemPackages = with pkgs; [
efibootmgr
neovim
vim
git
alacritty
ghostty
kitty
gnupg
xwayland
xwayland-satellite
wget
];
# Some programs need SUID wrappers
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# enable the OpenSSH daemon
services.openssh.enable = true;
# firewall configs
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedUDPPorts = [ ];
# install state version
system.stateVersion = "25.11"; # Don't change
}

View File

@@ -0,0 +1,41 @@
# 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 + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-label/nixroot";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/nixboot";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-label/nixhome";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-label/nixswap"; }
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

76
hosts/neon/home.nix Normal file
View File

@@ -0,0 +1,76 @@
{ config, pkgs, ... }:
{
# user config
home.username = "aaron";
home.homeDirectory = "/home/aaron";
# packages
home.packages = with pkgs; [
fastfetch
zip
xz
unzip
p7zip
jq
mtr
iperf3
dnsutils
ldns
socat
nmap
cowsay
file
which
tree
zstd
gnupg
btop
iotop
iftop
strace
ltrace
lsof
sysstat
lm_sensors
ethtool
pciutils
usbutils
];
# configure git
programs.git.settings = {
enable = true;
userName = "aaron";
userEmail = "aaron@0x29a.ch";
};
programs.zsh = {
enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
plugins = [ "git" "sudo" "python" "ansible" ];
theme = "agnoster";
};
};
## deploy qtile config
#home.file."qtile-config" = {
# target = ".config/qtile/config.py";
# source = "${inputs.qtile-config}/qtile_config/config.py";
# force = true;
#};
home.sessionVariables = {
EDITOR = "vim";
};
# enable home manager
programs.home-manager.enable = true;
# don't change
home.stateVersion = "25.05";
}

7
hosts/neon/noctalia.nix Normal file
View File

@@ -0,0 +1,7 @@
{ pkgs, inputs, ... }:
{
# install noctalia package
environment.systemPackages = with pkgs; [
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
];
}