mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
programs/gnome-session: rename systemd unit options
This commit is contained in:
parent
67b3c96869
commit
3aef91614b
@ -48,7 +48,7 @@ let
|
|||||||
# Most of the systemd config types are trying to eliminate as much of the
|
# Most of the systemd config types are trying to eliminate as much of the
|
||||||
# NixOS systemd extensions as much as possible. For more details, see
|
# NixOS systemd extensions as much as possible. For more details, see
|
||||||
# `config` attribute of the `sessionType`.
|
# `config` attribute of the `sessionType`.
|
||||||
serviceConfig = lib.mkOption {
|
serviceUnit = lib.mkOption {
|
||||||
type =
|
type =
|
||||||
let
|
let
|
||||||
inherit (utils.systemdUtils.lib) unitConfig serviceConfig;
|
inherit (utils.systemdUtils.lib) unitConfig serviceConfig;
|
||||||
@ -78,7 +78,7 @@ let
|
|||||||
default = {};
|
default = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
targetConfig = lib.mkOption {
|
targetUnit = lib.mkOption {
|
||||||
type =
|
type =
|
||||||
let
|
let
|
||||||
inherit (utils.systemdUtils.lib) unitConfig;
|
inherit (utils.systemdUtils.lib) unitConfig;
|
||||||
@ -177,7 +177,7 @@ let
|
|||||||
to easily compose their own desktop environment. THIS MODULE ALREADY
|
to easily compose their own desktop environment. THIS MODULE ALREADY
|
||||||
DOES A LOT, ALRIGHT! CUT ME SOME SLACK!
|
DOES A LOT, ALRIGHT! CUT ME SOME SLACK!
|
||||||
*/
|
*/
|
||||||
serviceConfig = {
|
serviceUnit = {
|
||||||
script = lib.mkAfter "${config.scriptPackage}/bin/${session.name}-${name}-script";
|
script = lib.mkAfter "${config.scriptPackage}/bin/${session.name}-${name}-script";
|
||||||
description = lib.mkDefault config.description;
|
description = lib.mkDefault config.description;
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ let
|
|||||||
painful experience to configure this by a first-timer. For now, this is
|
painful experience to configure this by a first-timer. For now, this is
|
||||||
on the user to know.
|
on the user to know.
|
||||||
*/
|
*/
|
||||||
targetConfig = {
|
targetUnit = {
|
||||||
wants = [ "${config.id}.service" ];
|
wants = [ "${config.id}.service" ];
|
||||||
description = lib.mkDefault config.description;
|
description = lib.mkDefault config.description;
|
||||||
documentation = [
|
documentation = [
|
||||||
@ -312,7 +312,7 @@ let
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
targetConfig = lib.mkOption {
|
targetUnit = lib.mkOption {
|
||||||
type =
|
type =
|
||||||
let
|
let
|
||||||
inherit (utils.systemdUtils.lib) unitConfig;
|
inherit (utils.systemdUtils.lib) unitConfig;
|
||||||
@ -383,16 +383,16 @@ let
|
|||||||
componentsUnits =
|
componentsUnits =
|
||||||
lib.foldlAttrs (acc: name: component:
|
lib.foldlAttrs (acc: name: component:
|
||||||
acc // {
|
acc // {
|
||||||
"${component.id}.service" = serviceToUnit component.id component.serviceConfig;
|
"${component.id}.service" = serviceToUnit component.id component.serviceUnit;
|
||||||
"${component.id}.target" = targetToUnit component.id component.targetConfig;
|
"${component.id}.target" = targetToUnit component.id component.targetUnit;
|
||||||
})
|
})
|
||||||
{} config.components;
|
{} config.components;
|
||||||
in
|
in
|
||||||
componentsUnits // {
|
componentsUnits // {
|
||||||
"gnome-session@${name}.target" = targetToUnit "gnome-session@${name}" config.targetConfig;
|
"gnome-session@${name}.target" = targetToUnit "gnome-session@${name}" config.targetUnit;
|
||||||
};
|
};
|
||||||
|
|
||||||
targetConfig = {
|
targetUnit = {
|
||||||
overrideStrategy = lib.mkForce "asDropin";
|
overrideStrategy = lib.mkForce "asDropin";
|
||||||
wants = lib.mkDefault (lib.mapAttrsToList (_: component: "${component.id}.target") config.components);
|
wants = lib.mkDefault (lib.mapAttrsToList (_: component: "${component.id}.target") config.components);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user