uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
58
nixos/modules/services/desktops/accountsservice.nix
Normal file
58
nixos/modules/services/desktops/accountsservice.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# AccountsService daemon.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.freedesktop.members;
|
||||
};
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.accounts-daemon = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable AccountsService, a DBus service for accessing
|
||||
the list of user accounts and information attached to those accounts.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.accounts-daemon.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.accountsservice ];
|
||||
|
||||
# Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
|
||||
environment.pathsToLink = [ "/share/accountsservice" ];
|
||||
|
||||
services.dbus.packages = [ pkgs.accountsservice ];
|
||||
|
||||
systemd.packages = [ pkgs.accountsservice ];
|
||||
|
||||
systemd.services.accounts-daemon = recursiveUpdate {
|
||||
|
||||
wantedBy = [ "graphical.target" ];
|
||||
|
||||
# Accounts daemon looks for dbus interfaces in $XDG_DATA_DIRS/accountsservice
|
||||
environment.XDG_DATA_DIRS = "${config.system.path}/share";
|
||||
|
||||
} (optionalAttrs (!config.users.mutableUsers) {
|
||||
environment.NIXOS_USERS_PURE = "true";
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
27
nixos/modules/services/desktops/bamf.nix
Normal file
27
nixos/modules/services/desktops/bamf.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Bamf
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = with lib; {
|
||||
maintainers = with maintainers; [ ] ++ teams.pantheon.members;
|
||||
};
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.bamf = {
|
||||
enable = mkEnableOption "bamf";
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.bamf.enable {
|
||||
services.dbus.packages = [ pkgs.bamf ];
|
||||
|
||||
systemd.packages = [ pkgs.bamf ];
|
||||
};
|
||||
}
|
||||
25
nixos/modules/services/desktops/blueman.nix
Normal file
25
nixos/modules/services/desktops/blueman.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# blueman service
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.blueman;
|
||||
in {
|
||||
###### interface
|
||||
options = {
|
||||
services.blueman = {
|
||||
enable = mkEnableOption "blueman";
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.blueman ];
|
||||
|
||||
services.dbus.packages = [ pkgs.blueman ];
|
||||
|
||||
systemd.packages = [ pkgs.blueman ];
|
||||
};
|
||||
}
|
||||
56
nixos/modules/services/desktops/cpupower-gui.nix
Normal file
56
nixos/modules/services/desktops/cpupower-gui.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.cpupower-gui;
|
||||
in {
|
||||
options = {
|
||||
services.cpupower-gui = {
|
||||
enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
Enables dbus/systemd service needed by cpupower-gui.
|
||||
These services are responsible for retrieving and modifying cpu power
|
||||
saving settings.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.cpupower-gui ];
|
||||
services.dbus.packages = [ pkgs.cpupower-gui ];
|
||||
systemd.user = {
|
||||
services.cpupower-gui-user = {
|
||||
description = "Apply cpupower-gui config at user login";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.cpupower-gui}/bin/cpupower-gui config";
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.services = {
|
||||
cpupower-gui = {
|
||||
description = "Apply cpupower-gui config at boot";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.cpupower-gui}/bin/cpupower-gui config";
|
||||
};
|
||||
};
|
||||
cpupower-gui-helper = {
|
||||
description = "cpupower-gui system helper";
|
||||
aliases = [ "dbus-org.rnd2.cpupower_gui.helper.service" ];
|
||||
serviceConfig = {
|
||||
Type = "dbus";
|
||||
BusName = "org.rnd2.cpupower_gui.helper";
|
||||
ExecStart = "${pkgs.cpupower-gui}/lib/cpupower-gui/cpupower-gui-helper";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
28
nixos/modules/services/desktops/dleyna-renderer.nix
Normal file
28
nixos/modules/services/desktops/dleyna-renderer.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# dleyna-renderer service.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.dleyna-renderer = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable dleyna-renderer service, a DBus service
|
||||
for handling DLNA renderers.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.dleyna-renderer.enable {
|
||||
environment.systemPackages = [ pkgs.dleyna-renderer ];
|
||||
|
||||
services.dbus.packages = [ pkgs.dleyna-renderer ];
|
||||
};
|
||||
}
|
||||
28
nixos/modules/services/desktops/dleyna-server.nix
Normal file
28
nixos/modules/services/desktops/dleyna-server.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# dleyna-server service.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.dleyna-server = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable dleyna-server service, a DBus service
|
||||
for handling DLNA servers.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.dleyna-server.enable {
|
||||
environment.systemPackages = [ pkgs.dleyna-server ];
|
||||
|
||||
services.dbus.packages = [ pkgs.dleyna-server ];
|
||||
};
|
||||
}
|
||||
24
nixos/modules/services/desktops/espanso.nix
Normal file
24
nixos/modules/services/desktops/espanso.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let cfg = config.services.espanso;
|
||||
in {
|
||||
meta = { maintainers = with lib.maintainers; [ numkem ]; };
|
||||
|
||||
options = {
|
||||
services.espanso = { enable = options.mkEnableOption "Espanso"; };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.espanso = {
|
||||
description = "Espanso daemon";
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.espanso}/bin/espanso daemon";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.espanso ];
|
||||
};
|
||||
}
|
||||
56
nixos/modules/services/desktops/flatpak.nix
Normal file
56
nixos/modules/services/desktops/flatpak.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# flatpak service.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.flatpak;
|
||||
in {
|
||||
meta = {
|
||||
doc = ./flatpak.xml;
|
||||
maintainers = pkgs.flatpak.meta.maintainers;
|
||||
};
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
services.flatpak = {
|
||||
enable = mkEnableOption "flatpak";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
assertions = [
|
||||
{ assertion = (config.xdg.portal.enable == true);
|
||||
message = "To use Flatpak you must enable XDG Desktop Portals with xdg.portal.enable.";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ pkgs.flatpak ];
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
services.dbus.packages = [ pkgs.flatpak ];
|
||||
|
||||
systemd.packages = [ pkgs.flatpak ];
|
||||
|
||||
environment.profiles = [
|
||||
"$HOME/.local/share/flatpak/exports"
|
||||
"/var/lib/flatpak/exports"
|
||||
];
|
||||
|
||||
# It has been possible since https://github.com/flatpak/flatpak/releases/tag/1.3.2
|
||||
# to build a SELinux policy module.
|
||||
|
||||
# TODO: use sysusers.d
|
||||
users.users.flatpak = {
|
||||
description = "Flatpak system helper";
|
||||
group = "flatpak";
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
users.groups.flatpak = { };
|
||||
};
|
||||
}
|
||||
56
nixos/modules/services/desktops/flatpak.xml
Normal file
56
nixos/modules/services/desktops/flatpak.xml
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="module-services-flatpak">
|
||||
<title>Flatpak</title>
|
||||
<para>
|
||||
<emphasis>Source:</emphasis>
|
||||
<filename>modules/services/desktop/flatpak.nix</filename>
|
||||
</para>
|
||||
<para>
|
||||
<emphasis>Upstream documentation:</emphasis>
|
||||
<link xlink:href="https://github.com/flatpak/flatpak/wiki"/>
|
||||
</para>
|
||||
<para>
|
||||
Flatpak is a system for building, distributing, and running sandboxed desktop
|
||||
applications on Linux.
|
||||
</para>
|
||||
<para>
|
||||
To enable Flatpak, add the following to your
|
||||
<filename>configuration.nix</filename>:
|
||||
<programlisting>
|
||||
<xref linkend="opt-services.flatpak.enable"/> = true;
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
For the sandboxed apps to work correctly, desktop integration portals need to
|
||||
be installed. If you run GNOME, this will be handled automatically for you;
|
||||
in other cases, you will need to add something like the following to your
|
||||
<filename>configuration.nix</filename>:
|
||||
<programlisting>
|
||||
<xref linkend="opt-xdg.portal.extraPortals"/> = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Then, you will need to add a repository, for example,
|
||||
<link xlink:href="https://github.com/flatpak/flatpak/wiki">Flathub</link>,
|
||||
either using the following commands:
|
||||
<screen>
|
||||
<prompt>$ </prompt>flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
<prompt>$ </prompt>flatpak update
|
||||
</screen>
|
||||
or by opening the
|
||||
<link xlink:href="https://flathub.org/repo/flathub.flatpakrepo">repository
|
||||
file</link> in GNOME Software.
|
||||
</para>
|
||||
<para>
|
||||
Finally, you can search and install programs:
|
||||
<screen>
|
||||
<prompt>$ </prompt>flatpak search bustle
|
||||
<prompt>$ </prompt>flatpak install flathub org.freedesktop.Bustle
|
||||
<prompt>$ </prompt>flatpak run org.freedesktop.Bustle
|
||||
</screen>
|
||||
Again, GNOME Software offers graphical interface for these tasks.
|
||||
</para>
|
||||
</chapter>
|
||||
270
nixos/modules/services/desktops/geoclue2.nix
Normal file
270
nixos/modules/services/desktops/geoclue2.nix
Normal file
|
|
@ -0,0 +1,270 @@
|
|||
# GeoClue 2 daemon.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
# the demo agent isn't built by default, but we need it here
|
||||
package = pkgs.geoclue2.override { withDemoAgent = config.services.geoclue2.enableDemoAgent; };
|
||||
|
||||
cfg = config.services.geoclue2;
|
||||
|
||||
defaultWhitelist = [ "gnome-shell" "io.elementary.desktop.agent-geoclue2" ];
|
||||
|
||||
appConfigModule = types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
desktopID = mkOption {
|
||||
type = types.str;
|
||||
description = "Desktop ID of the application.";
|
||||
};
|
||||
|
||||
isAllowed = mkOption {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether the application will be allowed access to location information.
|
||||
'';
|
||||
};
|
||||
|
||||
isSystem = mkOption {
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether the application is a system component or not.
|
||||
'';
|
||||
};
|
||||
|
||||
users = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = ''
|
||||
List of UIDs of all users for which this application is allowed location
|
||||
info access, Defaults to an empty string to allow it for all users.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config.desktopID = mkDefault name;
|
||||
});
|
||||
|
||||
appConfigToINICompatible = _: { desktopID, isAllowed, isSystem, users, ... }: {
|
||||
name = desktopID;
|
||||
value = {
|
||||
allowed = isAllowed;
|
||||
system = isSystem;
|
||||
users = concatStringsSep ";" users;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.geoclue2 = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable GeoClue 2 daemon, a DBus service
|
||||
that provides location information for accessing.
|
||||
'';
|
||||
};
|
||||
|
||||
enableDemoAgent = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to use the GeoClue demo agent. This should be
|
||||
overridden by desktop environments that provide their own
|
||||
agent.
|
||||
'';
|
||||
};
|
||||
|
||||
enableNmea = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to fetch location from NMEA sources on local network.
|
||||
'';
|
||||
};
|
||||
|
||||
enable3G = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable 3G source.
|
||||
'';
|
||||
};
|
||||
|
||||
enableCDMA = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable CDMA source.
|
||||
'';
|
||||
};
|
||||
|
||||
enableModemGPS = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable Modem-GPS source.
|
||||
'';
|
||||
};
|
||||
|
||||
enableWifi = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable WiFi source.
|
||||
'';
|
||||
};
|
||||
|
||||
geoProviderUrl = mkOption {
|
||||
type = types.str;
|
||||
default = "https://location.services.mozilla.com/v1/geolocate?key=geoclue";
|
||||
example = "https://www.googleapis.com/geolocation/v1/geolocate?key=YOUR_KEY";
|
||||
description = ''
|
||||
The url to the wifi GeoLocation Service.
|
||||
'';
|
||||
};
|
||||
|
||||
submitData = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to submit data to a GeoLocation Service.
|
||||
'';
|
||||
};
|
||||
|
||||
submissionUrl = mkOption {
|
||||
type = types.str;
|
||||
default = "https://location.services.mozilla.com/v1/submit?key=geoclue";
|
||||
description = ''
|
||||
The url to submit data to a GeoLocation Service.
|
||||
'';
|
||||
};
|
||||
|
||||
submissionNick = mkOption {
|
||||
type = types.str;
|
||||
default = "geoclue";
|
||||
description = ''
|
||||
A nickname to submit network data with.
|
||||
Must be 2-32 characters long.
|
||||
'';
|
||||
};
|
||||
|
||||
appConfig = mkOption {
|
||||
type = types.attrsOf appConfigModule;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
"com.github.app" = {
|
||||
isAllowed = true;
|
||||
isSystem = true;
|
||||
users = [ "300" ];
|
||||
};
|
||||
'';
|
||||
description = ''
|
||||
Specify extra settings per application.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ package ];
|
||||
|
||||
services.dbus.packages = [ package ];
|
||||
|
||||
systemd.packages = [ package ];
|
||||
|
||||
# we cannot use DynamicUser as we need the the geoclue user to exist for the
|
||||
# dbus policy to work
|
||||
users = {
|
||||
users.geoclue = {
|
||||
isSystemUser = true;
|
||||
home = "/var/lib/geoclue";
|
||||
group = "geoclue";
|
||||
description = "Geoinformation service";
|
||||
};
|
||||
|
||||
groups.geoclue = {};
|
||||
};
|
||||
|
||||
systemd.services.geoclue = {
|
||||
# restart geoclue service when the configuration changes
|
||||
restartTriggers = [
|
||||
config.environment.etc."geoclue/geoclue.conf".source
|
||||
];
|
||||
serviceConfig.StateDirectory = "geoclue";
|
||||
};
|
||||
|
||||
# this needs to run as a user service, since it's associated with the
|
||||
# user who is making the requests
|
||||
systemd.user.services = mkIf cfg.enableDemoAgent {
|
||||
geoclue-agent = {
|
||||
description = "Geoclue agent";
|
||||
# this should really be `partOf = [ "geoclue.service" ]`, but
|
||||
# we can't be part of a system service, and the agent should
|
||||
# be okay with the main service coming and going
|
||||
wantedBy = [ "default.target" ];
|
||||
unitConfig.ConditionUser = "!@system";
|
||||
serviceConfig = {
|
||||
Type = "exec";
|
||||
ExecStart = "${package}/libexec/geoclue-2.0/demos/agent";
|
||||
Restart = "on-failure";
|
||||
PrivateTmp = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.geoclue2.appConfig.epiphany = {
|
||||
isAllowed = true;
|
||||
isSystem = false;
|
||||
};
|
||||
|
||||
services.geoclue2.appConfig.firefox = {
|
||||
isAllowed = true;
|
||||
isSystem = false;
|
||||
};
|
||||
|
||||
environment.etc."geoclue/geoclue.conf".text =
|
||||
generators.toINI {} ({
|
||||
agent = {
|
||||
whitelist = concatStringsSep ";"
|
||||
(optional cfg.enableDemoAgent "geoclue-demo-agent" ++ defaultWhitelist);
|
||||
};
|
||||
network-nmea = {
|
||||
enable = cfg.enableNmea;
|
||||
};
|
||||
"3g" = {
|
||||
enable = cfg.enable3G;
|
||||
};
|
||||
cdma = {
|
||||
enable = cfg.enableCDMA;
|
||||
};
|
||||
modem-gps = {
|
||||
enable = cfg.enableModemGPS;
|
||||
};
|
||||
wifi = {
|
||||
enable = cfg.enableWifi;
|
||||
url = cfg.geoProviderUrl;
|
||||
submit-data = boolToString cfg.submitData;
|
||||
submission-url = cfg.submissionUrl;
|
||||
submission-nick = cfg.submissionNick;
|
||||
};
|
||||
} // mapAttrs' appConfigToINICompatible cfg.appConfig);
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
maintainers = with maintainers; [ ] ++ teams.pantheon.members;
|
||||
};
|
||||
}
|
||||
57
nixos/modules/services/desktops/gnome/at-spi2-core.nix
Normal file
57
nixos/modules/services/desktops/gnome/at-spi2-core.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
# at-spi2-core daemon.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
###### interface
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "at-spi2-core" "enable" ]
|
||||
[ "services" "gnome" "at-spi2-core" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.at-spi2-core = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable at-spi2-core, a service for the Assistive Technologies
|
||||
available on the GNOME platform.
|
||||
|
||||
Enable this if you get the error or warning
|
||||
<literal>The name org.a11y.Bus was not provided by any .service files</literal>.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkMerge [
|
||||
(mkIf config.services.gnome.at-spi2-core.enable {
|
||||
environment.systemPackages = [ pkgs.at-spi2-core ];
|
||||
services.dbus.packages = [ pkgs.at-spi2-core ];
|
||||
systemd.packages = [ pkgs.at-spi2-core ];
|
||||
})
|
||||
|
||||
(mkIf (!config.services.gnome.at-spi2-core.enable) {
|
||||
environment.variables.NO_AT_BRIDGE = "1";
|
||||
})
|
||||
];
|
||||
}
|
||||
41
nixos/modules/services/desktops/gnome/chrome-gnome-shell.nix
Normal file
41
nixos/modules/services/desktops/gnome/chrome-gnome-shell.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Chrome GNOME Shell native host connector.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "chrome-gnome-shell" "enable" ]
|
||||
[ "services" "gnome" "chrome-gnome-shell" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
services.gnome.chrome-gnome-shell.enable = mkEnableOption ''
|
||||
Chrome GNOME Shell native host connector, a DBus service
|
||||
allowing to install GNOME Shell extensions from a web browser.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.gnome.chrome-gnome-shell.enable {
|
||||
environment.etc = {
|
||||
"chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.chrome-gnome-shell}/etc/chromium/native-messaging-hosts/org.gnome.chrome_gnome_shell.json";
|
||||
"opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.chrome-gnome-shell}/etc/opt/chrome/native-messaging-hosts/org.gnome.chrome_gnome_shell.json";
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.chrome-gnome-shell ];
|
||||
|
||||
services.dbus.packages = [ pkgs.chrome-gnome-shell ];
|
||||
|
||||
nixpkgs.config.firefox.enableGnomeExtensions = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
# Evolution Data Server daemon.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "evolution-data-server" "enable" ]
|
||||
[ "services" "gnome" "evolution-data-server" "enable" ]
|
||||
)
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "evolution-data-server" "plugins" ]
|
||||
[ "services" "gnome" "evolution-data-server" "plugins" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.evolution-data-server = {
|
||||
enable = mkEnableOption "Evolution Data Server, a collection of services for storing addressbooks and calendars.";
|
||||
plugins = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
description = "Plugins for Evolution Data Server.";
|
||||
};
|
||||
};
|
||||
programs.evolution = {
|
||||
enable = mkEnableOption "Evolution, a Personal information management application that provides integrated mail, calendaring and address book functionality.";
|
||||
plugins = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
example = literalExpression "[ pkgs.evolution-ews ]";
|
||||
description = "Plugins for Evolution.";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config =
|
||||
let
|
||||
bundle = pkgs.evolutionWithPlugins.override { inherit (config.services.gnome.evolution-data-server) plugins; };
|
||||
in
|
||||
mkMerge [
|
||||
(mkIf config.services.gnome.evolution-data-server.enable {
|
||||
environment.systemPackages = [ bundle ];
|
||||
|
||||
services.dbus.packages = [ bundle ];
|
||||
|
||||
systemd.packages = [ bundle ];
|
||||
})
|
||||
(mkIf config.programs.evolution.enable {
|
||||
services.gnome.evolution-data-server = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.evolution ] ++ config.programs.evolution.plugins;
|
||||
};
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
})
|
||||
];
|
||||
}
|
||||
45
nixos/modules/services/desktops/gnome/glib-networking.nix
Normal file
45
nixos/modules/services/desktops/gnome/glib-networking.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# GLib Networking
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "glib-networking" "enable" ]
|
||||
[ "services" "gnome" "glib-networking" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.glib-networking = {
|
||||
|
||||
enable = mkEnableOption "network extensions for GLib";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.glib-networking.enable {
|
||||
|
||||
services.dbus.packages = [ pkgs.glib-networking ];
|
||||
|
||||
systemd.packages = [ pkgs.glib-networking ];
|
||||
|
||||
environment.sessionVariables.GIO_EXTRA_MODULES = [ "${pkgs.glib-networking.out}/lib/gio/modules" ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
# GNOME Initial Setup.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
# GNOME initial setup's run is conditioned on whether
|
||||
# the gnome-initial-setup-done file exists in XDG_CONFIG_HOME
|
||||
# Because of this, every existing user will have initial setup
|
||||
# running because they never ran it before.
|
||||
#
|
||||
# To prevent this we create the file if the users stateVersion
|
||||
# is older than 20.03 (the release we added this module).
|
||||
|
||||
script = pkgs.writeScript "create-gis-stamp-files" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
setup_done=$HOME/.config/gnome-initial-setup-done
|
||||
|
||||
echo "Creating g-i-s stamp file $setup_done ..."
|
||||
cat - > $setup_done <<- EOF
|
||||
yes
|
||||
EOF
|
||||
'';
|
||||
|
||||
createGisStampFilesAutostart = pkgs.writeTextFile rec {
|
||||
name = "create-g-i-s-stamp-files";
|
||||
destination = "/etc/xdg/autostart/${name}.desktop";
|
||||
text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Create GNOME Initial Setup stamp files
|
||||
Exec=${script}
|
||||
StartupNotify=false
|
||||
NoDisplay=true
|
||||
OnlyShowIn=GNOME;
|
||||
AutostartCondition=unless-exists gnome-initial-setup-done
|
||||
X-GNOME-Autostart-Phase=EarlyInitialization
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-initial-setup" "enable" ]
|
||||
[ "services" "gnome" "gnome-initial-setup" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.gnome-initial-setup = {
|
||||
|
||||
enable = mkEnableOption "GNOME Initial Setup, a Simple, easy, and safe way to prepare a new system";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.gnome-initial-setup.enable {
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.gnome.gnome-initial-setup
|
||||
]
|
||||
++ optional (versionOlder config.system.stateVersion "20.03") createGisStampFilesAutostart
|
||||
;
|
||||
|
||||
systemd.packages = [
|
||||
pkgs.gnome.gnome-initial-setup
|
||||
];
|
||||
|
||||
systemd.user.targets."gnome-session".wants = [
|
||||
"gnome-initial-setup-copy-worker.service"
|
||||
"gnome-initial-setup-first-login.service"
|
||||
"gnome-welcome-tour.service"
|
||||
];
|
||||
|
||||
systemd.user.targets."gnome-session@gnome-initial-setup".wants = [
|
||||
"gnome-initial-setup.service"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
63
nixos/modules/services/desktops/gnome/gnome-keyring.nix
Normal file
63
nixos/modules/services/desktops/gnome/gnome-keyring.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
# GNOME Keyring daemon.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-keyring" "enable" ]
|
||||
[ "services" "gnome" "gnome-keyring" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.gnome-keyring = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable GNOME Keyring daemon, a service designed to
|
||||
take care of the user's security credentials,
|
||||
such as user names and passwords.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.gnome-keyring.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome.gnome-keyring ];
|
||||
|
||||
services.dbus.packages = [ pkgs.gnome.gnome-keyring pkgs.gcr ];
|
||||
|
||||
xdg.portal.extraPortals = [ pkgs.gnome.gnome-keyring ];
|
||||
|
||||
security.pam.services.login.enableGnomeKeyring = true;
|
||||
|
||||
security.wrappers.gnome-keyring-daemon = {
|
||||
owner = "root";
|
||||
group = "root";
|
||||
capabilities = "cap_ipc_lock=ep";
|
||||
source = "${pkgs.gnome.gnome-keyring}/bin/gnome-keyring-daemon";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
# GNOME Online Accounts daemon.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-online-accounts" "enable" ]
|
||||
[ "services" "gnome" "gnome-online-accounts" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.gnome-online-accounts = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable GNOME Online Accounts daemon, a service that provides
|
||||
a single sign-on framework for the GNOME desktop.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.gnome-online-accounts.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome-online-accounts ];
|
||||
|
||||
services.dbus.packages = [ pkgs.gnome-online-accounts ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
# GNOME Online Miners daemon.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-online-miners" "enable" ]
|
||||
[ "services" "gnome" "gnome-online-miners" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.gnome-online-miners = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable GNOME Online Miners, a service that
|
||||
crawls through your online content.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.gnome-online-miners.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome.gnome-online-miners ];
|
||||
|
||||
services.dbus.packages = [ pkgs.gnome.gnome-online-miners ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
# Remote desktop daemon using Pipewire.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2021-05-07
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-remote-desktop" "enable" ]
|
||||
[ "services" "gnome" "gnome-remote-desktop" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
services.gnome.gnome-remote-desktop = {
|
||||
enable = mkEnableOption "Remote Desktop support using Pipewire";
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.gnome.gnome-remote-desktop.enable {
|
||||
services.pipewire.enable = true;
|
||||
|
||||
systemd.packages = [ pkgs.gnome.gnome-remote-desktop ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
# GNOME Settings Daemon
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.gnome.gnome-settings-daemon;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
imports = [
|
||||
(mkRemovedOptionModule
|
||||
["services" "gnome3" "gnome-settings-daemon" "package"]
|
||||
"")
|
||||
|
||||
# Added 2021-05-07
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-settings-daemon" "enable" ]
|
||||
[ "services" "gnome" "gnome-settings-daemon" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.gnome-settings-daemon = {
|
||||
|
||||
enable = mkEnableOption "GNOME Settings Daemon";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.gnome.gnome-settings-daemon
|
||||
];
|
||||
|
||||
services.udev.packages = [
|
||||
pkgs.gnome.gnome-settings-daemon
|
||||
];
|
||||
|
||||
systemd.packages = [
|
||||
pkgs.gnome.gnome-settings-daemon
|
||||
];
|
||||
|
||||
systemd.user.targets."gnome-session-x11-services".wants = [
|
||||
"org.gnome.SettingsDaemon.XSettings.service"
|
||||
];
|
||||
|
||||
systemd.user.targets."gnome-session-x11-services-ready".wants = [
|
||||
"org.gnome.SettingsDaemon.XSettings.service"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
48
nixos/modules/services/desktops/gnome/gnome-user-share.nix
Normal file
48
nixos/modules/services/desktops/gnome/gnome-user-share.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# GNOME User Share daemon.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
imports = [
|
||||
# Added 2021-05-07
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gnome-user-share" "enable" ]
|
||||
[ "services" "gnome" "gnome-user-share" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.gnome-user-share = {
|
||||
|
||||
enable = mkEnableOption "GNOME User Share, a user-level file sharing service for GNOME";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.gnome-user-share.enable {
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.gnome.gnome-user-share
|
||||
];
|
||||
|
||||
systemd.packages = [
|
||||
pkgs.gnome.gnome-user-share
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
44
nixos/modules/services/desktops/gnome/rygel.nix
Normal file
44
nixos/modules/services/desktops/gnome/rygel.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# rygel service.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
imports = [
|
||||
# Added 2021-05-07
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "rygel" "enable" ]
|
||||
[ "services" "gnome" "rygel" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
services.gnome.rygel = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Rygel UPnP Mediaserver.
|
||||
|
||||
You will need to also allow UPnP connections in firewall, see the following <link xlink:href="https://github.com/NixOS/nixpkgs/pull/45045#issuecomment-416030795">comment</link>.
|
||||
'';
|
||||
type = types.bool;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.gnome.rygel.enable {
|
||||
environment.systemPackages = [ pkgs.gnome.rygel ];
|
||||
|
||||
services.dbus.packages = [ pkgs.gnome.rygel ];
|
||||
|
||||
systemd.packages = [ pkgs.gnome.rygel ];
|
||||
|
||||
environment.etc."rygel.conf".source = "${pkgs.gnome.rygel}/etc/rygel.conf";
|
||||
};
|
||||
}
|
||||
50
nixos/modules/services/desktops/gnome/sushi.nix
Normal file
50
nixos/modules/services/desktops/gnome/sushi.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# GNOME Sushi daemon.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
imports = [
|
||||
# Added 2021-05-07
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "sushi" "enable" ]
|
||||
[ "services" "gnome" "sushi" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.sushi = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Sushi, a quick previewer for nautilus.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.sushi.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome.sushi ];
|
||||
|
||||
services.dbus.packages = [ pkgs.gnome.sushi ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
54
nixos/modules/services/desktops/gnome/tracker-miners.nix
Normal file
54
nixos/modules/services/desktops/gnome/tracker-miners.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# Tracker Miners daemons.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
imports = [
|
||||
# Added 2021-05-07
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "tracker-miners" "enable" ]
|
||||
[ "services" "gnome" "tracker-miners" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.tracker-miners = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Tracker miners, indexing services for Tracker
|
||||
search engine and metadata storage system.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.tracker-miners.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.tracker-miners ];
|
||||
|
||||
services.dbus.packages = [ pkgs.tracker-miners ];
|
||||
|
||||
systemd.packages = [ pkgs.tracker-miners ];
|
||||
|
||||
services.gnome.tracker.subcommandPackages = [ pkgs.tracker-miners ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
76
nixos/modules/services/desktops/gnome/tracker.nix
Normal file
76
nixos/modules/services/desktops/gnome/tracker.nix
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# Tracker daemon.
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.gnome.tracker;
|
||||
in
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
imports = [
|
||||
# Added 2021-05-07
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "tracker" "enable" ]
|
||||
[ "services" "gnome" "tracker" "enable" ]
|
||||
)
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gnome.tracker = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Tracker services, a search engine,
|
||||
search tool and metadata storage system.
|
||||
'';
|
||||
};
|
||||
|
||||
subcommandPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
internal = true;
|
||||
description = ''
|
||||
List of packages containing tracker3 subcommands.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.tracker ];
|
||||
|
||||
services.dbus.packages = [ pkgs.tracker ];
|
||||
|
||||
systemd.packages = [ pkgs.tracker ];
|
||||
|
||||
environment.variables = {
|
||||
TRACKER_CLI_SUBCOMMANDS_DIR =
|
||||
let
|
||||
subcommandPackagesTree = pkgs.symlinkJoin {
|
||||
name = "tracker-with-subcommands-${pkgs.tracker.version}";
|
||||
paths = [ pkgs.tracker ] ++ cfg.subcommandPackages;
|
||||
};
|
||||
in
|
||||
"${subcommandPackagesTree}/libexec/tracker3";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
45
nixos/modules/services/desktops/gsignond.nix
Normal file
45
nixos/modules/services/desktops/gsignond.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
# Accounts-SSO gSignOn daemon
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
package = pkgs.gsignond.override { plugins = config.services.gsignond.plugins; };
|
||||
in
|
||||
{
|
||||
|
||||
meta.maintainers = teams.pantheon.members;
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gsignond = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable gSignOn daemon, a DBus service
|
||||
which performs user authentication on behalf of its clients.
|
||||
'';
|
||||
};
|
||||
|
||||
plugins = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
description = ''
|
||||
What plugins to use with the gSignOn daemon.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.gsignond.enable {
|
||||
environment.etc."gsignond.conf".source = "${package}/etc/gsignond.conf";
|
||||
services.dbus.packages = [ package ];
|
||||
};
|
||||
|
||||
}
|
||||
64
nixos/modules/services/desktops/gvfs.nix
Normal file
64
nixos/modules/services/desktops/gvfs.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# GVfs
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.gvfs;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
# Added 2019-08-19
|
||||
imports = [
|
||||
(mkRenamedOptionModule
|
||||
[ "services" "gnome3" "gvfs" "enable" ]
|
||||
[ "services" "gvfs" "enable" ])
|
||||
];
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.gvfs = {
|
||||
|
||||
enable = mkEnableOption "GVfs, a userspace virtual filesystem";
|
||||
|
||||
# gvfs can be built with multiple configurations
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.gnome.gvfs;
|
||||
defaultText = literalExpression "pkgs.gnome.gvfs";
|
||||
description = "Which GVfs package to use.";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
services.dbus.packages = [ cfg.package ];
|
||||
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
||||
services.udev.packages = [ pkgs.libmtp.out ];
|
||||
|
||||
# Needed for unwrapped applications
|
||||
environment.sessionVariables.GIO_EXTRA_MODULES = [ "${cfg.package}/lib/gio/modules" ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
40
nixos/modules/services/desktops/malcontent.nix
Normal file
40
nixos/modules/services/desktops/malcontent.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# Malcontent daemon.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.malcontent = {
|
||||
|
||||
enable = mkEnableOption "Malcontent, parental control support for applications";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.malcontent.enable {
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
malcontent
|
||||
malcontent-ui
|
||||
];
|
||||
|
||||
services.dbus.packages = [
|
||||
# D-Bus services are in `out`, not the default `bin` output that would be picked up by `makeDbusConf`.
|
||||
pkgs.malcontent.out
|
||||
];
|
||||
|
||||
services.accounts-daemon.enable = true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
23
nixos/modules/services/desktops/neard.nix
Normal file
23
nixos/modules/services/desktops/neard.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# neard service.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
###### interface
|
||||
options = {
|
||||
services.neard = {
|
||||
enable = mkEnableOption "neard, NFC daemon";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf config.services.neard.enable {
|
||||
environment.systemPackages = [ pkgs.neard ];
|
||||
|
||||
services.dbus.packages = [ pkgs.neard ];
|
||||
|
||||
systemd.packages = [ pkgs.neard ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"context.properties": {
|
||||
"log.level": 0
|
||||
},
|
||||
"context.spa-libs": {
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-device"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-session-manager"
|
||||
}
|
||||
],
|
||||
"filter.properties": {},
|
||||
"stream.properties": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"context.properties": {
|
||||
"log.level": 0
|
||||
},
|
||||
"context.spa-libs": {
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-device"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-session-manager"
|
||||
}
|
||||
],
|
||||
"filter.properties": {},
|
||||
"stream.properties": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"context.properties": {
|
||||
"log.level": 0
|
||||
},
|
||||
"context.spa-libs": {
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
}
|
||||
],
|
||||
"jack.properties": {},
|
||||
"jack.rules": [
|
||||
{
|
||||
"matches": [
|
||||
{}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"context.properties": {
|
||||
"link.max-buffers": 16,
|
||||
"core.daemon": true,
|
||||
"core.name": "pipewire-0",
|
||||
"settings.check-quantum": true,
|
||||
"settings.check-rate": true,
|
||||
"vm.overrides": {
|
||||
"default.clock.min-quantum": 1024
|
||||
}
|
||||
},
|
||||
"context.spa-libs": {
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"api.alsa.*": "alsa/libspa-alsa",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {
|
||||
"nice.level": -11
|
||||
},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-profiler"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-spa-node-factory"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-access",
|
||||
"args": {}
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-link-factory"
|
||||
}
|
||||
],
|
||||
"context.objects": [
|
||||
{
|
||||
"factory": "metadata",
|
||||
"args": {
|
||||
"metadata.name": "default"
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "spa-node-factory",
|
||||
"args": {
|
||||
"factory.name": "support.node.driver",
|
||||
"node.name": "Dummy-Driver",
|
||||
"node.group": "pipewire.dummy",
|
||||
"priority.driver": 20000
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "spa-node-factory",
|
||||
"args": {
|
||||
"factory.name": "support.node.driver",
|
||||
"node.name": "Freewheel-Driver",
|
||||
"priority.driver": 19000,
|
||||
"node.group": "pipewire.freewheel",
|
||||
"node.freewheel": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "adapter",
|
||||
"args": {
|
||||
"factory.name": "api.alsa.pcm.source",
|
||||
"node.name": "system",
|
||||
"node.description": "system",
|
||||
"media.class": "Audio/Source",
|
||||
"api.alsa.path": "hw:0",
|
||||
"node.suspend-on-idle": true,
|
||||
"resample.disable": true,
|
||||
"channelmix.disable": true,
|
||||
"adapter.auto-port-config": {
|
||||
"mode": "dsp",
|
||||
"monitor": false,
|
||||
"position": "unknown"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "adapter",
|
||||
"args": {
|
||||
"factory.name": "api.alsa.pcm.sink",
|
||||
"node.name": "system",
|
||||
"node.description": "system",
|
||||
"media.class": "Audio/Sink",
|
||||
"api.alsa.path": "hw:0",
|
||||
"node.suspend-on-idle": true,
|
||||
"resample.disable": true,
|
||||
"channelmix.disable": true,
|
||||
"adapter.auto-port-config": {
|
||||
"mode": "dsp",
|
||||
"monitor": false,
|
||||
"position": "unknown"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"context.exec": []
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"context.properties": {},
|
||||
"context.spa-libs": {
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {
|
||||
"nice.level": -11
|
||||
},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-pulse",
|
||||
"args": {}
|
||||
}
|
||||
],
|
||||
"context.exec": [
|
||||
{
|
||||
"path": "pactl",
|
||||
"args": "load-module module-always-sink"
|
||||
}
|
||||
],
|
||||
"stream.properties": {},
|
||||
"pulse.properties": {
|
||||
"server.address": [
|
||||
"unix:native"
|
||||
],
|
||||
"vm.overrides": {
|
||||
"pulse.min.quantum": "1024/48000"
|
||||
}
|
||||
},
|
||||
"pulse.rules": [
|
||||
{
|
||||
"matches": [
|
||||
{}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"application.process.binary": "teams"
|
||||
},
|
||||
{
|
||||
"application.process.binary": "teams-insiders"
|
||||
},
|
||||
{
|
||||
"application.process.binary": "skypeforlinux"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"quirks": [
|
||||
"force-s16-info"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"application.process.binary": "firefox"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"quirks": [
|
||||
"remove-capture-dont-move"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"application.name": "~speech-dispatcher*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {
|
||||
"pulse.min.req": "1024/48000",
|
||||
"pulse.min.quantum": "1024/48000"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
{
|
||||
"context.properties": {
|
||||
"link.max-buffers": 16,
|
||||
"core.daemon": true,
|
||||
"core.name": "pipewire-0",
|
||||
"default.clock.min-quantum": 16,
|
||||
"vm.overrides": {
|
||||
"default.clock.min-quantum": 1024
|
||||
}
|
||||
},
|
||||
"context.spa-libs": {
|
||||
"audio.convert.*": "audioconvert/libspa-audioconvert",
|
||||
"api.alsa.*": "alsa/libspa-alsa",
|
||||
"api.v4l2.*": "v4l2/libspa-v4l2",
|
||||
"api.libcamera.*": "libcamera/libspa-libcamera",
|
||||
"api.bluez5.*": "bluez5/libspa-bluez5",
|
||||
"api.vulkan.*": "vulkan/libspa-vulkan",
|
||||
"api.jack.*": "jack/libspa-jack",
|
||||
"support.*": "support/libspa-support"
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rt",
|
||||
"args": {
|
||||
"nice.level": -11
|
||||
},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-profiler"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-spa-device-factory"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-spa-node-factory"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-device"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-portal",
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-access",
|
||||
"args": {}
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-link-factory"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-session-manager"
|
||||
}
|
||||
],
|
||||
"context.objects": [
|
||||
{
|
||||
"factory": "spa-node-factory",
|
||||
"args": {
|
||||
"factory.name": "support.node.driver",
|
||||
"node.name": "Dummy-Driver",
|
||||
"node.group": "pipewire.dummy",
|
||||
"priority.driver": 20000
|
||||
}
|
||||
},
|
||||
{
|
||||
"factory": "spa-node-factory",
|
||||
"args": {
|
||||
"factory.name": "support.node.driver",
|
||||
"node.name": "Freewheel-Driver",
|
||||
"priority.driver": 19000,
|
||||
"node.group": "pipewire.freewheel",
|
||||
"node.freewheel": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"context.exec": []
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"properties": {},
|
||||
"rules": [
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"device.name": "~alsa_card.*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {
|
||||
"api.alsa.use-acp": true,
|
||||
"api.acp.auto-profile": false,
|
||||
"api.acp.auto-port": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"node.name": "~alsa_input.*"
|
||||
},
|
||||
{
|
||||
"node.name": "~alsa_output.*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {
|
||||
"node.pause-on-idle": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"properties": {},
|
||||
"rules": [
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"device.name": "~bluez_card.*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {
|
||||
"bluez5.auto-connect": [
|
||||
"hfp_hf",
|
||||
"hsp_hs",
|
||||
"a2dp_sink"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"node.name": "~bluez_input.*"
|
||||
},
|
||||
{
|
||||
"node.name": "~bluez_output.*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {
|
||||
"node.pause-on-idle": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"context.properties": {},
|
||||
"context.spa-libs": {
|
||||
"api.bluez5.*": "bluez5/libspa-bluez5",
|
||||
"api.alsa.*": "alsa/libspa-alsa",
|
||||
"api.v4l2.*": "v4l2/libspa-v4l2",
|
||||
"api.libcamera.*": "libcamera/libspa-libcamera"
|
||||
},
|
||||
"context.modules": [
|
||||
{
|
||||
"name": "libpipewire-module-rtkit",
|
||||
"args": {},
|
||||
"flags": [
|
||||
"ifexists",
|
||||
"nofail"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-protocol-native"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-node"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-client-device"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-adapter"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-metadata"
|
||||
},
|
||||
{
|
||||
"name": "libpipewire-module-session-manager"
|
||||
}
|
||||
],
|
||||
"session.modules": {
|
||||
"default": [
|
||||
"flatpak",
|
||||
"portal",
|
||||
"v4l2",
|
||||
"suspend-node",
|
||||
"policy-node"
|
||||
],
|
||||
"with-audio": [
|
||||
"metadata",
|
||||
"default-nodes",
|
||||
"default-profile",
|
||||
"default-routes",
|
||||
"alsa-seq",
|
||||
"alsa-monitor"
|
||||
],
|
||||
"with-alsa": [
|
||||
"with-audio"
|
||||
],
|
||||
"with-jack": [
|
||||
"with-audio"
|
||||
],
|
||||
"with-pulseaudio": [
|
||||
"with-audio",
|
||||
"bluez5",
|
||||
"bluez5-autoswitch",
|
||||
"logind",
|
||||
"restore-stream",
|
||||
"streams-follow-default"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"properties": {},
|
||||
"rules": [
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"device.name": "~v4l2_device.*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"matches": [
|
||||
{
|
||||
"node.name": "~v4l2_input.*"
|
||||
},
|
||||
{
|
||||
"node.name": "~v4l2_output.*"
|
||||
}
|
||||
],
|
||||
"actions": {
|
||||
"update-props": {
|
||||
"node.pause-on-idle": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,141 @@
|
|||
# pipewire example session manager.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
json = pkgs.formats.json {};
|
||||
cfg = config.services.pipewire.media-session;
|
||||
enable32BitAlsaPlugins = cfg.alsa.support32Bit
|
||||
&& pkgs.stdenv.isx86_64
|
||||
&& pkgs.pkgsi686Linux.pipewire != null;
|
||||
|
||||
# Use upstream config files passed through spa-json-dump as the base
|
||||
# Patched here as necessary for them to work with this module
|
||||
defaults = {
|
||||
alsa-monitor = lib.importJSON ./media-session/alsa-monitor.conf.json;
|
||||
bluez-monitor = lib.importJSON ./media-session/bluez-monitor.conf.json;
|
||||
media-session = lib.importJSON ./media-session/media-session.conf.json;
|
||||
v4l2-monitor = lib.importJSON ./media-session/v4l2-monitor.conf.json;
|
||||
};
|
||||
|
||||
configs = {
|
||||
alsa-monitor = recursiveUpdate defaults.alsa-monitor cfg.config.alsa-monitor;
|
||||
bluez-monitor = recursiveUpdate defaults.bluez-monitor cfg.config.bluez-monitor;
|
||||
media-session = recursiveUpdate defaults.media-session cfg.config.media-session;
|
||||
v4l2-monitor = recursiveUpdate defaults.v4l2-monitor cfg.config.v4l2-monitor;
|
||||
};
|
||||
in {
|
||||
|
||||
meta = {
|
||||
maintainers = teams.freedesktop.members;
|
||||
# uses attributes of the linked package
|
||||
buildDocsInSandbox = false;
|
||||
};
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
services.pipewire.media-session = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to enable the deprecated example Pipewire session manager";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.pipewire-media-session;
|
||||
defaultText = literalExpression "pkgs.pipewire-media-session";
|
||||
description = ''
|
||||
The pipewire-media-session derivation to use.
|
||||
'';
|
||||
};
|
||||
|
||||
config = {
|
||||
media-session = mkOption {
|
||||
type = json.type;
|
||||
description = ''
|
||||
Configuration for the media session core. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/media-session.conf
|
||||
'';
|
||||
default = defaults.media-session;
|
||||
};
|
||||
|
||||
alsa-monitor = mkOption {
|
||||
type = json.type;
|
||||
description = ''
|
||||
Configuration for the alsa monitor. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/alsa-monitor.conf
|
||||
'';
|
||||
default = defaults.alsa-monitor;
|
||||
};
|
||||
|
||||
bluez-monitor = mkOption {
|
||||
type = json.type;
|
||||
description = ''
|
||||
Configuration for the bluez5 monitor. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/bluez-monitor.conf
|
||||
'';
|
||||
default = defaults.bluez-monitor;
|
||||
};
|
||||
|
||||
v4l2-monitor = mkOption {
|
||||
type = json.type;
|
||||
description = ''
|
||||
Configuration for the V4L2 monitor. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/v4l2-monitor.conf
|
||||
'';
|
||||
default = defaults.v4l2-monitor;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
||||
# Enable either system or user units.
|
||||
systemd.services.pipewire-media-session.enable = config.services.pipewire.systemWide;
|
||||
systemd.user.services.pipewire-media-session.enable = !config.services.pipewire.systemWide;
|
||||
|
||||
systemd.services.pipewire-media-session.wantedBy = [ "pipewire.service" ];
|
||||
systemd.user.services.pipewire-media-session.wantedBy = [ "pipewire.service" ];
|
||||
|
||||
environment.etc."pipewire/media-session.d/media-session.conf" = {
|
||||
source = json.generate "media-session.conf" configs.media-session;
|
||||
};
|
||||
environment.etc."pipewire/media-session.d/v4l2-monitor.conf" = {
|
||||
source = json.generate "v4l2-monitor.conf" configs.v4l2-monitor;
|
||||
};
|
||||
|
||||
environment.etc."pipewire/media-session.d/with-audio" =
|
||||
mkIf config.services.pipewire.audio.enable {
|
||||
text = "";
|
||||
};
|
||||
|
||||
environment.etc."pipewire/media-session.d/with-alsa" =
|
||||
mkIf config.services.pipewire.alsa.enable {
|
||||
text = "";
|
||||
};
|
||||
environment.etc."pipewire/media-session.d/alsa-monitor.conf" =
|
||||
mkIf config.services.pipewire.alsa.enable {
|
||||
source = json.generate "alsa-monitor.conf" configs.alsa-monitor;
|
||||
};
|
||||
|
||||
environment.etc."pipewire/media-session.d/with-pulseaudio" =
|
||||
mkIf config.services.pipewire.pulse.enable {
|
||||
text = "";
|
||||
};
|
||||
environment.etc."pipewire/media-session.d/bluez-monitor.conf" =
|
||||
mkIf config.services.pipewire.pulse.enable {
|
||||
source = json.generate "bluez-monitor.conf" configs.bluez-monitor;
|
||||
};
|
||||
|
||||
environment.etc."pipewire/media-session.d/with-jack" =
|
||||
mkIf config.services.pipewire.jack.enable {
|
||||
text = "";
|
||||
};
|
||||
};
|
||||
}
|
||||
262
nixos/modules/services/desktops/pipewire/pipewire.nix
Normal file
262
nixos/modules/services/desktops/pipewire/pipewire.nix
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
# pipewire service.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
json = pkgs.formats.json {};
|
||||
cfg = config.services.pipewire;
|
||||
enable32BitAlsaPlugins = cfg.alsa.support32Bit
|
||||
&& pkgs.stdenv.isx86_64
|
||||
&& pkgs.pkgsi686Linux.pipewire != null;
|
||||
|
||||
# The package doesn't output to $out/lib/pipewire directly so that the
|
||||
# overlays can use the outputs to replace the originals in FHS environments.
|
||||
#
|
||||
# This doesn't work in general because of missing development information.
|
||||
jack-libs = pkgs.runCommand "jack-libs" {} ''
|
||||
mkdir -p "$out/lib"
|
||||
ln -s "${cfg.package.jack}/lib" "$out/lib/pipewire"
|
||||
'';
|
||||
|
||||
# Use upstream config files passed through spa-json-dump as the base
|
||||
# Patched here as necessary for them to work with this module
|
||||
defaults = {
|
||||
client = lib.importJSON ./daemon/client.conf.json;
|
||||
client-rt = lib.importJSON ./daemon/client-rt.conf.json;
|
||||
jack = lib.importJSON ./daemon/jack.conf.json;
|
||||
minimal = lib.importJSON ./daemon/minimal.conf.json;
|
||||
pipewire = lib.importJSON ./daemon/pipewire.conf.json;
|
||||
pipewire-pulse = lib.importJSON ./daemon/pipewire-pulse.conf.json;
|
||||
};
|
||||
|
||||
useSessionManager = cfg.wireplumber.enable || cfg.media-session.enable;
|
||||
|
||||
configs = {
|
||||
client = recursiveUpdate defaults.client cfg.config.client;
|
||||
client-rt = recursiveUpdate defaults.client-rt cfg.config.client-rt;
|
||||
jack = recursiveUpdate defaults.jack cfg.config.jack;
|
||||
pipewire = recursiveUpdate (if useSessionManager then defaults.pipewire else defaults.minimal) cfg.config.pipewire;
|
||||
pipewire-pulse = recursiveUpdate defaults.pipewire-pulse cfg.config.pipewire-pulse;
|
||||
};
|
||||
in {
|
||||
|
||||
meta = {
|
||||
maintainers = teams.freedesktop.members;
|
||||
# uses attributes of the linked package
|
||||
buildDocsInSandbox = false;
|
||||
};
|
||||
|
||||
###### interface
|
||||
options = {
|
||||
services.pipewire = {
|
||||
enable = mkEnableOption "pipewire service";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.pipewire;
|
||||
defaultText = literalExpression "pkgs.pipewire";
|
||||
description = ''
|
||||
The pipewire derivation to use.
|
||||
'';
|
||||
};
|
||||
|
||||
socketActivation = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Automatically run pipewire when connections are made to the pipewire socket.
|
||||
'';
|
||||
};
|
||||
|
||||
config = {
|
||||
client = mkOption {
|
||||
type = json.type;
|
||||
default = {};
|
||||
description = ''
|
||||
Configuration for pipewire clients. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/client.conf.in
|
||||
'';
|
||||
};
|
||||
|
||||
client-rt = mkOption {
|
||||
type = json.type;
|
||||
default = {};
|
||||
description = ''
|
||||
Configuration for realtime pipewire clients. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/client-rt.conf.in
|
||||
'';
|
||||
};
|
||||
|
||||
jack = mkOption {
|
||||
type = json.type;
|
||||
default = {};
|
||||
description = ''
|
||||
Configuration for the pipewire daemon's jack module. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/jack.conf.in
|
||||
'';
|
||||
};
|
||||
|
||||
pipewire = mkOption {
|
||||
type = json.type;
|
||||
default = {};
|
||||
description = ''
|
||||
Configuration for the pipewire daemon. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/pipewire.conf.in
|
||||
'';
|
||||
};
|
||||
|
||||
pipewire-pulse = mkOption {
|
||||
type = json.type;
|
||||
default = {};
|
||||
description = ''
|
||||
Configuration for the pipewire-pulse daemon. For details see
|
||||
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/pipewire-pulse.conf.in
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
audio = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
# this is for backwards compatibility
|
||||
default = cfg.alsa.enable || cfg.jack.enable || cfg.pulse.enable;
|
||||
defaultText = lib.literalExpression "config.services.pipewire.alsa.enable || config.services.pipewire.jack.enable || config.services.pipewire.pulse.enable";
|
||||
description = "Whether to use PipeWire as the primary sound server";
|
||||
};
|
||||
};
|
||||
|
||||
alsa = {
|
||||
enable = mkEnableOption "ALSA support";
|
||||
support32Bit = mkEnableOption "32-bit ALSA support on 64-bit systems";
|
||||
};
|
||||
|
||||
jack = {
|
||||
enable = mkEnableOption "JACK audio emulation";
|
||||
};
|
||||
|
||||
pulse = {
|
||||
enable = mkEnableOption "PulseAudio server emulation";
|
||||
};
|
||||
|
||||
systemWide = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
If true, a system-wide PipeWire service and socket is enabled
|
||||
allowing all users in the "pipewire" group to use it simultaneously.
|
||||
If false, then user units are used instead, restricting access to
|
||||
only one user.
|
||||
|
||||
Enabling system-wide PipeWire is however not recommended and disabled
|
||||
by default according to
|
||||
https://github.com/PipeWire/pipewire/blob/master/NEWS
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.audio.enable -> !config.hardware.pulseaudio.enable;
|
||||
message = "Using PipeWire as the sound server conflicts with PulseAudio. This option requires `hardware.pulseaudio.enable` to be set to false";
|
||||
}
|
||||
{
|
||||
assertion = cfg.jack.enable -> !config.services.jack.jackd.enable;
|
||||
message = "PipeWire based JACK emulation doesn't use the JACK service. This option requires `services.jack.jackd.enable` to be set to false";
|
||||
}
|
||||
{
|
||||
# JACK intentionally not checked, as PW-on-JACK setups are a thing that some people may want
|
||||
assertion = (cfg.alsa.enable || cfg.pulse.enable) -> cfg.audio.enable;
|
||||
message = "Using PipeWire's ALSA/PulseAudio compatibility layers requires running PipeWire as the sound server. Set `services.pipewire.audio.enable` to true.";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ cfg.package ]
|
||||
++ lib.optional cfg.jack.enable jack-libs;
|
||||
|
||||
systemd.packages = [ cfg.package ]
|
||||
++ lib.optional cfg.pulse.enable cfg.package.pulse;
|
||||
|
||||
# PipeWire depends on DBUS but doesn't list it. Without this booting
|
||||
# into a terminal results in the service crashing with an error.
|
||||
systemd.services.pipewire.bindsTo = [ "dbus.service" ];
|
||||
systemd.user.services.pipewire.bindsTo = [ "dbus.service" ];
|
||||
|
||||
# Enable either system or user units. Note that for pipewire-pulse there
|
||||
# are only user units, which work in both cases.
|
||||
systemd.sockets.pipewire.enable = cfg.systemWide;
|
||||
systemd.services.pipewire.enable = cfg.systemWide;
|
||||
systemd.user.sockets.pipewire.enable = !cfg.systemWide;
|
||||
systemd.user.services.pipewire.enable = !cfg.systemWide;
|
||||
|
||||
systemd.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
|
||||
systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
|
||||
systemd.user.sockets.pipewire-pulse.wantedBy = lib.mkIf (cfg.socketActivation && cfg.pulse.enable) ["sockets.target"];
|
||||
|
||||
services.udev.packages = [ cfg.package ];
|
||||
|
||||
# If any paths are updated here they must also be updated in the package test.
|
||||
environment.etc."alsa/conf.d/49-pipewire-modules.conf" = mkIf cfg.alsa.enable {
|
||||
text = ''
|
||||
pcm_type.pipewire {
|
||||
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;
|
||||
${optionalString enable32BitAlsaPlugins
|
||||
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ;"}
|
||||
}
|
||||
ctl_type.pipewire {
|
||||
libs.native = ${cfg.package.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;
|
||||
${optionalString enable32BitAlsaPlugins
|
||||
"libs.32Bit = ${pkgs.pkgsi686Linux.pipewire.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ;"}
|
||||
}
|
||||
'';
|
||||
};
|
||||
environment.etc."alsa/conf.d/50-pipewire.conf" = mkIf cfg.alsa.enable {
|
||||
source = "${cfg.package}/share/alsa/alsa.conf.d/50-pipewire.conf";
|
||||
};
|
||||
environment.etc."alsa/conf.d/99-pipewire-default.conf" = mkIf cfg.alsa.enable {
|
||||
source = "${cfg.package}/share/alsa/alsa.conf.d/99-pipewire-default.conf";
|
||||
};
|
||||
|
||||
environment.etc."pipewire/client.conf" = {
|
||||
source = json.generate "client.conf" configs.client;
|
||||
};
|
||||
environment.etc."pipewire/client-rt.conf" = {
|
||||
source = json.generate "client-rt.conf" configs.client-rt;
|
||||
};
|
||||
environment.etc."pipewire/jack.conf" = {
|
||||
source = json.generate "jack.conf" configs.jack;
|
||||
};
|
||||
environment.etc."pipewire/pipewire.conf" = {
|
||||
source = json.generate "pipewire.conf" configs.pipewire;
|
||||
};
|
||||
environment.etc."pipewire/pipewire-pulse.conf" = {
|
||||
source = json.generate "pipewire-pulse.conf" configs.pipewire-pulse;
|
||||
};
|
||||
|
||||
environment.sessionVariables.LD_LIBRARY_PATH =
|
||||
lib.mkIf cfg.jack.enable [ "${cfg.package.jack}/lib" ];
|
||||
|
||||
users = lib.mkIf cfg.systemWide {
|
||||
users.pipewire = {
|
||||
uid = config.ids.uids.pipewire;
|
||||
group = "pipewire";
|
||||
extraGroups = [
|
||||
"audio"
|
||||
"video"
|
||||
] ++ lib.optional config.security.rtkit.enable "rtkit";
|
||||
description = "Pipewire system service user";
|
||||
isSystemUser = true;
|
||||
};
|
||||
groups.pipewire.gid = config.ids.gids.pipewire;
|
||||
};
|
||||
|
||||
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/464#note_723554
|
||||
systemd.services.pipewire.environment."PIPEWIRE_LINK_PASSIVE" = "1";
|
||||
systemd.user.services.pipewire.environment."PIPEWIRE_LINK_PASSIVE" = "1";
|
||||
};
|
||||
}
|
||||
54
nixos/modules/services/desktops/pipewire/wireplumber.nix
Normal file
54
nixos/modules/services/desktops/pipewire/wireplumber.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
pwCfg = config.services.pipewire;
|
||||
cfg = pwCfg.wireplumber;
|
||||
pwUsedForAudio = pwCfg.audio.enable;
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.k900 ];
|
||||
|
||||
options = {
|
||||
services.pipewire.wireplumber = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.services.pipewire.enable;
|
||||
defaultText = lib.literalExpression "config.services.pipewire.enable";
|
||||
description = "Whether to enable Wireplumber, a modular session / policy manager for PipeWire";
|
||||
};
|
||||
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.wireplumber;
|
||||
defaultText = lib.literalExpression "pkgs.wireplumber";
|
||||
description = "The wireplumber derivation to use.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !config.services.pipewire.media-session.enable;
|
||||
message = "WirePlumber and pipewire-media-session can't be enabled at the same time.";
|
||||
}
|
||||
];
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
environment.etc."wireplumber/main.lua.d/80-nixos.lua" = lib.mkIf (!pwUsedForAudio) {
|
||||
text = ''
|
||||
-- Pipewire is not used for audio, so prevent it from grabbing audio devices
|
||||
alsa_monitor.enable = function() end
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
||||
systemd.services.wireplumber.enable = config.services.pipewire.systemWide;
|
||||
systemd.user.services.wireplumber.enable = !config.services.pipewire.systemWide;
|
||||
|
||||
systemd.services.wireplumber.wantedBy = [ "pipewire.service" ];
|
||||
systemd.user.services.wireplumber.wantedBy = [ "pipewire.service" ];
|
||||
};
|
||||
}
|
||||
77
nixos/modules/services/desktops/profile-sync-daemon.nix
Normal file
77
nixos/modules/services/desktops/profile-sync-daemon.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.psd;
|
||||
in {
|
||||
options.services.psd = with types; {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable the Profile Sync daemon.
|
||||
'';
|
||||
};
|
||||
resyncTimer = mkOption {
|
||||
type = str;
|
||||
default = "1h";
|
||||
example = "1h 30min";
|
||||
description = ''
|
||||
The amount of time to wait before syncing browser profiles back to the
|
||||
disk.
|
||||
|
||||
Takes a systemd.unit time span. The time unit defaults to seconds if
|
||||
omitted.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd = {
|
||||
user = {
|
||||
services = {
|
||||
psd = {
|
||||
enable = true;
|
||||
description = "Profile Sync daemon";
|
||||
wants = [ "psd-resync.service" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
path = with pkgs; [ rsync kmod gawk nettools util-linux profile-sync-daemon ];
|
||||
unitConfig = {
|
||||
RequiresMountsFor = [ "/home/" ];
|
||||
};
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = "yes";
|
||||
ExecStart = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon sync";
|
||||
ExecStop = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon unsync";
|
||||
};
|
||||
};
|
||||
|
||||
psd-resync = {
|
||||
enable = true;
|
||||
description = "Timed profile resync";
|
||||
after = [ "psd.service" ];
|
||||
wants = [ "psd-resync.timer" ];
|
||||
partOf = [ "psd.service" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
path = with pkgs; [ rsync kmod gawk nettools util-linux profile-sync-daemon ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.profile-sync-daemon}/bin/profile-sync-daemon resync";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
timers.psd-resync = {
|
||||
description = "Timer for profile sync daemon - ${cfg.resyncTimer}";
|
||||
partOf = [ "psd-resync.service" "psd.service" ];
|
||||
|
||||
timerConfig = {
|
||||
OnUnitActiveSec = "${cfg.resyncTimer}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
41
nixos/modules/services/desktops/system-config-printer.nix
Normal file
41
nixos/modules/services/desktops/system-config-printer.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.system-config-printer = {
|
||||
|
||||
enable = mkEnableOption "system-config-printer, a service for CUPS administration used by printing interfaces";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.system-config-printer.enable {
|
||||
|
||||
services.dbus.packages = [
|
||||
pkgs.system-config-printer
|
||||
];
|
||||
|
||||
systemd.packages = [
|
||||
pkgs.system-config-printer
|
||||
];
|
||||
|
||||
services.udev.packages = [
|
||||
pkgs.system-config-printer
|
||||
];
|
||||
|
||||
# for $out/bin/install-printer-driver
|
||||
services.packagekit.enable = true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
48
nixos/modules/services/desktops/telepathy.nix
Normal file
48
nixos/modules/services/desktops/telepathy.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Telepathy daemon.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = {
|
||||
maintainers = teams.gnome.members;
|
||||
};
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.telepathy = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Telepathy service, a communications framework
|
||||
that enables real-time communication via pluggable protocol backends.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.telepathy.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.telepathy-mission-control ];
|
||||
|
||||
services.dbus.packages = [ pkgs.telepathy-mission-control ];
|
||||
|
||||
# Enable runtime optional telepathy in gnome-shell
|
||||
services.xserver.desktopManager.gnome.sessionPath = with pkgs; [
|
||||
telepathy-glib
|
||||
telepathy-logger
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
52
nixos/modules/services/desktops/tumbler.nix
Normal file
52
nixos/modules/services/desktops/tumbler.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
# Tumbler
|
||||
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.tumbler;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
(mkRemovedOptionModule
|
||||
[ "services" "tumbler" "package" ]
|
||||
"")
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
maintainers = with maintainers; [ ] ++ teams.pantheon.members;
|
||||
};
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.tumbler = {
|
||||
|
||||
enable = mkEnableOption "Tumbler, A D-Bus thumbnailer service";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = with pkgs.xfce; [
|
||||
tumbler
|
||||
];
|
||||
|
||||
services.dbus.packages = with pkgs.xfce; [
|
||||
tumbler
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
31
nixos/modules/services/desktops/zeitgeist.nix
Normal file
31
nixos/modules/services/desktops/zeitgeist.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
# Zeitgeist
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
|
||||
meta = with lib; {
|
||||
maintainers = with maintainers; [ ] ++ teams.pantheon.members;
|
||||
};
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.zeitgeist = {
|
||||
enable = mkEnableOption "zeitgeist";
|
||||
};
|
||||
};
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.zeitgeist.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.zeitgeist ];
|
||||
|
||||
services.dbus.packages = [ pkgs.zeitgeist ];
|
||||
|
||||
systemd.packages = [ pkgs.zeitgeist ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue