Initial commit: Nomarchy NixOS configuration
An opinionated NixOS configuration with Hyprland, featuring: - Modular flake-based architecture - Parameterized user configuration (username, timezone, locale, etc.) - Classical/antiquity theme with Thomas Cole wallpapers - Full Hyprland setup with waybar, rofi, swaync - Custom utility scripts (screenshots, screen recording, WiFi QR) - Neovim with LSP support - Interactive installer for existing NixOS systems - ISO builder for fresh installations Flake outputs: - nixosConfigurations.example - Test configuration - nixosConfigurations.installer - ISO installer - packages.iso - Bootable ISO image - apps.default - Interactive installer - lib.mkHost - Host builder function - templates.default - Starter template Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
25
modules/core/boot.nix
Normal file
25
modules/core/boot.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
# Boot configuration
|
||||
# Supports both systemd-boot (default) and Limine
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
nomarchyConfig,
|
||||
...
|
||||
}: let
|
||||
# For ISO builds, we'll use Limine; for regular installs, systemd-boot
|
||||
useSystemdBoot = nomarchyConfig.bootloader or "systemd-boot" == "systemd-boot";
|
||||
in {
|
||||
# Systemd-boot (default for NixOS installs)
|
||||
boot.loader.systemd-boot = lib.mkIf useSystemdBoot {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
};
|
||||
|
||||
boot.loader.efi.canTouchEfiVariables = useSystemdBoot;
|
||||
|
||||
# Limine support (for ISO)
|
||||
boot.loader.limine = lib.mkIf (!useSystemdBoot) {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
8
modules/core/default.nix
Normal file
8
modules/core/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
# Core system modules
|
||||
{...}: {
|
||||
imports = [
|
||||
./boot.nix
|
||||
./networking.nix
|
||||
./hardware.nix
|
||||
];
|
||||
}
|
||||
37
modules/core/hardware.nix
Normal file
37
modules/core/hardware.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
# Hardware configuration
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
nomarchyConfig,
|
||||
...
|
||||
}: {
|
||||
# Bluetooth
|
||||
hardware.bluetooth = lib.mkIf (nomarchyConfig.enableBluetooth or true) {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
services.blueman.enable = nomarchyConfig.enableBluetooth or true;
|
||||
|
||||
# Graphics - hardware acceleration
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# Audio - PipeWire (modern audio stack)
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Bluetooth audio support
|
||||
environment.systemPackages = lib.mkIf (nomarchyConfig.enableBluetooth or true) (with pkgs; [
|
||||
blueman
|
||||
bluez
|
||||
bluez-tools
|
||||
]);
|
||||
}
|
||||
34
modules/core/networking.nix
Normal file
34
modules/core/networking.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
# Networking configuration
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
nomarchyConfig,
|
||||
...
|
||||
}: {
|
||||
# NetworkManager with iwd backend (better WiFi handling)
|
||||
networking.wireless.enable = false;
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
wifi.backend = "iwd";
|
||||
};
|
||||
|
||||
# Firewall - enabled by default, ports configurable
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
|
||||
# Syncthing ports (if enabled)
|
||||
allowedTCPPorts = lib.optionals (nomarchyConfig.enableSyncthing or true) [
|
||||
8384 # Syncthing GUI
|
||||
22000 # Syncthing transfer
|
||||
];
|
||||
|
||||
allowedUDPPorts = lib.optionals (nomarchyConfig.enableSyncthing or true) [
|
||||
22000 # Syncthing transfer
|
||||
21027 # Syncthing discovery
|
||||
];
|
||||
};
|
||||
|
||||
# DNS resolution
|
||||
services.resolved.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user