Split configuration.nix and home.nix into per-domain modules

Break the two monolithic files into focused modules under system/
and home/ so each concern (boot, networking, xserver, picom, zsh,
git, rofi, etc.) lives in its own file. Clean up duplicates: drop
rofi from home.packages since programs.rofi.enable already installs
it, and move user-only apps (alacritty, obsidian, claude-code) from
environment.systemPackages to home.packages. Remove commented-out
boilerplate carried over from the install template.
This commit is contained in:
2026-06-28 21:02:48 +02:00
parent 7acb45c3a9
commit df0df6048a
21 changed files with 231 additions and 188 deletions

View File

@@ -1,121 +1,21 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "hivebrain"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "de";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
# services.xserver.enable = true;
services.xserver = {
enable = true;
autoRepeatDelay = 200;
autoRepeatInterval = 35;
windowManager.qtile.enable = true;
displayManager.sessionCommands = ''
xwallpaper --zoom ~/nixos-dotfiles/Pictures/NixOsWallpaper.png
'';
xrandrHeads = [
{
output = "HDMI-1";
monitorConfig = ''
Option "Position" "0 0"
'';
}
{
output = "DP-1";
primary = true;
monitorConfig = ''
Option "Position" "1920 0"
'';
}
];
};
services.displayManager.ly.enable = true;
services.picom = {
enable = true;
backend = "xrender";
fade = true;
};
fonts.packages = with pkgs; [
jetbrains-mono
imports = [
./hardware-configuration.nix
./system/boot.nix
./system/networking.nix
./system/locale.nix
./system/xserver.nix
./system/picom.nix
./system/display-manager.nix
./system/fonts.nix
./system/users.nix
./system/programs.nix
./system/packages.nix
./system/ssh.nix
./system/nix.nix
];
# Enable sound.
# services.pulseaudio.enable = true;
# OR
# services.pipewire = {
# enable = true;
# pulse.enable = true;
# };
nixpkgs.config.allowUnfree = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.marvin = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
shell = pkgs.zsh;
packages = with pkgs; [
tree
];
};
programs.firefox.enable = true;
programs.zsh.enable = true;
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
environment.systemPackages = with pkgs; [
vim
wget
alacritty
btop
obsidian
claude-code
jq # used by the Claude vault bootstrap.sh to parse settings.json
];
nix.settings.experimental-features = ["nix-command" "flakes"];
# 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;
system.stateVersion = "26.05";
system.stateVersion = "26.05";
}