✨ make use of mkEnableOption
This commit is contained in:
parent
a98589b6f8
commit
5c0752b891
43 changed files with 73 additions and 329 deletions
|
|
@ -9,13 +9,7 @@ let
|
|||
cfg = config.my.services.dunst;
|
||||
in
|
||||
{
|
||||
options.my.services.dunst = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.services.dunst.enable = mkEnableOption "dunst";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.moritz = {
|
||||
|
|
|
|||
|
|
@ -13,13 +13,7 @@ let
|
|||
cfg = config.my.services.kdeconnect;
|
||||
in
|
||||
{
|
||||
options.my.services.kdeconnect = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.services.kdeconnect.enable = mkEnableOption "kdeconnect";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.services.kdeconnect.enable = mkIf (!config.my.programs.gnome.enable) true;
|
||||
|
|
|
|||
|
|
@ -9,13 +9,7 @@ let
|
|||
cfg = config.my.services.mullvad;
|
||||
in
|
||||
{
|
||||
options.my.services.mullvad = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.services.mullvad.enable = mkEnableOption "mullvad";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.mullvad-vpn.enable = true;
|
||||
|
|
|
|||
|
|
@ -9,13 +9,7 @@ let
|
|||
cfg = config.my.services.openconnect;
|
||||
in
|
||||
{
|
||||
options.my.services.openconnect = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.services.openconnect.enable = mkEnableOption "openconnect";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking.openconnect.interfaces = {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,7 @@ let
|
|||
cfg = config.my.services.openvpn;
|
||||
in
|
||||
{
|
||||
options.my.services.openvpn = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.services.openvpn.enable = mkEnableOption "openvpn";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets = {
|
||||
|
|
|
|||
|
|
@ -9,13 +9,7 @@ let
|
|||
cfg = config.my.services.picom;
|
||||
in
|
||||
{
|
||||
options.my.services.picom = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.services.picom.enable = mkEnableOption "picom";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.moritz = {
|
||||
|
|
|
|||
|
|
@ -5,13 +5,7 @@ let
|
|||
cfg = config.my.services.printing;
|
||||
in
|
||||
{
|
||||
options.my.services.printing = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.services.printing.enable = mkEnableOption "printing";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
|
|
|
|||
|
|
@ -5,13 +5,7 @@ let
|
|||
cfg = config.my.services.redshift;
|
||||
in
|
||||
{
|
||||
options.my.services.redshift = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.services.redshift.enable = mkEnableOption "redshift";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.redshift.enable = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue