refactor(treewide): cleanup

This commit is contained in:
ooks-io 2024-04-30 20:20:35 +12:00
parent 2fe6c44941
commit 2d93503bbc
30 changed files with 76 additions and 273 deletions

View file

@ -1,14 +1,13 @@
{ lib, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.systemModules.programs.bandwhich;
inherit (lib) mkIf;
inherit (builtins) elem;
host = config.systemModules.host;
in
{
options.systemModules.programs.bandwhich.enable = mkEnableOption "Enable bandwhich system module";
config = mkIf cfg.enable {
config = mkIf (elem "workstation" host.function) {
programs.bandwhich.enable = true;
};
}

View file

@ -1,14 +1,13 @@
{ lib, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.systemModules.programs.dconf;
inherit (lib) mkIf;
inherit (builtins) elem;
host = config.systemModules.host;
in
{
options.systemModules.programs.dconf.enable = mkEnableOption "Enable dconf system module";
config = mkIf cfg.enable {
config = mkIf (elem "workstation" host.function){
programs.dconf.enable = true;
};
}

View file

@ -1,14 +1,9 @@
{ lib, ... }:
{
imports = [
./gnomeServices.nix
./dconf
./kdeconnect
./seahorse
./wireshark
./bandwhich
];
options.systemModules.programs = {
gnomeServices = {
enable = lib.mkEnableOption "Enable gnome services module";
};
};
}

View file

@ -1,18 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.systemModules.programs.gnomeServices;
in
{
config = lib.mkIf cfg.enable {
services = {
dbus.packages = with pkgs; [
gcr
gnome.gnome-settings-daemon
];
gnome.gnome-keyring.enable = true;
gvfs.enable = true;
};
};
}

View file

@ -0,0 +1,16 @@
{ lib, config, ... }:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.systemModules.services.kdeconnect;
in
{
options.systemModules.services.kdeconnect.enable = mkEnableOption "Enable kdeconnect system module";
config = mkIf cfg.enable {
programs.kdeconnect = {
enable = true;
};
};
}

View file

@ -1,14 +1,13 @@
{ lib, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.systemModules.programs.seahorse;
inherit (lib) mkIf;
inherit (builtins) elem;
host = config.systemModules.host;
in
{
options.systemModules.programs.seahorse.enable = mkEnableOption "Enable seahorse system module";
config = mkIf cfg.enable {
config = mkIf (elem "workstation" host.function) {
programs.seahorse.enable = true;
};
}

View file

@ -1,14 +1,13 @@
{ lib, config, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.systemModules.programs.wireshark;
inherit (lib) mkIf;
inherit (builtins) elem;
host = config.systemModules.host;
in
{
options.systemModules.programs.wireshark.enable = mkEnableOption "Enable wireshark system module";
config = mkIf cfg.enable {
config = mkIf (elem "workstation" host.function) {
programs.wireshark.enable = true;
};
}