parent
9e96d809d3
commit
b838caa222
5 changed files with 144 additions and 101 deletions
|
@ -12,45 +12,54 @@ with lib;
|
||||||
default = config.components.gui.enable;
|
default = config.components.gui.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (config.components.gui.audio.enable) {
|
config = mkMerge [
|
||||||
|
(mkIf (config.components.gui.audio.enable) {
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
services.pulseaudio.enable = false;
|
environment.systemPackages = with pkgs; [
|
||||||
|
alsa-utils
|
||||||
|
|
||||||
hardware.bluetooth = {
|
# PulseAudio control
|
||||||
enable = true;
|
# ------------------
|
||||||
powerOnBoot = true;
|
ponymix
|
||||||
};
|
pavucontrol
|
||||||
|
lxqt.pavucontrol-qt
|
||||||
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
services.pipewire = {
|
||||||
alsa-utils
|
#enable = true;
|
||||||
|
systemWide = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# PulseAudio control
|
environment.etc = {
|
||||||
# ------------------
|
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||||
ponymix
|
bluez_monitor.properties = {
|
||||||
pavucontrol
|
["bluez5.enable-sbc-xq"] = true,
|
||||||
lxqt.pavucontrol-qt
|
["bluez5.enable-msbc"] = true,
|
||||||
];
|
["bluez5.enable-hw-volume"] = true,
|
||||||
|
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
services.pipewire = {
|
{
|
||||||
enable = true;
|
|
||||||
systemWide = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc = {
|
# this is always true
|
||||||
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
# seems other options enable this one
|
||||||
bluez_monitor.properties = {
|
services.pipewire.enable = config.components.gui.audio.enable;
|
||||||
["bluez5.enable-sbc-xq"] = true,
|
services.pulseaudio.enable = false;
|
||||||
["bluez5.enable-msbc"] = true,
|
|
||||||
["bluez5.enable-hw-volume"] = true,
|
}
|
||||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
|
||||||
}
|
];
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ with lib;
|
||||||
./browser.nix
|
./browser.nix
|
||||||
./cups.nix
|
./cups.nix
|
||||||
./home-manager
|
./home-manager
|
||||||
|
./kde.nix
|
||||||
./kmonad.nix
|
./kmonad.nix
|
||||||
./noti.nix # todo: make this different (use password store and such)
|
./noti.nix # todo: make this different (use password store and such)
|
||||||
./pass.nix
|
./pass.nix
|
||||||
|
|
19
components/gui/kde.nix
Normal file
19
components/gui/kde.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
|
options.components.gui.kde.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = config.components.gui.enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.components.gui.kde.enable) {
|
||||||
|
|
||||||
|
services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -14,72 +14,85 @@ with lib;
|
||||||
default = config.components.gui.enable;
|
default = config.components.gui.enable;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf (config.components.gui.xorg.enable && config.components.gui.enable) {
|
options.components.gui.xorg.lightdm.enable = mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
# system.custom.fonts.enable = true;
|
default = config.components.gui.xorg.enable;
|
||||||
services.displayManager = {
|
|
||||||
defaultSession = lib.mkDefault "none+i3";
|
|
||||||
autoLogin.enable = lib.mkDefault true;
|
|
||||||
autoLogin.user = config.users.users.mainUser.name;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
displayManager = {
|
|
||||||
lightdm.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
|
|
||||||
desktopManager.xterm.enable = false;
|
|
||||||
windowManager.i3.enable = true;
|
|
||||||
|
|
||||||
# mouse/touchpad
|
|
||||||
# --------------
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
services.libinput = {
|
|
||||||
enable = true;
|
|
||||||
touchpad = {
|
|
||||||
disableWhileTyping = true;
|
|
||||||
tapping = true;
|
|
||||||
scrollMethod = "twofinger";
|
|
||||||
accelSpeed = "1.3";
|
|
||||||
naturalScrolling = true;
|
|
||||||
horizontalScrolling = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Packages
|
|
||||||
# --------
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
|
|
||||||
xclip
|
|
||||||
#xtrlock-pam
|
|
||||||
xorg.xev
|
|
||||||
|
|
||||||
dmenu
|
|
||||||
arandr
|
|
||||||
xcalib
|
|
||||||
flameshot
|
|
||||||
feh
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
# Xresources config
|
|
||||||
# -----------------
|
|
||||||
# spread the Xresource config
|
|
||||||
# across different files
|
|
||||||
# just add a file into `/etc/X11/Xresource.d/` and it will be
|
|
||||||
# evaluated.
|
|
||||||
services.xserver.displayManager.sessionCommands = ''
|
|
||||||
for file in `ls /etc/X11/Xresource.d/`
|
|
||||||
do
|
|
||||||
${pkgs.xorg.xrdb}/bin/xrdb -merge /etc/X11/Xresource.d/$file
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
environment.etc."/X11/Xresource.d/.keep".text = "";
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.components.gui.xorg.sddm.enable = mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = !config.components.gui.xorg.lightdm.enable;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkMerge [
|
||||||
|
|
||||||
|
(mkIf (config.components.gui.xorg.lightdm.enable && config.components.gui.xorg.enable) {
|
||||||
|
|
||||||
|
services.displayManager = {
|
||||||
|
defaultSession = "none+i3";
|
||||||
|
autoLogin.enable = lib.mkDefault true;
|
||||||
|
autoLogin.user = config.users.users.mainUser.name;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.displayManager.lightdm.enable = true;
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkIf (config.components.gui.xorg.sddm.enable && config.components.gui.xorg.enable) {
|
||||||
|
|
||||||
|
services.xserver.displayManager.sddm.enable = true;
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkIf (config.components.gui.xorg.enable && config.components.gui.enable) {
|
||||||
|
|
||||||
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
services.xserver.windowManager.i3.enable = true;
|
||||||
|
|
||||||
|
services.libinput = {
|
||||||
|
enable = true;
|
||||||
|
touchpad = {
|
||||||
|
disableWhileTyping = true;
|
||||||
|
tapping = true;
|
||||||
|
scrollMethod = "twofinger";
|
||||||
|
accelSpeed = "1.3";
|
||||||
|
naturalScrolling = true;
|
||||||
|
horizontalScrolling = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
# --------
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
||||||
|
xclip
|
||||||
|
#xtrlock-pam
|
||||||
|
xorg.xev
|
||||||
|
|
||||||
|
dmenu
|
||||||
|
arandr
|
||||||
|
xcalib
|
||||||
|
flameshot
|
||||||
|
feh
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
# Xresources config
|
||||||
|
# -----------------
|
||||||
|
# spread the Xresource config
|
||||||
|
# across different files
|
||||||
|
# just add a file into `/etc/X11/Xresource.d/` and it will be
|
||||||
|
# evaluated.
|
||||||
|
services.xserver.displayManager.sessionCommands = ''
|
||||||
|
for file in `ls /etc/X11/Xresource.d/`
|
||||||
|
do
|
||||||
|
${pkgs.xorg.xrdb}/bin/xrdb -merge /etc/X11/Xresource.d/$file
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
environment.etc."/X11/Xresource.d/.keep".text = "";
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@
|
||||||
components.virtualisation.enable = true;
|
components.virtualisation.enable = true;
|
||||||
|
|
||||||
components.gui.enable = true;
|
components.gui.enable = true;
|
||||||
|
components.gui.audio.enable = false;
|
||||||
components.mainUser.enable = true;
|
components.mainUser.enable = true;
|
||||||
components.media.enable = true;
|
components.media.enable = true;
|
||||||
components.media.tts-client.enable = false;
|
components.media.tts-client.enable = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue