Working on reshuffling

This commit is contained in:
2026-03-19 10:45:07 +00:00
parent bebf308651
commit 7e48206cc7
33 changed files with 1570 additions and 0 deletions
@@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
# Enable Bluetooth hardware and daemon
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
packages = with pkgs; [ bluez ];
};
# Enable Bluetooth audio support in PipeWire
services.pipewire = {
config.pulse = {
bluez5.enable = true;
};
};
# Optional: Additional Bluetooth settings
hardware.bluetooth.extraConfig = ''
AutoEnable=true
DiscoverableTimeout=0
PairableTimeout=0
'';
# Install a graphical Bluetooth manager (optional)
environment.systemPackages = with pkgs; [
blueman
];
}
@@ -0,0 +1,40 @@
{ inputs, config, lib, pkgs, ... }:
let
# Import all reusable modules via the flake input
modulesFromTree = builtins.attrValues (inputs.import-tree { path = ../modules; });
in
{
# Host-specific imports
imports = [
inputs.home-manager.nixosModules.home-manager
] ++ modulesFromTree;
# Host-specific configuration
networking.hostName = "traveldroid";
system.stateVersion = "25.11";
boot.loader.grub = {
enable = true;
efiSupport = true;
device = "nodev";
useOSProber = true;
};
boot.efi.canTouchEfiVariables = true;
boot.kernelParams = [
"systemd.mask=dev-tpm0.device"
"systemd.mask=dev-tpmrm0.device"
];
# User-defined features
mySystem.system.core.enable = true;
# Desktop environment features
desktop.hyprland.enable = true;
desktop.noctalia.enable = true;
desktop.stylix.enable = true;
# Hardware overrides (host-specific)
hardware.nvidia.enable = false;
}
@@ -0,0 +1,25 @@
{ lib, config, ... }:
let
cfg = config.mySystem.system.core;
in
{
options.mySystem.system.core.enable =
lib.mkEnableOption "Core System Settings";
imports = [
./locale.nix
./networking.nix
./services.nix
./users/user.nix
./homebase.nix
./nix.nix
./boot.nix
];
config = lib.mkIf cfg.enable {
# alleen echt "core-specifieke" dingen hier
nixpkgs.config.allowUnfree = true;
};
}
@@ -0,0 +1,13 @@
{ config, pkgs, lib, ... }:
{
services.dbus = lib.mkForce {
enable = true; # Force this to be true
};
# Configure dbus-broker via its configuration file
environment.etc."dbus-broker/launch.conf".text = ''
[General]
LogLevel=warning
MaxConnectionsPerUser=2048
'';
}
@@ -0,0 +1,30 @@
{ pkgs, user, ... }:
{
environment.systemPackages = with pkgs; [
gtk3 # GTK target
gtk4 # GTK target
];
# Stylix GTK target
stylix.targets.gtk.enable = true;
home-manager.users.${user.username} = {
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Standard-Blue-Dark";
package = pkgs.magnetic-catppuccin-gtk;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
};
}
@@ -0,0 +1,47 @@
{
hostname,
pkgs,
lib,
modulesPath,
user,
config,
...
}:
{
imports = [
# (modulesPath + "/installer/scan/not-detected.nix")
#../../hardware/hardware.nix
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_usb_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/69433a14-fbaf-401b-af85-cd1bbf02b4e2";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/811D-0676";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/b6c557c2-7682-460b-a5e7-8f6f2f429a3a"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
@@ -0,0 +1,28 @@
{ lib, config, ... }:
let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
options.mySystem.system.locale.enable =
lib.mkEnableOption "Home-Manager settings";
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
# --- Home Manager Base ---
home-manager = {
backupFileExtension = "backup";
users.henrov = {
home.sessionVariables = {
TERMINAL = "kitty";
EDITOR = "emacs";
BROWSER = "zen";
};
home.stateVersion = "25.11";
};
};
};
}
@@ -0,0 +1,26 @@
{ lib, config, ... }:
let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
options.mySystem.system.locale.enable =
lib.mkEnableOption "Locale settings";
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
time.timeZone = "Europe/Amsterdam";
i18n.defaultLocale = "nl_NL.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8";
};
};
}
@@ -0,0 +1,14 @@
{ pkgs, user, ... } :
{
environment.systemPackages = with pkgs; [
tuigreet
];
services.greetd = {
enable = true;
settings = {
default_session = {
command = pkgs.lib.mkForce "${pkgs.tuigreet}/bin/tuigreet --remember --time --time-format '%I:%M %p | %a %h | %F'";
};
};
};
}
@@ -0,0 +1,41 @@
{ lib, config, pkgs,... }:
let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
options.mySystem.system.locale.enable =
lib.mkEnableOption "Network settings";
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
networking = {
useDHCP = lib.mkDefault true;
networkmanager.enable = true;
networkmanager.wifi.backend = "iwd";
wireless.iwd.enable = true;
wireless.userControlled.enable = true;
firewall = {
enable = true;
# KDE Connect: discovery + encrypted connections
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
}
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
}
];
};
};
# Install NetworkManager
environment.systemPackages = with pkgs; [
networkmanager
];
};
}
@@ -0,0 +1,27 @@
{ lib, config, ... }:
let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
# Top-level option for this module
options.mySystem.system.locale.enable =
lib.mkEnableOption "Enable Nix & Flake specific settings";
# Top-level container for all custom program configs (your myPrograms idea)
options.myPrograms = lib.mkOption {
type = lib.types.attrsOf lib.types.any;
default = {};
description = "Container for all custom program configurations";
};
# Apply the configuration only if core or locale is enabled
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
download-buffer-size = 536870912; # 512 MB
cores = 2;
max-jobs = 1;
};
};
}
@@ -0,0 +1,23 @@
{ lib, config, ... }:
let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
options.mySystem.system.locale.enable =
lib.mkEnableOption "Services settings (printing / audio)";
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
# --- Services (Printing & Audio) ---
services.printing.enable = true;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}
@@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
# (NVF = Neovim/terminal flavor)
stylix.targets.nvf.enable = true;
# feh wallpaper integration
stylix.targets.feh.enable = true;
}
@@ -0,0 +1,46 @@
{ inputs, ... }:
inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
# Optional: pass inputs to modules
specialArgs = { inherit inputs; };
modules = [
inputs.home-manager.nixosModules.home-manager
]
++ builtins.attrValues (import-tree ./generated/modules)
++ [
./hardware-configuration.nix
# Host-specific hardware and system settings
({ config, lib, ... }: {
networking.hostName = "traveldroid";
system.stateVersion = "25.11";
boot.loader.grub = {
enable = true;
efiSupport = true;
device = "nodev";
useOSProber = true;
};
boot.efi.canTouchEfiVariables = true;
boot.kernelParams = [
"systemd.mask=dev-tpm0.device"
"systemd.mask=dev-tpmrm0.device"
];
# User-defined features
mySystem.system.core.enable = true;
# Desktop environment features
desktop.hyprland.enable = true;
desktop.noctalia.enable = true;
desktop.stylix.enable = true;
# Hardware overrides (host-specific)
hardware.nvidia.enable = false;
})
];
}
@@ -0,0 +1,7 @@
{
username = "henrov";
hashedPassword = "$6$ISAmsPLyFi7idYXr$VmZsq.zMsyh1irSkyDNqtorNXG0oEHbbMVqTii1t8bymvrQ5ZQmbdi4OiBNeNYe/huHGrojXM.3TST2fTLz0T.";
homeDirectory = "/home/henrov";
stateVersion = "25.11";
locale = "nl_NL.UTF-8";
}
@@ -0,0 +1,23 @@
{
config,
pkgs,
lib,
inputs,
...
}:
let
user = import ./henrov.nix;
in
{
home-manager.users.${user.username} = {
home.stateVersion = "25.11";
home.username = user.username;
home.homeDirectory = user.homeDirectory;
};
# Ensure the user is in the necessary groups
users.users.${config.users.users.${user.username}.username} = {
extraGroups = [ "wheel" "networkmanager" ];
};
}
@@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
xdg.portal = {
enable = true;
config.system.default = [ "hyprland" "gtk" ];
};
}