nixos/pantheon: move contractor module into xservice
This commit is contained in:
parent
1ec2b545dd
commit
ee75a460af
|
@ -6,35 +6,12 @@ with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
meta.maintainers = pkgs.pantheon.maintainers;
|
|
||||||
|
|
||||||
###### interface
|
|
||||||
|
|
||||||
options = {
|
|
||||||
|
|
||||||
services.pantheon.contractor = {
|
|
||||||
|
|
||||||
enable = mkEnableOption "contractor, a desktop-wide extension service used by pantheon";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.services.pantheon.contractor.enable {
|
config = mkIf config.services.pantheon.contractor.enable {
|
||||||
|
|
||||||
environment.systemPackages = with pkgs.pantheon; [
|
|
||||||
contractor
|
|
||||||
extra-elementary-contracts
|
|
||||||
];
|
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.pantheon.contractor ];
|
|
||||||
|
|
||||||
environment.pathsToLink = [
|
|
||||||
"/share/contractor"
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
cfg = config.services.xserver.desktopManager.pantheon;
|
cfg = config.services.xserver.desktopManager.pantheon;
|
||||||
|
serviceCfg = config.services.pantheon;
|
||||||
|
|
||||||
nixos-gsettings-desktop-schemas = pkgs.pantheon.elementary-gsettings-schemas.override {
|
nixos-gsettings-desktop-schemas = pkgs.pantheon.elementary-gsettings-schemas.override {
|
||||||
extraGSettingsOverridePackages = cfg.extraGSettingsOverridePackages;
|
extraGSettingsOverridePackages = cfg.extraGSettingsOverridePackages;
|
||||||
|
@ -19,6 +20,14 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
|
services.pantheon = {
|
||||||
|
|
||||||
|
contractor = {
|
||||||
|
enable = mkEnableOption "contractor, a desktop-wide extension service used by Pantheon";
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
services.xserver.desktopManager.pantheon = {
|
services.xserver.desktopManager.pantheon = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
@ -67,13 +76,13 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkMerge [
|
||||||
|
(mkIf cfg.enable {
|
||||||
|
|
||||||
services.xserver.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ];
|
services.xserver.displayManager.sessionPackages = [ pkgs.pantheon.elementary-session-settings ];
|
||||||
|
|
||||||
# Ensure lightdm is used when Pantheon is enabled
|
# Ensure lightdm is used when Pantheon is enabled
|
||||||
# Without it screen locking will be nonfunctional because of the use of lightlocker
|
# Without it screen locking will be nonfunctional because of the use of lightlocker
|
||||||
|
|
||||||
warnings = optional (config.services.xserver.displayManager.lightdm.enable != true)
|
warnings = optional (config.services.xserver.displayManager.lightdm.enable != true)
|
||||||
''
|
''
|
||||||
Using Pantheon without LightDM as a displayManager will break screenlocking from the UI.
|
Using Pantheon without LightDM as a displayManager will break screenlocking from the UI.
|
||||||
|
@ -81,7 +90,7 @@ in
|
||||||
|
|
||||||
services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true;
|
services.xserver.displayManager.lightdm.greeters.pantheon.enable = mkDefault true;
|
||||||
|
|
||||||
# Without this, Elementary LightDM greeter will pre-select non-existent `default` session
|
# Without this, elementary LightDM greeter will pre-select non-existent `default` session
|
||||||
# https://github.com/elementary/greeter/issues/368
|
# https://github.com/elementary/greeter/issues/368
|
||||||
services.xserver.displayManager.defaultSession = "pantheon";
|
services.xserver.displayManager.defaultSession = "pantheon";
|
||||||
|
|
||||||
|
@ -207,7 +216,18 @@ in
|
||||||
monospace = [ "Roboto Mono" ];
|
monospace = [ "Roboto Mono" ];
|
||||||
sansSerif = [ "Open Sans" ];
|
sansSerif = [ "Open Sans" ];
|
||||||
};
|
};
|
||||||
|
})
|
||||||
|
|
||||||
};
|
(mkIf serviceCfg.contractor.enable {
|
||||||
|
environment.systemPackages = with pkgs.pantheon; [
|
||||||
|
contractor
|
||||||
|
extra-elementary-contracts
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.pathsToLink = [
|
||||||
|
"/share/contractor"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue