2022-04-27 00:21:19 +02:00
|
|
|
{ lib
|
|
|
|
, pkgs
|
|
|
|
, config
|
|
|
|
, ...
|
2022-03-01 22:19:03 +01:00
|
|
|
}:
|
|
|
|
with lib; let
|
2021-11-22 08:04:54 +01:00
|
|
|
cfg = config.eboskma.desktop;
|
2022-04-27 00:21:19 +02:00
|
|
|
in
|
|
|
|
{
|
2021-11-12 17:10:17 +01:00
|
|
|
options.eboskma.desktop = {
|
|
|
|
enable = mkEnableOption "Enable default desktop configuration";
|
2022-11-11 11:54:21 +01:00
|
|
|
wayland = mkOption {
|
|
|
|
description = "Configure for wayland";
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
};
|
2021-11-12 17:10:17 +01:00
|
|
|
home-manager = mkOption {
|
2022-11-11 11:54:21 +01:00
|
|
|
description = "Enable home-manager for this desktop";
|
2021-11-12 17:10:17 +01:00
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-11-21 19:07:12 +01:00
|
|
|
programs = {
|
|
|
|
dconf.enable = true;
|
|
|
|
|
2022-07-12 23:46:31 +02:00
|
|
|
fuse.userAllowOther = true;
|
|
|
|
|
2022-01-31 08:10:31 +01:00
|
|
|
seahorse.enable = true;
|
|
|
|
|
2022-11-11 11:54:21 +01:00
|
|
|
sway = mkIf cfg.wayland {
|
2021-11-21 19:07:12 +01:00
|
|
|
enable = true;
|
|
|
|
wrapperFeatures = {
|
|
|
|
gtk = true;
|
|
|
|
base = true;
|
|
|
|
};
|
2022-02-03 22:57:53 +01:00
|
|
|
extraPackages = with pkgs; [
|
2023-01-06 00:14:46 +01:00
|
|
|
swaylock
|
2022-02-03 22:57:53 +01:00
|
|
|
swayidle
|
|
|
|
];
|
2021-11-21 19:07:12 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-11-17 16:32:18 +01:00
|
|
|
xdg = {
|
|
|
|
mime.enable = true;
|
|
|
|
menus.enable = true;
|
|
|
|
icons.enable = true;
|
|
|
|
sounds.enable = true;
|
|
|
|
autostart.enable = true;
|
|
|
|
portal = {
|
|
|
|
enable = true;
|
2022-11-11 11:54:21 +01:00
|
|
|
wlr.enable = cfg.wayland;
|
2022-04-27 00:21:19 +02:00
|
|
|
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
2021-11-17 16:32:18 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
2022-04-27 00:21:19 +02:00
|
|
|
dbus.packages = [ pkgs.gcr ];
|
2021-12-06 09:58:39 +01:00
|
|
|
avahi.publish.workstation = true;
|
2022-01-31 08:10:31 +01:00
|
|
|
gvfs.enable = true;
|
2022-03-18 21:14:51 +01:00
|
|
|
pcscd.enable = true;
|
2022-03-22 11:04:22 +01:00
|
|
|
ratbagd.enable = true;
|
2022-12-23 09:21:20 +01:00
|
|
|
teamviewer.enable = mkIf (pkgs.system == "x86_64-linux") true;
|
2021-11-21 19:07:12 +01:00
|
|
|
};
|
2021-11-17 16:32:18 +01:00
|
|
|
|
2021-11-25 17:18:13 +01:00
|
|
|
security = {
|
|
|
|
pam.services.swaylock = {
|
2022-02-03 22:57:53 +01:00
|
|
|
unixAuth = true;
|
|
|
|
setLoginUid = true;
|
|
|
|
enableGnomeKeyring = true;
|
|
|
|
allowNullPassword = true;
|
|
|
|
updateWtmp = true;
|
|
|
|
startSession = true;
|
2021-11-25 17:18:13 +01:00
|
|
|
};
|
2022-04-27 00:21:19 +02:00
|
|
|
pki.certificates = [ (builtins.readFile ./horus-ca.pem) ];
|
2022-07-12 23:46:31 +02:00
|
|
|
wrappers = {
|
|
|
|
fusermount.source = "${pkgs.fuse}/bin/fusermount";
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-11-16 00:22:18 +01:00
|
|
|
};
|
2021-11-22 18:56:59 +01:00
|
|
|
|
2022-03-18 21:14:51 +01:00
|
|
|
environment = {
|
2022-11-17 14:06:39 +01:00
|
|
|
sessionVariables = mkIf cfg.wayland {
|
2022-03-18 21:14:51 +01:00
|
|
|
_JAVA_AWT_WM_NONREPARENTING = "1";
|
|
|
|
MOZ_ENABLE_WAYLAND = "1";
|
|
|
|
MOZ_DBUS_REMOTE = "1";
|
|
|
|
QT_QPA_PLATFORM = "wayland";
|
|
|
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
|
|
|
QT_QPA_PLATFORMTHEME = "qt5ct";
|
|
|
|
SDL_VIDEODRIVER = "wayland";
|
2022-10-30 21:09:15 +01:00
|
|
|
SSH_AUTH_SOCK = ''''${XDG_RUNTIME_DIR}/ssh-agent'';
|
2022-03-18 21:14:51 +01:00
|
|
|
AMD_VULKAN_ICD = "RADV";
|
2022-10-30 21:09:15 +01:00
|
|
|
NIXOS_OZONE_WL = "1";
|
2022-03-18 21:14:51 +01:00
|
|
|
};
|
2021-11-22 18:56:59 +01:00
|
|
|
|
2022-03-18 21:14:51 +01:00
|
|
|
etc = {
|
|
|
|
"X11/xkb".source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
|
|
|
|
};
|
2022-03-22 11:04:22 +01:00
|
|
|
|
|
|
|
systemPackages = with pkgs; [
|
|
|
|
piper
|
|
|
|
];
|
2021-12-18 16:23:14 +01:00
|
|
|
};
|
2021-11-12 17:10:17 +01:00
|
|
|
};
|
|
|
|
}
|