Further modularization of machine
This commit is contained in:
+421
-373
File diff suppressed because it is too large
Load Diff
+50
-27
@@ -511,6 +511,9 @@ This is the top of the machine hierarchy
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
./machine.nix
|
||||
./dbus.nix
|
||||
./audio.nix
|
||||
./xdg.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
}
|
||||
@@ -589,6 +592,53 @@ This is the top if the machine hierarchy
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =assets/flake/machines/traveldroid/dbus.nix=
|
||||
This sets the dbus implementation
|
||||
#+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/dbus.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
package = pkgs.dbus-broker; # Use dbus-broker for performance
|
||||
};
|
||||
services.dbus-broker.enable = true; # Explicitly enable the broker
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =assets/flake/machines/traveldroid/audio.nix=
|
||||
This sets audiosystem for this machine
|
||||
#+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/audio.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true; # ALSA compatibility
|
||||
pulse.enable = true; # PulseAudio compatibility
|
||||
wireplumber.enable = true; # Session manager for PipeWire
|
||||
};
|
||||
# Optional: Add realtime privileges for pro audio (if needed)
|
||||
security.rtkit.enable = true;
|
||||
# Optional: Enable Bluetooth audio support
|
||||
services.bluez = {
|
||||
enable = true;
|
||||
audioSupport = true;
|
||||
};
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** =assets/flake/machines/traveldroid/xdg.nix=
|
||||
This sets the XDG implementation
|
||||
#+BEGIN_SRC nix :tangle assets/flake/machines/traveldroid/xdg.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.system.default = [ "hyprland" "gtk" ];
|
||||
};
|
||||
}
|
||||
|
||||
#+END_SRC
|
||||
|
||||
* Now we reach the top of the hierarchy which will call all other imports
|
||||
|
||||
** =generated/top.nix=
|
||||
@@ -1021,33 +1071,6 @@ This is top file of this level which contains just an import statement for all r
|
||||
#+BEGIN_SRC nix :tangle generated/system/core/wayland.nix :noweb tangle :mkdirp yes :eval never-html
|
||||
{ config, pkgs, lib, user, ... }:
|
||||
{
|
||||
# Enable essential services for a Wayland session
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
package = pkgs.dbus-broker; # Explicitly use dbus-broker
|
||||
}
|
||||
services.dbus-broker.enable = true; # Enable the broker service
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
# XDG Desktop Portal settings for better application integration
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.system.default = [ "hyprland" "gtk" ];
|
||||
};
|
||||
|
||||
# Environment variables for a Wayland session
|
||||
environment.sessionVariables = {
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XCURSOR_SIZE = "24";
|
||||
};
|
||||
|
||||
# Home Manager Wayland configurations
|
||||
home-manager.users.${user.username} = {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true; # ALSA compatibility
|
||||
pulse.enable = true; # PulseAudio compatibility
|
||||
wireplumber.enable = true; # Session manager for PipeWire
|
||||
};
|
||||
# Optional: Add realtime privileges for pro audio (if needed)
|
||||
security.rtkit.enable = true;
|
||||
# Optional: Enable Bluetooth audio support
|
||||
services.bluez = {
|
||||
enable = true;
|
||||
audioSupport = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
package = pkgs.dbus-broker; # Use dbus-broker for performance
|
||||
};
|
||||
services.dbus-broker.enable = true; # Explicitly enable the broker
|
||||
}
|
||||
@@ -13,6 +13,9 @@
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
./machine.nix
|
||||
./dbus.nix
|
||||
./audio.nix
|
||||
./xdg.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.system.default = [ "hyprland" "gtk" ];
|
||||
};
|
||||
}
|
||||
@@ -1,28 +1,5 @@
|
||||
{ config, pkgs, lib, user, ... }:
|
||||
{
|
||||
# Enable essential services for a Wayland session
|
||||
services.dbus.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
};
|
||||
|
||||
# XDG Desktop Portal settings for better application integration
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config.system.default = [ "hyprland" "gtk" ];
|
||||
};
|
||||
|
||||
# Environment variables for a Wayland session
|
||||
environment.sessionVariables = {
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
XCURSOR_SIZE = "24";
|
||||
};
|
||||
|
||||
# Home Manager Wayland configurations
|
||||
home-manager.users.${user.username} = {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user