Base of Nix Configuration
This commit is contained in:
Executable
+68
@@ -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";
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
users = {
|
||||
alistreaza = import ../home-manager/home.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelModules = [
|
||||
"coretemp"
|
||||
"nct6775"
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
users.users = {
|
||||
alistreaza = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user