organizing config and getting rid of withs as much as possible

This commit is contained in:
Christoph Hollizeck 2024-09-06 21:28:59 +02:00
parent 42c647cb63
commit c365ba3827
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
12 changed files with 142 additions and 57 deletions

View file

@ -1,17 +1,16 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
inherit(lib) mkIf;
inherit(lib.wyrdgard) mkBoolOpt;
cfg = config.wyrdgard.apps.cli-apps.nixvim;
in
{
options.wyrdgard.apps.cli-apps.nixvim = with types; {
options.wyrdgard.apps.cli-apps.nixvim = {
enable = mkBoolOpt true "Whether to enable nixvim or not (Default true)";
};

View file

@ -22,6 +22,15 @@ in
qt5.qtwayland
];
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
vivaldi-bin
'';
mode = "0755";
};
};
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
};
}

View file

@ -0,0 +1,34 @@
{
options,
config,
lib,
pkgs,
system,
inputs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.apps.zen-browser;
in
{
options.wyrdgard.apps.zen-browser = with types; {
enable = mkBoolOpt false "Whether or not to enable zen browser";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
inputs.zen-browser.packages."${system}".default
];
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
.zen-wrapped
'';
mode = "0755";
};
};
};
}

View file

@ -4,14 +4,13 @@
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.apps.factorio-server;
inherit (config.wyrdgard.user) name;
cfg = config.wyrdgard.services.factorio-server;
inherit (lib) mkIf mkEnableOption;
in
{
options.wyrdgard.apps.factorio-server = with types; {
options.wyrdgard.services.factorio-server = {
enable = mkEnableOption "Enable Factorio Headless Server";
};
@ -55,7 +54,6 @@ in
nonBlockingSaving = true;
autosave-interval = 5;
loadLatestSave = true;
bind = "192.168.178.34";
extraSettingsFile = config.sops.templates."extraSettingsFile.json".path;
};
};

View file

@ -1,11 +1,15 @@
{ lib, config, ... }:
with lib;
with lib.wyrdgard;
{
lib,
config,
...
}:
let
cfg = config.wyrdgard.apps.onedrive;
cfg = config.wyrdgard.services.onedrive;
inherit (lib) mkEnableOption mkIf;
in
{
options.wyrdgard.apps.onedrive = with types; {
options.wyrdgard.services.onedrive = {
enable = mkEnableOption "Enable OneDrive integration";
};

View file

@ -20,7 +20,6 @@ in
wyrdgard.graphical-interface = {
display-manager.sddm = enabled;
desktop-manager = {
hyprland = enabled;
kde = enabled;
};
};

View file

@ -28,7 +28,7 @@ let
pkgs.runCommandNoCC "propagated-icon"
{
passthru = {
inherit (fileName);
inherit (fileName) ;
};
}
''