From e6b67905aa6f2066e7b11aa88a8bb2780f7eaa44 Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Wed, 18 Mar 2026 15:22:01 +0000 Subject: [PATCH] New structure since I kept struggling with the home-manager implemnentation --- Droidnix/README.org | 87 ++----------------- Droidnix/flake.lock | 73 +++++++++++----- .../generated/modules/system/bluetooth.nix | 28 ++++++ Droidnix/generated/modules/system/dbus.nix | 13 +++ Droidnix/generated/modules/system/xdg.nix | 7 ++ 5 files changed, 105 insertions(+), 103 deletions(-) create mode 100644 Droidnix/generated/modules/system/bluetooth.nix create mode 100644 Droidnix/generated/modules/system/dbus.nix create mode 100644 Droidnix/generated/modules/system/xdg.nix diff --git a/Droidnix/README.org b/Droidnix/README.org index 209937536..bc7877697 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -450,82 +450,9 @@ mkShell { } #+END_SRC -** =generated/hosts/traveldroid/boot.nix= -This file has most of the settings the control how the computer boots up. -#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/boot.nix :noweb tangle :mkdirp yes :eval never-html -{ 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 - -** =generated/hosts/traveldroid/machine.nix= -This is the top if the machine hierarchy -#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/machine.nix :noweb tangle :mkdirp yes :eval never-html -{ - config, - pkgs, - lib, - user, - inputs, - flakeRoot, - ... -}: - -{ - 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"; - - # User configuration - users.users.${user.username} = { - isNormalUser = true; - extraGroups = [ - "wheel" - "networkmanager" - ]; - hashedPassword = user.hashedPassword; - home = user.homeDirectory; - }; - # Optional: Enable auto-login for testing - #services.getty.autologinUser = user.username; - }; -} -#+END_SRC - -** =generated/hosts/traveldroid/dbus.nix= +** =generated/modules/system/dbus.nix= This sets the dbus implementation -#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/dbus.nix :noweb tangle :mkdirp yes :eval never-html +#+BEGIN_SRC nix :tangle generated/modules/system/dbus.nix :noweb tangle :mkdirp yes :eval never-html { config, pkgs, lib, ... }: { services.dbus = lib.mkForce { @@ -541,11 +468,9 @@ This sets the dbus implementation } #+END_SRC - - -** =generated/hosts/traveldroid/bluetooth.nix= +** =generated/modules/system/bluetooth.nix= This sets the bluetooth implementation -#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/bluetooth.nix :noweb tangle :mkdirp yes :eval never-html +#+BEGIN_SRC nix :tangle generated/modules/system/bluetooth.nix :noweb tangle :mkdirp yes :eval never-html { config, pkgs, ... }: { # Enable Bluetooth hardware and daemon @@ -576,9 +501,9 @@ This sets the bluetooth implementation } #+END_SRC -** =generated/hosts/traveldroid/xdg.nix= +** =generated/modules/system/xdg.nix= This sets the XDG implementation -#+BEGIN_SRC nix :tangle generated/hosts/traveldroid/xdg.nix :noweb tangle :mkdirp yes :eval never-html +#+BEGIN_SRC nix :tangle generated/modules/system/xdg.nix :noweb tangle :mkdirp yes :eval never-html { config, pkgs, ... }: { xdg.portal = { diff --git a/Droidnix/flake.lock b/Droidnix/flake.lock index 99c8ce193..89d4d3564 100644 --- a/Droidnix/flake.lock +++ b/Droidnix/flake.lock @@ -101,26 +101,6 @@ "type": "github" } }, - "catppuccin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1773403535, - "narHash": "sha256-47MZaFrHxNO8tVUAmtVnerXUw2WWVluBOiU9MulN/yM=", - "owner": "catppuccin", - "repo": "nix", - "rev": "d45b5665cc638bad1b794350de02f4dd41b0bb47", - "type": "github" - }, - "original": { - "owner": "catppuccin", - "repo": "nix", - "type": "github" - } - }, "emacs-overlay": { "inputs": { "nixpkgs": [ @@ -175,6 +155,24 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1772408722, + "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -591,6 +589,21 @@ "type": "github" } }, + "import-tree": { + "locked": { + "lastModified": 1773693634, + "narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=", + "owner": "vic", + "repo": "import-tree", + "rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1773389992, @@ -607,6 +620,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1772328832, + "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1773610124, @@ -689,10 +717,11 @@ }, "root": { "inputs": { - "catppuccin": "catppuccin", "emacs-overlay": "emacs-overlay", + "flake-parts": "flake-parts", "home-manager": "home-manager", "hyprland": "hyprland", + "import-tree": "import-tree", "nixpkgs": "nixpkgs_2", "stylix": "stylix", "zen-browser": "zen-browser" @@ -705,7 +734,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" diff --git a/Droidnix/generated/modules/system/bluetooth.nix b/Droidnix/generated/modules/system/bluetooth.nix new file mode 100644 index 000000000..b985e6742 --- /dev/null +++ b/Droidnix/generated/modules/system/bluetooth.nix @@ -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 + ]; +} diff --git a/Droidnix/generated/modules/system/dbus.nix b/Droidnix/generated/modules/system/dbus.nix new file mode 100644 index 000000000..b39025a6b --- /dev/null +++ b/Droidnix/generated/modules/system/dbus.nix @@ -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 + ''; +} diff --git a/Droidnix/generated/modules/system/xdg.nix b/Droidnix/generated/modules/system/xdg.nix new file mode 100644 index 000000000..ed37e204f --- /dev/null +++ b/Droidnix/generated/modules/system/xdg.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: +{ + xdg.portal = { + enable = true; + config.system.default = [ "hyprland" "gtk" ]; + }; +}