From f341ab27c69a8128e206ce26aa0f534ea4795581 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Fri, 6 Mar 2026 23:23:15 +0100 Subject: [PATCH] Added boot.nix --- Droidnix/README.html | 735 ++++++++++-------- Droidnix/README.org | 156 ++-- .../flake/machines/traveldroid/boot.nix | 26 + .../assets/flake/machines/traveldroid/top.nix | 3 +- Droidnix/flake.nix | 120 ++- 5 files changed, 583 insertions(+), 457 deletions(-) create mode 100644 Droidnix/assets/flake/machines/traveldroid/boot.nix diff --git a/Droidnix/README.html b/Droidnix/README.html index 7611aeae0..650f6dff7 100644 --- a/Droidnix/README.html +++ b/Droidnix/README.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Droidnix: A Dendritic NixOS + Home Manager Configuration NixOS Configuration Structure @@ -204,109 +204,110 @@

Table of Contents

-
-

Shortcuts

-
+
+

Shortcuts

+

Introduction The Assets Folder @@ -322,26 +323,26 @@

Introduction   intro

-
-

What is Droidnix

-
+
+

What is Droidnix

+

Droidnix is a modular, declarative NixOS + Home Manager configuration system. It allows users to choose between Hyprland and Mangowc as their window manager, with shared and WM-specific configurations managed via Emacs Org and Nix Flakes. The project is designed for reproducibility, maintainability, and cross-machine compatibility.

-
-

Installed components:

-
+
+

Installed components:

+
    -
  • Core
  • -
  • Hyprland
  • -
  • Mangowc
  • +
  • Core
  • +
  • Hyprland
  • +
  • Mangowc
-
-

Goals, project Structure, import hierarchy

-
+
+

Goals, project Structure, import hierarchy

+

This project uses a modular NixOS configuration with Hyprland and MangoWC support, designed for literate programming and cross-device reusability. The Droidnix repository is organized into two main parts: @@ -354,9 +355,9 @@ The Droidnix repository is organized into two main parts:

-
-

Root Level

-
+
+

Root Level

+
  • flake.nix is the entry point and imports:
      @@ -368,23 +369,23 @@ The Droidnix repository is organized into two main parts:
-
-

Generated Structure

-
+
+

Generated Structure

+

The generated/ directory contains all generated configurations, divided into three main groups: system, hyprland, and mangowc.

-
-

System (generated/system/)

-
+
+

System (generated/system/)

+

This directory contains system-wide configurations that are independent of the window manager.

-
-

Applications (applications/)

-
+
+

Applications (applications/)

+
  • file_management/: Configurations for file managers and storage solutions.
  • gaming/: Settings for gaming-related software.
  • @@ -394,9 +395,9 @@ This directory contains system-wide configurations that are independent of the w
-
-

Development (development/)

-
+
+

Development (development/)

+
  • databases/: Settings for local databases.
  • devops_ci_cd/: Configurations for DevOps tools.
  • @@ -406,9 +407,9 @@ This directory contains system-wide configurations that are independent of the w
-
-

System Management (system_management/)

-
+
+

System Management (system_management/)

+
  • backups/: Settings for backup software.
  • bluetooth/: Configurations for Bluetooth devices and services.
  • @@ -427,9 +428,9 @@ This directory contains system-wide configurations that are independent of the w
-
-

Hyprland (generated/hyprland/)

-
+
+

Hyprland (generated/hyprland/)

+

This directory contains configurations specific to Hyprland.

@@ -446,9 +447,9 @@ This directory contains configurations specific to Hyprland.
-
-

MangoWC (generated/mangowc/)

-
+
+

MangoWC (generated/mangowc/)

+

This directory contains configurations specific to MangoWC.

