Revert "treewide/nixos: remove `with lib;` part 12"

authored by philiptaron.tngl.sh and committed by GitHub b6b551fe 64688082

+807 -674
+5 -2
nixos/modules/services/x11/colord.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.colord; ··· 14 options = { 15 16 services.colord = { 17 - enable = lib.mkEnableOption "colord, the color management daemon"; 18 }; 19 20 }; 21 22 - config = lib.mkIf cfg.enable { 23 24 environment.systemPackages = [ pkgs.colord ]; 25
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.colord; ··· 17 options = { 18 19 services.colord = { 20 + enable = mkEnableOption "colord, the color management daemon"; 21 }; 22 23 }; 24 25 + config = mkIf cfg.enable { 26 27 environment.systemPackages = [ pkgs.colord ]; 28
+8 -5
nixos/modules/services/x11/desktop-managers/cde.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 xcfg = config.services.xserver; 9 cfg = xcfg.desktopManager.cde; 10 in 11 { 12 options.services.xserver.desktopManager.cde = { 13 - enable = lib.mkEnableOption "Common Desktop Environment"; 14 15 - extraPackages = lib.mkOption { 16 - type = with lib.types; listOf package; 17 default = with pkgs.xorg; [ 18 xclock 19 bitmap ··· 26 xwd 27 xwud 28 ]; 29 - defaultText = lib.literalExpression '' 30 with pkgs.xorg; [ 31 xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud 32 ] ··· 37 }; 38 }; 39 40 - config = lib.mkIf (xcfg.enable && cfg.enable) { 41 environment.systemPackages = cfg.extraPackages; 42 43 services.rpcbind.enable = true;
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 xcfg = config.services.xserver; 12 cfg = xcfg.desktopManager.cde; 13 in 14 { 15 options.services.xserver.desktopManager.cde = { 16 + enable = mkEnableOption "Common Desktop Environment"; 17 18 + extraPackages = mkOption { 19 + type = with types; listOf package; 20 default = with pkgs.xorg; [ 21 xclock 22 bitmap ··· 29 xwd 30 xwud 31 ]; 32 + defaultText = literalExpression '' 33 with pkgs.xorg; [ 34 xclock bitmap xlsfonts xfd xrefresh xload xwininfo xdpyinfo xwd xwud 35 ] ··· 40 }; 41 }; 42 43 + config = mkIf (xcfg.enable && cfg.enable) { 44 environment.systemPackages = cfg.extraPackages; 45 46 services.rpcbind.enable = true;
+46 -43
nixos/modules/services/x11/desktop-managers/cinnamon.nix
··· 1 { config, lib, pkgs, utils, ... }: 2 let 3 4 cfg = config.services.xserver.desktopManager.cinnamon; ··· 15 { 16 options = { 17 services.cinnamon = { 18 - apps.enable = lib.mkEnableOption "Cinnamon default applications"; 19 }; 20 21 services.xserver.desktopManager.cinnamon = { 22 - enable = lib.mkEnableOption "the cinnamon desktop manager"; 23 24 - sessionPath = lib.mkOption { 25 default = []; 26 - type = lib.types.listOf lib.types.package; 27 - example = lib.literalExpression "[ pkgs.gpaste ]"; 28 description = '' 29 Additional list of packages to be added to the session search path. 30 Useful for GSettings-conditional autostart. ··· 33 ''; 34 }; 35 36 - extraGSettingsOverrides = lib.mkOption { 37 default = ""; 38 - type = lib.types.lines; 39 description = "Additional gsettings overrides."; 40 }; 41 42 - extraGSettingsOverridePackages = lib.mkOption { 43 default = []; 44 - type = lib.types.listOf lib.types.path; 45 description = "List of packages for which gsettings are overridden."; 46 }; 47 }; 48 49 - environment.cinnamon.excludePackages = lib.mkOption { 50 default = []; 51 - example = lib.literalExpression "[ pkgs.blueman ]"; 52 - type = lib.types.listOf lib.types.package; 53 description = "Which packages cinnamon should exclude from the default environment"; 54 }; 55 56 }; 57 58 - config = lib.mkMerge [ 59 - (lib.mkIf cfg.enable { 60 services.displayManager.sessionPackages = [ pkgs.cinnamon-common ]; 61 62 services.xserver.displayManager.lightdm.greeters.slick = { 63 - enable = lib.mkDefault true; 64 65 # Taken from mint-artwork.gschema.override 66 - theme = lib.mkIf (notExcluded pkgs.mint-themes) { 67 - name = lib.mkDefault "Mint-Y-Aqua"; 68 - package = lib.mkDefault pkgs.mint-themes; 69 }; 70 - iconTheme = lib.mkIf (notExcluded pkgs.mint-y-icons) { 71 - name = lib.mkDefault "Mint-Y-Sand"; 72 - package = lib.mkDefault pkgs.mint-y-icons; 73 }; 74 - cursorTheme = lib.mkIf (notExcluded pkgs.mint-cursor-themes) { 75 - name = lib.mkDefault "Bibata-Modern-Classic"; 76 - package = lib.mkDefault pkgs.mint-cursor-themes; 77 }; 78 }; 79 80 # Have to take care of GDM + Cinnamon on Wayland users 81 environment.extraInit = '' 82 - ${lib.concatMapStrings (p: '' 83 if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then 84 export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name} 85 fi ··· 92 ''; 93 94 # Default services 95 - services.blueman.enable = lib.mkDefault (notExcluded pkgs.blueman); 96 - hardware.bluetooth.enable = lib.mkDefault true; 97 security.polkit.enable = true; 98 services.accounts-daemon.enable = true; 99 - services.system-config-printer.enable = (lib.mkIf config.services.printing.enable (lib.mkDefault true)); 100 services.dbus.packages = with pkgs; [ 101 cinnamon-common 102 cinnamon-screensaver 103 nemo-with-extensions 104 xapp 105 ]; 106 - services.cinnamon.apps.enable = lib.mkDefault true; 107 services.gnome.evolution-data-server.enable = true; 108 services.gnome.glib-networking.enable = true; 109 services.gnome.gnome-keyring.enable = true; 110 services.gvfs.enable = true; 111 - services.power-profiles-daemon.enable = lib.mkDefault true; 112 - services.switcherooControl.enable = lib.mkDefault true; # xapp-gpu-offload-helper 113 - services.touchegg.enable = lib.mkDefault true; 114 services.udisks2.enable = true; 115 - services.upower.enable = lib.mkDefault config.powerManagement.enable; 116 - services.libinput.enable = lib.mkDefault true; 117 services.xserver.updateDbusEnvironment = true; 118 - networking.networkmanager.enable = lib.mkDefault true; 119 120 # Enable colord server 121 services.colord.enable = true; ··· 201 pkgs.xdg-desktop-portal-gtk 202 ]; 203 204 - services.orca.enable = lib.mkDefault (notExcluded pkgs.orca); 205 206 - xdg.portal.configPackages = lib.mkDefault [ pkgs.cinnamon-common ]; 207 208 # Override GSettings schemas 209 environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; ··· 214 ]; 215 216 # Shell integration for VTE terminals 217 - programs.bash.vteIntegration = lib.mkDefault true; 218 - programs.zsh.vteIntegration = lib.mkDefault true; 219 220 # Default Fonts 221 fonts.packages = with pkgs; [ ··· 224 ]; 225 }) 226 227 - (lib.mkIf serviceCfg.apps.enable { 228 - programs.gnome-disks.enable = lib.mkDefault (notExcluded pkgs.gnome-disk-utility); 229 - programs.gnome-terminal.enable = lib.mkDefault (notExcluded pkgs.gnome-terminal); 230 - programs.file-roller.enable = lib.mkDefault (notExcluded pkgs.file-roller); 231 232 environment.systemPackages = with pkgs; utils.removePackagesByName [ 233 # cinnamon team apps
··· 1 { config, lib, pkgs, utils, ... }: 2 + 3 + with lib; 4 + 5 let 6 7 cfg = config.services.xserver.desktopManager.cinnamon; ··· 18 { 19 options = { 20 services.cinnamon = { 21 + apps.enable = mkEnableOption "Cinnamon default applications"; 22 }; 23 24 services.xserver.desktopManager.cinnamon = { 25 + enable = mkEnableOption "the cinnamon desktop manager"; 26 27 + sessionPath = mkOption { 28 default = []; 29 + type = types.listOf types.package; 30 + example = literalExpression "[ pkgs.gpaste ]"; 31 description = '' 32 Additional list of packages to be added to the session search path. 33 Useful for GSettings-conditional autostart. ··· 36 ''; 37 }; 38 39 + extraGSettingsOverrides = mkOption { 40 default = ""; 41 + type = types.lines; 42 description = "Additional gsettings overrides."; 43 }; 44 45 + extraGSettingsOverridePackages = mkOption { 46 default = []; 47 + type = types.listOf types.path; 48 description = "List of packages for which gsettings are overridden."; 49 }; 50 }; 51 52 + environment.cinnamon.excludePackages = mkOption { 53 default = []; 54 + example = literalExpression "[ pkgs.blueman ]"; 55 + type = types.listOf types.package; 56 description = "Which packages cinnamon should exclude from the default environment"; 57 }; 58 59 }; 60 61 + config = mkMerge [ 62 + (mkIf cfg.enable { 63 services.displayManager.sessionPackages = [ pkgs.cinnamon-common ]; 64 65 services.xserver.displayManager.lightdm.greeters.slick = { 66 + enable = mkDefault true; 67 68 # Taken from mint-artwork.gschema.override 69 + theme = mkIf (notExcluded pkgs.mint-themes) { 70 + name = mkDefault "Mint-Y-Aqua"; 71 + package = mkDefault pkgs.mint-themes; 72 }; 73 + iconTheme = mkIf (notExcluded pkgs.mint-y-icons) { 74 + name = mkDefault "Mint-Y-Sand"; 75 + package = mkDefault pkgs.mint-y-icons; 76 }; 77 + cursorTheme = mkIf (notExcluded pkgs.mint-cursor-themes) { 78 + name = mkDefault "Bibata-Modern-Classic"; 79 + package = mkDefault pkgs.mint-cursor-themes; 80 }; 81 }; 82 83 # Have to take care of GDM + Cinnamon on Wayland users 84 environment.extraInit = '' 85 + ${concatMapStrings (p: '' 86 if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then 87 export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name} 88 fi ··· 95 ''; 96 97 # Default services 98 + services.blueman.enable = mkDefault (notExcluded pkgs.blueman); 99 + hardware.bluetooth.enable = mkDefault true; 100 security.polkit.enable = true; 101 services.accounts-daemon.enable = true; 102 + services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true)); 103 services.dbus.packages = with pkgs; [ 104 cinnamon-common 105 cinnamon-screensaver 106 nemo-with-extensions 107 xapp 108 ]; 109 + services.cinnamon.apps.enable = mkDefault true; 110 services.gnome.evolution-data-server.enable = true; 111 services.gnome.glib-networking.enable = true; 112 services.gnome.gnome-keyring.enable = true; 113 services.gvfs.enable = true; 114 + services.power-profiles-daemon.enable = mkDefault true; 115 + services.switcherooControl.enable = mkDefault true; # xapp-gpu-offload-helper 116 + services.touchegg.enable = mkDefault true; 117 services.udisks2.enable = true; 118 + services.upower.enable = mkDefault config.powerManagement.enable; 119 + services.libinput.enable = mkDefault true; 120 services.xserver.updateDbusEnvironment = true; 121 + networking.networkmanager.enable = mkDefault true; 122 123 # Enable colord server 124 services.colord.enable = true; ··· 204 pkgs.xdg-desktop-portal-gtk 205 ]; 206 207 + services.orca.enable = mkDefault (notExcluded pkgs.orca); 208 209 + xdg.portal.configPackages = mkDefault [ pkgs.cinnamon-common ]; 210 211 # Override GSettings schemas 212 environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; ··· 217 ]; 218 219 # Shell integration for VTE terminals 220 + programs.bash.vteIntegration = mkDefault true; 221 + programs.zsh.vteIntegration = mkDefault true; 222 223 # Default Fonts 224 fonts.packages = with pkgs; [ ··· 227 ]; 228 }) 229 230 + (mkIf serviceCfg.apps.enable { 231 + programs.gnome-disks.enable = mkDefault (notExcluded pkgs.gnome-disk-utility); 232 + programs.gnome-terminal.enable = mkDefault (notExcluded pkgs.gnome-terminal); 233 + programs.file-roller.enable = mkDefault (notExcluded pkgs.file-roller); 234 235 environment.systemPackages = with pkgs; utils.removePackagesByName [ 236 # cinnamon team apps
+30 -27
nixos/modules/services/x11/desktop-managers/deepin.nix
··· 5 utils, 6 ... 7 }: 8 let 9 xcfg = config.services.xserver; 10 cfg = xcfg.desktopManager.deepin; ··· 18 options = { 19 20 services.xserver.desktopManager.deepin = { 21 - enable = lib.mkEnableOption "Deepin desktop manager"; 22 - extraGSettingsOverrides = lib.mkOption { 23 default = ""; 24 - type = lib.types.lines; 25 description = "Additional gsettings overrides."; 26 }; 27 - extraGSettingsOverridePackages = lib.mkOption { 28 default = [ ]; 29 - type = lib.types.listOf lib.types.path; 30 description = "List of packages for which gsettings are overridden."; 31 }; 32 }; 33 34 - environment.deepin.excludePackages = lib.mkOption { 35 default = [ ]; 36 - type = lib.types.listOf lib.types.package; 37 description = "List of default packages to exclude from the configuration"; 38 }; 39 40 }; 41 42 - config = lib.mkIf cfg.enable { 43 services.displayManager.sessionPackages = [ pkgs.deepin.dde-session ]; 44 - services.displayManager.defaultSession = lib.mkDefault "dde-x11"; 45 46 # Update the DBus activation environment after launching the desktop manager. 47 services.xserver.displayManager.sessionCommands = '' 48 ${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all 49 ''; 50 51 - hardware.bluetooth.enable = lib.mkDefault true; 52 security.polkit.enable = true; 53 54 - services.deepin.dde-daemon.enable = lib.mkForce true; 55 - services.deepin.dde-api.enable = lib.mkForce true; 56 - services.deepin.app-services.enable = lib.mkForce true; 57 58 - services.colord.enable = lib.mkDefault true; 59 - services.accounts-daemon.enable = lib.mkDefault true; 60 - services.gvfs.enable = lib.mkDefault true; 61 - services.gnome.glib-networking.enable = lib.mkDefault true; 62 - services.gnome.gnome-keyring.enable = lib.mkDefault true; 63 - services.bamf.enable = lib.mkDefault true; 64 65 - services.libinput.enable = lib.mkDefault true; 66 services.udisks2.enable = true; 67 - services.upower.enable = lib.mkDefault config.powerManagement.enable; 68 - networking.networkmanager.enable = lib.mkDefault true; 69 - programs.dconf.enable = lib.mkDefault true; 70 - programs.gnupg.agent.pinentryPackage = lib.mkDefault pkgs.pinentry-qt; 71 72 fonts.packages = with pkgs; [ noto-fonts ]; 73 xdg.mime.enable = true; 74 xdg.menus.enable = true; 75 xdg.icons.enable = true; 76 - xdg.portal.enable = lib.mkDefault true; 77 - xdg.portal.extraPortals = lib.mkDefault [ 78 pkgs.xdg-desktop-portal-gtk 79 ]; 80 81 # https://github.com/NixOS/nixpkgs/pull/247766#issuecomment-1722839259 82 - xdg.portal.config.deepin.default = lib.mkDefault [ "gtk" ]; 83 84 environment.sessionVariables = { 85 NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
··· 5 utils, 6 ... 7 }: 8 + 9 + with lib; 10 + 11 let 12 xcfg = config.services.xserver; 13 cfg = xcfg.desktopManager.deepin; ··· 21 options = { 22 23 services.xserver.desktopManager.deepin = { 24 + enable = mkEnableOption "Deepin desktop manager"; 25 + extraGSettingsOverrides = mkOption { 26 default = ""; 27 + type = types.lines; 28 description = "Additional gsettings overrides."; 29 }; 30 + extraGSettingsOverridePackages = mkOption { 31 default = [ ]; 32 + type = types.listOf types.path; 33 description = "List of packages for which gsettings are overridden."; 34 }; 35 }; 36 37 + environment.deepin.excludePackages = mkOption { 38 default = [ ]; 39 + type = types.listOf types.package; 40 description = "List of default packages to exclude from the configuration"; 41 }; 42 43 }; 44 45 + config = mkIf cfg.enable { 46 services.displayManager.sessionPackages = [ pkgs.deepin.dde-session ]; 47 + services.displayManager.defaultSession = mkDefault "dde-x11"; 48 49 # Update the DBus activation environment after launching the desktop manager. 50 services.xserver.displayManager.sessionCommands = '' 51 ${lib.getBin pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all 52 ''; 53 54 + hardware.bluetooth.enable = mkDefault true; 55 security.polkit.enable = true; 56 57 + services.deepin.dde-daemon.enable = mkForce true; 58 + services.deepin.dde-api.enable = mkForce true; 59 + services.deepin.app-services.enable = mkForce true; 60 61 + services.colord.enable = mkDefault true; 62 + services.accounts-daemon.enable = mkDefault true; 63 + services.gvfs.enable = mkDefault true; 64 + services.gnome.glib-networking.enable = mkDefault true; 65 + services.gnome.gnome-keyring.enable = mkDefault true; 66 + services.bamf.enable = mkDefault true; 67 68 + services.libinput.enable = mkDefault true; 69 services.udisks2.enable = true; 70 + services.upower.enable = mkDefault config.powerManagement.enable; 71 + networking.networkmanager.enable = mkDefault true; 72 + programs.dconf.enable = mkDefault true; 73 + programs.gnupg.agent.pinentryPackage = mkDefault pkgs.pinentry-qt; 74 75 fonts.packages = with pkgs; [ noto-fonts ]; 76 xdg.mime.enable = true; 77 xdg.menus.enable = true; 78 xdg.icons.enable = true; 79 + xdg.portal.enable = mkDefault true; 80 + xdg.portal.extraPortals = mkDefault [ 81 pkgs.xdg-desktop-portal-gtk 82 ]; 83 84 # https://github.com/NixOS/nixpkgs/pull/247766#issuecomment-1722839259 85 + xdg.portal.config.deepin.default = mkDefault [ "gtk" ]; 86 87 environment.sessionVariables = { 88 NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-overrides}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas";
+9 -6
nixos/modules/services/x11/desktop-managers/enlightenment.nix
··· 4 lib, 5 ... 6 }: 7 let 8 9 e = pkgs.enlightenment; ··· 20 21 { 22 meta = { 23 - maintainers = lib.teams.enlightenment.members; 24 }; 25 26 imports = [ 27 - (lib.mkRenamedOptionModule 28 [ "services" "xserver" "desktopManager" "e19" "enable" ] 29 [ "services" "xserver" "desktopManager" "enlightenment" "enable" ] 30 ) ··· 32 33 options = { 34 35 - services.xserver.desktopManager.enlightenment.enable = lib.mkOption { 36 - type = lib.types.bool; 37 default = false; 38 description = "Enable the Enlightenment desktop environment."; 39 }; 40 41 }; 42 43 - config = lib.mkIf cfg.enable { 44 45 environment.systemPackages = with pkgs; [ 46 enlightenment.econnman ··· 102 103 services.udisks2.enable = true; 104 services.upower.enable = config.powerManagement.enable; 105 - services.libinput.enable = lib.mkDefault true; 106 107 services.dbus.packages = [ e.efl ]; 108
··· 4 lib, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 e = pkgs.enlightenment; ··· 23 24 { 25 meta = { 26 + maintainers = teams.enlightenment.members; 27 }; 28 29 imports = [ 30 + (mkRenamedOptionModule 31 [ "services" "xserver" "desktopManager" "e19" "enable" ] 32 [ "services" "xserver" "desktopManager" "enlightenment" "enable" ] 33 ) ··· 35 36 options = { 37 38 + services.xserver.desktopManager.enlightenment.enable = mkOption { 39 + type = types.bool; 40 default = false; 41 description = "Enable the Enlightenment desktop environment."; 42 }; 43 44 }; 45 46 + config = mkIf cfg.enable { 47 48 environment.systemPackages = with pkgs; [ 49 enlightenment.econnman ··· 105 106 services.udisks2.enable = true; 107 services.upower.enable = config.powerManagement.enable; 108 + services.libinput.enable = mkDefault true; 109 110 services.dbus.packages = [ e.efl ]; 111
+7 -4
nixos/modules/services/x11/desktop-managers/kodi.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.desktopManager.kodi; 9 in ··· 11 { 12 options = { 13 services.xserver.desktopManager.kodi = { 14 - enable = lib.mkOption { 15 - type = lib.types.bool; 16 default = false; 17 description = "Enable the kodi multimedia center."; 18 }; 19 20 - package = lib.mkPackageOption pkgs "kodi" { 21 example = "kodi.withPackages (p: with p; [ jellyfin pvr-iptvsimple vfs-sftp ])"; 22 }; 23 }; 24 }; 25 26 - config = lib.mkIf cfg.enable { 27 services.xserver.desktopManager.session = [ 28 { 29 name = "kodi";
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.desktopManager.kodi; 12 in ··· 14 { 15 options = { 16 services.xserver.desktopManager.kodi = { 17 + enable = mkOption { 18 + type = types.bool; 19 default = false; 20 description = "Enable the kodi multimedia center."; 21 }; 22 23 + package = mkPackageOption pkgs "kodi" { 24 example = "kodi.withPackages (p: with p; [ jellyfin pvr-iptvsimple vfs-sftp ])"; 25 }; 26 }; 27 }; 28 29 + config = mkIf cfg.enable { 30 services.xserver.desktopManager.session = [ 31 { 32 name = "kodi";
+7 -4
nixos/modules/services/x11/desktop-managers/lumina.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 xcfg = config.services.xserver; ··· 13 14 { 15 meta = { 16 - maintainers = lib.teams.lumina.members; 17 }; 18 19 options = { 20 21 - services.xserver.desktopManager.lumina.enable = lib.mkOption { 22 - type = lib.types.bool; 23 default = false; 24 description = "Enable the Lumina desktop manager"; 25 }; 26 27 }; 28 29 - config = lib.mkIf cfg.enable { 30 31 services.displayManager.sessionPackages = [ 32 pkgs.lumina.lumina
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 xcfg = config.services.xserver; ··· 16 17 { 18 meta = { 19 + maintainers = teams.lumina.members; 20 }; 21 22 options = { 23 24 + services.xserver.desktopManager.lumina.enable = mkOption { 25 + type = types.bool; 26 default = false; 27 description = "Enable the Lumina desktop manager"; 28 }; 29 30 }; 31 32 + config = mkIf cfg.enable { 33 34 services.displayManager.sessionPackages = [ 35 pkgs.lumina.lumina
+15 -12
nixos/modules/services/x11/desktop-managers/lxqt.nix
··· 1 { config, lib, pkgs, utils, ... }: 2 let 3 xcfg = config.services.xserver; 4 cfg = xcfg.desktopManager.lxqt; ··· 7 8 { 9 meta = { 10 - maintainers = lib.teams.lxqt.members; 11 }; 12 13 options = { 14 15 - services.xserver.desktopManager.lxqt.enable = lib.mkOption { 16 - type = lib.types.bool; 17 default = false; 18 description = "Enable the LXQt desktop manager"; 19 }; 20 21 - environment.lxqt.excludePackages = lib.mkOption { 22 default = []; 23 - example = lib.literalExpression "[ pkgs.lxqt.qterminal ]"; 24 - type = lib.types.listOf lib.types.package; 25 description = "Which LXQt packages to exclude from the default environment"; 26 }; 27 28 }; 29 30 - config = lib.mkIf cfg.enable { 31 32 - services.xserver.desktopManager.session = lib.singleton { 33 name = "lxqt"; 34 bgSupport = true; 35 start = '' ··· 59 # Link some extra directories in /run/current-system/software/share 60 environment.pathsToLink = [ "/share" ]; 61 62 - programs.gnupg.agent.pinentryPackage = lib.mkDefault pkgs.pinentry-qt; 63 64 # virtual file systems support for PCManFM-QT 65 services.gvfs.enable = true; 66 67 services.upower.enable = config.powerManagement.enable; 68 69 - services.libinput.enable = lib.mkDefault true; 70 71 - xdg.portal.lxqt.enable = lib.mkDefault true; 72 73 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050804 74 - xdg.portal.config.lxqt.default = lib.mkDefault [ "lxqt" "gtk" ]; 75 }; 76 77 }
··· 1 { config, lib, pkgs, utils, ... }: 2 + 3 + with lib; 4 + 5 let 6 xcfg = config.services.xserver; 7 cfg = xcfg.desktopManager.lxqt; ··· 10 11 { 12 meta = { 13 + maintainers = teams.lxqt.members; 14 }; 15 16 options = { 17 18 + services.xserver.desktopManager.lxqt.enable = mkOption { 19 + type = types.bool; 20 default = false; 21 description = "Enable the LXQt desktop manager"; 22 }; 23 24 + environment.lxqt.excludePackages = mkOption { 25 default = []; 26 + example = literalExpression "[ pkgs.lxqt.qterminal ]"; 27 + type = types.listOf types.package; 28 description = "Which LXQt packages to exclude from the default environment"; 29 }; 30 31 }; 32 33 + config = mkIf cfg.enable { 34 35 + services.xserver.desktopManager.session = singleton { 36 name = "lxqt"; 37 bgSupport = true; 38 start = '' ··· 62 # Link some extra directories in /run/current-system/software/share 63 environment.pathsToLink = [ "/share" ]; 64 65 + programs.gnupg.agent.pinentryPackage = mkDefault pkgs.pinentry-qt; 66 67 # virtual file systems support for PCManFM-QT 68 services.gvfs.enable = true; 69 70 services.upower.enable = config.powerManagement.enable; 71 72 + services.libinput.enable = mkDefault true; 73 74 + xdg.portal.lxqt.enable = mkDefault true; 75 76 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050804 77 + xdg.portal.config.lxqt.default = mkDefault [ "lxqt" "gtk" ]; 78 }; 79 80 }
+24 -23
nixos/modules/services/x11/desktop-managers/mate.nix
··· 5 utils, 6 ... 7 }: 8 let 9 10 xcfg = config.services.xserver; ··· 16 options = { 17 18 services.xserver.desktopManager.mate = { 19 - enable = lib.mkOption { 20 - type = lib.types.bool; 21 default = false; 22 description = "Enable the MATE desktop environment"; 23 }; 24 25 - debug = lib.mkEnableOption "mate-session debug messages"; 26 27 - extraPanelApplets = lib.mkOption { 28 default = [ ]; 29 - example = lib.literalExpression "with pkgs.mate; [ mate-applets ]"; 30 - type = lib.types.listOf lib.types.package; 31 description = "Extra applets to add to mate-panel."; 32 }; 33 34 - extraCajaExtensions = lib.mkOption { 35 default = [ ]; 36 example = lib.literalExpression "with pkgs.mate; [ caja-extensions ]"; 37 - type = lib.types.listOf lib.types.package; 38 description = "Extra extensions to add to caja."; 39 }; 40 41 - enableWaylandSession = lib.mkEnableOption "MATE Wayland session"; 42 }; 43 44 - environment.mate.excludePackages = lib.mkOption { 45 default = [ ]; 46 - example = lib.literalExpression "[ pkgs.mate.mate-terminal pkgs.mate.pluma ]"; 47 - type = lib.types.listOf lib.types.package; 48 description = "Which MATE packages to exclude from the default environment"; 49 }; 50 51 }; 52 53 - config = lib.mkMerge [ 54 - (lib.mkIf (cfg.enable || cfg.enableWaylandSession) { 55 services.displayManager.sessionPackages = [ 56 pkgs.mate.mate-session-manager 57 ]; 58 59 # Debugging 60 - environment.sessionVariables.MATE_SESSION_DEBUG = lib.mkIf cfg.debug "1"; 61 62 environment.systemPackages = utils.removePackagesByName ( 63 pkgs.mate.basePackages ··· 80 81 programs.dconf.enable = true; 82 # Shell integration for VTE terminals 83 - programs.bash.vteIntegration = lib.mkDefault true; 84 - programs.zsh.vteIntegration = lib.mkDefault true; 85 86 # Mate uses this for printing 87 - programs.system-config-printer.enable = ( 88 - lib.mkIf config.services.printing.enable (lib.mkDefault true) 89 - ); 90 91 services.gnome.at-spi2-core.enable = true; 92 services.gnome.glib-networking.enable = true; ··· 94 services.udev.packages = [ pkgs.mate.mate-settings-daemon ]; 95 services.gvfs.enable = true; 96 services.upower.enable = config.powerManagement.enable; 97 - services.libinput.enable = lib.mkDefault true; 98 99 security.pam.services.mate-screensaver.unixAuth = true; 100 101 - xdg.portal.configPackages = lib.mkDefault [ pkgs.mate.mate-desktop ]; 102 103 environment.pathsToLink = [ "/share" ]; 104 }) 105 - (lib.mkIf cfg.enableWaylandSession { 106 programs.wayfire.enable = true; 107 programs.wayfire.plugins = [ pkgs.wayfirePlugins.firedecor ]; 108
··· 5 utils, 6 ... 7 }: 8 + 9 + with lib; 10 + 11 let 12 13 xcfg = config.services.xserver; ··· 19 options = { 20 21 services.xserver.desktopManager.mate = { 22 + enable = mkOption { 23 + type = types.bool; 24 default = false; 25 description = "Enable the MATE desktop environment"; 26 }; 27 28 + debug = mkEnableOption "mate-session debug messages"; 29 30 + extraPanelApplets = mkOption { 31 default = [ ]; 32 + example = literalExpression "with pkgs.mate; [ mate-applets ]"; 33 + type = types.listOf types.package; 34 description = "Extra applets to add to mate-panel."; 35 }; 36 37 + extraCajaExtensions = mkOption { 38 default = [ ]; 39 example = lib.literalExpression "with pkgs.mate; [ caja-extensions ]"; 40 + type = types.listOf types.package; 41 description = "Extra extensions to add to caja."; 42 }; 43 44 + enableWaylandSession = mkEnableOption "MATE Wayland session"; 45 }; 46 47 + environment.mate.excludePackages = mkOption { 48 default = [ ]; 49 + example = literalExpression "[ pkgs.mate.mate-terminal pkgs.mate.pluma ]"; 50 + type = types.listOf types.package; 51 description = "Which MATE packages to exclude from the default environment"; 52 }; 53 54 }; 55 56 + config = mkMerge [ 57 + (mkIf (cfg.enable || cfg.enableWaylandSession) { 58 services.displayManager.sessionPackages = [ 59 pkgs.mate.mate-session-manager 60 ]; 61 62 # Debugging 63 + environment.sessionVariables.MATE_SESSION_DEBUG = mkIf cfg.debug "1"; 64 65 environment.systemPackages = utils.removePackagesByName ( 66 pkgs.mate.basePackages ··· 83 84 programs.dconf.enable = true; 85 # Shell integration for VTE terminals 86 + programs.bash.vteIntegration = mkDefault true; 87 + programs.zsh.vteIntegration = mkDefault true; 88 89 # Mate uses this for printing 90 + programs.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true)); 91 92 services.gnome.at-spi2-core.enable = true; 93 services.gnome.glib-networking.enable = true; ··· 95 services.udev.packages = [ pkgs.mate.mate-settings-daemon ]; 96 services.gvfs.enable = true; 97 services.upower.enable = config.powerManagement.enable; 98 + services.libinput.enable = mkDefault true; 99 100 security.pam.services.mate-screensaver.unixAuth = true; 101 102 + xdg.portal.configPackages = mkDefault [ pkgs.mate.mate-desktop ]; 103 104 environment.pathsToLink = [ "/share" ]; 105 }) 106 + (mkIf cfg.enableWaylandSession { 107 programs.wayfire.enable = true; 108 programs.wayfire.plugins = [ pkgs.wayfirePlugins.firedecor ]; 109
+6 -5
nixos/modules/services/x11/desktop-managers/none.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 runXdgAutostart = config.services.xserver.desktopManager.runXdgAutostartIfNone; 9 in 10 { 11 options = { 12 - services.xserver.desktopManager.runXdgAutostartIfNone = lib.mkOption { 13 - type = lib.types.bool; 14 default = false; 15 description = '' 16 Whether to run XDG autostart files for sessions without a desktop manager ··· 26 }; 27 }; 28 29 - config = lib.mkMerge [ 30 { 31 services.xserver.desktopManager.session = [ 32 { 33 name = "none"; 34 - start = lib.optionalString runXdgAutostart '' 35 /run/current-system/systemd/bin/systemctl --user start xdg-autostart-if-no-desktop-manager.target 36 ''; 37 } 38 ]; 39 } 40 - (lib.mkIf runXdgAutostart { 41 systemd.user.targets.xdg-autostart-if-no-desktop-manager = { 42 description = "Run XDG autostart files"; 43 # From `plasma-workspace`, `share/systemd/user/plasma-workspace@.target`.
··· 4 pkgs, 5 ... 6 }: 7 + with lib; 8 let 9 runXdgAutostart = config.services.xserver.desktopManager.runXdgAutostartIfNone; 10 in 11 { 12 options = { 13 + services.xserver.desktopManager.runXdgAutostartIfNone = mkOption { 14 + type = types.bool; 15 default = false; 16 description = '' 17 Whether to run XDG autostart files for sessions without a desktop manager ··· 27 }; 28 }; 29 30 + config = mkMerge [ 31 { 32 services.xserver.desktopManager.session = [ 33 { 34 name = "none"; 35 + start = optionalString runXdgAutostart '' 36 /run/current-system/systemd/bin/systemctl --user start xdg-autostart-if-no-desktop-manager.target 37 ''; 38 } 39 ]; 40 } 41 + (mkIf runXdgAutostart { 42 systemd.user.targets.xdg-autostart-if-no-desktop-manager = { 43 description = "Run XDG autostart files"; 44 # From `plasma-workspace`, `share/systemd/user/plasma-workspace@.target`.
+53 -50
nixos/modules/services/x11/desktop-managers/pantheon.nix
··· 1 { config, lib, utils, pkgs, ... }: 2 let 3 4 cfg = config.services.xserver.desktopManager.pantheon; ··· 16 17 meta = { 18 doc = ./pantheon.md; 19 - maintainers = lib.teams.pantheon.members; 20 }; 21 22 options = { ··· 24 services.pantheon = { 25 26 contractor = { 27 - enable = lib.mkEnableOption "contractor, a desktop-wide extension service used by Pantheon"; 28 }; 29 30 - apps.enable = lib.mkEnableOption "Pantheon default applications"; 31 32 }; 33 34 services.xserver.desktopManager.pantheon = { 35 - enable = lib.mkOption { 36 - type = lib.types.bool; 37 default = false; 38 description = "Enable the pantheon desktop manager"; 39 }; 40 41 - sessionPath = lib.mkOption { 42 default = []; 43 - type = lib.types.listOf lib.types.package; 44 - example = lib.literalExpression "[ pkgs.gpaste ]"; 45 description = '' 46 Additional list of packages to be added to the session search path. 47 Useful for GSettings-conditional autostart. ··· 50 ''; 51 }; 52 53 - extraWingpanelIndicators = lib.mkOption { 54 default = null; 55 - type = with lib.types; nullOr (listOf package); 56 description = "Indicators to add to Wingpanel."; 57 }; 58 59 - extraSwitchboardPlugs = lib.mkOption { 60 default = null; 61 - type = with lib.types; nullOr (listOf package); 62 description = "Plugs to add to Switchboard."; 63 }; 64 65 - extraGSettingsOverrides = lib.mkOption { 66 default = ""; 67 - type = lib.types.lines; 68 description = "Additional gsettings overrides."; 69 }; 70 71 - extraGSettingsOverridePackages = lib.mkOption { 72 default = []; 73 - type = lib.types.listOf lib.types.path; 74 description = "List of packages for which gsettings are overridden."; 75 }; 76 77 - debug = lib.mkEnableOption "gnome-session debug messages"; 78 79 }; 80 81 - environment.pantheon.excludePackages = lib.mkOption { 82 default = []; 83 - example = lib.literalExpression "[ pkgs.pantheon.elementary-camera ]"; 84 - type = lib.types.listOf lib.types.package; 85 description = "Which packages pantheon should exclude from the default environment"; 86 }; 87 88 }; 89 90 91 - config = lib.mkMerge [ 92 - (lib.mkIf cfg.enable { 93 services.xserver.desktopManager.pantheon.sessionPath = utils.removePackagesByName [ 94 pkgs.pantheon.pantheon-agent-geoclue2 95 ] config.environment.pantheon.excludePackages; ··· 98 99 # Ensure lightdm is used when Pantheon is enabled 100 # Without it screen locking will be nonfunctional because of the use of lightlocker 101 - warnings = lib.optional (config.services.xserver.displayManager.lightdm.enable != true) 102 '' 103 Using Pantheon without LightDM as a displayManager will break screenlocking from the UI. 104 ''; 105 106 - services.xserver.displayManager.lightdm.greeters.pantheon.enable = lib.mkDefault true; 107 108 # Without this, elementary LightDM greeter will pre-select non-existent `default` session 109 # https://github.com/elementary/greeter/issues/368 110 - services.displayManager.defaultSession = lib.mkDefault "pantheon"; 111 112 services.xserver.displayManager.sessionCommands = '' 113 if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then 114 true 115 - ${lib.concatMapStrings (p: '' 116 if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then 117 export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name} 118 fi ··· 126 ''; 127 128 # Default services 129 - hardware.bluetooth.enable = lib.mkDefault true; 130 security.polkit.enable = true; 131 services.accounts-daemon.enable = true; 132 services.bamf.enable = true; 133 - services.colord.enable = lib.mkDefault true; 134 - services.fwupd.enable = lib.mkDefault true; 135 # TODO: Enable once #177946 is resolved 136 # services.packagekit.enable = mkDefault true; 137 - services.power-profiles-daemon.enable = lib.mkDefault true; 138 - services.touchegg.enable = lib.mkDefault true; 139 services.touchegg.package = pkgs.pantheon.touchegg; 140 - services.tumbler.enable = lib.mkDefault true; 141 - services.system-config-printer.enable = (lib.mkIf config.services.printing.enable (lib.mkDefault true)); 142 services.dbus.packages = with pkgs.pantheon; [ 143 switchboard-plug-power 144 elementary-default-settings # accountsservice extensions 145 ]; 146 - services.pantheon.apps.enable = lib.mkDefault true; 147 - services.pantheon.contractor.enable = lib.mkDefault true; 148 services.gnome.at-spi2-core.enable = true; 149 services.gnome.evolution-data-server.enable = true; 150 services.gnome.glib-networking.enable = true; 151 services.gnome.gnome-keyring.enable = true; 152 services.gvfs.enable = true; 153 - services.gnome.rygel.enable = lib.mkDefault true; 154 services.udisks2.enable = true; 155 services.upower.enable = config.powerManagement.enable; 156 - services.libinput.enable = lib.mkDefault true; 157 - services.switcherooControl.enable = lib.mkDefault true; 158 services.xserver.updateDbusEnvironment = true; 159 - services.zeitgeist.enable = lib.mkDefault true; 160 - services.geoclue2.enable = lib.mkDefault true; 161 # pantheon has pantheon-agent-geoclue2 162 services.geoclue2.enableDemoAgent = false; 163 services.geoclue2.appConfig."io.elementary.desktop.agent-geoclue2" = { ··· 170 # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1443 171 pkgs.pantheon.mutter 172 ]; 173 - services.orca.enable = lib.mkDefault (notExcluded pkgs.orca); 174 systemd.packages = with pkgs; [ 175 gnome-session 176 pantheon.gala ··· 178 pantheon.elementary-session-settings 179 ]; 180 programs.dconf.enable = true; 181 - networking.networkmanager.enable = lib.mkDefault true; 182 183 systemd.user.targets."gnome-session-x11-services".wants = [ 184 "org.gnome.SettingsDaemon.XSettings.service" ··· 243 xdg-desktop-portal-pantheon 244 ]); 245 246 - xdg.portal.configPackages = lib.mkDefault [ pkgs.pantheon.elementary-default-settings ]; 247 248 # Override GSettings schemas 249 environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; 250 251 - environment.sessionVariables.GNOME_SESSION_DEBUG = lib.mkIf cfg.debug "1"; 252 253 environment.pathsToLink = [ 254 # FIXME: modules should link subdirs of `/share` rather than relying on this ··· 262 programs.nm-applet.indicator = false; 263 264 # Shell integration for VTE terminals 265 - programs.bash.vteIntegration = lib.mkDefault true; 266 - programs.zsh.vteIntegration = lib.mkDefault true; 267 268 # Default Fonts 269 fonts.packages = with pkgs; [ ··· 279 }; 280 }) 281 282 - (lib.mkIf serviceCfg.apps.enable { 283 - programs.evince.enable = lib.mkDefault (notExcluded pkgs.evince); 284 - programs.file-roller.enable = lib.mkDefault (notExcluded pkgs.file-roller); 285 286 environment.systemPackages = utils.removePackagesByName ([ 287 pkgs.gnome-font-viewer ··· 312 ]; 313 }) 314 315 - (lib.mkIf serviceCfg.contractor.enable { 316 environment.systemPackages = with pkgs.pantheon; [ 317 contractor 318 file-roller-contract
··· 1 { config, lib, utils, pkgs, ... }: 2 + 3 + with lib; 4 + 5 let 6 7 cfg = config.services.xserver.desktopManager.pantheon; ··· 19 20 meta = { 21 doc = ./pantheon.md; 22 + maintainers = teams.pantheon.members; 23 }; 24 25 options = { ··· 27 services.pantheon = { 28 29 contractor = { 30 + enable = mkEnableOption "contractor, a desktop-wide extension service used by Pantheon"; 31 }; 32 33 + apps.enable = mkEnableOption "Pantheon default applications"; 34 35 }; 36 37 services.xserver.desktopManager.pantheon = { 38 + enable = mkOption { 39 + type = types.bool; 40 default = false; 41 description = "Enable the pantheon desktop manager"; 42 }; 43 44 + sessionPath = mkOption { 45 default = []; 46 + type = types.listOf types.package; 47 + example = literalExpression "[ pkgs.gpaste ]"; 48 description = '' 49 Additional list of packages to be added to the session search path. 50 Useful for GSettings-conditional autostart. ··· 53 ''; 54 }; 55 56 + extraWingpanelIndicators = mkOption { 57 default = null; 58 + type = with types; nullOr (listOf package); 59 description = "Indicators to add to Wingpanel."; 60 }; 61 62 + extraSwitchboardPlugs = mkOption { 63 default = null; 64 + type = with types; nullOr (listOf package); 65 description = "Plugs to add to Switchboard."; 66 }; 67 68 + extraGSettingsOverrides = mkOption { 69 default = ""; 70 + type = types.lines; 71 description = "Additional gsettings overrides."; 72 }; 73 74 + extraGSettingsOverridePackages = mkOption { 75 default = []; 76 + type = types.listOf types.path; 77 description = "List of packages for which gsettings are overridden."; 78 }; 79 80 + debug = mkEnableOption "gnome-session debug messages"; 81 82 }; 83 84 + environment.pantheon.excludePackages = mkOption { 85 default = []; 86 + example = literalExpression "[ pkgs.pantheon.elementary-camera ]"; 87 + type = types.listOf types.package; 88 description = "Which packages pantheon should exclude from the default environment"; 89 }; 90 91 }; 92 93 94 + config = mkMerge [ 95 + (mkIf cfg.enable { 96 services.xserver.desktopManager.pantheon.sessionPath = utils.removePackagesByName [ 97 pkgs.pantheon.pantheon-agent-geoclue2 98 ] config.environment.pantheon.excludePackages; ··· 101 102 # Ensure lightdm is used when Pantheon is enabled 103 # Without it screen locking will be nonfunctional because of the use of lightlocker 104 + warnings = optional (config.services.xserver.displayManager.lightdm.enable != true) 105 '' 106 Using Pantheon without LightDM as a displayManager will break screenlocking from the UI. 107 ''; 108 109 + services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true; 110 111 # Without this, elementary LightDM greeter will pre-select non-existent `default` session 112 # https://github.com/elementary/greeter/issues/368 113 + services.displayManager.defaultSession = mkDefault "pantheon"; 114 115 services.xserver.displayManager.sessionCommands = '' 116 if test "$XDG_CURRENT_DESKTOP" = "Pantheon"; then 117 true 118 + ${concatMapStrings (p: '' 119 if [ -d "${p}/share/gsettings-schemas/${p.name}" ]; then 120 export XDG_DATA_DIRS=$XDG_DATA_DIRS''${XDG_DATA_DIRS:+:}${p}/share/gsettings-schemas/${p.name} 121 fi ··· 129 ''; 130 131 # Default services 132 + hardware.bluetooth.enable = mkDefault true; 133 security.polkit.enable = true; 134 services.accounts-daemon.enable = true; 135 services.bamf.enable = true; 136 + services.colord.enable = mkDefault true; 137 + services.fwupd.enable = mkDefault true; 138 # TODO: Enable once #177946 is resolved 139 # services.packagekit.enable = mkDefault true; 140 + services.power-profiles-daemon.enable = mkDefault true; 141 + services.touchegg.enable = mkDefault true; 142 services.touchegg.package = pkgs.pantheon.touchegg; 143 + services.tumbler.enable = mkDefault true; 144 + services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true)); 145 services.dbus.packages = with pkgs.pantheon; [ 146 switchboard-plug-power 147 elementary-default-settings # accountsservice extensions 148 ]; 149 + services.pantheon.apps.enable = mkDefault true; 150 + services.pantheon.contractor.enable = mkDefault true; 151 services.gnome.at-spi2-core.enable = true; 152 services.gnome.evolution-data-server.enable = true; 153 services.gnome.glib-networking.enable = true; 154 services.gnome.gnome-keyring.enable = true; 155 services.gvfs.enable = true; 156 + services.gnome.rygel.enable = mkDefault true; 157 services.udisks2.enable = true; 158 services.upower.enable = config.powerManagement.enable; 159 + services.libinput.enable = mkDefault true; 160 + services.switcherooControl.enable = mkDefault true; 161 services.xserver.updateDbusEnvironment = true; 162 + services.zeitgeist.enable = mkDefault true; 163 + services.geoclue2.enable = mkDefault true; 164 # pantheon has pantheon-agent-geoclue2 165 services.geoclue2.enableDemoAgent = false; 166 services.geoclue2.appConfig."io.elementary.desktop.agent-geoclue2" = { ··· 173 # https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1443 174 pkgs.pantheon.mutter 175 ]; 176 + services.orca.enable = mkDefault (notExcluded pkgs.orca); 177 systemd.packages = with pkgs; [ 178 gnome-session 179 pantheon.gala ··· 181 pantheon.elementary-session-settings 182 ]; 183 programs.dconf.enable = true; 184 + networking.networkmanager.enable = mkDefault true; 185 186 systemd.user.targets."gnome-session-x11-services".wants = [ 187 "org.gnome.SettingsDaemon.XSettings.service" ··· 246 xdg-desktop-portal-pantheon 247 ]); 248 249 + xdg.portal.configPackages = mkDefault [ pkgs.pantheon.elementary-default-settings ]; 250 251 # Override GSettings schemas 252 environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR = "${nixos-gsettings-desktop-schemas}/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas"; 253 254 + environment.sessionVariables.GNOME_SESSION_DEBUG = mkIf cfg.debug "1"; 255 256 environment.pathsToLink = [ 257 # FIXME: modules should link subdirs of `/share` rather than relying on this ··· 265 programs.nm-applet.indicator = false; 266 267 # Shell integration for VTE terminals 268 + programs.bash.vteIntegration = mkDefault true; 269 + programs.zsh.vteIntegration = mkDefault true; 270 271 # Default Fonts 272 fonts.packages = with pkgs; [ ··· 282 }; 283 }) 284 285 + (mkIf serviceCfg.apps.enable { 286 + programs.evince.enable = mkDefault (notExcluded pkgs.evince); 287 + programs.file-roller.enable = mkDefault (notExcluded pkgs.file-roller); 288 289 environment.systemPackages = utils.removePackagesByName ([ 290 pkgs.gnome-font-viewer ··· 315 ]; 316 }) 317 318 + (mkIf serviceCfg.contractor.enable { 319 environment.systemPackages = with pkgs.pantheon; [ 320 contractor 321 file-roller-contract
+10 -7
nixos/modules/services/x11/desktop-managers/retroarch.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.desktopManager.retroarch; 9 10 in 11 { 12 options.services.xserver.desktopManager.retroarch = { 13 - enable = lib.mkEnableOption "RetroArch"; 14 15 - package = lib.mkPackageOption pkgs "retroarch" { 16 example = "retroarch-full"; 17 }; 18 19 - extraArgs = lib.mkOption { 20 - type = lib.types.listOf lib.types.str; 21 default = [ ]; 22 example = [ 23 "--verbose" ··· 27 }; 28 }; 29 30 - config = lib.mkIf cfg.enable { 31 services.xserver.desktopManager.session = [ 32 { 33 name = "RetroArch"; 34 start = '' 35 - ${cfg.package}/bin/retroarch -f ${lib.escapeShellArgs cfg.extraArgs} & 36 waitPID=$! 37 ''; 38 } ··· 41 environment.systemPackages = [ cfg.package ]; 42 }; 43 44 - meta.maintainers = with lib.maintainers; [ j0hax ]; 45 }
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.desktopManager.retroarch; 12 13 in 14 { 15 options.services.xserver.desktopManager.retroarch = { 16 + enable = mkEnableOption "RetroArch"; 17 18 + package = mkPackageOption pkgs "retroarch" { 19 example = "retroarch-full"; 20 }; 21 22 + extraArgs = mkOption { 23 + type = types.listOf types.str; 24 default = [ ]; 25 example = [ 26 "--verbose" ··· 30 }; 31 }; 32 33 + config = mkIf cfg.enable { 34 services.xserver.desktopManager.session = [ 35 { 36 name = "RetroArch"; 37 start = '' 38 + ${cfg.package}/bin/retroarch -f ${escapeShellArgs cfg.extraArgs} & 39 waitPID=$! 40 ''; 41 } ··· 44 environment.systemPackages = [ cfg.package ]; 45 }; 46 47 + meta.maintainers = with maintainers; [ j0hax ]; 48 }
+18 -15
nixos/modules/services/x11/desktop-managers/surf-display.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.desktopManager.surf-display; 9 ··· 48 { 49 options = { 50 services.xserver.desktopManager.surf-display = { 51 - enable = lib.mkEnableOption "surf-display as a kiosk browser session"; 52 53 - defaultWwwUri = lib.mkOption { 54 - type = lib.types.str; 55 default = "${pkgs.surf-display}/share/surf-display/empty-page.html"; 56 - defaultText = lib.literalExpression ''"''${pkgs.surf-display}/share/surf-display/empty-page.html"''; 57 example = "https://www.example.com/"; 58 description = "Default URI to display."; 59 }; 60 61 - inactivityInterval = lib.mkOption { 62 - type = lib.types.int; 63 default = 300; 64 example = 0; 65 description = '' ··· 72 ''; 73 }; 74 75 - screensaverSettings = lib.mkOption { 76 - type = lib.types.separatedString " "; 77 default = ""; 78 description = '' 79 Screensaver settings, see `man 1 xset` for possible options. 80 ''; 81 }; 82 83 - pointerButtonMap = lib.mkOption { 84 - type = lib.types.str; 85 default = "1 0 0 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; 86 description = '' 87 Disable right and middle pointer device click in browser sessions ··· 90 ''; 91 }; 92 93 - hideIdlePointer = lib.mkOption { 94 - type = lib.types.str; 95 default = "yes"; 96 example = "no"; 97 description = "Hide idle mouse pointer."; 98 }; 99 100 - extraConfig = lib.mkOption { 101 - type = lib.types.lines; 102 default = ""; 103 example = '' 104 # Enforce fixed resolution for all displays (default: not set): ··· 121 }; 122 }; 123 124 - config = lib.mkIf cfg.enable { 125 services.displayManager.sessionPackages = [ 126 pkgs.surf-display 127 ];
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.desktopManager.surf-display; 12 ··· 51 { 52 options = { 53 services.xserver.desktopManager.surf-display = { 54 + enable = mkEnableOption "surf-display as a kiosk browser session"; 55 56 + defaultWwwUri = mkOption { 57 + type = types.str; 58 default = "${pkgs.surf-display}/share/surf-display/empty-page.html"; 59 + defaultText = literalExpression ''"''${pkgs.surf-display}/share/surf-display/empty-page.html"''; 60 example = "https://www.example.com/"; 61 description = "Default URI to display."; 62 }; 63 64 + inactivityInterval = mkOption { 65 + type = types.int; 66 default = 300; 67 example = 0; 68 description = '' ··· 75 ''; 76 }; 77 78 + screensaverSettings = mkOption { 79 + type = types.separatedString " "; 80 default = ""; 81 description = '' 82 Screensaver settings, see `man 1 xset` for possible options. 83 ''; 84 }; 85 86 + pointerButtonMap = mkOption { 87 + type = types.str; 88 default = "1 0 0 4 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"; 89 description = '' 90 Disable right and middle pointer device click in browser sessions ··· 93 ''; 94 }; 95 96 + hideIdlePointer = mkOption { 97 + type = types.str; 98 default = "yes"; 99 example = "no"; 100 description = "Hide idle mouse pointer."; 101 }; 102 103 + extraConfig = mkOption { 104 + type = types.lines; 105 default = ""; 106 example = '' 107 # Enforce fixed resolution for all displays (default: not set): ··· 124 }; 125 }; 126 127 + config = mkIf cfg.enable { 128 services.displayManager.sessionPackages = [ 129 pkgs.surf-display 130 ];
+34 -31
nixos/modules/services/x11/desktop-managers/xfce.nix
··· 1 { config, lib, pkgs, utils, ... }: 2 let 3 cfg = config.services.xserver.desktopManager.xfce; 4 excludePackages = config.environment.xfce.excludePackages; ··· 6 in 7 { 8 meta = { 9 - maintainers = lib.teams.xfce.members; 10 }; 11 12 imports = [ 13 # added 2019-08-18 14 # needed to preserve some semblance of UI familarity 15 # with original XFCE module 16 - (lib.mkRenamedOptionModule 17 [ "services" "xserver" "desktopManager" "xfce4-14" "extraSessionCommands" ] 18 [ "services" "xserver" "displayManager" "sessionCommands" ]) 19 20 # added 2019-11-04 21 # xfce4-14 module removed and promoted to xfce. 22 # Needed for configs that used xfce4-14 module to migrate to this one. 23 - (lib.mkRenamedOptionModule 24 [ "services" "xserver" "desktopManager" "xfce4-14" "enable" ] 25 [ "services" "xserver" "desktopManager" "xfce" "enable" ]) 26 - (lib.mkRenamedOptionModule 27 [ "services" "xserver" "desktopManager" "xfce4-14" "noDesktop" ] 28 [ "services" "xserver" "desktopManager" "xfce" "noDesktop" ]) 29 - (lib.mkRenamedOptionModule 30 [ "services" "xserver" "desktopManager" "xfce4-14" "enableXfwm" ] 31 [ "services" "xserver" "desktopManager" "xfce" "enableXfwm" ]) 32 - (lib.mkRenamedOptionModule 33 [ "services" "xserver" "desktopManager" "xfce" "extraSessionCommands" ] 34 [ "services" "xserver" "displayManager" "sessionCommands" ]) 35 - (lib.mkRemovedOptionModule [ "services" "xserver" "desktopManager" "xfce" "screenLock" ] "") 36 37 # added 2022-06-26 38 # thunar has its own module 39 - (lib.mkRenamedOptionModule 40 [ "services" "xserver" "desktopManager" "xfce" "thunarPlugins" ] 41 [ "programs" "thunar" "plugins" ]) 42 ]; 43 44 options = { 45 services.xserver.desktopManager.xfce = { 46 - enable = lib.mkOption { 47 - type = lib.types.bool; 48 default = false; 49 description = "Enable the Xfce desktop environment."; 50 }; 51 52 - noDesktop = lib.mkOption { 53 - type = lib.types.bool; 54 default = false; 55 description = "Don't install XFCE desktop components (xfdesktop and panel)."; 56 }; 57 58 - enableXfwm = lib.mkOption { 59 - type = lib.types.bool; 60 default = true; 61 description = "Enable the XFWM (default) window manager."; 62 }; 63 64 - enableScreensaver = lib.mkOption { 65 - type = lib.types.bool; 66 default = true; 67 description = "Enable the XFCE screensaver."; 68 }; 69 70 - enableWaylandSession = lib.mkEnableOption "the experimental Xfce Wayland session"; 71 72 - waylandSessionCompositor = lib.mkOption { 73 type = lib.types.str; 74 default = ""; 75 example = "wayfire"; ··· 84 }; 85 }; 86 87 - environment.xfce.excludePackages = lib.mkOption { 88 default = []; 89 - example = lib.literalExpression "[ pkgs.xfce.xfce4-volumed-pulse ]"; 90 - type = lib.types.listOf lib.types.package; 91 description = "Which packages XFCE should exclude from the default environment"; 92 }; 93 }; 94 95 - config = lib.mkIf cfg.enable { 96 environment.systemPackages = utils.removePackagesByName (with pkgs; [ 97 glib # for gsettings 98 gtk3.out # gtk-update-icon-cache ··· 144 xfce.xfdesktop 145 ] ++ lib.optional cfg.enableScreensaver xfce.xfce4-screensaver) excludePackages; 146 147 - programs.gnupg.agent.pinentryPackage = lib.mkDefault pkgs.pinentry-gtk2; 148 programs.xfconf.enable = true; 149 programs.thunar.enable = true; 150 - programs.labwc.enable = lib.mkDefault (cfg.enableWaylandSession && ( 151 cfg.waylandSessionCompositor == "" || lib.substring 0 5 cfg.waylandSessionCompositor == "labwc")); 152 153 environment.pathsToLink = [ ··· 170 171 # Copied from https://gitlab.xfce.org/xfce/xfce4-session/-/blob/xfce4-session-4.19.2/xfce-wayland.desktop.in 172 # to maintain consistent l10n state with X11 session file and to support the waylandSessionCompositor option. 173 - services.displayManager.sessionPackages = lib.optionals cfg.enableWaylandSession [ 174 ((pkgs.writeTextDir "share/wayland-sessions/xfce-wayland.desktop" '' 175 [Desktop Entry] 176 Version=1.0 ··· 195 services.gnome.glib-networking.enable = true; 196 services.gvfs.enable = true; 197 services.tumbler.enable = true; 198 - services.system-config-printer.enable = (lib.mkIf config.services.printing.enable (lib.mkDefault true)); 199 - services.libinput.enable = lib.mkDefault true; # used in xfce4-settings-manager 200 - services.colord.enable = lib.mkDefault true; 201 202 # Enable default programs 203 programs.dconf.enable = true; 204 205 # Shell integration for VTE terminals 206 - programs.bash.vteIntegration = lib.mkDefault true; 207 - programs.zsh.vteIntegration = lib.mkDefault true; 208 209 # Systemd services 210 systemd.packages = utils.removePackagesByName (with pkgs.xfce; [ ··· 213 214 security.pam.services.xfce4-screensaver.unixAuth = cfg.enableScreensaver; 215 216 - xdg.portal.configPackages = lib.mkDefault [ pkgs.xfce.xfce4-session ]; 217 }; 218 }
··· 1 { config, lib, pkgs, utils, ... }: 2 + 3 + with lib; 4 + 5 let 6 cfg = config.services.xserver.desktopManager.xfce; 7 excludePackages = config.environment.xfce.excludePackages; ··· 9 in 10 { 11 meta = { 12 + maintainers = teams.xfce.members; 13 }; 14 15 imports = [ 16 # added 2019-08-18 17 # needed to preserve some semblance of UI familarity 18 # with original XFCE module 19 + (mkRenamedOptionModule 20 [ "services" "xserver" "desktopManager" "xfce4-14" "extraSessionCommands" ] 21 [ "services" "xserver" "displayManager" "sessionCommands" ]) 22 23 # added 2019-11-04 24 # xfce4-14 module removed and promoted to xfce. 25 # Needed for configs that used xfce4-14 module to migrate to this one. 26 + (mkRenamedOptionModule 27 [ "services" "xserver" "desktopManager" "xfce4-14" "enable" ] 28 [ "services" "xserver" "desktopManager" "xfce" "enable" ]) 29 + (mkRenamedOptionModule 30 [ "services" "xserver" "desktopManager" "xfce4-14" "noDesktop" ] 31 [ "services" "xserver" "desktopManager" "xfce" "noDesktop" ]) 32 + (mkRenamedOptionModule 33 [ "services" "xserver" "desktopManager" "xfce4-14" "enableXfwm" ] 34 [ "services" "xserver" "desktopManager" "xfce" "enableXfwm" ]) 35 + (mkRenamedOptionModule 36 [ "services" "xserver" "desktopManager" "xfce" "extraSessionCommands" ] 37 [ "services" "xserver" "displayManager" "sessionCommands" ]) 38 + (mkRemovedOptionModule [ "services" "xserver" "desktopManager" "xfce" "screenLock" ] "") 39 40 # added 2022-06-26 41 # thunar has its own module 42 + (mkRenamedOptionModule 43 [ "services" "xserver" "desktopManager" "xfce" "thunarPlugins" ] 44 [ "programs" "thunar" "plugins" ]) 45 ]; 46 47 options = { 48 services.xserver.desktopManager.xfce = { 49 + enable = mkOption { 50 + type = types.bool; 51 default = false; 52 description = "Enable the Xfce desktop environment."; 53 }; 54 55 + noDesktop = mkOption { 56 + type = types.bool; 57 default = false; 58 description = "Don't install XFCE desktop components (xfdesktop and panel)."; 59 }; 60 61 + enableXfwm = mkOption { 62 + type = types.bool; 63 default = true; 64 description = "Enable the XFWM (default) window manager."; 65 }; 66 67 + enableScreensaver = mkOption { 68 + type = types.bool; 69 default = true; 70 description = "Enable the XFCE screensaver."; 71 }; 72 73 + enableWaylandSession = mkEnableOption "the experimental Xfce Wayland session"; 74 75 + waylandSessionCompositor = mkOption { 76 type = lib.types.str; 77 default = ""; 78 example = "wayfire"; ··· 87 }; 88 }; 89 90 + environment.xfce.excludePackages = mkOption { 91 default = []; 92 + example = literalExpression "[ pkgs.xfce.xfce4-volumed-pulse ]"; 93 + type = types.listOf types.package; 94 description = "Which packages XFCE should exclude from the default environment"; 95 }; 96 }; 97 98 + config = mkIf cfg.enable { 99 environment.systemPackages = utils.removePackagesByName (with pkgs; [ 100 glib # for gsettings 101 gtk3.out # gtk-update-icon-cache ··· 147 xfce.xfdesktop 148 ] ++ lib.optional cfg.enableScreensaver xfce.xfce4-screensaver) excludePackages; 149 150 + programs.gnupg.agent.pinentryPackage = mkDefault pkgs.pinentry-gtk2; 151 programs.xfconf.enable = true; 152 programs.thunar.enable = true; 153 + programs.labwc.enable = mkDefault (cfg.enableWaylandSession && ( 154 cfg.waylandSessionCompositor == "" || lib.substring 0 5 cfg.waylandSessionCompositor == "labwc")); 155 156 environment.pathsToLink = [ ··· 173 174 # Copied from https://gitlab.xfce.org/xfce/xfce4-session/-/blob/xfce4-session-4.19.2/xfce-wayland.desktop.in 175 # to maintain consistent l10n state with X11 session file and to support the waylandSessionCompositor option. 176 + services.displayManager.sessionPackages = optionals cfg.enableWaylandSession [ 177 ((pkgs.writeTextDir "share/wayland-sessions/xfce-wayland.desktop" '' 178 [Desktop Entry] 179 Version=1.0 ··· 198 services.gnome.glib-networking.enable = true; 199 services.gvfs.enable = true; 200 services.tumbler.enable = true; 201 + services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true)); 202 + services.libinput.enable = mkDefault true; # used in xfce4-settings-manager 203 + services.colord.enable = mkDefault true; 204 205 # Enable default programs 206 programs.dconf.enable = true; 207 208 # Shell integration for VTE terminals 209 + programs.bash.vteIntegration = mkDefault true; 210 + programs.zsh.vteIntegration = mkDefault true; 211 212 # Systemd services 213 systemd.packages = utils.removePackagesByName (with pkgs.xfce; [ ··· 216 217 security.pam.services.xfce4-screensaver.unixAuth = cfg.enableScreensaver; 218 219 + xdg.portal.configPackages = mkDefault [ pkgs.xfce.xfce4-session ]; 220 }; 221 }
+9 -6
nixos/modules/services/x11/desktop-managers/xterm.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.xserver.desktopManager.xterm; ··· 14 { 15 options = { 16 17 - services.xserver.desktopManager.xterm.enable = lib.mkOption { 18 - type = lib.types.bool; 19 - default = lib.versionOlder config.system.stateVersion "19.09" && xSessionEnabled; 20 - defaultText = lib.literalExpression ''versionOlder config.system.stateVersion "19.09" && config.services.xserver.enable;''; 21 description = "Enable a xterm terminal as a desktop manager."; 22 }; 23 24 }; 25 26 - config = lib.mkIf cfg.enable { 27 28 - services.xserver.desktopManager.session = lib.singleton { 29 name = "xterm"; 30 start = '' 31 ${pkgs.xterm}/bin/xterm -ls &
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.xserver.desktopManager.xterm; ··· 17 { 18 options = { 19 20 + services.xserver.desktopManager.xterm.enable = mkOption { 21 + type = types.bool; 22 + default = versionOlder config.system.stateVersion "19.09" && xSessionEnabled; 23 + defaultText = literalExpression ''versionOlder config.system.stateVersion "19.09" && config.services.xserver.enable;''; 24 description = "Enable a xterm terminal as a desktop manager."; 25 }; 26 27 }; 28 29 + config = mkIf cfg.enable { 30 31 + services.xserver.desktopManager.session = singleton { 32 name = "xterm"; 33 start = '' 34 ${pkgs.xterm}/bin/xterm -ls &
+28 -26
nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 dmcfg = config.services.xserver.displayManager; 9 ldmcfg = dmcfg.lightdm; ··· 27 { 28 options = { 29 services.xserver.displayManager.lightdm.greeters.enso = { 30 - enable = lib.mkOption { 31 - type = lib.types.bool; 32 default = false; 33 description = '' 34 Whether to enable enso-os-greeter as the lightdm greeter ··· 36 }; 37 38 theme = { 39 - package = lib.mkOption { 40 - type = lib.types.package; 41 default = pkgs.gnome-themes-extra; 42 - defaultText = lib.literalExpression "pkgs.gnome-themes-extra"; 43 description = '' 44 The package path that contains the theme given in the name option. 45 ''; 46 }; 47 48 - name = lib.mkOption { 49 - type = lib.types.str; 50 default = "Adwaita"; 51 description = '' 52 Name of the theme to use for the lightdm-enso-os-greeter ··· 55 }; 56 57 iconTheme = { 58 - package = lib.mkOption { 59 - type = lib.types.package; 60 default = pkgs.papirus-icon-theme; 61 - defaultText = lib.literalExpression "pkgs.papirus-icon-theme"; 62 description = '' 63 The package path that contains the icon theme given in the name option. 64 ''; 65 }; 66 67 - name = lib.mkOption { 68 - type = lib.types.str; 69 default = "ePapirus"; 70 description = '' 71 Name of the icon theme to use for the lightdm-enso-os-greeter ··· 74 }; 75 76 cursorTheme = { 77 - package = lib.mkOption { 78 - type = lib.types.package; 79 default = pkgs.capitaine-cursors; 80 - defaultText = lib.literalExpression "pkgs.capitaine-cursors"; 81 description = '' 82 The package path that contains the cursor theme given in the name option. 83 ''; 84 }; 85 86 - name = lib.mkOption { 87 - type = lib.types.str; 88 default = "capitane-cursors"; 89 description = '' 90 Name of the cursor theme to use for the lightdm-enso-os-greeter ··· 92 }; 93 }; 94 95 - blur = lib.mkOption { 96 - type = lib.types.bool; 97 default = false; 98 description = '' 99 Whether or not to enable blur 100 ''; 101 }; 102 103 - brightness = lib.mkOption { 104 - type = lib.types.int; 105 default = 7; 106 description = '' 107 Brightness 108 ''; 109 }; 110 111 - extraConfig = lib.mkOption { 112 - type = lib.types.lines; 113 default = ""; 114 description = '' 115 Extra configuration that should be put in the greeter.conf ··· 119 }; 120 }; 121 122 - config = lib.mkIf (ldmcfg.enable && cfg.enable) { 123 environment.etc."lightdm/greeter.conf".source = ensoGreeterConf; 124 125 environment.systemPackages = [ ··· 129 ]; 130 131 services.xserver.displayManager.lightdm = { 132 - greeter = lib.mkDefault { 133 package = pkgs.lightdm-enso-os-greeter.xgreeters; 134 name = "pantheon-greeter"; 135 }; 136 137 greeters = { 138 gtk = { 139 - enable = lib.mkDefault false; 140 }; 141 }; 142 };
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 let 10 dmcfg = config.services.xserver.displayManager; 11 ldmcfg = dmcfg.lightdm; ··· 29 { 30 options = { 31 services.xserver.displayManager.lightdm.greeters.enso = { 32 + enable = mkOption { 33 + type = types.bool; 34 default = false; 35 description = '' 36 Whether to enable enso-os-greeter as the lightdm greeter ··· 38 }; 39 40 theme = { 41 + package = mkOption { 42 + type = types.package; 43 default = pkgs.gnome-themes-extra; 44 + defaultText = literalExpression "pkgs.gnome-themes-extra"; 45 description = '' 46 The package path that contains the theme given in the name option. 47 ''; 48 }; 49 50 + name = mkOption { 51 + type = types.str; 52 default = "Adwaita"; 53 description = '' 54 Name of the theme to use for the lightdm-enso-os-greeter ··· 57 }; 58 59 iconTheme = { 60 + package = mkOption { 61 + type = types.package; 62 default = pkgs.papirus-icon-theme; 63 + defaultText = literalExpression "pkgs.papirus-icon-theme"; 64 description = '' 65 The package path that contains the icon theme given in the name option. 66 ''; 67 }; 68 69 + name = mkOption { 70 + type = types.str; 71 default = "ePapirus"; 72 description = '' 73 Name of the icon theme to use for the lightdm-enso-os-greeter ··· 76 }; 77 78 cursorTheme = { 79 + package = mkOption { 80 + type = types.package; 81 default = pkgs.capitaine-cursors; 82 + defaultText = literalExpression "pkgs.capitaine-cursors"; 83 description = '' 84 The package path that contains the cursor theme given in the name option. 85 ''; 86 }; 87 88 + name = mkOption { 89 + type = types.str; 90 default = "capitane-cursors"; 91 description = '' 92 Name of the cursor theme to use for the lightdm-enso-os-greeter ··· 94 }; 95 }; 96 97 + blur = mkOption { 98 + type = types.bool; 99 default = false; 100 description = '' 101 Whether or not to enable blur 102 ''; 103 }; 104 105 + brightness = mkOption { 106 + type = types.int; 107 default = 7; 108 description = '' 109 Brightness 110 ''; 111 }; 112 113 + extraConfig = mkOption { 114 + type = types.lines; 115 default = ""; 116 description = '' 117 Extra configuration that should be put in the greeter.conf ··· 121 }; 122 }; 123 124 + config = mkIf (ldmcfg.enable && cfg.enable) { 125 environment.etc."lightdm/greeter.conf".source = ensoGreeterConf; 126 127 environment.systemPackages = [ ··· 131 ]; 132 133 services.xserver.displayManager.lightdm = { 134 + greeter = mkDefault { 135 package = pkgs.lightdm-enso-os-greeter.xgreeters; 136 name = "pantheon-greeter"; 137 }; 138 139 greeters = { 140 gtk = { 141 + enable = mkDefault false; 142 }; 143 }; 144 };
+33 -32
nixos/modules/services/x11/display-managers/lightdm-greeters/gtk.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 dmcfg = config.services.xserver.displayManager; ··· 24 cursor-theme-name = ${cfg.cursorTheme.name} 25 cursor-theme-size = ${toString cfg.cursorTheme.size} 26 background = ${ldmcfg.background} 27 - ${lib.optionalString (cfg.clock-format != null) "clock-format = ${cfg.clock-format}"} 28 - ${lib.optionalString ( 29 - cfg.indicators != null 30 - ) "indicators = ${lib.concatStringsSep ";" cfg.indicators}"} 31 - ${lib.optionalString (xcfg.dpi != null) "xft-dpi=${toString xcfg.dpi}"} 32 ${cfg.extraConfig} 33 ''; 34 ··· 38 39 services.xserver.displayManager.lightdm.greeters.gtk = { 40 41 - enable = lib.mkOption { 42 - type = lib.types.bool; 43 default = true; 44 description = '' 45 Whether to enable lightdm-gtk-greeter as the lightdm greeter. ··· 48 49 theme = { 50 51 - package = lib.mkOption { 52 - type = lib.types.package; 53 default = pkgs.gnome-themes-extra; 54 - defaultText = lib.literalExpression "pkgs.gnome-themes-extra"; 55 description = '' 56 The package path that contains the theme given in the name option. 57 ''; 58 }; 59 60 - name = lib.mkOption { 61 - type = lib.types.str; 62 default = "Adwaita"; 63 description = '' 64 Name of the theme to use for the lightdm-gtk-greeter. ··· 69 70 iconTheme = { 71 72 - package = lib.mkOption { 73 - type = lib.types.package; 74 default = pkgs.adwaita-icon-theme; 75 - defaultText = lib.literalExpression "pkgs.adwaita-icon-theme"; 76 description = '' 77 The package path that contains the icon theme given in the name option. 78 ''; 79 }; 80 81 - name = lib.mkOption { 82 - type = lib.types.str; 83 default = "Adwaita"; 84 description = '' 85 Name of the icon theme to use for the lightdm-gtk-greeter. ··· 90 91 cursorTheme = { 92 93 - package = lib.mkOption { 94 - type = lib.types.package; 95 default = pkgs.adwaita-icon-theme; 96 - defaultText = lib.literalExpression "pkgs.adwaita-icon-theme"; 97 description = '' 98 The package path that contains the cursor theme given in the name option. 99 ''; 100 }; 101 102 - name = lib.mkOption { 103 - type = lib.types.str; 104 default = "Adwaita"; 105 description = '' 106 Name of the cursor theme to use for the lightdm-gtk-greeter. 107 ''; 108 }; 109 110 - size = lib.mkOption { 111 - type = lib.types.int; 112 default = 16; 113 description = '' 114 Size of the cursor theme to use for the lightdm-gtk-greeter. ··· 116 }; 117 }; 118 119 - clock-format = lib.mkOption { 120 - type = lib.types.nullOr lib.types.str; 121 default = null; 122 example = "%F"; 123 description = '' ··· 128 ''; 129 }; 130 131 - indicators = lib.mkOption { 132 - type = lib.types.nullOr (lib.types.listOf lib.types.str); 133 default = null; 134 example = [ 135 "~host" ··· 154 ''; 155 }; 156 157 - extraConfig = lib.mkOption { 158 - type = lib.types.lines; 159 default = ""; 160 description = '' 161 Extra configuration that should be put in the lightdm-gtk-greeter.conf ··· 167 168 }; 169 170 - config = lib.mkIf (ldmcfg.enable && cfg.enable) { 171 172 - services.xserver.displayManager.lightdm.greeter = lib.mkDefault { 173 package = pkgs.lightdm-gtk-greeter.xgreeters; 174 name = "lightdm-gtk-greeter"; 175 };
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 dmcfg = config.services.xserver.displayManager; ··· 27 cursor-theme-name = ${cfg.cursorTheme.name} 28 cursor-theme-size = ${toString cfg.cursorTheme.size} 29 background = ${ldmcfg.background} 30 + ${optionalString (cfg.clock-format != null) "clock-format = ${cfg.clock-format}"} 31 + ${optionalString (cfg.indicators != null) "indicators = ${concatStringsSep ";" cfg.indicators}"} 32 + ${optionalString (xcfg.dpi != null) "xft-dpi=${toString xcfg.dpi}"} 33 ${cfg.extraConfig} 34 ''; 35 ··· 39 40 services.xserver.displayManager.lightdm.greeters.gtk = { 41 42 + enable = mkOption { 43 + type = types.bool; 44 default = true; 45 description = '' 46 Whether to enable lightdm-gtk-greeter as the lightdm greeter. ··· 49 50 theme = { 51 52 + package = mkOption { 53 + type = types.package; 54 default = pkgs.gnome-themes-extra; 55 + defaultText = literalExpression "pkgs.gnome-themes-extra"; 56 description = '' 57 The package path that contains the theme given in the name option. 58 ''; 59 }; 60 61 + name = mkOption { 62 + type = types.str; 63 default = "Adwaita"; 64 description = '' 65 Name of the theme to use for the lightdm-gtk-greeter. ··· 70 71 iconTheme = { 72 73 + package = mkOption { 74 + type = types.package; 75 default = pkgs.adwaita-icon-theme; 76 + defaultText = literalExpression "pkgs.adwaita-icon-theme"; 77 description = '' 78 The package path that contains the icon theme given in the name option. 79 ''; 80 }; 81 82 + name = mkOption { 83 + type = types.str; 84 default = "Adwaita"; 85 description = '' 86 Name of the icon theme to use for the lightdm-gtk-greeter. ··· 91 92 cursorTheme = { 93 94 + package = mkOption { 95 + type = types.package; 96 default = pkgs.adwaita-icon-theme; 97 + defaultText = literalExpression "pkgs.adwaita-icon-theme"; 98 description = '' 99 The package path that contains the cursor theme given in the name option. 100 ''; 101 }; 102 103 + name = mkOption { 104 + type = types.str; 105 default = "Adwaita"; 106 description = '' 107 Name of the cursor theme to use for the lightdm-gtk-greeter. 108 ''; 109 }; 110 111 + size = mkOption { 112 + type = types.int; 113 default = 16; 114 description = '' 115 Size of the cursor theme to use for the lightdm-gtk-greeter. ··· 117 }; 118 }; 119 120 + clock-format = mkOption { 121 + type = types.nullOr types.str; 122 default = null; 123 example = "%F"; 124 description = '' ··· 129 ''; 130 }; 131 132 + indicators = mkOption { 133 + type = types.nullOr (types.listOf types.str); 134 default = null; 135 example = [ 136 "~host" ··· 155 ''; 156 }; 157 158 + extraConfig = mkOption { 159 + type = types.lines; 160 default = ""; 161 description = '' 162 Extra configuration that should be put in the lightdm-gtk-greeter.conf ··· 168 169 }; 170 171 + config = mkIf (ldmcfg.enable && cfg.enable) { 172 173 + services.xserver.displayManager.lightdm.greeter = mkDefault { 174 package = pkgs.lightdm-gtk-greeter.xgreeters; 175 name = "lightdm-gtk-greeter"; 176 };
+11 -8
nixos/modules/services/x11/display-managers/lightdm-greeters/mini.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 dmcfg = config.services.xserver.displayManager; ··· 53 54 services.xserver.displayManager.lightdm.greeters.mini = { 55 56 - enable = lib.mkOption { 57 - type = lib.types.bool; 58 default = false; 59 description = '' 60 Whether to enable lightdm-mini-greeter as the lightdm greeter. ··· 65 ''; 66 }; 67 68 - user = lib.mkOption { 69 - type = lib.types.str; 70 default = "root"; 71 description = '' 72 The user to login as. 73 ''; 74 }; 75 76 - extraConfig = lib.mkOption { 77 - type = lib.types.lines; 78 default = ""; 79 description = '' 80 Extra configuration that should be put in the lightdm-mini-greeter.conf ··· 86 87 }; 88 89 - config = lib.mkIf (ldmcfg.enable && cfg.enable) { 90 91 services.xserver.displayManager.lightdm.greeters.gtk.enable = false; 92 93 - services.xserver.displayManager.lightdm.greeter = lib.mkDefault { 94 package = pkgs.lightdm-mini-greeter.xgreeters; 95 name = "lightdm-mini-greeter"; 96 };
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 dmcfg = config.services.xserver.displayManager; ··· 56 57 services.xserver.displayManager.lightdm.greeters.mini = { 58 59 + enable = mkOption { 60 + type = types.bool; 61 default = false; 62 description = '' 63 Whether to enable lightdm-mini-greeter as the lightdm greeter. ··· 68 ''; 69 }; 70 71 + user = mkOption { 72 + type = types.str; 73 default = "root"; 74 description = '' 75 The user to login as. 76 ''; 77 }; 78 79 + extraConfig = mkOption { 80 + type = types.lines; 81 default = ""; 82 description = '' 83 Extra configuration that should be put in the lightdm-mini-greeter.conf ··· 89 90 }; 91 92 + config = mkIf (ldmcfg.enable && cfg.enable) { 93 94 services.xserver.displayManager.lightdm.greeters.gtk.enable = false; 95 96 + services.xserver.displayManager.lightdm.greeter = mkDefault { 97 package = pkgs.lightdm-mini-greeter.xgreeters; 98 name = "lightdm-mini-greeter"; 99 };
+5 -3
nixos/modules/services/x11/display-managers/lightdm-greeters/mobile.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 dmcfg = config.services.xserver.displayManager; 9 ldmcfg = dmcfg.lightdm; ··· 12 { 13 options = { 14 services.xserver.displayManager.lightdm.greeters.mobile = { 15 - enable = lib.mkEnableOption "lightdm-mobile-greeter as the lightdm greeter"; 16 }; 17 }; 18 19 - config = lib.mkIf (ldmcfg.enable && cfg.enable) { 20 services.xserver.displayManager.lightdm.greeters.gtk.enable = false; 21 22 - services.xserver.displayManager.lightdm.greeter = lib.mkDefault { 23 package = pkgs.lightdm-mobile-greeter.xgreeters; 24 name = "lightdm-mobile-greeter"; 25 };
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 let 10 dmcfg = config.services.xserver.displayManager; 11 ldmcfg = dmcfg.lightdm; ··· 14 { 15 options = { 16 services.xserver.displayManager.lightdm.greeters.mobile = { 17 + enable = mkEnableOption "lightdm-mobile-greeter as the lightdm greeter"; 18 }; 19 }; 20 21 + config = mkIf (ldmcfg.enable && cfg.enable) { 22 services.xserver.displayManager.lightdm.greeters.gtk.enable = false; 23 24 + services.xserver.displayManager.lightdm.greeter = mkDefault { 25 package = pkgs.lightdm-mobile-greeter.xgreeters; 26 name = "lightdm-mobile-greeter"; 27 };
+7 -4
nixos/modules/services/x11/display-managers/lightdm-greeters/pantheon.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 dmcfg = config.services.xserver.displayManager; ··· 20 21 services.xserver.displayManager.lightdm.greeters.pantheon = { 22 23 - enable = lib.mkOption { 24 - type = lib.types.bool; 25 default = false; 26 description = '' 27 Whether to enable elementary-greeter as the lightdm greeter. ··· 32 33 }; 34 35 - config = lib.mkIf (ldmcfg.enable && cfg.enable) { 36 37 services.xserver.displayManager.lightdm.greeters.gtk.enable = false; 38 39 - services.xserver.displayManager.lightdm.greeter = lib.mkDefault { 40 package = pkgs.pantheon.elementary-greeter.xgreeters; 41 name = "io.elementary.greeter"; 42 };
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 dmcfg = config.services.xserver.displayManager; ··· 23 24 services.xserver.displayManager.lightdm.greeters.pantheon = { 25 26 + enable = mkOption { 27 + type = types.bool; 28 default = false; 29 description = '' 30 Whether to enable elementary-greeter as the lightdm greeter. ··· 35 36 }; 37 38 + config = mkIf (ldmcfg.enable && cfg.enable) { 39 40 services.xserver.displayManager.lightdm.greeters.gtk.enable = false; 41 42 + services.xserver.displayManager.lightdm.greeter = mkDefault { 43 package = pkgs.pantheon.elementary-greeter.xgreeters; 44 name = "io.elementary.greeter"; 45 };
+32 -29
nixos/modules/services/x11/display-managers/lightdm-greeters/slick.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 ldmcfg = config.services.xserver.displayManager.lightdm; 9 cfg = ldmcfg.greeters.slick; ··· 23 font-name=${cfg.font.name} 24 cursor-theme-name=${cfg.cursorTheme.name} 25 cursor-theme-size=${toString cfg.cursorTheme.size} 26 - draw-user-backgrounds=${lib.boolToString cfg.draw-user-backgrounds} 27 ${cfg.extraConfig} 28 ''; 29 in 30 { 31 options = { 32 services.xserver.displayManager.lightdm.greeters.slick = { 33 - enable = lib.mkEnableOption "lightdm-slick-greeter as the lightdm greeter"; 34 35 theme = { 36 - package = lib.mkOption { 37 - type = lib.types.package; 38 default = pkgs.gnome-themes-extra; 39 - defaultText = lib.literalExpression "pkgs.gnome-themes-extra"; 40 description = '' 41 The package path that contains the theme given in the name option. 42 ''; 43 }; 44 45 - name = lib.mkOption { 46 - type = lib.types.str; 47 default = "Adwaita"; 48 description = '' 49 Name of the theme to use for the lightdm-slick-greeter. ··· 52 }; 53 54 iconTheme = { 55 - package = lib.mkOption { 56 - type = lib.types.package; 57 default = pkgs.adwaita-icon-theme; 58 - defaultText = lib.literalExpression "pkgs.adwaita-icon-theme"; 59 description = '' 60 The package path that contains the icon theme given in the name option. 61 ''; 62 }; 63 64 - name = lib.mkOption { 65 - type = lib.types.str; 66 default = "Adwaita"; 67 description = '' 68 Name of the icon theme to use for the lightdm-slick-greeter. ··· 71 }; 72 73 font = { 74 - package = lib.mkOption { 75 - type = lib.types.package; 76 default = pkgs.ubuntu-classic; 77 - defaultText = lib.literalExpression "pkgs.ubuntu-classic"; 78 description = '' 79 The package path that contains the font given in the name option. 80 ''; 81 }; 82 83 - name = lib.mkOption { 84 - type = lib.types.str; 85 default = "Ubuntu 11"; 86 description = '' 87 Name of the font to use. ··· 90 }; 91 92 cursorTheme = { 93 - package = lib.mkOption { 94 - type = lib.types.package; 95 default = pkgs.adwaita-icon-theme; 96 - defaultText = lib.literalExpression "pkgs.adwaita-icon-theme"; 97 description = '' 98 The package path that contains the cursor theme given in the name option. 99 ''; 100 }; 101 102 - name = lib.mkOption { 103 - type = lib.types.str; 104 default = "Adwaita"; 105 description = '' 106 Name of the cursor theme to use for the lightdm-slick-greeter. 107 ''; 108 }; 109 110 - size = lib.mkOption { 111 - type = lib.types.int; 112 default = 24; 113 description = '' 114 Size of the cursor theme to use for the lightdm-slick-greeter. ··· 116 }; 117 }; 118 119 - draw-user-backgrounds = lib.mkEnableOption "draw user backgrounds"; 120 121 - extraConfig = lib.mkOption { 122 - type = lib.types.lines; 123 default = ""; 124 description = '' 125 Extra configuration that should be put in the lightdm-slick-greeter.conf ··· 129 }; 130 }; 131 132 - config = lib.mkIf (ldmcfg.enable && cfg.enable) { 133 services.xserver.displayManager.lightdm = { 134 greeters.gtk.enable = false; 135 - greeter = lib.mkDefault { 136 package = pkgs.lightdm-slick-greeter.xgreeters; 137 name = "lightdm-slick-greeter"; 138 };
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 ldmcfg = config.services.xserver.displayManager.lightdm; 12 cfg = ldmcfg.greeters.slick; ··· 26 font-name=${cfg.font.name} 27 cursor-theme-name=${cfg.cursorTheme.name} 28 cursor-theme-size=${toString cfg.cursorTheme.size} 29 + draw-user-backgrounds=${boolToString cfg.draw-user-backgrounds} 30 ${cfg.extraConfig} 31 ''; 32 in 33 { 34 options = { 35 services.xserver.displayManager.lightdm.greeters.slick = { 36 + enable = mkEnableOption "lightdm-slick-greeter as the lightdm greeter"; 37 38 theme = { 39 + package = mkOption { 40 + type = types.package; 41 default = pkgs.gnome-themes-extra; 42 + defaultText = literalExpression "pkgs.gnome-themes-extra"; 43 description = '' 44 The package path that contains the theme given in the name option. 45 ''; 46 }; 47 48 + name = mkOption { 49 + type = types.str; 50 default = "Adwaita"; 51 description = '' 52 Name of the theme to use for the lightdm-slick-greeter. ··· 55 }; 56 57 iconTheme = { 58 + package = mkOption { 59 + type = types.package; 60 default = pkgs.adwaita-icon-theme; 61 + defaultText = literalExpression "pkgs.adwaita-icon-theme"; 62 description = '' 63 The package path that contains the icon theme given in the name option. 64 ''; 65 }; 66 67 + name = mkOption { 68 + type = types.str; 69 default = "Adwaita"; 70 description = '' 71 Name of the icon theme to use for the lightdm-slick-greeter. ··· 74 }; 75 76 font = { 77 + package = mkOption { 78 + type = types.package; 79 default = pkgs.ubuntu-classic; 80 + defaultText = literalExpression "pkgs.ubuntu-classic"; 81 description = '' 82 The package path that contains the font given in the name option. 83 ''; 84 }; 85 86 + name = mkOption { 87 + type = types.str; 88 default = "Ubuntu 11"; 89 description = '' 90 Name of the font to use. ··· 93 }; 94 95 cursorTheme = { 96 + package = mkOption { 97 + type = types.package; 98 default = pkgs.adwaita-icon-theme; 99 + defaultText = literalExpression "pkgs.adwaita-icon-theme"; 100 description = '' 101 The package path that contains the cursor theme given in the name option. 102 ''; 103 }; 104 105 + name = mkOption { 106 + type = types.str; 107 default = "Adwaita"; 108 description = '' 109 Name of the cursor theme to use for the lightdm-slick-greeter. 110 ''; 111 }; 112 113 + size = mkOption { 114 + type = types.int; 115 default = 24; 116 description = '' 117 Size of the cursor theme to use for the lightdm-slick-greeter. ··· 119 }; 120 }; 121 122 + draw-user-backgrounds = mkEnableOption "draw user backgrounds"; 123 124 + extraConfig = mkOption { 125 + type = types.lines; 126 default = ""; 127 description = '' 128 Extra configuration that should be put in the lightdm-slick-greeter.conf ··· 132 }; 133 }; 134 135 + config = mkIf (ldmcfg.enable && cfg.enable) { 136 services.xserver.displayManager.lightdm = { 137 greeters.gtk.enable = false; 138 + greeter = mkDefault { 139 package = pkgs.lightdm-slick-greeter.xgreeters; 140 name = "lightdm-slick-greeter"; 141 };
+14 -11
nixos/modules/services/x11/display-managers/lightdm-greeters/tiny.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 dmcfg = config.services.xserver.displayManager; ··· 16 17 services.xserver.displayManager.lightdm.greeters.tiny = { 18 19 - enable = lib.mkOption { 20 - type = lib.types.bool; 21 default = false; 22 description = '' 23 Whether to enable lightdm-tiny-greeter as the lightdm greeter. ··· 29 }; 30 31 label = { 32 - user = lib.mkOption { 33 - type = lib.types.str; 34 default = "Username"; 35 description = '' 36 The string to represent the user_text label. 37 ''; 38 }; 39 40 - pass = lib.mkOption { 41 - type = lib.types.str; 42 default = "Password"; 43 description = '' 44 The string to represent the pass_text label. ··· 46 }; 47 }; 48 49 - extraConfig = lib.mkOption { 50 - type = lib.types.lines; 51 default = ""; 52 description = '' 53 Section to describe style and ui. ··· 58 59 }; 60 61 - config = lib.mkIf (ldmcfg.enable && cfg.enable) { 62 63 services.xserver.displayManager.lightdm.greeters.gtk.enable = false; 64 ··· 70 static const char *pass_text = "${cfg.label.pass}"; 71 static const char *session = "${dmcfg.defaultSession}"; 72 ''; 73 - config = lib.optionalString (cfg.extraConfig != "") (configHeader + cfg.extraConfig); 74 package = pkgs.lightdm-tiny-greeter.override { conf = config; }; 75 in 76 - lib.mkDefault { 77 package = package.xgreeters; 78 name = "lightdm-tiny-greeter"; 79 };
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 dmcfg = config.services.xserver.displayManager; ··· 19 20 services.xserver.displayManager.lightdm.greeters.tiny = { 21 22 + enable = mkOption { 23 + type = types.bool; 24 default = false; 25 description = '' 26 Whether to enable lightdm-tiny-greeter as the lightdm greeter. ··· 32 }; 33 34 label = { 35 + user = mkOption { 36 + type = types.str; 37 default = "Username"; 38 description = '' 39 The string to represent the user_text label. 40 ''; 41 }; 42 43 + pass = mkOption { 44 + type = types.str; 45 default = "Password"; 46 description = '' 47 The string to represent the pass_text label. ··· 49 }; 50 }; 51 52 + extraConfig = mkOption { 53 + type = types.lines; 54 default = ""; 55 description = '' 56 Section to describe style and ui. ··· 61 62 }; 63 64 + config = mkIf (ldmcfg.enable && cfg.enable) { 65 66 services.xserver.displayManager.lightdm.greeters.gtk.enable = false; 67 ··· 73 static const char *pass_text = "${cfg.label.pass}"; 74 static const char *session = "${dmcfg.defaultSession}"; 75 ''; 76 + config = optionalString (cfg.extraConfig != "") (configHeader + cfg.extraConfig); 77 package = pkgs.lightdm-tiny-greeter.override { conf = config; }; 78 in 79 + mkDefault { 80 package = package.xgreeters; 81 name = "lightdm-tiny-greeter"; 82 };
+31 -28
nixos/modules/services/x11/display-managers/lightdm.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 xcfg = config.services.xserver; ··· 19 # lightdm runs with clearenv(), but we need a few things in the environment for X to startup 20 xserverWrapper = writeScript "xserver-wrapper" '' 21 #! ${pkgs.bash}/bin/bash 22 - ${lib.concatMapStrings (n: "export ${n}=\"${lib.getAttr n xEnv}\"\n") (lib.attrNames xEnv)} 23 24 display=$(echo "$@" | xargs -n 1 | grep -P ^:\\d\$ | head -n 1 | sed s/^://) 25 if [ -z "$display" ] ··· 33 usersConf = writeText "users.conf" '' 34 [UserList] 35 minimum-uid=1000 36 - hidden-users=${lib.concatStringsSep " " dmcfg.hiddenUsers} 37 hidden-shells=/run/current-system/sw/bin/nologin 38 ''; 39 40 lightdmConf = writeText "lightdm.conf" '' 41 [LightDM] 42 - ${lib.optionalString cfg.greeter.enable '' 43 greeter-user = ${config.users.users.lightdm.name} 44 greeters-directory = ${cfg.greeter.package} 45 ''} ··· 49 [Seat:*] 50 xserver-command = ${xserverWrapper} 51 session-wrapper = ${dmcfg.sessionData.wrapper} 52 - ${lib.optionalString cfg.greeter.enable '' 53 greeter-session = ${cfg.greeter.name} 54 ''} 55 - ${lib.optionalString dmcfg.autoLogin.enable '' 56 autologin-user = ${dmcfg.autoLogin.user} 57 autologin-user-timeout = ${toString cfg.autoLogin.timeout} 58 autologin-session = ${sessionData.autologinSession} 59 ''} 60 - ${lib.optionalString (xcfg.displayManager.setupCommands != "") '' 61 display-setup-script=${pkgs.writeScript "lightdm-display-setup" '' 62 #!${pkgs.bash}/bin/bash 63 ${xcfg.displayManager.setupCommands} ··· 84 ./lightdm-greeters/tiny.nix 85 ./lightdm-greeters/slick.nix 86 ./lightdm-greeters/mobile.nix 87 - (lib.mkRenamedOptionModule 88 [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] 89 [ 90 "services" ··· 93 "enable" 94 ] 95 ) 96 - (lib.mkRenamedOptionModule 97 [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "user" ] 98 [ 99 "services" ··· 108 109 services.xserver.displayManager.lightdm = { 110 111 - enable = lib.mkOption { 112 - type = lib.types.bool; 113 default = false; 114 description = '' 115 Whether to enable lightdm as the display manager. ··· 117 }; 118 119 greeter = { 120 - enable = lib.mkOption { 121 - type = lib.types.bool; 122 default = true; 123 description = '' 124 If set to false, run lightdm in greeterless mode. This only works if autologin 125 is enabled and autoLogin.timeout is zero. 126 ''; 127 }; 128 - package = lib.mkOption { 129 - type = lib.types.package; 130 description = '' 131 The LightDM greeter to login via. The package should be a directory 132 containing a .desktop file matching the name in the 'name' option. 133 ''; 134 135 }; 136 - name = lib.mkOption { 137 - type = lib.types.str; 138 description = '' 139 The name of a .desktop file in the directory specified 140 in the 'package' option. ··· 142 }; 143 }; 144 145 - extraConfig = lib.mkOption { 146 - type = lib.types.lines; 147 default = ""; 148 example = '' 149 user-authority-in-system-dir = true ··· 151 description = "Extra lines to append to LightDM section."; 152 }; 153 154 - background = lib.mkOption { 155 - type = lib.types.either lib.types.path (lib.types.strMatching "^#[0-9]\{6\}$"); 156 # Manual cannot depend on packages, we are actually setting the default in config below. 157 - defaultText = lib.literalExpression "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath"; 158 description = '' 159 The background image or color to use. 160 ''; 161 }; 162 163 - extraSeatDefaults = lib.mkOption { 164 - type = lib.types.lines; 165 default = ""; 166 example = '' 167 greeter-show-manual-login=true ··· 170 }; 171 172 # Configuration for automatic login specific to LightDM 173 - autoLogin.timeout = lib.mkOption { 174 - type = lib.types.int; 175 default = 0; 176 description = '' 177 Show the greeter for this many seconds before automatic login occurs. ··· 181 }; 182 }; 183 184 - config = lib.mkIf cfg.enable { 185 186 assertions = [ 187 { ··· 207 208 # Keep in sync with the defaultText value from the option definition. 209 services.xserver.displayManager.lightdm.background = 210 - lib.mkDefault pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath; 211 212 # Set default session in session chooser to a specified values – basically ignore session history. 213 # Auto-login is already covered by a config value. 214 services.displayManager.preStart = 215 - lib.optionalString (!dmcfg.autoLogin.enable && dmcfg.defaultSession != null) 216 '' 217 ${setSessionScript}/bin/set-session ${dmcfg.defaultSession} 218 '';
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 xcfg = config.services.xserver; ··· 22 # lightdm runs with clearenv(), but we need a few things in the environment for X to startup 23 xserverWrapper = writeScript "xserver-wrapper" '' 24 #! ${pkgs.bash}/bin/bash 25 + ${concatMapStrings (n: "export ${n}=\"${getAttr n xEnv}\"\n") (attrNames xEnv)} 26 27 display=$(echo "$@" | xargs -n 1 | grep -P ^:\\d\$ | head -n 1 | sed s/^://) 28 if [ -z "$display" ] ··· 36 usersConf = writeText "users.conf" '' 37 [UserList] 38 minimum-uid=1000 39 + hidden-users=${concatStringsSep " " dmcfg.hiddenUsers} 40 hidden-shells=/run/current-system/sw/bin/nologin 41 ''; 42 43 lightdmConf = writeText "lightdm.conf" '' 44 [LightDM] 45 + ${optionalString cfg.greeter.enable '' 46 greeter-user = ${config.users.users.lightdm.name} 47 greeters-directory = ${cfg.greeter.package} 48 ''} ··· 52 [Seat:*] 53 xserver-command = ${xserverWrapper} 54 session-wrapper = ${dmcfg.sessionData.wrapper} 55 + ${optionalString cfg.greeter.enable '' 56 greeter-session = ${cfg.greeter.name} 57 ''} 58 + ${optionalString dmcfg.autoLogin.enable '' 59 autologin-user = ${dmcfg.autoLogin.user} 60 autologin-user-timeout = ${toString cfg.autoLogin.timeout} 61 autologin-session = ${sessionData.autologinSession} 62 ''} 63 + ${optionalString (xcfg.displayManager.setupCommands != "") '' 64 display-setup-script=${pkgs.writeScript "lightdm-display-setup" '' 65 #!${pkgs.bash}/bin/bash 66 ${xcfg.displayManager.setupCommands} ··· 87 ./lightdm-greeters/tiny.nix 88 ./lightdm-greeters/slick.nix 89 ./lightdm-greeters/mobile.nix 90 + (mkRenamedOptionModule 91 [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] 92 [ 93 "services" ··· 96 "enable" 97 ] 98 ) 99 + (mkRenamedOptionModule 100 [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "user" ] 101 [ 102 "services" ··· 111 112 services.xserver.displayManager.lightdm = { 113 114 + enable = mkOption { 115 + type = types.bool; 116 default = false; 117 description = '' 118 Whether to enable lightdm as the display manager. ··· 120 }; 121 122 greeter = { 123 + enable = mkOption { 124 + type = types.bool; 125 default = true; 126 description = '' 127 If set to false, run lightdm in greeterless mode. This only works if autologin 128 is enabled and autoLogin.timeout is zero. 129 ''; 130 }; 131 + package = mkOption { 132 + type = types.package; 133 description = '' 134 The LightDM greeter to login via. The package should be a directory 135 containing a .desktop file matching the name in the 'name' option. 136 ''; 137 138 }; 139 + name = mkOption { 140 + type = types.str; 141 description = '' 142 The name of a .desktop file in the directory specified 143 in the 'package' option. ··· 145 }; 146 }; 147 148 + extraConfig = mkOption { 149 + type = types.lines; 150 default = ""; 151 example = '' 152 user-authority-in-system-dir = true ··· 154 description = "Extra lines to append to LightDM section."; 155 }; 156 157 + background = mkOption { 158 + type = types.either types.path (types.strMatching "^#[0-9]\{6\}$"); 159 # Manual cannot depend on packages, we are actually setting the default in config below. 160 + defaultText = literalExpression "pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath"; 161 description = '' 162 The background image or color to use. 163 ''; 164 }; 165 166 + extraSeatDefaults = mkOption { 167 + type = types.lines; 168 default = ""; 169 example = '' 170 greeter-show-manual-login=true ··· 173 }; 174 175 # Configuration for automatic login specific to LightDM 176 + autoLogin.timeout = mkOption { 177 + type = types.int; 178 default = 0; 179 description = '' 180 Show the greeter for this many seconds before automatic login occurs. ··· 184 }; 185 }; 186 187 + config = mkIf cfg.enable { 188 189 assertions = [ 190 { ··· 210 211 # Keep in sync with the defaultText value from the option definition. 212 services.xserver.displayManager.lightdm.background = 213 + mkDefault pkgs.nixos-artwork.wallpapers.simple-dark-gray-bottom.gnomeFilePath; 214 215 # Set default session in session chooser to a specified values – basically ignore session history. 216 # Auto-login is already covered by a config value. 217 services.displayManager.preStart = 218 + optionalString (!dmcfg.autoLogin.enable && dmcfg.defaultSession != null) 219 '' 220 ${setSessionScript}/bin/set-session ${dmcfg.defaultSession} 221 '';
+4 -1
nixos/modules/services/x11/display-managers/slim.nix
··· 4 pkgs, 5 ... 6 }: 7 { 8 # added 2019-11-11 9 imports = [ 10 - (lib.mkRemovedOptionModule [ "services" "xserver" "displayManager" "slim" ] '' 11 The SLIM project is abandoned and their last release was in 2013. 12 Because of this it poses a security risk to your system. 13 Other issues include it not fully supporting systemd and logind sessions.
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 { 11 # added 2019-11-11 12 imports = [ 13 + (mkRemovedOptionModule [ "services" "xserver" "displayManager" "slim" ] '' 14 The SLIM project is abandoned and their last release was in 2013. 15 Because of this it poses a security risk to your system. 16 Other issues include it not fully supporting systemd and logind sessions.
+7 -4
nixos/modules/services/x11/display-managers/startx.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.xserver.displayManager.startx; ··· 16 17 options = { 18 services.xserver.displayManager.startx = { 19 - enable = lib.mkOption { 20 - type = lib.types.bool; 21 default = false; 22 description = '' 23 Whether to enable the dummy "startx" pseudo-display manager, ··· 33 34 ###### implementation 35 36 - config = lib.mkIf cfg.enable { 37 services.xserver = { 38 exportConfiguration = true; 39 }; ··· 43 # 44 # To send log to Xorg's default log location ($XDG_DATA_HOME/xorg/), we do 45 # not specify a log file when running X 46 - services.xserver.logFile = lib.mkDefault null; 47 48 # Implement xserverArgs via xinit's system-wide xserverrc 49 environment.etc."X11/xinit/xserverrc".source = pkgs.writeShellScript "xserverrc" ''
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.xserver.displayManager.startx; ··· 19 20 options = { 21 services.xserver.displayManager.startx = { 22 + enable = mkOption { 23 + type = types.bool; 24 default = false; 25 description = '' 26 Whether to enable the dummy "startx" pseudo-display manager, ··· 36 37 ###### implementation 38 39 + config = mkIf cfg.enable { 40 services.xserver = { 41 exportConfiguration = true; 42 }; ··· 46 # 47 # To send log to Xorg's default log location ($XDG_DATA_HOME/xorg/), we do 48 # not specify a log file when running X 49 + services.xserver.logFile = mkDefault null; 50 51 # Implement xserverArgs via xinit's system-wide xserverrc 52 environment.etc."X11/xinit/xserverrc".source = pkgs.writeShellScript "xserverrc" ''
+22 -19
nixos/modules/services/x11/display-managers/xpra.nix
··· 1 { config, lib, pkgs, ... }: 2 let 3 cfg = config.services.xserver.displayManager.xpra; 4 dmcfg = config.services.xserver.displayManager; ··· 10 11 options = { 12 services.xserver.displayManager.xpra = { 13 - enable = lib.mkOption { 14 - type = lib.types.bool; 15 default = false; 16 description = "Whether to enable xpra as display manager."; 17 }; 18 19 - bindTcp = lib.mkOption { 20 default = "127.0.0.1:10000"; 21 example = "0.0.0.0:10000"; 22 - type = lib.types.nullOr lib.types.str; 23 description = "Bind xpra to TCP"; 24 }; 25 26 - desktop = lib.mkOption { 27 - type = lib.types.nullOr lib.types.str; 28 default = null; 29 example = "gnome-shell"; 30 description = "Start a desktop environment instead of seamless mode"; 31 }; 32 33 - auth = lib.mkOption { 34 - type = lib.types.str; 35 default = "pam"; 36 example = "password:value=mysecret"; 37 description = "Authentication to use when connecting to xpra"; 38 }; 39 40 - pulseaudio = lib.mkEnableOption "pulseaudio audio streaming"; 41 42 - extraOptions = lib.mkOption { 43 description = "Extra xpra options"; 44 default = []; 45 - type = lib.types.listOf lib.types.str; 46 }; 47 }; 48 }; 49 50 ###### implementation 51 52 - config = lib.mkIf cfg.enable { 53 services.xserver.videoDrivers = ["dummy"]; 54 55 services.xserver.monitorSection = '' ··· 224 ''; 225 226 services.displayManager.execCmd = '' 227 - ${lib.optionalString (cfg.pulseaudio) 228 "export PULSE_COOKIE=/run/pulse/.config/pulse/cookie"} 229 exec ${pkgs.xpra}/bin/xpra ${if cfg.desktop == null then "start" else "start-desktop --start=${cfg.desktop}"} \ 230 --daemon=off \ ··· 236 --speaker=yes \ 237 --mdns=no \ 238 --pulseaudio=no \ 239 - ${lib.optionalString (cfg.pulseaudio) "--sound-source=pulse"} \ 240 --socket-dirs=/run/xpra \ 241 - --xvfb="xpra_Xdummy ${lib.concatStringsSep " " dmcfg.xserverArgs}" \ 242 - ${lib.optionalString (cfg.bindTcp != null) "--bind-tcp=${cfg.bindTcp}"} \ 243 --auth=${cfg.auth} \ 244 - ${lib.concatStringsSep " " cfg.extraOptions} 245 ''; 246 247 services.xserver.terminateOnReset = false; 248 249 environment.systemPackages = [pkgs.xpra]; 250 251 - services.pulseaudio.enable = lib.mkDefault cfg.pulseaudio; 252 - services.pulseaudio.systemWide = lib.mkDefault cfg.pulseaudio; 253 }; 254 255 }
··· 1 { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 let 6 cfg = config.services.xserver.displayManager.xpra; 7 dmcfg = config.services.xserver.displayManager; ··· 13 14 options = { 15 services.xserver.displayManager.xpra = { 16 + enable = mkOption { 17 + type = types.bool; 18 default = false; 19 description = "Whether to enable xpra as display manager."; 20 }; 21 22 + bindTcp = mkOption { 23 default = "127.0.0.1:10000"; 24 example = "0.0.0.0:10000"; 25 + type = types.nullOr types.str; 26 description = "Bind xpra to TCP"; 27 }; 28 29 + desktop = mkOption { 30 + type = types.nullOr types.str; 31 default = null; 32 example = "gnome-shell"; 33 description = "Start a desktop environment instead of seamless mode"; 34 }; 35 36 + auth = mkOption { 37 + type = types.str; 38 default = "pam"; 39 example = "password:value=mysecret"; 40 description = "Authentication to use when connecting to xpra"; 41 }; 42 43 + pulseaudio = mkEnableOption "pulseaudio audio streaming"; 44 45 + extraOptions = mkOption { 46 description = "Extra xpra options"; 47 default = []; 48 + type = types.listOf types.str; 49 }; 50 }; 51 }; 52 53 ###### implementation 54 55 + config = mkIf cfg.enable { 56 services.xserver.videoDrivers = ["dummy"]; 57 58 services.xserver.monitorSection = '' ··· 227 ''; 228 229 services.displayManager.execCmd = '' 230 + ${optionalString (cfg.pulseaudio) 231 "export PULSE_COOKIE=/run/pulse/.config/pulse/cookie"} 232 exec ${pkgs.xpra}/bin/xpra ${if cfg.desktop == null then "start" else "start-desktop --start=${cfg.desktop}"} \ 233 --daemon=off \ ··· 239 --speaker=yes \ 240 --mdns=no \ 241 --pulseaudio=no \ 242 + ${optionalString (cfg.pulseaudio) "--sound-source=pulse"} \ 243 --socket-dirs=/run/xpra \ 244 + --xvfb="xpra_Xdummy ${concatStringsSep " " dmcfg.xserverArgs}" \ 245 + ${optionalString (cfg.bindTcp != null) "--bind-tcp=${cfg.bindTcp}"} \ 246 --auth=${cfg.auth} \ 247 + ${concatStringsSep " " cfg.extraOptions} 248 ''; 249 250 services.xserver.terminateOnReset = false; 251 252 environment.systemPackages = [pkgs.xpra]; 253 254 + services.pulseaudio.enable = mkDefault cfg.pulseaudio; 255 + services.pulseaudio.systemWide = mkDefault cfg.pulseaudio; 256 }; 257 258 }
+21 -18
nixos/modules/services/x11/extra-layouts.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 layouts = config.services.xserver.xkb.extraLayouts; 9 10 layoutOpts = { 11 options = { 12 - description = lib.mkOption { 13 - type = lib.types.str; 14 description = "A short description of the layout."; 15 }; 16 17 - languages = lib.mkOption { 18 - type = lib.types.listOf lib.types.str; 19 description = '' 20 A list of languages provided by the layout. 21 (Use ISO 639-2 codes, for example: "eng" for english) 22 ''; 23 }; 24 25 - compatFile = lib.mkOption { 26 - type = lib.types.nullOr lib.types.path; 27 default = null; 28 description = '' 29 The path to the xkb compat file. ··· 33 ''; 34 }; 35 36 - geometryFile = lib.mkOption { 37 - type = lib.types.nullOr lib.types.path; 38 default = null; 39 description = '' 40 The path to the xkb geometry file. ··· 44 ''; 45 }; 46 47 - keycodesFile = lib.mkOption { 48 - type = lib.types.nullOr lib.types.path; 49 default = null; 50 description = '' 51 The path to the xkb keycodes file. ··· 55 ''; 56 }; 57 58 - symbolsFile = lib.mkOption { 59 - type = lib.types.nullOr lib.types.path; 60 default = null; 61 description = '' 62 The path to the xkb symbols file. ··· 66 ''; 67 }; 68 69 - typesFile = lib.mkOption { 70 - type = lib.types.nullOr lib.types.path; 71 default = null; 72 description = '' 73 The path to the xkb types file. ··· 108 ###### interface 109 110 options.services.xserver.xkb = { 111 - extraLayouts = lib.mkOption { 112 - type = lib.types.attrsOf (lib.types.submodule layoutOpts); 113 default = { }; 114 - example = lib.literalExpression '' 115 { 116 mine = { 117 description = "My custom xkb layout."; ··· 133 134 ###### implementation 135 136 - config = lib.mkIf (layouts != { }) { 137 138 environment.sessionVariables = { 139 # runtime override supported by multiple libraries e. g. libxkbcommon
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 layouts = config.services.xserver.xkb.extraLayouts; 12 13 layoutOpts = { 14 options = { 15 + description = mkOption { 16 + type = types.str; 17 description = "A short description of the layout."; 18 }; 19 20 + languages = mkOption { 21 + type = types.listOf types.str; 22 description = '' 23 A list of languages provided by the layout. 24 (Use ISO 639-2 codes, for example: "eng" for english) 25 ''; 26 }; 27 28 + compatFile = mkOption { 29 + type = types.nullOr types.path; 30 default = null; 31 description = '' 32 The path to the xkb compat file. ··· 36 ''; 37 }; 38 39 + geometryFile = mkOption { 40 + type = types.nullOr types.path; 41 default = null; 42 description = '' 43 The path to the xkb geometry file. ··· 47 ''; 48 }; 49 50 + keycodesFile = mkOption { 51 + type = types.nullOr types.path; 52 default = null; 53 description = '' 54 The path to the xkb keycodes file. ··· 58 ''; 59 }; 60 61 + symbolsFile = mkOption { 62 + type = types.nullOr types.path; 63 default = null; 64 description = '' 65 The path to the xkb symbols file. ··· 69 ''; 70 }; 71 72 + typesFile = mkOption { 73 + type = types.nullOr types.path; 74 default = null; 75 description = '' 76 The path to the xkb types file. ··· 111 ###### interface 112 113 options.services.xserver.xkb = { 114 + extraLayouts = mkOption { 115 + type = types.attrsOf (types.submodule layoutOpts); 116 default = { }; 117 + example = literalExpression '' 118 { 119 mine = { 120 description = "My custom xkb layout."; ··· 136 137 ###### implementation 138 139 + config = mkIf (layouts != { }) { 140 141 environment.sessionVariables = { 142 # runtime override supported by multiple libraries e. g. libxkbcommon
+10 -9
nixos/modules/services/x11/fractalart.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.fractalart; 9 in 10 { 11 options.services.fractalart = { 12 - enable = lib.mkOption { 13 - type = lib.types.bool; 14 default = false; 15 example = true; 16 description = "Enable FractalArt for generating colorful wallpapers on login"; 17 }; 18 19 - width = lib.mkOption { 20 - type = lib.types.nullOr lib.types.int; 21 default = null; 22 example = 1920; 23 description = "Screen width"; 24 }; 25 26 - height = lib.mkOption { 27 - type = lib.types.nullOr lib.types.int; 28 default = null; 29 example = 1080; 30 description = "Screen height"; 31 }; 32 }; 33 34 - config = lib.mkIf cfg.enable { 35 environment.systemPackages = [ pkgs.haskellPackages.FractalArt ]; 36 services.xserver.displayManager.sessionCommands = 37 "${pkgs.haskellPackages.FractalArt}/bin/FractalArt --no-bg -f .background-image" 38 - + lib.optionalString (cfg.width != null) " -w ${toString cfg.width}" 39 - + lib.optionalString (cfg.height != null) " -h ${toString cfg.height}"; 40 }; 41 }
··· 4 pkgs, 5 ... 6 }: 7 + with lib; 8 let 9 cfg = config.services.fractalart; 10 in 11 { 12 options.services.fractalart = { 13 + enable = mkOption { 14 + type = types.bool; 15 default = false; 16 example = true; 17 description = "Enable FractalArt for generating colorful wallpapers on login"; 18 }; 19 20 + width = mkOption { 21 + type = types.nullOr types.int; 22 default = null; 23 example = 1920; 24 description = "Screen width"; 25 }; 26 27 + height = mkOption { 28 + type = types.nullOr types.int; 29 default = null; 30 example = 1080; 31 description = "Screen height"; 32 }; 33 }; 34 35 + config = mkIf cfg.enable { 36 environment.systemPackages = [ pkgs.haskellPackages.FractalArt ]; 37 services.xserver.displayManager.sessionCommands = 38 "${pkgs.haskellPackages.FractalArt}/bin/FractalArt --no-bg -f .background-image" 39 + + optionalString (cfg.width != null) " -w ${toString cfg.width}" 40 + + optionalString (cfg.height != null) " -h ${toString cfg.height}"; 41 }; 42 }
+8 -5
nixos/modules/services/x11/hardware/cmt.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.xserver.cmt; ··· 15 options = { 16 17 services.xserver.cmt = { 18 - enable = lib.mkOption { 19 - type = lib.types.bool; 20 default = false; 21 description = "Enable chrome multitouch input (cmt). Touchpad drivers that are configured for chromebooks."; 22 }; 23 - models = lib.mkOption { 24 - type = lib.types.enum [ 25 "atlas" 26 "banjo" 27 "candy" ··· 80 }; # closes services 81 }; # closes options 82 83 - config = lib.mkIf cfg.enable { 84 85 services.xserver.modules = [ pkgs.xf86_input_cmt ]; 86
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.xserver.cmt; ··· 18 options = { 19 20 services.xserver.cmt = { 21 + enable = mkOption { 22 + type = types.bool; 23 default = false; 24 description = "Enable chrome multitouch input (cmt). Touchpad drivers that are configured for chromebooks."; 25 }; 26 + models = mkOption { 27 + type = types.enum [ 28 "atlas" 29 "banjo" 30 "candy" ··· 83 }; # closes services 84 }; # closes options 85 86 + config = mkIf cfg.enable { 87 88 services.xserver.modules = [ pkgs.xf86_input_cmt ]; 89
+5 -2
nixos/modules/services/x11/hardware/digimend.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.xserver.digimend; ··· 18 19 services.xserver.digimend = { 20 21 - enable = lib.mkEnableOption "the digimend drivers for Huion/XP-Pen/etc. tablets"; 22 23 }; 24 25 }; 26 27 - config = lib.mkIf cfg.enable { 28 29 # digimend drivers use xsetwacom and wacom X11 drivers 30 services.xserver.wacom.enable = true;
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.xserver.digimend; ··· 21 22 services.xserver.digimend = { 23 24 + enable = mkEnableOption "the digimend drivers for Huion/XP-Pen/etc. tablets"; 25 26 }; 27 28 }; 29 30 + config = mkIf cfg.enable { 31 32 # digimend drivers use xsetwacom and wacom X11 drivers 33 services.xserver.wacom.enable = true;
+56 -53
nixos/modules/services/x11/hardware/synaptics.nix
··· 5 pkgs, 6 ... 7 }: 8 let 9 cfg = config.services.xserver.synaptics; 10 opt = options.services.xserver.synaptics; ··· 32 33 services.xserver.synaptics = { 34 35 - enable = lib.mkOption { 36 - type = lib.types.bool; 37 default = false; 38 description = "Whether to enable touchpad support. Deprecated: Consider services.libinput.enable."; 39 }; 40 41 - dev = lib.mkOption { 42 - type = lib.types.nullOr lib.types.str; 43 default = null; 44 example = "/dev/input/event0"; 45 description = '' ··· 48 ''; 49 }; 50 51 - accelFactor = lib.mkOption { 52 - type = lib.types.nullOr lib.types.str; 53 default = "0.001"; 54 description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed)."; 55 }; 56 57 - minSpeed = lib.mkOption { 58 - type = lib.types.nullOr lib.types.str; 59 default = "0.6"; 60 description = "Cursor speed factor for precision finger motion."; 61 }; 62 63 - maxSpeed = lib.mkOption { 64 - type = lib.types.nullOr lib.types.str; 65 default = "1.0"; 66 description = "Cursor speed factor for highest-speed finger motion."; 67 }; 68 69 - scrollDelta = lib.mkOption { 70 - type = lib.types.nullOr lib.types.int; 71 default = null; 72 example = 75; 73 description = "Move distance of the finger for a scroll event."; 74 }; 75 76 - twoFingerScroll = lib.mkOption { 77 - type = lib.types.bool; 78 default = false; 79 description = "Whether to enable two-finger drag-scrolling. Overridden by horizTwoFingerScroll and vertTwoFingerScroll."; 80 }; 81 82 - horizTwoFingerScroll = lib.mkOption { 83 - type = lib.types.bool; 84 default = cfg.twoFingerScroll; 85 - defaultText = lib.literalExpression "config.${opt.twoFingerScroll}"; 86 description = "Whether to enable horizontal two-finger drag-scrolling."; 87 }; 88 89 - vertTwoFingerScroll = lib.mkOption { 90 - type = lib.types.bool; 91 default = cfg.twoFingerScroll; 92 - defaultText = lib.literalExpression "config.${opt.twoFingerScroll}"; 93 description = "Whether to enable vertical two-finger drag-scrolling."; 94 }; 95 96 - horizEdgeScroll = lib.mkOption { 97 - type = lib.types.bool; 98 default = !cfg.horizTwoFingerScroll; 99 - defaultText = lib.literalExpression "! config.${opt.horizTwoFingerScroll}"; 100 description = "Whether to enable horizontal edge drag-scrolling."; 101 }; 102 103 - vertEdgeScroll = lib.mkOption { 104 - type = lib.types.bool; 105 default = !cfg.vertTwoFingerScroll; 106 - defaultText = lib.literalExpression "! config.${opt.vertTwoFingerScroll}"; 107 description = "Whether to enable vertical edge drag-scrolling."; 108 }; 109 110 - tapButtons = lib.mkOption { 111 - type = lib.types.bool; 112 default = true; 113 description = "Whether to enable tap buttons."; 114 }; 115 116 - buttonsMap = lib.mkOption { 117 - type = lib.types.listOf lib.types.int; 118 default = [ 119 1 120 2 ··· 129 apply = map toString; 130 }; 131 132 - fingersMap = lib.mkOption { 133 - type = lib.types.listOf lib.types.int; 134 default = [ 135 1 136 2 ··· 145 apply = map toString; 146 }; 147 148 - palmDetect = lib.mkOption { 149 - type = lib.types.bool; 150 default = false; 151 description = "Whether to enable palm detection (hardware support required)"; 152 }; 153 154 - palmMinWidth = lib.mkOption { 155 - type = lib.types.nullOr lib.types.int; 156 default = null; 157 example = 5; 158 description = "Minimum finger width at which touch is considered a palm"; 159 }; 160 161 - palmMinZ = lib.mkOption { 162 - type = lib.types.nullOr lib.types.int; 163 default = null; 164 example = 20; 165 description = "Minimum finger pressure at which touch is considered a palm"; 166 }; 167 168 - horizontalScroll = lib.mkOption { 169 - type = lib.types.bool; 170 default = true; 171 description = "Whether to enable horizontal scrolling (on touchpad)"; 172 }; 173 174 - additionalOptions = lib.mkOption { 175 - type = lib.types.str; 176 default = ""; 177 example = '' 178 Option "RTCornerButton" "2" ··· 187 188 }; 189 190 - config = lib.mkIf cfg.enable { 191 192 services.xserver.modules = [ pkg.out ]; 193 ··· 200 Section "InputClass" 201 Identifier "synaptics touchpad catchall" 202 MatchIsTouchpad "on" 203 - ${lib.optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''} 204 Driver "synaptics" 205 - ${lib.optionalString (cfg.minSpeed != null) ''Option "MinSpeed" "${cfg.minSpeed}"''} 206 - ${lib.optionalString (cfg.maxSpeed != null) ''Option "MaxSpeed" "${cfg.maxSpeed}"''} 207 - ${lib.optionalString (cfg.accelFactor != null) ''Option "AccelFactor" "${cfg.accelFactor}"''} 208 - ${lib.optionalString cfg.tapButtons tapConfig} 209 Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}" 210 Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}" 211 Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}" ··· 213 Option "HorizTwoFingerScroll" "${if cfg.horizTwoFingerScroll then "1" else "0"}" 214 Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}" 215 Option "HorizEdgeScroll" "${if cfg.horizEdgeScroll then "1" else "0"}" 216 - ${lib.optionalString cfg.palmDetect ''Option "PalmDetect" "1"''} 217 - ${lib.optionalString ( 218 cfg.palmMinWidth != null 219 ) ''Option "PalmMinWidth" "${toString cfg.palmMinWidth}"''} 220 - ${lib.optionalString (cfg.palmMinZ != null) ''Option "PalmMinZ" "${toString cfg.palmMinZ}"''} 221 - ${lib.optionalString ( 222 cfg.scrollDelta != null 223 ) ''Option "VertScrollDelta" "${toString cfg.scrollDelta}"''} 224 ${ 225 if !cfg.horizontalScroll then 226 ''Option "HorizScrollDelta" "0"'' 227 else 228 - (lib.optionalString ( 229 cfg.scrollDelta != null 230 ) ''Option "HorizScrollDelta" "${toString cfg.scrollDelta}"'') 231 }
··· 5 pkgs, 6 ... 7 }: 8 + 9 + with lib; 10 + 11 let 12 cfg = config.services.xserver.synaptics; 13 opt = options.services.xserver.synaptics; ··· 35 36 services.xserver.synaptics = { 37 38 + enable = mkOption { 39 + type = types.bool; 40 default = false; 41 description = "Whether to enable touchpad support. Deprecated: Consider services.libinput.enable."; 42 }; 43 44 + dev = mkOption { 45 + type = types.nullOr types.str; 46 default = null; 47 example = "/dev/input/event0"; 48 description = '' ··· 51 ''; 52 }; 53 54 + accelFactor = mkOption { 55 + type = types.nullOr types.str; 56 default = "0.001"; 57 description = "Cursor acceleration (how fast speed increases from minSpeed to maxSpeed)."; 58 }; 59 60 + minSpeed = mkOption { 61 + type = types.nullOr types.str; 62 default = "0.6"; 63 description = "Cursor speed factor for precision finger motion."; 64 }; 65 66 + maxSpeed = mkOption { 67 + type = types.nullOr types.str; 68 default = "1.0"; 69 description = "Cursor speed factor for highest-speed finger motion."; 70 }; 71 72 + scrollDelta = mkOption { 73 + type = types.nullOr types.int; 74 default = null; 75 example = 75; 76 description = "Move distance of the finger for a scroll event."; 77 }; 78 79 + twoFingerScroll = mkOption { 80 + type = types.bool; 81 default = false; 82 description = "Whether to enable two-finger drag-scrolling. Overridden by horizTwoFingerScroll and vertTwoFingerScroll."; 83 }; 84 85 + horizTwoFingerScroll = mkOption { 86 + type = types.bool; 87 default = cfg.twoFingerScroll; 88 + defaultText = literalExpression "config.${opt.twoFingerScroll}"; 89 description = "Whether to enable horizontal two-finger drag-scrolling."; 90 }; 91 92 + vertTwoFingerScroll = mkOption { 93 + type = types.bool; 94 default = cfg.twoFingerScroll; 95 + defaultText = literalExpression "config.${opt.twoFingerScroll}"; 96 description = "Whether to enable vertical two-finger drag-scrolling."; 97 }; 98 99 + horizEdgeScroll = mkOption { 100 + type = types.bool; 101 default = !cfg.horizTwoFingerScroll; 102 + defaultText = literalExpression "! config.${opt.horizTwoFingerScroll}"; 103 description = "Whether to enable horizontal edge drag-scrolling."; 104 }; 105 106 + vertEdgeScroll = mkOption { 107 + type = types.bool; 108 default = !cfg.vertTwoFingerScroll; 109 + defaultText = literalExpression "! config.${opt.vertTwoFingerScroll}"; 110 description = "Whether to enable vertical edge drag-scrolling."; 111 }; 112 113 + tapButtons = mkOption { 114 + type = types.bool; 115 default = true; 116 description = "Whether to enable tap buttons."; 117 }; 118 119 + buttonsMap = mkOption { 120 + type = types.listOf types.int; 121 default = [ 122 1 123 2 ··· 132 apply = map toString; 133 }; 134 135 + fingersMap = mkOption { 136 + type = types.listOf types.int; 137 default = [ 138 1 139 2 ··· 148 apply = map toString; 149 }; 150 151 + palmDetect = mkOption { 152 + type = types.bool; 153 default = false; 154 description = "Whether to enable palm detection (hardware support required)"; 155 }; 156 157 + palmMinWidth = mkOption { 158 + type = types.nullOr types.int; 159 default = null; 160 example = 5; 161 description = "Minimum finger width at which touch is considered a palm"; 162 }; 163 164 + palmMinZ = mkOption { 165 + type = types.nullOr types.int; 166 default = null; 167 example = 20; 168 description = "Minimum finger pressure at which touch is considered a palm"; 169 }; 170 171 + horizontalScroll = mkOption { 172 + type = types.bool; 173 default = true; 174 description = "Whether to enable horizontal scrolling (on touchpad)"; 175 }; 176 177 + additionalOptions = mkOption { 178 + type = types.str; 179 default = ""; 180 example = '' 181 Option "RTCornerButton" "2" ··· 190 191 }; 192 193 + config = mkIf cfg.enable { 194 195 services.xserver.modules = [ pkg.out ]; 196 ··· 203 Section "InputClass" 204 Identifier "synaptics touchpad catchall" 205 MatchIsTouchpad "on" 206 + ${optionalString (cfg.dev != null) ''MatchDevicePath "${cfg.dev}"''} 207 Driver "synaptics" 208 + ${optionalString (cfg.minSpeed != null) ''Option "MinSpeed" "${cfg.minSpeed}"''} 209 + ${optionalString (cfg.maxSpeed != null) ''Option "MaxSpeed" "${cfg.maxSpeed}"''} 210 + ${optionalString (cfg.accelFactor != null) ''Option "AccelFactor" "${cfg.accelFactor}"''} 211 + ${optionalString cfg.tapButtons tapConfig} 212 Option "ClickFinger1" "${builtins.elemAt cfg.buttonsMap 0}" 213 Option "ClickFinger2" "${builtins.elemAt cfg.buttonsMap 1}" 214 Option "ClickFinger3" "${builtins.elemAt cfg.buttonsMap 2}" ··· 216 Option "HorizTwoFingerScroll" "${if cfg.horizTwoFingerScroll then "1" else "0"}" 217 Option "VertEdgeScroll" "${if cfg.vertEdgeScroll then "1" else "0"}" 218 Option "HorizEdgeScroll" "${if cfg.horizEdgeScroll then "1" else "0"}" 219 + ${optionalString cfg.palmDetect ''Option "PalmDetect" "1"''} 220 + ${optionalString ( 221 cfg.palmMinWidth != null 222 ) ''Option "PalmMinWidth" "${toString cfg.palmMinWidth}"''} 223 + ${optionalString (cfg.palmMinZ != null) ''Option "PalmMinZ" "${toString cfg.palmMinZ}"''} 224 + ${optionalString ( 225 cfg.scrollDelta != null 226 ) ''Option "VertScrollDelta" "${toString cfg.scrollDelta}"''} 227 ${ 228 if !cfg.horizontalScroll then 229 ''Option "HorizScrollDelta" "0"'' 230 else 231 + (optionalString ( 232 cfg.scrollDelta != null 233 ) ''Option "HorizScrollDelta" "${toString cfg.scrollDelta}"'') 234 }
+6 -3
nixos/modules/services/x11/hardware/wacom.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.xserver.wacom; ··· 16 17 services.xserver.wacom = { 18 19 - enable = lib.mkOption { 20 - type = lib.types.bool; 21 default = false; 22 description = '' 23 Whether to enable the Wacom touchscreen/digitizer/tablet. ··· 34 35 }; 36 37 - config = lib.mkIf cfg.enable { 38 39 environment.systemPackages = [ pkgs.xf86_input_wacom ]; # provides xsetwacom 40
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.xserver.wacom; ··· 19 20 services.xserver.wacom = { 21 22 + enable = mkOption { 23 + type = types.bool; 24 default = false; 25 description = '' 26 Whether to enable the Wacom touchscreen/digitizer/tablet. ··· 37 38 }; 39 40 + config = mkIf cfg.enable { 41 42 environment.systemPackages = [ pkgs.xf86_input_wacom ]; # provides xsetwacom 43
+10 -9
nixos/modules/services/x11/imwheel.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.imwheel; 9 in 10 { 11 options = { 12 services.xserver.imwheel = { 13 - enable = lib.mkEnableOption "IMWheel service"; 14 15 - extraOptions = lib.mkOption { 16 - type = lib.types.listOf lib.types.str; 17 default = [ "--buttons=45" ]; 18 example = [ "--debug" ]; 19 description = '' ··· 22 ''; 23 }; 24 25 - rules = lib.mkOption { 26 - type = lib.types.attrsOf lib.types.str; 27 default = { }; 28 - example = lib.literalExpression '' 29 { 30 ".*" = ''' 31 None, Up, Button4, 8 ··· 48 }; 49 }; 50 51 - config = lib.mkIf cfg.enable { 52 environment.systemPackages = [ pkgs.imwheel ]; 53 54 environment.etc."X11/imwheel/imwheelrc".source = pkgs.writeText "imwheelrc" ( 55 - lib.concatStringsSep "\n\n" (lib.mapAttrsToList (rule: conf: "\"${rule}\"\n${conf}") cfg.rules) 56 ); 57 58 systemd.user.services.imwheel = { ··· 62 serviceConfig = { 63 ExecStart = 64 "${pkgs.imwheel}/bin/imwheel " 65 - + lib.escapeShellArgs ( 66 [ 67 "--detach" 68 "--kill"
··· 4 pkgs, 5 ... 6 }: 7 + with lib; 8 let 9 cfg = config.services.xserver.imwheel; 10 in 11 { 12 options = { 13 services.xserver.imwheel = { 14 + enable = mkEnableOption "IMWheel service"; 15 16 + extraOptions = mkOption { 17 + type = types.listOf types.str; 18 default = [ "--buttons=45" ]; 19 example = [ "--debug" ]; 20 description = '' ··· 23 ''; 24 }; 25 26 + rules = mkOption { 27 + type = types.attrsOf types.str; 28 default = { }; 29 + example = literalExpression '' 30 { 31 ".*" = ''' 32 None, Up, Button4, 8 ··· 49 }; 50 }; 51 52 + config = mkIf cfg.enable { 53 environment.systemPackages = [ pkgs.imwheel ]; 54 55 environment.etc."X11/imwheel/imwheelrc".source = pkgs.writeText "imwheelrc" ( 56 + concatStringsSep "\n\n" (mapAttrsToList (rule: conf: "\"${rule}\"\n${conf}") cfg.rules) 57 ); 58 59 systemd.user.services.imwheel = { ··· 63 serviceConfig = { 64 ExecStart = 65 "${pkgs.imwheel}/bin/imwheel " 66 + + escapeShellArgs ( 67 [ 68 "--detach" 69 "--kill"
+67 -64
nixos/modules/services/x11/picom.nix
··· 5 pkgs, 6 ... 7 }: 8 let 9 10 cfg = config.services.picom; ··· 12 13 pairOf = 14 x: 15 - with lib.types; 16 addCheck (listOf x) (y: length y == 2) // { description = "pair of ${x.description}"; }; 17 18 - mkDefaultAttrs = lib.mapAttrs (n: v: lib.mkDefault v); 19 20 # Basically a tinkered lib.generators.mkKeyValueDefault 21 # It either serializes a top-level definition "key: { values };" 22 # or an expression "key = { values };" 23 mkAttrsString = 24 top: 25 - lib.mapAttrsToList ( 26 k: v: 27 let 28 - sep = if (top && lib.isAttrs v) then ":" else "="; 29 in 30 - "${lib.escape [ sep ] k}${sep}${mkValueString v};" 31 ); 32 33 # This serializes a Nix expression to the libconfig format. 34 mkValueString = 35 v: 36 - if lib.types.bool.check v then 37 - lib.boolToString v 38 - else if lib.types.int.check v then 39 toString v 40 - else if lib.types.float.check v then 41 toString v 42 - else if lib.types.str.check v then 43 - "\"${lib.escape [ "\"" ] v}\"" 44 else if builtins.isList v then 45 - "[ ${lib.concatMapStringsSep " , " mkValueString v} ]" 46 - else if lib.types.attrs.check v then 47 - "{ ${lib.concatStringsSep " " (mkAttrsString false v)} }" 48 else 49 throw '' 50 invalid expression used in option services.picom.settings: 51 ${v} 52 ''; 53 54 - toConf = attrs: lib.concatStringsSep "\n" (mkAttrsString true cfg.settings); 55 56 configFile = pkgs.writeText "picom.conf" (toConf cfg.settings); 57 ··· 59 { 60 61 imports = [ 62 - (lib.mkAliasOptionModuleMD [ "services" "compton" ] [ "services" "picom" ]) 63 - (lib.mkRemovedOptionModule [ "services" "picom" "refreshRate" ] '' 64 This option corresponds to `refresh-rate`, which has been unused 65 since picom v6 and was subsequently removed by upstream. 66 See https://github.com/yshui/picom/commit/bcbc410 67 '') 68 - (lib.mkRemovedOptionModule [ "services" "picom" "experimentalBackends" ] '' 69 This option was removed by upstream since picom v10. 70 '') 71 ]; 72 73 options.services.picom = { 74 - enable = lib.mkOption { 75 - type = lib.types.bool; 76 default = false; 77 description = '' 78 Whether or not to enable Picom as the X.org composite manager. 79 ''; 80 }; 81 82 - package = lib.mkPackageOption pkgs "picom" { }; 83 84 - fade = lib.mkOption { 85 - type = lib.types.bool; 86 default = false; 87 description = '' 88 Fade windows in and out. 89 ''; 90 }; 91 92 - fadeDelta = lib.mkOption { 93 - type = lib.types.ints.positive; 94 default = 10; 95 example = 5; 96 description = '' ··· 98 ''; 99 }; 100 101 - fadeSteps = lib.mkOption { 102 - type = pairOf (lib.types.numbers.between 0.01 1); 103 default = [ 104 0.028 105 0.03 ··· 113 ''; 114 }; 115 116 - fadeExclude = lib.mkOption { 117 - type = lib.types.listOf lib.types.str; 118 default = [ ]; 119 example = [ 120 "window_type *= 'menu'" ··· 127 ''; 128 }; 129 130 - shadow = lib.mkOption { 131 - type = lib.types.bool; 132 default = false; 133 description = '' 134 Draw window shadows. 135 ''; 136 }; 137 138 - shadowOffsets = lib.mkOption { 139 - type = pairOf lib.types.int; 140 default = [ 141 (-15) 142 (-15) ··· 150 ''; 151 }; 152 153 - shadowOpacity = lib.mkOption { 154 - type = lib.types.numbers.between 0 1; 155 default = 0.75; 156 example = 0.8; 157 description = '' ··· 159 ''; 160 }; 161 162 - shadowExclude = lib.mkOption { 163 - type = lib.types.listOf lib.types.str; 164 default = [ ]; 165 example = [ 166 "window_type *= 'menu'" ··· 173 ''; 174 }; 175 176 - activeOpacity = lib.mkOption { 177 - type = lib.types.numbers.between 0 1; 178 default = 1.0; 179 example = 0.8; 180 description = '' ··· 182 ''; 183 }; 184 185 - inactiveOpacity = lib.mkOption { 186 - type = lib.types.numbers.between 0.1 1; 187 default = 1.0; 188 example = 0.8; 189 description = '' ··· 191 ''; 192 }; 193 194 - menuOpacity = lib.mkOption { 195 - type = lib.types.numbers.between 0 1; 196 default = 1.0; 197 example = 0.8; 198 description = '' ··· 200 ''; 201 }; 202 203 - wintypes = lib.mkOption { 204 - type = lib.types.attrs; 205 default = { 206 popup_menu = { 207 opacity = cfg.menuOpacity; ··· 210 opacity = cfg.menuOpacity; 211 }; 212 }; 213 - defaultText = lib.literalExpression '' 214 { 215 popup_menu = { opacity = config.${opt.menuOpacity}; }; 216 dropdown_menu = { opacity = config.${opt.menuOpacity}; }; ··· 222 ''; 223 }; 224 225 - opacityRules = lib.mkOption { 226 - type = lib.types.listOf lib.types.str; 227 default = [ ]; 228 example = [ 229 "95:class_g = 'URxvt' && !_NET_WM_STATE@:32a" ··· 234 ''; 235 }; 236 237 - backend = lib.mkOption { 238 - type = lib.types.enum [ 239 "egl" 240 "glx" 241 "xrender" ··· 247 ''; 248 }; 249 250 - vSync = lib.mkOption { 251 type = 252 - with lib.types; 253 either bool (enum [ 254 "none" 255 "drm" ··· 265 res = x != "none"; 266 msg = 267 "The type of services.picom.vSync has changed to bool:" 268 - + " interpreting ${x} as ${lib.boolToString res}"; 269 in 270 - if lib.isBool x then x else lib.warn msg res; 271 272 description = '' 273 Enable vertical synchronization. Chooses the best method ··· 277 }; 278 279 settings = 280 - with lib.types; 281 let 282 scalar = 283 oneOf [ ··· 310 }; 311 312 in 313 - lib.mkOption { 314 type = topLevel; 315 default = { }; 316 - example = lib.literalExpression '' 317 blur = 318 { method = "gaussian"; 319 size = 10; ··· 328 }; 329 }; 330 331 - config = lib.mkIf cfg.enable { 332 services.picom.settings = mkDefaultAttrs { 333 # fading 334 fading = cfg.fade; 335 fade-delta = cfg.fadeDelta; 336 - fade-in-step = lib.elemAt cfg.fadeSteps 0; 337 - fade-out-step = lib.elemAt cfg.fadeSteps 1; 338 fade-exclude = cfg.fadeExclude; 339 340 # shadows 341 shadow = cfg.shadow; 342 - shadow-offset-x = lib.elemAt cfg.shadowOffsets 0; 343 - shadow-offset-y = lib.elemAt cfg.shadowOffsets 1; 344 shadow-opacity = cfg.shadowOpacity; 345 shadow-exclude = cfg.shadowExclude; 346 ··· 363 partOf = [ "graphical-session.target" ]; 364 365 # Temporarily fixes corrupt colours with Mesa 18 366 - environment = lib.mkIf (cfg.backend == "glx") { 367 allow_rgb10_configs = "false"; 368 }; 369 370 serviceConfig = { 371 - ExecStart = "${lib.getExe cfg.package} --config ${configFile}"; 372 RestartSec = 3; 373 Restart = "always"; 374 };
··· 5 pkgs, 6 ... 7 }: 8 + 9 + with lib; 10 + 11 let 12 13 cfg = config.services.picom; ··· 15 16 pairOf = 17 x: 18 + with types; 19 addCheck (listOf x) (y: length y == 2) // { description = "pair of ${x.description}"; }; 20 21 + mkDefaultAttrs = mapAttrs (n: v: mkDefault v); 22 23 # Basically a tinkered lib.generators.mkKeyValueDefault 24 # It either serializes a top-level definition "key: { values };" 25 # or an expression "key = { values };" 26 mkAttrsString = 27 top: 28 + mapAttrsToList ( 29 k: v: 30 let 31 + sep = if (top && isAttrs v) then ":" else "="; 32 in 33 + "${escape [ sep ] k}${sep}${mkValueString v};" 34 ); 35 36 # This serializes a Nix expression to the libconfig format. 37 mkValueString = 38 v: 39 + if types.bool.check v then 40 + boolToString v 41 + else if types.int.check v then 42 toString v 43 + else if types.float.check v then 44 toString v 45 + else if types.str.check v then 46 + "\"${escape [ "\"" ] v}\"" 47 else if builtins.isList v then 48 + "[ ${concatMapStringsSep " , " mkValueString v} ]" 49 + else if types.attrs.check v then 50 + "{ ${concatStringsSep " " (mkAttrsString false v)} }" 51 else 52 throw '' 53 invalid expression used in option services.picom.settings: 54 ${v} 55 ''; 56 57 + toConf = attrs: concatStringsSep "\n" (mkAttrsString true cfg.settings); 58 59 configFile = pkgs.writeText "picom.conf" (toConf cfg.settings); 60 ··· 62 { 63 64 imports = [ 65 + (mkAliasOptionModuleMD [ "services" "compton" ] [ "services" "picom" ]) 66 + (mkRemovedOptionModule [ "services" "picom" "refreshRate" ] '' 67 This option corresponds to `refresh-rate`, which has been unused 68 since picom v6 and was subsequently removed by upstream. 69 See https://github.com/yshui/picom/commit/bcbc410 70 '') 71 + (mkRemovedOptionModule [ "services" "picom" "experimentalBackends" ] '' 72 This option was removed by upstream since picom v10. 73 '') 74 ]; 75 76 options.services.picom = { 77 + enable = mkOption { 78 + type = types.bool; 79 default = false; 80 description = '' 81 Whether or not to enable Picom as the X.org composite manager. 82 ''; 83 }; 84 85 + package = mkPackageOption pkgs "picom" { }; 86 87 + fade = mkOption { 88 + type = types.bool; 89 default = false; 90 description = '' 91 Fade windows in and out. 92 ''; 93 }; 94 95 + fadeDelta = mkOption { 96 + type = types.ints.positive; 97 default = 10; 98 example = 5; 99 description = '' ··· 101 ''; 102 }; 103 104 + fadeSteps = mkOption { 105 + type = pairOf (types.numbers.between 0.01 1); 106 default = [ 107 0.028 108 0.03 ··· 116 ''; 117 }; 118 119 + fadeExclude = mkOption { 120 + type = types.listOf types.str; 121 default = [ ]; 122 example = [ 123 "window_type *= 'menu'" ··· 130 ''; 131 }; 132 133 + shadow = mkOption { 134 + type = types.bool; 135 default = false; 136 description = '' 137 Draw window shadows. 138 ''; 139 }; 140 141 + shadowOffsets = mkOption { 142 + type = pairOf types.int; 143 default = [ 144 (-15) 145 (-15) ··· 153 ''; 154 }; 155 156 + shadowOpacity = mkOption { 157 + type = types.numbers.between 0 1; 158 default = 0.75; 159 example = 0.8; 160 description = '' ··· 162 ''; 163 }; 164 165 + shadowExclude = mkOption { 166 + type = types.listOf types.str; 167 default = [ ]; 168 example = [ 169 "window_type *= 'menu'" ··· 176 ''; 177 }; 178 179 + activeOpacity = mkOption { 180 + type = types.numbers.between 0 1; 181 default = 1.0; 182 example = 0.8; 183 description = '' ··· 185 ''; 186 }; 187 188 + inactiveOpacity = mkOption { 189 + type = types.numbers.between 0.1 1; 190 default = 1.0; 191 example = 0.8; 192 description = '' ··· 194 ''; 195 }; 196 197 + menuOpacity = mkOption { 198 + type = types.numbers.between 0 1; 199 default = 1.0; 200 example = 0.8; 201 description = '' ··· 203 ''; 204 }; 205 206 + wintypes = mkOption { 207 + type = types.attrs; 208 default = { 209 popup_menu = { 210 opacity = cfg.menuOpacity; ··· 213 opacity = cfg.menuOpacity; 214 }; 215 }; 216 + defaultText = literalExpression '' 217 { 218 popup_menu = { opacity = config.${opt.menuOpacity}; }; 219 dropdown_menu = { opacity = config.${opt.menuOpacity}; }; ··· 225 ''; 226 }; 227 228 + opacityRules = mkOption { 229 + type = types.listOf types.str; 230 default = [ ]; 231 example = [ 232 "95:class_g = 'URxvt' && !_NET_WM_STATE@:32a" ··· 237 ''; 238 }; 239 240 + backend = mkOption { 241 + type = types.enum [ 242 "egl" 243 "glx" 244 "xrender" ··· 250 ''; 251 }; 252 253 + vSync = mkOption { 254 type = 255 + with types; 256 either bool (enum [ 257 "none" 258 "drm" ··· 268 res = x != "none"; 269 msg = 270 "The type of services.picom.vSync has changed to bool:" 271 + + " interpreting ${x} as ${boolToString res}"; 272 in 273 + if isBool x then x else warn msg res; 274 275 description = '' 276 Enable vertical synchronization. Chooses the best method ··· 280 }; 281 282 settings = 283 + with types; 284 let 285 scalar = 286 oneOf [ ··· 313 }; 314 315 in 316 + mkOption { 317 type = topLevel; 318 default = { }; 319 + example = literalExpression '' 320 blur = 321 { method = "gaussian"; 322 size = 10; ··· 331 }; 332 }; 333 334 + config = mkIf cfg.enable { 335 services.picom.settings = mkDefaultAttrs { 336 # fading 337 fading = cfg.fade; 338 fade-delta = cfg.fadeDelta; 339 + fade-in-step = elemAt cfg.fadeSteps 0; 340 + fade-out-step = elemAt cfg.fadeSteps 1; 341 fade-exclude = cfg.fadeExclude; 342 343 # shadows 344 shadow = cfg.shadow; 345 + shadow-offset-x = elemAt cfg.shadowOffsets 0; 346 + shadow-offset-y = elemAt cfg.shadowOffsets 1; 347 shadow-opacity = cfg.shadowOpacity; 348 shadow-exclude = cfg.shadowExclude; 349 ··· 366 partOf = [ "graphical-session.target" ]; 367 368 # Temporarily fixes corrupt colours with Mesa 18 369 + environment = mkIf (cfg.backend == "glx") { 370 allow_rgb10_configs = "false"; 371 }; 372 373 serviceConfig = { 374 + ExecStart = "${getExe cfg.package} --config ${configFile}"; 375 RestartSec = 3; 376 Restart = "always"; 377 };
+24 -21
nixos/modules/services/x11/redshift.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.redshift; ··· 13 { 14 15 imports = [ 16 - (lib.mkChangedOptionModule [ "services" "redshift" "latitude" ] [ "location" "latitude" ] ( 17 config: 18 let 19 - value = lib.getAttrFromPath [ "services" "redshift" "latitude" ] config; 20 in 21 if value == null then 22 throw "services.redshift.latitude is set to null, you can remove this" 23 else 24 builtins.fromJSON value 25 )) 26 - (lib.mkChangedOptionModule [ "services" "redshift" "longitude" ] [ "location" "longitude" ] ( 27 config: 28 let 29 - value = lib.getAttrFromPath [ "services" "redshift" "longitude" ] config; 30 in 31 if value == null then 32 throw "services.redshift.longitude is set to null, you can remove this" 33 else 34 builtins.fromJSON value 35 )) 36 - (lib.mkRenamedOptionModule [ "services" "redshift" "provider" ] [ "location" "provider" ]) 37 ]; 38 39 options.services.redshift = { 40 - enable = lib.mkOption { 41 - type = lib.types.bool; 42 default = false; 43 description = '' 44 Enable Redshift to change your screen's colour temperature depending on ··· 47 }; 48 49 temperature = { 50 - day = lib.mkOption { 51 - type = lib.types.int; 52 default = 5500; 53 description = '' 54 Colour temperature to use during the day, between 55 `1000` and `25000` K. 56 ''; 57 }; 58 - night = lib.mkOption { 59 - type = lib.types.int; 60 default = 3700; 61 description = '' 62 Colour temperature to use at night, between ··· 66 }; 67 68 brightness = { 69 - day = lib.mkOption { 70 - type = lib.types.str; 71 default = "1"; 72 description = '' 73 Screen brightness to apply during the day, 74 between `0.1` and `1.0`. 75 ''; 76 }; 77 - night = lib.mkOption { 78 - type = lib.types.str; 79 default = "1"; 80 description = '' 81 Screen brightness to apply during the night, ··· 84 }; 85 }; 86 87 - package = lib.mkPackageOption pkgs "redshift" { }; 88 89 - executable = lib.mkOption { 90 - type = lib.types.str; 91 default = "/bin/redshift"; 92 example = "/bin/redshift-gtk"; 93 description = '' ··· 95 ''; 96 }; 97 98 - extraOptions = lib.mkOption { 99 - type = lib.types.listOf lib.types.str; 100 default = [ ]; 101 example = [ 102 "-v" ··· 109 }; 110 }; 111 112 - config = lib.mkIf cfg.enable { 113 # needed so that .desktop files are installed, which geoclue cares about 114 environment.systemPackages = [ cfg.package ]; 115
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.redshift; ··· 16 { 17 18 imports = [ 19 + (mkChangedOptionModule [ "services" "redshift" "latitude" ] [ "location" "latitude" ] ( 20 config: 21 let 22 + value = getAttrFromPath [ "services" "redshift" "latitude" ] config; 23 in 24 if value == null then 25 throw "services.redshift.latitude is set to null, you can remove this" 26 else 27 builtins.fromJSON value 28 )) 29 + (mkChangedOptionModule [ "services" "redshift" "longitude" ] [ "location" "longitude" ] ( 30 config: 31 let 32 + value = getAttrFromPath [ "services" "redshift" "longitude" ] config; 33 in 34 if value == null then 35 throw "services.redshift.longitude is set to null, you can remove this" 36 else 37 builtins.fromJSON value 38 )) 39 + (mkRenamedOptionModule [ "services" "redshift" "provider" ] [ "location" "provider" ]) 40 ]; 41 42 options.services.redshift = { 43 + enable = mkOption { 44 + type = types.bool; 45 default = false; 46 description = '' 47 Enable Redshift to change your screen's colour temperature depending on ··· 50 }; 51 52 temperature = { 53 + day = mkOption { 54 + type = types.int; 55 default = 5500; 56 description = '' 57 Colour temperature to use during the day, between 58 `1000` and `25000` K. 59 ''; 60 }; 61 + night = mkOption { 62 + type = types.int; 63 default = 3700; 64 description = '' 65 Colour temperature to use at night, between ··· 69 }; 70 71 brightness = { 72 + day = mkOption { 73 + type = types.str; 74 default = "1"; 75 description = '' 76 Screen brightness to apply during the day, 77 between `0.1` and `1.0`. 78 ''; 79 }; 80 + night = mkOption { 81 + type = types.str; 82 default = "1"; 83 description = '' 84 Screen brightness to apply during the night, ··· 87 }; 88 }; 89 90 + package = mkPackageOption pkgs "redshift" { }; 91 92 + executable = mkOption { 93 + type = types.str; 94 default = "/bin/redshift"; 95 example = "/bin/redshift-gtk"; 96 description = '' ··· 98 ''; 99 }; 100 101 + extraOptions = mkOption { 102 + type = types.listOf types.str; 103 default = [ ]; 104 example = [ 105 "-v" ··· 112 }; 113 }; 114 115 + config = mkIf cfg.enable { 116 # needed so that .desktop files are installed, which geoclue cares about 117 environment.systemPackages = [ cfg.package ]; 118
+7 -4
nixos/modules/services/x11/touchegg.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.touchegg; 9 10 in 11 { 12 meta = { 13 - maintainers = lib.teams.pantheon.members; 14 }; 15 16 ###### interface 17 options.services.touchegg = { 18 - enable = lib.mkEnableOption "touchegg, a multi-touch gesture recognizer"; 19 20 - package = lib.mkPackageOption pkgs "touchegg" { }; 21 }; 22 23 ###### implementation 24 - config = lib.mkIf cfg.enable { 25 systemd.services.touchegg = { 26 description = "Touchegg Daemon"; 27 serviceConfig = {
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.touchegg; 12 13 in 14 { 15 meta = { 16 + maintainers = teams.pantheon.members; 17 }; 18 19 ###### interface 20 options.services.touchegg = { 21 + enable = mkEnableOption "touchegg, a multi-touch gesture recognizer"; 22 23 + package = mkPackageOption pkgs "touchegg" { }; 24 }; 25 26 ###### implementation 27 + config = mkIf cfg.enable { 28 systemd.services.touchegg = { 29 description = "Touchegg Daemon"; 30 serviceConfig = {
+14 -11
nixos/modules/services/x11/unclutter-xfixes.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.unclutter-xfixes; 9 ··· 11 { 12 options.services.unclutter-xfixes = { 13 14 - enable = lib.mkOption { 15 description = "Enable unclutter-xfixes to hide your mouse cursor when inactive."; 16 - type = lib.types.bool; 17 default = false; 18 }; 19 20 - package = lib.mkPackageOption pkgs "unclutter-xfixes" { }; 21 22 - timeout = lib.mkOption { 23 description = "Number of seconds before the cursor is marked inactive."; 24 - type = lib.types.int; 25 default = 1; 26 }; 27 28 - threshold = lib.mkOption { 29 description = "Minimum number of pixels considered cursor movement."; 30 - type = lib.types.int; 31 default = 1; 32 }; 33 34 - extraOptions = lib.mkOption { 35 description = "More arguments to pass to the unclutter-xfixes command."; 36 - type = lib.types.listOf lib.types.str; 37 default = [ ]; 38 example = [ 39 "exclude-root" ··· 43 }; 44 }; 45 46 - config = lib.mkIf cfg.enable { 47 systemd.user.services.unclutter-xfixes = { 48 description = "unclutter-xfixes"; 49 wantedBy = [ "graphical-session.target" ]; ··· 52 ${cfg.package}/bin/unclutter \ 53 --timeout ${toString cfg.timeout} \ 54 --jitter ${toString (cfg.threshold - 1)} \ 55 - ${lib.concatMapStrings (x: " --" + x) cfg.extraOptions} \ 56 ''; 57 serviceConfig.RestartSec = 3; 58 serviceConfig.Restart = "always";
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.unclutter-xfixes; 12 ··· 14 { 15 options.services.unclutter-xfixes = { 16 17 + enable = mkOption { 18 description = "Enable unclutter-xfixes to hide your mouse cursor when inactive."; 19 + type = types.bool; 20 default = false; 21 }; 22 23 + package = mkPackageOption pkgs "unclutter-xfixes" { }; 24 25 + timeout = mkOption { 26 description = "Number of seconds before the cursor is marked inactive."; 27 + type = types.int; 28 default = 1; 29 }; 30 31 + threshold = mkOption { 32 description = "Minimum number of pixels considered cursor movement."; 33 + type = types.int; 34 default = 1; 35 }; 36 37 + extraOptions = mkOption { 38 description = "More arguments to pass to the unclutter-xfixes command."; 39 + type = types.listOf types.str; 40 default = [ ]; 41 example = [ 42 "exclude-root" ··· 46 }; 47 }; 48 49 + config = mkIf cfg.enable { 50 systemd.user.services.unclutter-xfixes = { 51 description = "unclutter-xfixes"; 52 wantedBy = [ "graphical-session.target" ]; ··· 55 ${cfg.package}/bin/unclutter \ 56 --timeout ${toString cfg.timeout} \ 57 --jitter ${toString (cfg.threshold - 1)} \ 58 + ${concatMapStrings (x: " --" + x) cfg.extraOptions} \ 59 ''; 60 serviceConfig.RestartSec = 3; 61 serviceConfig.Restart = "always";
+21 -18
nixos/modules/services/x11/unclutter.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.unclutter; 9 ··· 11 { 12 options.services.unclutter = { 13 14 - enable = lib.mkOption { 15 description = "Enable unclutter to hide your mouse cursor when inactive"; 16 - type = lib.types.bool; 17 default = false; 18 }; 19 20 - package = lib.mkPackageOption pkgs "unclutter" { }; 21 22 - keystroke = lib.mkOption { 23 description = "Wait for a keystroke before hiding the cursor"; 24 - type = lib.types.bool; 25 default = false; 26 }; 27 28 - timeout = lib.mkOption { 29 description = "Number of seconds before the cursor is marked inactive"; 30 - type = lib.types.int; 31 default = 1; 32 }; 33 34 - threshold = lib.mkOption { 35 description = "Minimum number of pixels considered cursor movement"; 36 - type = lib.types.int; 37 default = 1; 38 }; 39 40 - excluded = lib.mkOption { 41 description = "Names of windows where unclutter should not apply"; 42 - type = lib.types.listOf lib.types.str; 43 default = [ ]; 44 example = [ "" ]; 45 }; 46 47 - extraOptions = lib.mkOption { 48 description = "More arguments to pass to the unclutter command"; 49 - type = lib.types.listOf lib.types.str; 50 default = [ ]; 51 example = [ 52 "noevent" ··· 55 }; 56 }; 57 58 - config = lib.mkIf cfg.enable { 59 systemd.user.services.unclutter = { 60 description = "unclutter"; 61 wantedBy = [ "graphical-session.target" ]; ··· 64 ${cfg.package}/bin/unclutter \ 65 -idle ${toString cfg.timeout} \ 66 -jitter ${toString (cfg.threshold - 1)} \ 67 - ${lib.optionalString cfg.keystroke "-keystroke"} \ 68 - ${lib.concatMapStrings (x: " -" + x) cfg.extraOptions} \ 69 - -not ${lib.concatStringsSep " " cfg.excluded} \ 70 ''; 71 serviceConfig.PassEnvironment = "DISPLAY"; 72 serviceConfig.RestartSec = 3; ··· 75 }; 76 77 imports = [ 78 - (lib.mkRenamedOptionModule 79 [ "services" "unclutter" "threeshold" ] 80 [ "services" "unclutter" "threshold" ] 81 )
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.unclutter; 12 ··· 14 { 15 options.services.unclutter = { 16 17 + enable = mkOption { 18 description = "Enable unclutter to hide your mouse cursor when inactive"; 19 + type = types.bool; 20 default = false; 21 }; 22 23 + package = mkPackageOption pkgs "unclutter" { }; 24 25 + keystroke = mkOption { 26 description = "Wait for a keystroke before hiding the cursor"; 27 + type = types.bool; 28 default = false; 29 }; 30 31 + timeout = mkOption { 32 description = "Number of seconds before the cursor is marked inactive"; 33 + type = types.int; 34 default = 1; 35 }; 36 37 + threshold = mkOption { 38 description = "Minimum number of pixels considered cursor movement"; 39 + type = types.int; 40 default = 1; 41 }; 42 43 + excluded = mkOption { 44 description = "Names of windows where unclutter should not apply"; 45 + type = types.listOf types.str; 46 default = [ ]; 47 example = [ "" ]; 48 }; 49 50 + extraOptions = mkOption { 51 description = "More arguments to pass to the unclutter command"; 52 + type = types.listOf types.str; 53 default = [ ]; 54 example = [ 55 "noevent" ··· 58 }; 59 }; 60 61 + config = mkIf cfg.enable { 62 systemd.user.services.unclutter = { 63 description = "unclutter"; 64 wantedBy = [ "graphical-session.target" ]; ··· 67 ${cfg.package}/bin/unclutter \ 68 -idle ${toString cfg.timeout} \ 69 -jitter ${toString (cfg.threshold - 1)} \ 70 + ${optionalString cfg.keystroke "-keystroke"} \ 71 + ${concatMapStrings (x: " -" + x) cfg.extraOptions} \ 72 + -not ${concatStringsSep " " cfg.excluded} \ 73 ''; 74 serviceConfig.PassEnvironment = "DISPLAY"; 75 serviceConfig.RestartSec = 3; ··· 78 }; 79 80 imports = [ 81 + (mkRenamedOptionModule 82 [ "services" "unclutter" "threeshold" ] 83 [ "services" "unclutter" "threshold" ] 84 )
+8 -4
nixos/modules/services/x11/urxvtd.nix
··· 4 pkgs, 5 ... 6 }: 7 # maintainer: siddharthist 8 let 9 cfg = config.services.urxvtd; 10 in 11 { 12 options.services.urxvtd = { 13 - enable = lib.mkOption { 14 - type = lib.types.bool; 15 default = false; 16 description = '' 17 Enable urxvtd, the urxvt terminal daemon. To use urxvtd, run ··· 19 ''; 20 }; 21 22 - package = lib.mkPackageOption pkgs "rxvt-unicode" { }; 23 }; 24 25 - config = lib.mkIf cfg.enable { 26 systemd.user.services.urxvtd = { 27 description = "urxvt terminal daemon"; 28 wantedBy = [ "graphical-session.target" ];
··· 4 pkgs, 5 ... 6 }: 7 + 8 # maintainer: siddharthist 9 + 10 + with lib; 11 + 12 let 13 cfg = config.services.urxvtd; 14 in 15 { 16 options.services.urxvtd = { 17 + enable = mkOption { 18 + type = types.bool; 19 default = false; 20 description = '' 21 Enable urxvtd, the urxvt terminal daemon. To use urxvtd, run ··· 23 ''; 24 }; 25 26 + package = mkPackageOption pkgs "rxvt-unicode" { }; 27 }; 28 29 + config = mkIf cfg.enable { 30 systemd.user.services.urxvtd = { 31 description = "urxvt terminal daemon"; 32 wantedBy = [ "graphical-session.target" ];
+6 -3
nixos/modules/services/x11/window-managers/2bwm.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.xserver.windowManager."2bwm"; ··· 15 ###### interface 16 17 options = { 18 - services.xserver.windowManager."2bwm".enable = lib.mkEnableOption "2bwm"; 19 }; 20 21 ###### implementation 22 23 - config = lib.mkIf cfg.enable { 24 25 - services.xserver.windowManager.session = lib.singleton { 26 name = "2bwm"; 27 start = '' 28 ${pkgs._2bwm}/bin/2bwm &
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.xserver.windowManager."2bwm"; ··· 18 ###### interface 19 20 options = { 21 + services.xserver.windowManager."2bwm".enable = mkEnableOption "2bwm"; 22 }; 23 24 ###### implementation 25 26 + config = mkIf cfg.enable { 27 28 + services.xserver.windowManager.session = singleton { 29 name = "2bwm"; 30 start = '' 31 ${pkgs._2bwm}/bin/2bwm &
+6 -3
nixos/modules/services/x11/window-managers/afterstep.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.windowManager.afterstep; 9 in 10 { 11 ###### interface 12 options = { 13 - services.xserver.windowManager.afterstep.enable = lib.mkEnableOption "afterstep"; 14 }; 15 16 ###### implementation 17 - config = lib.mkIf cfg.enable { 18 - services.xserver.windowManager.session = lib.singleton { 19 name = "afterstep"; 20 start = '' 21 ${pkgs.afterstep}/bin/afterstep &
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.windowManager.afterstep; 12 in 13 { 14 ###### interface 15 options = { 16 + services.xserver.windowManager.afterstep.enable = mkEnableOption "afterstep"; 17 }; 18 19 ###### implementation 20 + config = mkIf cfg.enable { 21 + services.xserver.windowManager.session = singleton { 22 name = "afterstep"; 23 start = '' 24 ${pkgs.afterstep}/bin/afterstep &
+12 -9
nixos/modules/services/x11/window-managers/awesome.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 9 cfg = config.services.xserver.windowManager.awesome; ··· 22 23 services.xserver.windowManager.awesome = { 24 25 - enable = lib.mkEnableOption "Awesome window manager"; 26 27 - luaModules = lib.mkOption { 28 default = [ ]; 29 - type = lib.types.listOf lib.types.package; 30 description = "List of lua packages available for being used in the Awesome configuration."; 31 - example = lib.literalExpression "[ pkgs.luaPackages.vicious ]"; 32 }; 33 34 - package = lib.mkPackageOption pkgs "awesome" { }; 35 36 - noArgb = lib.mkOption { 37 default = false; 38 - type = lib.types.bool; 39 description = "Disable client transparency support, which can be greatly detrimental to performance in some setups"; 40 }; 41 }; ··· 44 45 ###### implementation 46 47 - config = lib.mkIf cfg.enable { 48 49 - services.xserver.windowManager.session = lib.singleton { 50 name = "awesome"; 51 start = '' 52 ${awesome}/bin/awesome ${lib.optionalString cfg.noArgb "--no-argb"} ${makeSearchPath cfg.luaModules} &
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 12 cfg = config.services.xserver.windowManager.awesome; ··· 25 26 services.xserver.windowManager.awesome = { 27 28 + enable = mkEnableOption "Awesome window manager"; 29 30 + luaModules = mkOption { 31 default = [ ]; 32 + type = types.listOf types.package; 33 description = "List of lua packages available for being used in the Awesome configuration."; 34 + example = literalExpression "[ pkgs.luaPackages.vicious ]"; 35 }; 36 37 + package = mkPackageOption pkgs "awesome" { }; 38 39 + noArgb = mkOption { 40 default = false; 41 + type = types.bool; 42 description = "Disable client transparency support, which can be greatly detrimental to performance in some setups"; 43 }; 44 }; ··· 47 48 ###### implementation 49 50 + config = mkIf cfg.enable { 51 52 + services.xserver.windowManager.session = singleton { 53 name = "awesome"; 54 start = '' 55 ${awesome}/bin/awesome ${lib.optionalString cfg.noArgb "--no-argb"} ${makeSearchPath cfg.luaModules} &
+6 -3
nixos/modules/services/x11/window-managers/berry.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.windowManager.berry; 9 in 10 { 11 ###### interface 12 options = { 13 - services.xserver.windowManager.berry.enable = lib.mkEnableOption "berry"; 14 }; 15 16 ###### implementation 17 - config = lib.mkIf cfg.enable { 18 - services.xserver.windowManager.session = lib.singleton { 19 name = "berry"; 20 start = '' 21 ${pkgs.berry}/bin/berry &
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.windowManager.berry; 12 in 13 { 14 ###### interface 15 options = { 16 + services.xserver.windowManager.berry.enable = mkEnableOption "berry"; 17 }; 18 19 ###### implementation 20 + config = mkIf cfg.enable { 21 + services.xserver.windowManager.session = singleton { 22 name = "berry"; 23 start = '' 24 ${pkgs.berry}/bin/berry &
+19 -16
nixos/modules/services/x11/window-managers/bspwm.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.windowManager.bspwm; 9 in ··· 11 { 12 options = { 13 services.xserver.windowManager.bspwm = { 14 - enable = lib.mkEnableOption "bspwm"; 15 16 - package = lib.mkPackageOption pkgs "bspwm" { 17 example = "bspwm-unstable"; 18 }; 19 - configFile = lib.mkOption { 20 - type = with lib.types; nullOr path; 21 - example = lib.literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc"''; 22 default = null; 23 description = '' 24 Path to the bspwm configuration file. ··· 27 }; 28 29 sxhkd = { 30 - package = lib.mkPackageOption pkgs "sxhkd" { 31 example = "sxhkd-unstable"; 32 }; 33 - configFile = lib.mkOption { 34 - type = with lib.types; nullOr path; 35 - example = lib.literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc"''; 36 default = null; 37 description = '' 38 Path to the sxhkd configuration file. ··· 43 }; 44 }; 45 46 - config = lib.mkIf cfg.enable { 47 - services.xserver.windowManager.session = lib.singleton { 48 name = "bspwm"; 49 start = '' 50 export _JAVA_AWT_WM_NONREPARENTING=1 51 SXHKD_SHELL=/bin/sh ${cfg.sxhkd.package}/bin/sxhkd ${ 52 - lib.optionalString (cfg.sxhkd.configFile != null) "-c \"${cfg.sxhkd.configFile}\"" 53 } & 54 - ${cfg.package}/bin/bspwm ${lib.optionalString (cfg.configFile != null) "-c \"${cfg.configFile}\""} & 55 waitPID=$! 56 ''; 57 }; ··· 59 }; 60 61 imports = [ 62 - (lib.mkRemovedOptionModule [ "services" "xserver" "windowManager" "bspwm-unstable" "enable" ] 63 "Use services.xserver.windowManager.bspwm.enable and set services.xserver.windowManager.bspwm.package to pkgs.bspwm-unstable to use the unstable version of bspwm." 64 ) 65 - (lib.mkRemovedOptionModule [ 66 "services" 67 "xserver" 68 "windowManager" 69 "bspwm" 70 "startThroughSession" 71 ] "bspwm package does not provide bspwm-session anymore.") 72 - (lib.mkRemovedOptionModule [ 73 "services" 74 "xserver" 75 "windowManager"
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.windowManager.bspwm; 12 in ··· 14 { 15 options = { 16 services.xserver.windowManager.bspwm = { 17 + enable = mkEnableOption "bspwm"; 18 19 + package = mkPackageOption pkgs "bspwm" { 20 example = "bspwm-unstable"; 21 }; 22 + configFile = mkOption { 23 + type = with types; nullOr path; 24 + example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/bspwmrc"''; 25 default = null; 26 description = '' 27 Path to the bspwm configuration file. ··· 30 }; 31 32 sxhkd = { 33 + package = mkPackageOption pkgs "sxhkd" { 34 example = "sxhkd-unstable"; 35 }; 36 + configFile = mkOption { 37 + type = with types; nullOr path; 38 + example = literalExpression ''"''${pkgs.bspwm}/share/doc/bspwm/examples/sxhkdrc"''; 39 default = null; 40 description = '' 41 Path to the sxhkd configuration file. ··· 46 }; 47 }; 48 49 + config = mkIf cfg.enable { 50 + services.xserver.windowManager.session = singleton { 51 name = "bspwm"; 52 start = '' 53 export _JAVA_AWT_WM_NONREPARENTING=1 54 SXHKD_SHELL=/bin/sh ${cfg.sxhkd.package}/bin/sxhkd ${ 55 + optionalString (cfg.sxhkd.configFile != null) "-c \"${cfg.sxhkd.configFile}\"" 56 } & 57 + ${cfg.package}/bin/bspwm ${optionalString (cfg.configFile != null) "-c \"${cfg.configFile}\""} & 58 waitPID=$! 59 ''; 60 }; ··· 62 }; 63 64 imports = [ 65 + (mkRemovedOptionModule [ "services" "xserver" "windowManager" "bspwm-unstable" "enable" ] 66 "Use services.xserver.windowManager.bspwm.enable and set services.xserver.windowManager.bspwm.package to pkgs.bspwm-unstable to use the unstable version of bspwm." 67 ) 68 + (mkRemovedOptionModule [ 69 "services" 70 "xserver" 71 "windowManager" 72 "bspwm" 73 "startThroughSession" 74 ] "bspwm package does not provide bspwm-session anymore.") 75 + (mkRemovedOptionModule [ 76 "services" 77 "xserver" 78 "windowManager"
+7 -4
nixos/modules/services/x11/window-managers/clfswm.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.windowManager.clfswm; 9 in ··· 11 { 12 options = { 13 services.xserver.windowManager.clfswm = { 14 - enable = lib.mkEnableOption "clfswm"; 15 - package = lib.mkPackageOption pkgs [ "sbclPackages" "clfswm" ] { }; 16 }; 17 }; 18 19 - config = lib.mkIf cfg.enable { 20 - services.xserver.windowManager.session = lib.singleton { 21 name = "clfswm"; 22 start = '' 23 ${cfg.package}/bin/clfswm &
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.windowManager.clfswm; 12 in ··· 14 { 15 options = { 16 services.xserver.windowManager.clfswm = { 17 + enable = mkEnableOption "clfswm"; 18 + package = mkPackageOption pkgs [ "sbclPackages" "clfswm" ] { }; 19 }; 20 }; 21 22 + config = mkIf cfg.enable { 23 + services.xserver.windowManager.session = singleton { 24 name = "clfswm"; 25 start = '' 26 ${cfg.package}/bin/clfswm &
+6 -3
nixos/modules/services/x11/window-managers/cwm.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.windowManager.cwm; 9 in 10 { 11 options = { 12 - services.xserver.windowManager.cwm.enable = lib.mkEnableOption "cwm"; 13 }; 14 - config = lib.mkIf cfg.enable { 15 - services.xserver.windowManager.session = lib.singleton { 16 name = "cwm"; 17 start = '' 18 cwm &
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.windowManager.cwm; 12 in 13 { 14 options = { 15 + services.xserver.windowManager.cwm.enable = mkEnableOption "cwm"; 16 }; 17 + config = mkIf cfg.enable { 18 + services.xserver.windowManager.session = singleton { 19 name = "cwm"; 20 start = '' 21 cwm &
+7 -4
nixos/modules/services/x11/window-managers/dwm.nix
··· 1 { config, lib, pkgs, ... }: 2 let 3 4 cfg = config.services.xserver.windowManager.dwm; ··· 11 12 options = { 13 services.xserver.windowManager.dwm = { 14 - enable = lib.mkEnableOption "dwm"; 15 - package = lib.mkPackageOption pkgs "dwm" { 16 example = '' 17 pkgs.dwm.overrideAttrs (oldAttrs: rec { 18 patches = [ ··· 30 31 ###### implementation 32 33 - config = lib.mkIf cfg.enable { 34 35 - services.xserver.windowManager.session = lib.singleton 36 { name = "dwm"; 37 start = 38 ''
··· 1 { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 let 6 7 cfg = config.services.xserver.windowManager.dwm; ··· 14 15 options = { 16 services.xserver.windowManager.dwm = { 17 + enable = mkEnableOption "dwm"; 18 + package = mkPackageOption pkgs "dwm" { 19 example = '' 20 pkgs.dwm.overrideAttrs (oldAttrs: rec { 21 patches = [ ··· 33 34 ###### implementation 35 36 + config = mkIf cfg.enable { 37 38 + services.xserver.windowManager.session = singleton 39 { name = "dwm"; 40 start = 41 ''
+6 -3
nixos/modules/services/x11/window-managers/e16.nix
··· 4 pkgs, 5 ... 6 }: 7 let 8 cfg = config.services.xserver.windowManager.e16; 9 in 10 { 11 ###### interface 12 options = { 13 - services.xserver.windowManager.e16.enable = lib.mkEnableOption "e16"; 14 }; 15 16 ###### implementation 17 - config = lib.mkIf cfg.enable { 18 - services.xserver.windowManager.session = lib.singleton { 19 name = "E16"; 20 start = '' 21 ${pkgs.e16}/bin/e16 &
··· 4 pkgs, 5 ... 6 }: 7 + 8 + with lib; 9 + 10 let 11 cfg = config.services.xserver.windowManager.e16; 12 in 13 { 14 ###### interface 15 options = { 16 + services.xserver.windowManager.e16.enable = mkEnableOption "e16"; 17 }; 18 19 ###### implementation 20 + config = mkIf cfg.enable { 21 + services.xserver.windowManager.session = singleton { 22 name = "E16"; 23 start = '' 24 ${pkgs.e16}/bin/e16 &