mirror of
https://github.com/zephrynis/nix-flake.git
synced 2026-02-18 20:21:53 +00:00
Initial NixOS flake-based multi-host setup
Add a NixOS system configuration using flakes, supporting multiple hosts (desktop, laptop, my-machine) with shared and per-host settings. Includes Home Manager integration, user-level and system-level package management, and example hardware configuration placeholders. Provides a README with setup instructions and a .gitignore for common Nix and editor artifacts.
This commit is contained in:
71
system/common.nix
Normal file
71
system/common.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Common system configuration shared across all machines
|
||||
|
||||
# Bootloader
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Timezone and locale
|
||||
time.timeZone = "Europe/London";
|
||||
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";
|
||||
};
|
||||
|
||||
# Enable sound
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# Enable CUPS for printing
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable OpenGL
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# System-wide packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
git
|
||||
htop
|
||||
neofetch
|
||||
unzip
|
||||
zip
|
||||
];
|
||||
|
||||
# Enable flakes
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Enable networking
|
||||
networking.firewall.enable = true;
|
||||
|
||||
# System state version
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
Reference in New Issue
Block a user