@@ -482,7 +483,7 @@ This directory contains configurations specific to MangoWC.
  • Scalability: Easy to add new machines or configurations.
  • -
    +
     .
     ├── assets
     │   ├── common
    @@ -664,9 +665,9 @@ This directory contains configurations specific to MangoWC.
     
    -
    -

    First Setup

    -
    +
    +

    First Setup

    +
    1. Clone this repository.
    2. Run the setup script: ./setup_droidnix.sh.
    3. @@ -688,9 +689,9 @@ This directory contains configurations specific to MangoWC. The .assets/ folder contains all static files, such as configs, scripts, and themes. These files are not generated and can be edited directly.

    -
    -

    .assets/common/

    -
    +
    +

    .assets/common/

    +

    This folder contains files shared across both window managers, such as wallpapers, shell configs, and common scripts.

    @@ -701,9 +702,9 @@ This folder contains files shared across both window managers, such as wallpaper
    -
    -

    .assets/hyprland/

    -
    +
    +

    .assets/hyprland/

    +

    Hyprland-specific assets, including configs, themes, and scripts.

    @@ -715,9 +716,9 @@ Hyprland-specific assets, including configs, themes, and scripts.
    -
    -

    .assets/mangowc/

    -
    +
    +

    .assets/mangowc/

    +

    Mangowc-specific assets, including configs, themes, and scripts.

    @@ -729,9 +730,9 @@ Mangowc-specific assets, including configs, themes, and scripts.
    -
    -

    .assets/machines/

    -
    +
    +

    .assets/machines/

    +

    Machine-specific NixOS configurations (e.g., configuration.nix for maindroid and traveldroid).

    @@ -749,80 +750,85 @@ Machine-specific NixOS configurations (e.g., configuration.nix for This section contains the Org blocks for tangling Nix code into the generated folders.

    -
    -

    flake.nix

    -
    +
    +

    flake.nix

    +

    The Nix flake definition for Droidnix.

    -
    {
    -  description = "Droidnix: A dendritic NixOS + Home Manager configuration";
    +
    url = "github:nix-community/emacs-overlay";
    +inputs.nixpkgs.follows = "nixpkgs";
    +};
    +catppuccin = {
    +url = "github:catppuccin/nix";
    +inputs.nixpkgs.follows = "nixpkgs";
    +};
    +zen-browser = {
    +url = "github:youwen5/zen-browser-flake";
    +inputs.nixpkgs.follows = "nixpkgs";
    +};
    +hyprland.url = "github:hyprwm/Hyprland";
    +};
     
    -  inputs = {
    -    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    -    home-manager = {
    -      url = "github:nix-community/home-manager";
    -      inputs.nixpkgs.follows = "nixpkgs";
    -    };
    -    emacs-overlay = {
    -      url = "github:nix-community/emacs-overlay";
    -      inputs.nixpkgs.follows = "nixpkgs";
    -    };
    -    catppuccin = {
    -      url = "github:catppuccin/nix";
    -      inputs.nixpkgs.follows = "nixpkgs";
    -    };
    -    zen-browser = {
    -      url = "github:youwen5/zen-browser-flake";
    -      inputs.nixpkgs.follows = "nixpkgs";
    -    };
    -    hyprland.url = "github:hyprwm/Hyprland";
    -  };
    +outputs =
    +inputs@{
    +nixpkgs,
    +home-manager,
    +emacs-overlay,
    +catppuccin,
    +zen-browser,
    +hyprland,
    +...
    +}:
    +let
    +lib = nixpkgs.lib;
    +system = "x86_64-linux"; # Define the system explicitly
    +user = import ./assets/flake/users/henrov.nix;
    +machines = [
    +  "traveldroid"
    +  "maindroid"
    +];
    +in
    +{
    +nixosConfigurations = lib.genAttrs machines (
    +  machine:
    +  lib.nixosSystem {
    +    inherit system;
    +    modules = [
    +      # Import machine-specific configurations
    +      ./assets/flake/machines/${machine}/top.nix
     
    -  outputs = inputs@{ nixpkgs, home-manager, emacs-overlay, catppuccin, zen-browser, hyprland, ... }:
    -  let
    -    lib = nixpkgs.lib;
    -    system = lib.system.system;
    -    user = import ./assets/flake/users/henrov.nix;
    -    machines = ["traveldroid" "maindroid"];
    -  in
    -  {
    -    nixosConfigurations = lib.genAttrs machines (machine: lib.nixosSystem {
    -      inherit system;
    -      modules = [
    -        # Import machine-specific configurations
    -        ./assets/flake/machines/${machine}/top.nix
    +      # Home Manager and theme modules
    +      home-manager.nixosModules.home-manager
    +      {
    +        home-manager.useGlobalPkgs = true;
    +        home-manager.useUserPackages = true;
    +        home-manager.extraSpecialArgs = { inherit user inputs; };
    +      }
    +      inputs.catppuccin.nixosModules.catppuccin
    +    ];
    +    specialArgs = { inherit user inputs; };
    +  }
    +);
     
    -        # Home Manager and theme modules
    -        home-manager.nixosModules.home-manager {
    -          home-manager.useGlobalPkgs = true;
    -          home-manager.useUserPackages = true;
    -          home-manager.extraSpecialArgs = { inherit user inputs; };
    -        }
    -        inputs.catppuccin.nixosModules.catppuccin
    -      ];
    -      specialArgs = { inherit user inputs; };
    -    });
    -
    -    devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix {
    -      inherit (nixpkgs) mkShell;
    +devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix {
    +  inherit (nixpkgs) mkShell;
         };
       };
     }
    -
     
    -
    -

    First the nix-files that flake really needs and that do not fit wel in the hierarchical structure

    -
    +
    +

    First the nix-files that flake really needs and that do not fit wel in the hierarchical structure

    +
    -
    -

    assets/flake/users/henrov.nix

    -
    +
    +

    assets/flake/users/henrov.nix

    +

    This is the default user, just search and replace henrov another name if you want to change

    @@ -838,9 +844,9 @@ This is the default user, just search and replace henrov another name if you wan
    -
    -

    assets/flake/terminal_shell/devshell.nix

    -
    +
    +

    assets/flake/terminal_shell/devshell.nix

    +

    This code defines a Nix shell environment (also called a "devShell") that you can enter using the nix develop command. When you enter this shell, Nix will provide the tools and dependencies listed in buildInputs.

    @@ -856,36 +862,89 @@ mkShell {
    -
    -

    assets/flake/machines/traveldroid/top.nix

    -
    +
    +

    assets/flake/machines/traveldroid/top.nix

    +

    This code defines the machine to build. Just search and replace traveldroid to provision another machine.

    -
    { config, pkgs, lib, user, inputs, ... }:
    +
    {
    +  config,
    +  pkgs,
    +  lib,
    +  user,
    +  inputs,
    +  ...
    +}:
     {
       # Import all other configurations
       imports = [
    +    ./boot.nix
         ./hardware-configuration.nix
       ];
    +  options = {
    +    wm = lib.mkOption {
    +      type = lib.types.str;
    +      default = "hyprland";
    +      description = "Type of window manager to use";
    +    };
    +  };
    +  config = {
         # Minimal settings that must be defined here
         networking.hostName = "traveldroid";
    -    wm.type = "hyprland";  # Define the window manager type here, mangowc will be made possible in the nerar future.
    -    # In generated/top.nix the chpice fopr a window manager will be effectuated
    +    wm.type = "hyprland"; # Define the window manager type here, mangowc will be made possible in the near future.
    +  };
    +}
    +
    +
    +
    +
    +
    +

    assets/flake/machines/traveldroid/boot.nix

    +
    +

    +This file has most of the settings the control how the computer boots up. +

    +
    +
     :noweb tangle :mkdirp yes
    +{ pkgs, ... } :
    +{
    +  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
    +  };
    +  };
     }
     
    -
    -

    Now we reach the top of the hierarchy which will call all other imports

    -
    +
    +

    Now we reach the top of the hierarchy which will call all other imports

    +
    -
    -

    generated/top.nix

    -
    +
    +

    generated/top.nix

    +

    The ./generated/top.nix file acts as an anchor or entry point for the entire chain of imports in the pyramid structure.

    @@ -909,9 +968,9 @@ The ./generated/top.nix file acts as an anchor or entry point for the entire cha
    -
    -

    generated/hyprland/top.nix

    -
    +
    +

    generated/hyprland/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1000,9 +1059,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/top.nix

    -
    +
    +

    generated/mangowc/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1025,9 +1084,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/top.nix

    -
    +
    +

    generated/system/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1045,9 +1104,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/applications/top.nix

    -
    +
    +

    generated/system/applications/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1068,9 +1127,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/development/top.nix

    -
    +
    +

    generated/system/development/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1090,9 +1149,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/top.nix

    -
    +
    +

    generated/system/system_management/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1120,9 +1179,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/hyprland/animations_effects/top.nix

    -
    +
    +

    generated/hyprland/animations_effects/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1138,9 +1197,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/hyprland/decorations/top.nix

    -
    +
    +

    generated/hyprland/decorations/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1156,9 +1215,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/hyprland/keyboard_binds/top.nix

    -
    +
    +

    generated/hyprland/keyboard_binds/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1180,9 +1239,9 @@ in
    -
    -

    generated/hyprland/notifications/top.nix

    -
    +
    +

    generated/hyprland/notifications/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1198,9 +1257,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/hyprland/statusbar_tray/top.nix

    -
    +
    +

    generated/hyprland/statusbar_tray/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1216,9 +1275,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/hyprland/task_launcher/top.nix

    -
    +
    +

    generated/hyprland/task_launcher/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1234,9 +1293,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/hyprland/task_window_workspace_switcher/top.nix

    -
    +
    +

    generated/hyprland/task_window_workspace_switcher/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1252,9 +1311,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/hyprland/window_rules/top.nix

    -
    +
    +

    generated/hyprland/window_rules/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1270,9 +1329,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/animations_effects/top.nix

    -
    +
    +

    generated/mangowc/animations_effects/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1288,9 +1347,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/decorations/top.nix

    -
    +
    +

    generated/mangowc/decorations/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1306,9 +1365,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/keyboard_binds/top.nix

    -
    +
    +

    generated/mangowc/keyboard_binds/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1324,9 +1383,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/notifications/top.nix

    -
    +
    +

    generated/mangowc/notifications/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1342,9 +1401,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/statusbar_tray/top.nix

    -
    +
    +

    generated/mangowc/statusbar_tray/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1360,9 +1419,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/task_launcher/top.nix

    -
    +
    +

    generated/mangowc/task_launcher/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1378,9 +1437,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/task_window_workspace_switcher/top.nix

    -
    +
    +

    generated/mangowc/task_window_workspace_switcher/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1396,9 +1455,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/mangowc/window_rules/top.nix

    -
    +
    +

    generated/mangowc/window_rules/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1414,9 +1473,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/applications/accessibility/top.nix

    -
    +
    +

    generated/system/applications/accessibility/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1432,9 +1491,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/applications/file_management/top.nix

    -
    +
    +

    generated/system/applications/file_management/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1450,9 +1509,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/applications/gaming/top.nix

    -
    +
    +

    generated/system/applications/gaming/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1468,9 +1527,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/applications/media_playback_editing/top.nix

    -
    +
    +

    generated/system/applications/media_playback_editing/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1486,9 +1545,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/applications/office_productivity/top.nix

    -
    +
    +

    generated/system/applications/office_productivity/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1504,9 +1563,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/applications/terminal_shell/top.nix

    -
    +
    +

    generated/system/applications/terminal_shell/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1522,9 +1581,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/development/databases/top.nix

    -
    +
    +

    generated/system/development/databases/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1540,9 +1599,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/development/devops_ci_cd/top.nix

    -
    +
    +

    generated/system/development/devops_ci_cd/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1558,9 +1617,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/development/programming_languages/top.nix

    -
    +
    +

    generated/system/development/programming_languages/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1576,9 +1635,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/development/virtualization/top.nix

    -
    +
    +

    generated/system/development/virtualization/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1594,9 +1653,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/development/web_development/top.nix

    -
    +
    +

    generated/system/development/web_development/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1612,9 +1671,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/audio/top.nix

    -
    +
    +

    generated/system/system_management/audio/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1630,9 +1689,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/backups/top.nix

    -
    +
    +

    generated/system/system_management/backups/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1648,9 +1707,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/bluetooth/top.nix

    -
    +
    +

    generated/system/system_management/bluetooth/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1666,9 +1725,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/disk_management/top.nix

    -
    +
    +

    generated/system/system_management/disk_management/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1684,9 +1743,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/hardware_sensors/top.nix

    -
    +
    +

    generated/system/system_management/hardware_sensors/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1702,9 +1761,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/logging_monitoring/top.nix

    -
    +
    +

    generated/system/system_management/logging_monitoring/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1720,9 +1779,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/login_manager/top.nix

    -
    +
    +

    generated/system/system_management/login_manager/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1738,9 +1797,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/monitor_setup/top.nix

    -
    +
    +

    generated/system/system_management/monitor_setup/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1756,9 +1815,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/networking/top.nix

    -
    +
    +

    generated/system/system_management/networking/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1774,9 +1833,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/power_management/top.nix

    -
    +
    +

    generated/system/system_management/power_management/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1792,9 +1851,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/printers_scanners/top.nix

    -
    +
    +

    generated/system/system_management/printers_scanners/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1810,9 +1869,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/security/top.nix

    -
    +
    +

    generated/system/system_management/security/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1828,9 +1887,9 @@ This is top file of this level which contains the bare necessities for this subj
    -
    -

    generated/system/system_management/system_updates/top.nix

    -
    +
    +

    generated/system/system_management/system_updates/top.nix

    +

    This is top file of this level which contains the bare necessities for this subject + an import statement for all the subfolder in this folder

    @@ -1850,7 +1909,7 @@ This is top file of this level which contains the bare necessities for this subj

    Author: Henro Veijer

    -

    Created: 2026-03-06 vr 22:57

    +

    Created: 2026-03-06 vr 23:22

    Validate

    diff --git a/Droidnix/README.org b/Droidnix/README.org index 067475254..4e110fde9 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -341,61 +341,66 @@ This section contains the Org blocks for tangling Nix code into the generated fo ** =flake.nix= The Nix flake definition for Droidnix. #+BEGIN_SRC nix :tangle flake.nix :noweb tangle :mkdirp yes :eval never-html +url = "github:nix-community/emacs-overlay"; +inputs.nixpkgs.follows = "nixpkgs"; +}; +catppuccin = { +url = "github:catppuccin/nix"; +inputs.nixpkgs.follows = "nixpkgs"; +}; +zen-browser = { +url = "github:youwen5/zen-browser-flake"; +inputs.nixpkgs.follows = "nixpkgs"; +}; +hyprland.url = "github:hyprwm/Hyprland"; +}; + +outputs = +inputs@{ +nixpkgs, +home-manager, +emacs-overlay, +catppuccin, +zen-browser, +hyprland, +... +}: +let +lib = nixpkgs.lib; +system = "x86_64-linux"; # Define the system explicitly +user = import ./assets/flake/users/henrov.nix; +machines = [ + "traveldroid" + "maindroid" +]; +in { - description = "Droidnix: A dendritic NixOS + Home Manager configuration"; +nixosConfigurations = lib.genAttrs machines ( + machine: + lib.nixosSystem { + inherit system; + modules = [ + # Import machine-specific configurations + ./assets/flake/machines/${machine}/top.nix - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - emacs-overlay = { - url = "github:nix-community/emacs-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - catppuccin = { - url = "github:catppuccin/nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - zen-browser = { - url = "github:youwen5/zen-browser-flake"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - hyprland.url = "github:hyprwm/Hyprland"; - }; + # Home Manager and theme modules + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit user inputs; }; + } + inputs.catppuccin.nixosModules.catppuccin + ]; + specialArgs = { inherit user inputs; }; + } +); - outputs = inputs@{ nixpkgs, home-manager, emacs-overlay, catppuccin, zen-browser, hyprland, ... }: - let - lib = nixpkgs.lib; - system = lib.system.system; - user = import ./assets/flake/users/henrov.nix; - machines = ["traveldroid" "maindroid"]; - in - { - nixosConfigurations = lib.genAttrs machines (machine: lib.nixosSystem { - inherit system; - modules = [ - # Import machine-specific configurations - ./assets/flake/machines/${machine}/top.nix - - # Home Manager and theme modules - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user inputs; }; - } - inputs.catppuccin.nixosModules.catppuccin - ]; - specialArgs = { inherit user inputs; }; - }); - - devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix { - inherit (nixpkgs) mkShell; +devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix { + inherit (nixpkgs) mkShell; }; }; } - #+END_SRC * First the nix-files that flake really needs and that do not fit wel in the hierarchical structure @@ -426,16 +431,63 @@ mkShell { ** =assets/flake/machines/traveldroid/top.nix= This code defines the machine to build. Just search and replace traveldroid to provision another machine. #+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/top.nix :noweb tangle :mkdirp yes :eval never-html -{ config, pkgs, lib, user, inputs, ... }: +{ + config, + pkgs, + lib, + user, + inputs, + ... +}: { # Import all other configurations imports = [ + ./boot.nix ./hardware-configuration.nix ]; + options = { + wm = lib.mkOption { + type = lib.types.str; + default = "hyprland"; + description = "Type of window manager to use"; + }; + }; + config = { # Minimal settings that must be defined here networking.hostName = "traveldroid"; - wm.type = "hyprland"; # Define the window manager type here, mangowc will be made possible in the nerar future. - # In generated/top.nix the chpice fopr a window manager will be effectuated + wm.type = "hyprland"; # Define the window manager type here, mangowc will be made possible in the near future. + }; +} +#+END_SRC + +** =assets/flake/machines/traveldroid/boot.nix= +This file has most of the settings the control how the computer boots up. +#+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/boot.nix :noweb tangle :mkdirp yes :eval never-html + :noweb tangle :mkdirp yes +{ pkgs, ... } : +{ + 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 + }; + }; } #+END_SRC diff --git a/Droidnix/assets/flake/machines/traveldroid/boot.nix b/Droidnix/assets/flake/machines/traveldroid/boot.nix new file mode 100644 index 000000000..a0c011ffb --- /dev/null +++ b/Droidnix/assets/flake/machines/traveldroid/boot.nix @@ -0,0 +1,26 @@ +:noweb tangle :mkdirp yes +{ pkgs, ... } : +{ + 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 + }; + }; +} diff --git a/Droidnix/assets/flake/machines/traveldroid/top.nix b/Droidnix/assets/flake/machines/traveldroid/top.nix index 6a37b602d..3fcc62250 100644 --- a/Droidnix/assets/flake/machines/traveldroid/top.nix +++ b/Droidnix/assets/flake/machines/traveldroid/top.nix @@ -9,9 +9,9 @@ { # Import all other configurations imports = [ + ./boot.nix ./hardware-configuration.nix ]; - options = { wm = lib.mkOption { type = lib.types.str; @@ -19,7 +19,6 @@ description = "Type of window manager to use"; }; }; - config = { # Minimal settings that must be defined here networking.hostName = "traveldroid"; diff --git a/Droidnix/flake.nix b/Droidnix/flake.nix index 484837642..cce4dd01f 100644 --- a/Droidnix/flake.nix +++ b/Droidnix/flake.nix @@ -1,70 +1,60 @@ +url = "github:nix-community/emacs-overlay"; +inputs.nixpkgs.follows = "nixpkgs"; +}; +catppuccin = { +url = "github:catppuccin/nix"; +inputs.nixpkgs.follows = "nixpkgs"; +}; +zen-browser = { +url = "github:youwen5/zen-browser-flake"; +inputs.nixpkgs.follows = "nixpkgs"; +}; +hyprland.url = "github:hyprwm/Hyprland"; +}; + +outputs = +inputs@{ +nixpkgs, +home-manager, +emacs-overlay, +catppuccin, +zen-browser, +hyprland, +... +}: +let +lib = nixpkgs.lib; +system = "x86_64-linux"; # Define the system explicitly +user = import ./assets/flake/users/henrov.nix; +machines = [ + "traveldroid" + "maindroid" +]; +in { - description = "Droidnix: A dendritic NixOS + Home Manager configuration"; +nixosConfigurations = lib.genAttrs machines ( + machine: + lib.nixosSystem { + inherit system; + modules = [ + # Import machine-specific configurations + ./assets/flake/machines/${machine}/top.nix - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; + # Home Manager and theme modules + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit user inputs; }; + } + inputs.catppuccin.nixosModules.catppuccin + ]; + specialArgs = { inherit user inputs; }; + } +); + +devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix { + inherit (nixpkgs) mkShell; }; - emacs-overlay = { - url = "github:nix-community/emacs-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - catppuccin = { - url = "github:catppuccin/nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - zen-browser = { - url = "github:youwen5/zen-browser-flake"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - hyprland.url = "github:hyprwm/Hyprland"; }; - - outputs = - inputs@{ - nixpkgs, - home-manager, - emacs-overlay, - catppuccin, - zen-browser, - hyprland, - ... - }: - let - lib = nixpkgs.lib; - system = "x86_64-linux"; # Define the system explicitly - user = import ./assets/flake/users/henrov.nix; - machines = [ - "traveldroid" - "maindroid" - ]; - in - { - nixosConfigurations = lib.genAttrs machines ( - machine: - lib.nixosSystem { - inherit system; - modules = [ - # Import machine-specific configurations - ./assets/flake/machines/${machine}/top.nix - - # Home Manager and theme modules - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit user inputs; }; - } - inputs.catppuccin.nixosModules.catppuccin - ]; - specialArgs = { inherit user inputs; }; - } - ); - - devShells.${system}.default = import ./assets/flake/terminal_shell/devshell.nix { - inherit (nixpkgs) mkShell; - }; - }; }