From 419a03ebd29655b46ae5e8672df8cf284d2bd587 Mon Sep 17 00:00:00 2001 From: NullBite Date: Wed, 7 Feb 2024 09:08:07 +0100 Subject: [PATCH] Add some shared configs for standalone WMs --- home/hyprland.nix | 5 +++++ home/wm-common.nix | 14 ++++++++++++++ system/hyprland.nix | 2 ++ system/wm-common.nix | 15 +++++++++++++++ 4 files changed, 36 insertions(+) create mode 100644 home/wm-common.nix create mode 100644 system/wm-common.nix diff --git a/home/hyprland.nix b/home/hyprland.nix index cf22947..9f1eb9a 100644 --- a/home/hyprland.nix +++ b/home/hyprland.nix @@ -23,6 +23,11 @@ let in { + # FIXME this is temporary just to get it working, need to make wm-common an + # option first + imports = [ + ./wm-common.nix + ]; home.packages = with pkgs; [ kitty dolphin diff --git a/home/wm-common.nix b/home/wm-common.nix new file mode 100644 index 0000000..3e173bf --- /dev/null +++ b/home/wm-common.nix @@ -0,0 +1,14 @@ +{ pkgs, lib, config, osConfig, options, ...}: +let + inherit (lib) mkDefault; +in +{ + # Common options for standalone window managers; many of these (or + # alternatives thereof) are pulled in by desktop environments. + services = { + udiskie = { + enable = mkDefault true; + automount = mkDefault false; + }; + }; +} diff --git a/system/hyprland.nix b/system/hyprland.nix index 355cb25..a71426e 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -2,6 +2,8 @@ { imports = [ ./desktop-common.nix + # FIXME make this into an option + ./wm-common.nix ]; services.xserver.displayManager.sddm.enable = true; diff --git a/system/wm-common.nix b/system/wm-common.nix new file mode 100644 index 0000000..606f19b --- /dev/null +++ b/system/wm-common.nix @@ -0,0 +1,15 @@ +{ pkgs, lib, config, options, ...}: +let + inherit (lib) mkDefault; +in +{ + # Common options for standalone window managers; many of these (or + # alternatives thereof) are pulled in by desktop environments. + services = { + power-profiles-daemon.enable = mkDefault true; + blueman.enable = mkDefault config.hardware.bluetooth.enable; + }; + programs = { + nm-applet.enable = mkDefault config.networking.networkmanager.enable; + }; +}