complete restructure
This commit is contained in:
45
modules/core/boot.nix
Normal file
45
modules/core/boot.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
# modules/core/boot.nix
|
||||
# Bootloader, kernel, and boot-time configuration
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
boot.loader.limine = {
|
||||
enable = true;
|
||||
style.wallpapers = [ ../../wallpaper/nix.png ];
|
||||
maxGenerations = 5;
|
||||
};
|
||||
boot.loader.limine.secureBoot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest-x86_64-v3;
|
||||
|
||||
boot.kernelParams = [
|
||||
"amd_pstate=active"
|
||||
"amdgpu.ppfeaturemask=0xffffffff"
|
||||
"quiet"
|
||||
"splash"
|
||||
"loglevel=3"
|
||||
"rd.udev.log_level=3"
|
||||
"systemd.show_status=auto"
|
||||
"vt.global_cursor_default=0"
|
||||
];
|
||||
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.resumeDevice = "/dev/mapper/cryptswap";
|
||||
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "nixos-bgrt";
|
||||
themePackages = [ pkgs.nixos-bgrt-plymouth ];
|
||||
};
|
||||
|
||||
services.scx.enable = true;
|
||||
services.scx.scheduler = "scx_lavd";
|
||||
}
|
||||
10
modules/core/default.nix
Normal file
10
modules/core/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
# modules/core/default.nix
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./system.nix
|
||||
./networking.nix
|
||||
./users.nix
|
||||
./localization.nix
|
||||
];
|
||||
}
|
||||
27
modules/core/localization.nix
Normal file
27
modules/core/localization.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
# modules/core/localization.nix
|
||||
# Timezone, locale, and keyboard settings
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
console.keyMap = "de-latin1-nodeadkeys";
|
||||
}
|
||||
16
modules/core/networking.nix
Normal file
16
modules/core/networking.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
# modules/core/networking.nix
|
||||
# Network configuration and services
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
networking.hostName = "nix";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.tailscale.enable = true;
|
||||
}
|
||||
32
modules/core/system.nix
Normal file
32
modules/core/system.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
# modules/core/system.nix
|
||||
# Nix settings and system configuration
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
27
modules/core/users.nix
Normal file
27
modules/core/users.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
# modules/core/users.nix
|
||||
# User accounts and shell configuration
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = "Melvin Ragusa";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"docker"
|
||||
"gamemode"
|
||||
"corectrl"
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
programs.fish.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user