New structure since I kept struggling with the home-manager implemnentation

This commit is contained in:
2026-03-18 15:05:33 +00:00
parent 86c3f52851
commit 084cd4c0f1
86 changed files with 507 additions and 4509 deletions
-3162
View File
File diff suppressed because it is too large Load Diff
+307 -839
View File
File diff suppressed because it is too large Load Diff
+7 -60
View File
@@ -1,16 +1,11 @@
{
description = "Droidnix: A dendritic NixOS + Home Manager configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin = {
url = "github:catppuccin/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
@@ -23,65 +18,17 @@
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
};
outputs =
inputs@{
self,
nixpkgs,
home-manager,
emacs-overlay,
catppuccin,
zen-browser,
hyprland,
stylix,
...
}:
let
lib = nixpkgs.lib;
system = "x86_64-linux";
user = import ./generated/out_of_tree/users/henrov.nix;
machines = [
"traveldroid"
"maindroid"
];
flakeRoot = ./.; # Define flakeRoot here
in
outputs = inputs@{self, nixpkgs,home-manager, emacs-overlay, zen-browser, hyprland, stylix, import-tree,...};
flake-parts.lib.mkFlake { inherit inputs; }
{
nixosConfigurations = lib.genAttrs machines (
machine:
lib.nixosSystem {
inherit system;
modules = [
# Import machine-specific configurations
./generated/out_of_tree/machines/traveldroid/top.nix
# Anchoring all the other nixes
./generated/top.nix
# Home Manager module
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
# flake-parts requires you to define systems
systems = [ "x86_64-linux" ];
home-manager.extraSpecialArgs = { inherit user inputs flakeRoot; };
}
imports = [
(import-tree ./generated/modules) # Auto-loads your modules
.generated/hosts/traveldroid/traveldroid.nix # Explicitly load grouped host
];
specialArgs = { inherit user inputs flakeRoot; };
}
);
homeConfigurations = lib.genAttrs (map (machine: "${user.username}@${machine}") machines) (
userMachine:
home-manager.lib.homeManagerConfiguration {
inherit system;
configuration = import ./user.nix { inherit inputs user flakeRoot; };
extraSpecialArgs = { inherit user inputs flakeRoot; };
}
);
devShells.${system}.default = import ./generated/out_of_tree/terminal_shell/devshell.nix {
inherit (nixpkgs.legacyPackages.${system}) mkShell;
};
};
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,32 +0,0 @@
{
config,
pkgs,
lib,
flakeRoot,
user,
...
}:
let
# Pad naar de wallpaper config in de flake
wallpaperConf = "${flakeRoot}/assets/hyprland/wallpaperstuff/wallpaper.conf";
in
{
home.packages = [ pkgs.wpaperd ];
systemd.user.services.wpaperd = {
Unit = {
Description = "wpaperd wallpaper daemon";
After = [ "default.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.wpaperd}/bin/wpaperd --config ${wallpaperConf}";
Restart = "on-failure";
RestartSec = 1;
};
Install = {
WantedBy = [ "default.target" ];
};
};
}
@@ -1,6 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No imports yet
];
}
@@ -1,6 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
-12
View File
@@ -1,12 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./hyprland.nix
./animations_effects/top.nix
./decorations/top.nix
./notifications/top.nix
./statusbar_tray/top.nix
./task_window_workspace_switcher/top.nix
./window_rules/top.nix
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -0,0 +1,34 @@
{ lib, config, ... }:
let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
options.mySystem.system.locale.enable =
lib.mkEnableOption "Boot settings";
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
boot = {
initrd = {
verbose = false; # its a lot of logs. dont need it, unless we do.
kernelModules = [ ]; # no kernel modules on boot
};
extraModulePackages = [ ]; # no extra packages on boot either
kernelPackages = pkgs.linuxPackages_latest; # latest greatest linux kernel
kernelParams = [ "silent" ]; # quiet those logs
consoleLogLevel = 0; # quiten more logs
plymouth.enable = true; # graphical boot animation instead
supportedFilesystems = [ "ntfs" ]; # should see the ntfs (windows)
loader = {
systemd-boot.enable = true; # systemd-boot
systemd-boot.configurationLimit = 10;
efi.canTouchEfiVariables = true; # allow editing efi to edit the boot loader
timeout = 5; # grub timeout to make a selection
};
};
}
@@ -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
./generated/modules/system/users/user.nix
./homebase.nix
./nix.nix
./boot.nix
];
config = lib.mkIf cfg.enable {
# alleen echt "core-specifieke" dingen hier
nixpkgs.config.allowUnfree = true;
};
}
@@ -1,3 +1,16 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# feh # wallpaper target
gtk3 # GTK target
gtk4 # GTK target
#st # NVF / terminal target, or kitty
];
# Stylix GTK target
stylix.targets.gtk.enable = true;
}
{ pkgs, user, ... }:
{
home-manager.users.${user.username} = {
@@ -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,28 @@
{ 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";
};
};
}
@@ -1,11 +1,14 @@
{
config,
pkgs,
lib,
...
}:
{ 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;
@@ -30,9 +33,8 @@
};
};
# Install NetworkManager and wofi
# Install NetworkManager
environment.systemPackages = with pkgs; [
networkmanager
wofi
];
}
+26
View File
@@ -0,0 +1,26 @@
{ lib, config, ... }:
let
coreEnabled = config.mySystem.system.core.enable or false;
in
{
options.mySystem.system.locale.enable =
lib.mkEnableOption "Flake & Nix settings";
config = lib.mkIf (coreEnabled || config.mySystem.system.locale.enable) {
# --- Flakes & Nix Settings ---
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
download-buffer-size = 536870912; # 512 MB
cores = 2;
max-jobs = 1;
};
}
{ config, pkgs, ... }:
{
nix.settings = {
extra-experimental-cores = [ "nix-command" "flakes" ];
};
}
@@ -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;
};
};
}
@@ -14,17 +14,9 @@ in
home.stateVersion = "25.11";
home.username = user.username;
home.homeDirectory = user.homeDirectory;
home.packages = with pkgs; [
direnv
git-extras
];
imports = [
./generated/out-of-tree/core/rotating_wallpaper.nix
];
};
# Ensure the user is in the necessary groups
users.users.${config.users.users.${user.username}.username} = {
extraGroups = [ "networkmanager" ];
extraGroups = [ "wheel", "networkmanager" ];
}
@@ -86,10 +86,5 @@
'';
};
# Home Manager packages (optional)
home.packages = with pkgs; [
direnv
git-extras
];
};
}
@@ -1,12 +0,0 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# feh # wallpaper target
gtk3 # GTK target
gtk4 # GTK target
#st # NVF / terminal target, or kitty
];
# Stylix GTK target
stylix.targets.gtk.enable = true;
}
@@ -1,6 +0,0 @@
{ config, pkgs, ... }:
{
nix.settings = {
extra-experimental-features = [ "nix-command" "flakes" ];
};
}
@@ -1,12 +0,0 @@
{ config, pkgs, ... }:
{
services.pipewire = {
enable = true;
alsa.enable = true; # ALSA compatibility
pulse.enable = true; # PulseAudio compatibility
wireplumber.enable = true; # Session manager for PipeWire
};
# Realtime privileges for pro audio (optional)
security.rtkit.enable = true;
}
@@ -1,26 +0,0 @@
{
config,
pkgs,
lib,
user,
inputs,
flakeRoot,
...
}:
{
imports = [
./../../core/nix.nix
./../../core/stylix.nix
./../../core/gtk.nix
./../../core/terminal.nix
./boot.nix
./hardware-configuration.nix
./machine.nix
./dbus.nix
./audio.nix
./xdg.nix
./networking.nix
inputs.home-manager.nixosModules.home-manager
];
}
@@ -1,16 +0,0 @@
{
config,
pkgs,
lib,
user,
inputs,
flakeRoot,
...
}:
{
imports = [
./devshell.nix
inputs.home-manager.nixosModules.home-manager
];
}
@@ -1,6 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
./user.nix
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,8 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./zen-browser.nix
# ./firefox.nix
# ./vivaldi.nix
];
}
@@ -1,6 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./thunar.nix
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,10 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./kitty.nix
./starship.nix
./zsh.nix
./emacs.nix
];
}
@@ -1,15 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./packages.nix
./flatpaks.nix
./accessibility/top.nix
./browsing/top.nix
./file_management/top.nix
./gaming/top.nix
./media_playback_editing/top.nix
./office_productivity/top.nix
./terminal_shell/top.nix
];
nixpkgs.config.allowUnfree = true;
}
-11
View File
@@ -1,11 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./wayland.nix
#./eww.nix
./waybar.nix
./login-tuigreeter.nix
#./login-lightdm.nix
./fonts.nix
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,11 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./databases/top.nix
./devops_ci_cd/top.nix
./programming_languages/top.nix
./virtualization/top.nix
./web_development/top.nix
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
# No subfolders to import
];
}
@@ -1,19 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./audio/top.nix
./backups/top.nix
./bluetooth/top.nix
./disk_management/top.nix
./hardware_sensors/top.nix
./logging_monitoring/top.nix
./login_manager/top.nix
./monitor_setup/top.nix
./networking/top.nix
./power_management/top.nix
./printers_scanners/top.nix
./security/top.nix
./system_updates/top.nix
];
}
@@ -1,7 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./wofi.nix
];
}
-10
View File
@@ -1,10 +0,0 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./applications/top.nix
./core/top.nix
./development/top.nix
./system_management/top.nix
];
}
-8
View File
@@ -1,8 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
./system/top.nix
./hyprland/top.nix
# ./mangowc/top.nix
];
}