chore: make namespace generic so people can copy easier

This commit is contained in:
Christoph Hollizeck 2024-10-11 00:17:03 +02:00
parent 0158f7ff06
commit 0562818aa7
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
45 changed files with 249 additions and 217 deletions

View file

@ -1,17 +1,19 @@
{
options,
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.apps._1password;
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps._1password;
in
{
options.wyrdgard.apps._1password = with types; {
options.${namespace}.apps._1password = {
enable = mkBoolOpt true "Enable 1Password";
};
@ -20,7 +22,7 @@ in
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = [ config.wyrdgard.user.name ];
polkitPolicyOwners = [ config.${namespace}.user.name ];
};
};
};

View file

@ -2,13 +2,14 @@
config,
inputs,
lib,
namespace,
pkgs,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.wyrdgard.apps.cli-apps.helix;
cfg = config.${namespace}.apps.cli-apps.helix;
cachix-url = "https://helix.cachix.org";
cachix-key = "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=";
@ -16,7 +17,7 @@ let
helix-pkg = inputs.helix.packages.${system}.default;
in
{
options.wyrdgard.apps.cli-apps.helix = {
options.${namespace}.apps.cli-apps.helix = {
enable = mkEnableOption "Whether to enable nixvim or not";
};
@ -25,7 +26,7 @@ in
systemPackages = [ helix-pkg ];
};
wyrdgard = {
${namespace} = {
home = {
extraOptions = {
programs.helix = {

View file

@ -1,16 +1,17 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.wyrdgard) mkBoolOpt;
cfg = config.wyrdgard.apps.cli-apps.nixvim;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.cli-apps.nixvim;
in
{
options.wyrdgard.apps.cli-apps.nixvim = {
options.${namespace}.apps.cli-apps.nixvim = {
enable = mkBoolOpt false "Whether to enable nixvim or not (Default true)";
};
@ -28,7 +29,7 @@ in
};
};
wyrdgard.home = {
${namespace}.home = {
extraOptions = {
# Use Neovim for Git diffs.
programs.fish.shellAliases.vimdiff = "nvim -d";

View file

@ -1,17 +1,18 @@
{
options,
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.wyrdgard;
with lib.${namespace};
let
cfg = config.wyrdgard.apps.discord;
cfg = config.${namespace}.apps.discord;
in
{
options.wyrdgard.apps.discord = with types; {
options.${namespace}.apps.discord = with types; {
enable = mkBoolOpt false "Whether or not to enable basic configuration";
};

View file

@ -1,16 +1,17 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
with lib.${namespace};
let
cfg = config.wyrdgard.apps.obs-studio;
cfg = config.${namespace}.apps.obs-studio;
in
{
options.wyrdgard.apps.obs-studio = with types; {
options.${namespace}.apps.obs-studio = with types; {
enable = mkBoolOpt false "Whether or not to enable obs-studio";
};

View file

@ -1,16 +1,17 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
with lib.${namespace};
let
cfg = config.wyrdgard.apps.teamspeak;
cfg = config.${namespace}.apps.teamspeak;
in
{
options.wyrdgard.apps.teamspeak = with types; {
options.${namespace}.apps.teamspeak = with types; {
enable = mkBoolOpt false "Whether or not to enable basic configuration";
};

View file

@ -1,17 +1,18 @@
{
options,
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.wyrdgard;
with lib.${namespace};
let
cfg = config.wyrdgard.apps.vivaldi;
cfg = config.${namespace}.apps.vivaldi;
in
{
options.wyrdgard.apps.vivaldi = with types; {
options.${namespace}.apps.vivaldi = with types; {
enable = mkBoolOpt false "Whether or not to enable vivaldi browser";
};

View file

@ -1,20 +1,20 @@
{
config,
lib,
pkgs,
system,
inputs,
lib,
namespace,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.wyrdgard.apps.zen-browser;
cfg = config.${namespace}.apps.zen-browser;
zenbrowser = inputs.zen-browser.packages."${system}".default;
in
{
options.wyrdgard.apps.zen-browser = {
options.${namespace}.apps.zen-browser = {
enable = mkEnableOption "Whether or not to enable zen browser";
};