Base of Nix Configuration

This commit is contained in:
2026-01-24 15:52:13 +01:00
commit 02082e2dd8
45 changed files with 3059 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
{
inputs,
lib,
config,
...
}:
{
imports = [
# Hardware
./hardware-configuration.nix
./configurations/kernel.nix
# Configurations
./configurations/users.nix
./configurations/home-manager.nix
# Modules
inputs.self.nixos.boot
inputs.self.nixos.graphics
inputs.self.nixos.audio
inputs.self.nixos.networks
inputs.self.nixos.keyboard
];
nixpkgs = {
overlays = [
inputs.self.overlays.additions
inputs.self.overlays.modifications
inputs.self.overlays.unstable-packages
];
};
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in
{
settings = {
experimental-features = "nix-command flakes";
flake-registry = ""; # Opinionated: disable global registry
nix-path = config.nix.nixPath; # Workaround for https://github.com/NixOS/nix/issues/9574
};
# Opinionated: make flake registry and nix path match flake inputs
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
channel.enable = false; # Opinionated: disable channels
};
networking.hostName = "nixos";
time.timeZone = "Europe/Brussels";
# System services
within.boot.systemd = true;
within.boot.plymouth = true;
within.graphics.nvidia.base = true;
within.audio.pipewire = true;
within.networks.dns.enable = true;
within.networks.manager.enable = true;
# System configurations
within.keyboard.apple.enable = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "25.11";
}