diff --git a/modules/home/apps/cli-apps/fish/default.nix b/modules/home/apps/cli-apps/fish/default.nix index 58d6570..73f28eb 100644 --- a/modules/home/apps/cli-apps/fish/default.nix +++ b/modules/home/apps/cli-apps/fish/default.nix @@ -1,17 +1,19 @@ { - options, config, lib, + namespace, + options, pkgs, ... }: -with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.apps.cli-apps.fish; + inherit (lib) mkIf; + inherit (lib.${namespace}) mkBoolOpt; + cfg = config.${namespace}.apps.cli-apps.fish; in { - options.wyrdgard.apps.cli-apps.fish = with types; { + options.${namespace}.apps.cli-apps.fish = { enable = mkBoolOpt true "Whether or not to enable the fish shell"; }; diff --git a/modules/home/apps/cli-apps/home-manager/default.nix b/modules/home/apps/cli-apps/home-manager/default.nix index ea63109..6829d25 100644 --- a/modules/home/apps/cli-apps/home-manager/default.nix +++ b/modules/home/apps/cli-apps/home-manager/default.nix @@ -1,11 +1,16 @@ -{ lib, config, ... }: -with lib; -with lib.wyrdgard; +{ + config, + lib, + namespace, + ... +}: let - cfg = config.wyrdgard.apps.cli-apps.home-manager; + inherit (lib) mkIf; + inherit (lib.${namespace}) mkBoolOpt enabled; + cfg = config.${namespace}.apps.cli-apps.home-manager; in { - options.wyrdgard.apps.cli-apps.home-manager = { + options.${namespace}.apps.cli-apps.home-manager = { enable = mkBoolOpt true "Enable home-manager"; }; diff --git a/modules/home/apps/cli-apps/starship/default.nix b/modules/home/apps/cli-apps/starship/default.nix index 7c8bf79..5f1f6df 100644 --- a/modules/home/apps/cli-apps/starship/default.nix +++ b/modules/home/apps/cli-apps/starship/default.nix @@ -1,17 +1,17 @@ { - options, config, lib, - pkgs, + namespace, + options, ... }: -with lib; -with lib.wyrdgard; let - cfg = config.wyrdgard.apps.cli-apps.starship; + inherit (lib) mkIf; + inherit (lib.${namespace}) mkBoolOpt; + cfg = config.${namespace}.apps.cli-apps.starship; in { - options.wyrdgard.apps.cli-apps.starship = with types; { + options.${namespace}.apps.cli-apps.starship = { enable = mkBoolOpt true "Whether or not to enable starship shell"; }; diff --git a/modules/home/apps/graphviz/default.nix b/modules/home/apps/graphviz/default.nix index d8fb477..9d355e0 100644 --- a/modules/home/apps/graphviz/default.nix +++ b/modules/home/apps/graphviz/default.nix @@ -1,16 +1,17 @@ { - lib, config, + lib, + namespace, pkgs, ... }: -with lib; -with lib.wyrdgard; let - cfg = config.wyrdgard.apps.graphviz; + inherit (lib) mkIf; + inherit (lib.${namespace}) mkBoolOpt; + cfg = config.${namespace}.apps.graphviz; in { - options.wyrdgard.apps.graphviz = { + options.${namespace}.apps.graphviz = { enable = mkBoolOpt true "Whether or not you want to install graphviz"; }; diff --git a/modules/home/tools/direnv/default.nix b/modules/home/tools/direnv/default.nix index f8c2802..08c87de 100644 --- a/modules/home/tools/direnv/default.nix +++ b/modules/home/tools/direnv/default.nix @@ -1,17 +1,17 @@ { - options, config, lib, - pkgs, + namespace, + options, ... }: -with lib; -with lib.wyrdgard; let - cfg = config.wyrdgard.tools.direnv; + inherit (lib) mkIf; + inherit (lib.${namespace}) mkBoolOpt enabled; + cfg = config.${namespace}.tools.direnv; in { - options.wyrdgard.tools.direnv = with types; { + options.${namespace}.tools.direnv = { enable = mkBoolOpt false "Whether or not to enable direnv."; }; diff --git a/modules/home/tools/git/default.nix b/modules/home/tools/git/default.nix index 4199b27..f94dfa5 100644 --- a/modules/home/tools/git/default.nix +++ b/modules/home/tools/git/default.nix @@ -1,18 +1,18 @@ { - options, - lib, config, - pkgs, + lib, + namespace, + options, ... }: -with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.tools.git; - user = config.wyrdgard.user; + inherit (lib) mkIf types; + cfg = config.${namespace}.tools.git; + user = config.${namespace}.user; in { - options.wyrdgard.tools.git = { + options.${namespace}.tools.git = { enable = mkBoolOpt true "Enable Git (Default true)"; userName = mkOpt types.str user.fullName "The name to configure git with."; userEmail = mkOpt types.str user.email "The email to configure git with."; diff --git a/modules/home/user/default.nix b/modules/home/user/default.nix index 9f29055..b383b5a 100644 --- a/modules/home/user/default.nix +++ b/modules/home/user/default.nix @@ -1,8 +1,7 @@ { lib, config, - pkgs, - osConfig ? { }, + namespace, ... }: let @@ -12,23 +11,14 @@ let mkDefault mkMerge ; - inherit (lib.wyrdgard) mkOpt; + inherit (lib.${namespace}) mkOpt; - cfg = config.wyrdgard.user; + cfg = config.${namespace}.user; - is-linux = pkgs.stdenv.isLinux; - is-darwin = pkgs.stdenv.isDarwin; - - home-directory = - if cfg.name == null then - null - else if is-darwin then - "/Users/${cfg.name}" - else - "/home/${cfg.name}"; + home-directory = if cfg.name == null then null else "/home/${cfg.name}"; in { - options.wyrdgard.user = { + options.${namespace}.user = { enable = mkOpt types.bool true "Whether to configure the user account."; name = mkOpt (types.nullOr types.str) (config.snowfallorg.user.name or "cholli" ) "The user account."; @@ -44,11 +34,11 @@ in assertions = [ { assertion = cfg.name != null; - message = "wyrdgard.user.name must be set"; + message = "${namespace}.user.name must be set"; } { assertion = cfg.home != null; - message = "wyrdgard.user.home must be set"; + message = "${namespace}.user.home must be set"; } ]; diff --git a/modules/nixos/apps/_1password/default.nix b/modules/nixos/apps/_1password/default.nix index d949400..ab0e244 100644 --- a/modules/nixos/apps/_1password/default.nix +++ b/modules/nixos/apps/_1password/default.nix @@ -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 ]; }; }; }; diff --git a/modules/nixos/apps/cli-apps/helix/default.nix b/modules/nixos/apps/cli-apps/helix/default.nix index 276b889..fcc6248 100644 --- a/modules/nixos/apps/cli-apps/helix/default.nix +++ b/modules/nixos/apps/cli-apps/helix/default.nix @@ -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 = { diff --git a/modules/nixos/apps/cli-apps/nixvim/default.nix b/modules/nixos/apps/cli-apps/nixvim/default.nix index e0addf3..7f27cdc 100644 --- a/modules/nixos/apps/cli-apps/nixvim/default.nix +++ b/modules/nixos/apps/cli-apps/nixvim/default.nix @@ -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"; diff --git a/modules/nixos/apps/discord/default.nix b/modules/nixos/apps/discord/default.nix index ade10ad..3564dda 100644 --- a/modules/nixos/apps/discord/default.nix +++ b/modules/nixos/apps/discord/default.nix @@ -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"; }; diff --git a/modules/nixos/apps/obs-studio/default.nix b/modules/nixos/apps/obs-studio/default.nix index 4e6f614..c7b1adc 100644 --- a/modules/nixos/apps/obs-studio/default.nix +++ b/modules/nixos/apps/obs-studio/default.nix @@ -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"; }; diff --git a/modules/nixos/apps/teamspeak/default.nix b/modules/nixos/apps/teamspeak/default.nix index a2a8846..5857e4d 100644 --- a/modules/nixos/apps/teamspeak/default.nix +++ b/modules/nixos/apps/teamspeak/default.nix @@ -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"; }; diff --git a/modules/nixos/apps/vivaldi/default.nix b/modules/nixos/apps/vivaldi/default.nix index f02faa2..6a730ef 100644 --- a/modules/nixos/apps/vivaldi/default.nix +++ b/modules/nixos/apps/vivaldi/default.nix @@ -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"; }; diff --git a/modules/nixos/apps/zen-browser/default.nix b/modules/nixos/apps/zen-browser/default.nix index f7140f0..c952e2d 100644 --- a/modules/nixos/apps/zen-browser/default.nix +++ b/modules/nixos/apps/zen-browser/default.nix @@ -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"; }; diff --git a/modules/nixos/archetypes/gaming/default.nix b/modules/nixos/archetypes/gaming/default.nix index 7baba0c..be26cb8 100644 --- a/modules/nixos/archetypes/gaming/default.nix +++ b/modules/nixos/archetypes/gaming/default.nix @@ -1,22 +1,23 @@ { - options, config, lib, + namespace, pkgs, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.archetypes.gaming; + cfg = config.${namespace}.archetypes.gaming; in { - options.wyrdgard.archetypes.gaming = with types; { + options.${namespace}.archetypes.gaming = with types; { enable = mkBoolOpt false "Whether or not to enable the gaming archetype."; }; config = mkIf cfg.enable { - wyrdgard = { + ${namespace} = { submodules = { basics = enabled; games = enabled; diff --git a/modules/nixos/desktop/addons/rofi/default.nix b/modules/nixos/desktop/addons/rofi/default.nix index f26bbb7..482dea8 100644 --- a/modules/nixos/desktop/addons/rofi/default.nix +++ b/modules/nixos/desktop/addons/rofi/default.nix @@ -28,7 +28,7 @@ in config = mkIf cfg.enable { environment.systemPackages = [ cfg.package ]; - wyrdgard.home.file = { + ${namespace}.home.file = { ".config/rofi/config.rasi".source = ./config.rasi; }; }; diff --git a/modules/nixos/desktop/addons/waybar/default.nix b/modules/nixos/desktop/addons/waybar/default.nix index 6a49dde..e9f868a 100644 --- a/modules/nixos/desktop/addons/waybar/default.nix +++ b/modules/nixos/desktop/addons/waybar/default.nix @@ -15,7 +15,7 @@ let mkIf types ; - inherit (lib.wyrdgard) enabled; + inherit (lib.${namespace}) enabled; in { options.${namespace}.desktop.addons.waybar = { @@ -39,7 +39,7 @@ in noto-fonts-cjk-sans ]; - wyrdgard.home.file = { + ${namespace}.home.file = { ".config/waybar/config.jsonc".source = ./config.jsonc; ".config/waybar/style.css".source = ./style.css; }; diff --git a/modules/nixos/desktop/default.nix b/modules/nixos/desktop/default.nix index d398097..090ab58 100644 --- a/modules/nixos/desktop/default.nix +++ b/modules/nixos/desktop/default.nix @@ -1,15 +1,16 @@ { - lib, config, + lib, + namespace, pkgs, ... }: let - user = config.wyrdgard.user.name; + user = config.${namespace}.user.name; in { config = { - wyrdgard.home.extraOptions = { + ${namespace}.home.extraOptions = { dconf.settings = { "org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; diff --git a/modules/nixos/desktop/hyprland/default.nix b/modules/nixos/desktop/hyprland/default.nix index 0018048..81c9b47 100644 --- a/modules/nixos/desktop/hyprland/default.nix +++ b/modules/nixos/desktop/hyprland/default.nix @@ -7,7 +7,7 @@ namespace, ... }: -with lib.wyrdgard; +with lib.${namespace}; let inherit (lib) mkIf @@ -29,7 +29,7 @@ let if [[ $running != "" ]]; then hyprctl dispatch workspace $running else - # always open on w/space 4 + # always open on w/space 4 hyprctl dispatch workspace 4 1password& fi @@ -79,7 +79,7 @@ in }; }; - wyrdgard = { + ${namespace} = { desktop.addons = { waybar = enabled; rofi = { diff --git a/modules/nixos/desktop/kde/default.nix b/modules/nixos/desktop/kde/default.nix index a6e793d..9f5cf35 100644 --- a/modules/nixos/desktop/kde/default.nix +++ b/modules/nixos/desktop/kde/default.nix @@ -6,7 +6,7 @@ ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let cfg = config.${namespace}.desktop.kde; in diff --git a/modules/nixos/home/default.nix b/modules/nixos/home/default.nix index 2befa77..2d04c35 100644 --- a/modules/nixos/home/default.nix +++ b/modules/nixos/home/default.nix @@ -1,16 +1,17 @@ { - options, config, lib, + namespace, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.home; + cfg = config.${namespace}.home; in { - options.wyrdgard.home = with types; { + options.${namespace}.home = with types; { file = mkOpt attrs { } (mdDoc "A set of files to be managed by home-manager's `home.file`."); configFile = mkOpt attrs { } ( mdDoc "A set of files to be managed by home-manager's `xdg.configFile`." @@ -19,14 +20,15 @@ in }; config = { - wyrdgard.home.extraOptions = { + ${namespace}.home.extraOptions = { home.stateVersion = config.system.stateVersion; - home.file = mkAliasDefinitions options.wyrdgard.home.file; + home.file = mkAliasDefinitions options.${namespace}.home.file; xdg.enable = true; - xdg.configFile = mkAliasDefinitions options.wyrdgard.home.configFile; + xdg.configFile = mkAliasDefinitions options.${namespace}.home.configFile; }; - snowfallorg.users.${config.wyrdgard.user.name}.home.config = config.wyrdgard.home.extraOptions; + snowfallorg.users.${config.${namespace}.user.name}.home.config = + config.${namespace}.home.extraOptions; home-manager = { useUserPackages = true; diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index b0c4e47..c2df8d3 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -1,13 +1,14 @@ { config, - pkgs, lib, + namespace, + pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.nix; + cfg = config.${namespace}.nix; substituters-submodule = types.submodule ( { name, ... }: @@ -19,7 +20,7 @@ let ); in { - options.wyrdgard.nix = with types; { + options.${namespace}.nix = with types; { enable = mkBoolOpt true "Whether or not to manage nix configuration."; package = mkOpt package pkgs.lix "Which nix package to use."; @@ -50,7 +51,7 @@ in let users = [ "root" - config.wyrdgard.user.name + config.${namespace}.user.name ]; in { @@ -73,7 +74,7 @@ in cfg.default-substituter.key ] ++ (mapAttrsToList (name: value: value.key) cfg.extra-substituters); } - // (lib.optionalAttrs config.wyrdgard.tools.direnv.enable { + // (lib.optionalAttrs config.${namespace}.tools.direnv.enable { keep-outputs = true; keep-derivations = true; }); diff --git a/modules/nixos/security/gpg/default.nix b/modules/nixos/security/gpg/default.nix index 6083559..4b98939 100644 --- a/modules/nixos/security/gpg/default.nix +++ b/modules/nixos/security/gpg/default.nix @@ -1,15 +1,16 @@ { - options, config, - pkgs, - lib, inputs, + lib, + namespace, + options, + pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.security.gpg; + cfg = config.${namespace}.security.gpg; gpgConf = "${inputs.gpg-base-conf}/gpg.conf"; @@ -25,7 +26,7 @@ let ''; in { - options.wyrdgard.security.gpg = with types; { + options.${namespace}.security.gpg = with types; { enable = mkBoolOpt false "Wether or not to enable GPG."; agentTimeout = mkOpt int 5 "The amount of time to wait before continuing with shell init."; }; @@ -56,7 +57,7 @@ in }; }; - wyrdgard = { + ${namespace} = { home.file = { ".gnupg/.keep".text = ""; diff --git a/modules/nixos/security/keyring/default.nix b/modules/nixos/security/keyring/default.nix index ddc8b26..4a75b59 100644 --- a/modules/nixos/security/keyring/default.nix +++ b/modules/nixos/security/keyring/default.nix @@ -7,7 +7,7 @@ }: let inherit (lib) mkIf; - inherit (lib.wyrdgard) mkBoolOpt; + inherit (lib.${namespace}) mkBoolOpt; cfg = config.${namespace}.security.keyring; in { diff --git a/modules/nixos/security/sops/default.nix b/modules/nixos/security/sops/default.nix index 421934b..d032d99 100644 --- a/modules/nixos/security/sops/default.nix +++ b/modules/nixos/security/sops/default.nix @@ -1,16 +1,17 @@ { config, - pkgs, lib, + namespace, + pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.security.sops; + cfg = config.${namespace}.security.sops; in { - options.wyrdgard.security.sops = with types; { + options.${namespace}.security.sops = with types; { enable = mkBoolOpt true "Enable sops (Default true)"; }; diff --git a/modules/nixos/security/syncthing/default.nix b/modules/nixos/security/syncthing/default.nix index cf44dd5..1b1ccf8 100644 --- a/modules/nixos/security/syncthing/default.nix +++ b/modules/nixos/security/syncthing/default.nix @@ -1,12 +1,17 @@ -{ config, lib, ... }: +{ + config, + lib, + namespace, + ... +}: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.security.syncthing; - user = config.wyrdgard.user; + cfg = config.${namespace}.security.syncthing; + user = config.${namespace}.user; in { - options.wyrdgard.security.syncthing = with types; { + options.${namespace}.security.syncthing = with types; { enable = mkEnableOption "Enable Syncthing"; }; diff --git a/modules/nixos/services/factorio-server/default.nix b/modules/nixos/services/factorio-server/default.nix index ae6d35a..9e501e4 100644 --- a/modules/nixos/services/factorio-server/default.nix +++ b/modules/nixos/services/factorio-server/default.nix @@ -1,16 +1,17 @@ { lib, config, + namespace, pkgs, ... }: -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.services.factorio-server; + cfg = config.${namespace}.services.factorio-server; inherit (lib) mkIf mkEnableOption; in { - options.wyrdgard.services.factorio-server = { + options.${namespace}.services.factorio-server = { enable = mkEnableOption "Enable Factorio Headless Server"; }; diff --git a/modules/nixos/submodules/basics-wsl/default.nix b/modules/nixos/submodules/basics-wsl/default.nix index 1d9bc68..a3c0891 100644 --- a/modules/nixos/submodules/basics-wsl/default.nix +++ b/modules/nixos/submodules/basics-wsl/default.nix @@ -1,16 +1,17 @@ { config, lib, + namespace, pkgs, ... }: let inherit (lib) mkIf; - inherit (lib.wyrdgard) mkBoolOpt enabled; - cfg = config.wyrdgard.submodules.basics-wsl; + inherit (lib.${namespace}) mkBoolOpt enabled; + cfg = config.${namespace}.submodules.basics-wsl; in { - options.wyrdgard.submodules.basics-wsl = { + options.${namespace}.submodules.basics-wsl = { enable = mkBoolOpt false "Whether or not to enable basic configuration."; }; @@ -28,7 +29,7 @@ in wsl-open ]; - wyrdgard = { + ${namespace} = { nix = enabled; apps.cli-apps.helix = enabled; diff --git a/modules/nixos/submodules/basics/default.nix b/modules/nixos/submodules/basics/default.nix index 58928c5..27ec758 100644 --- a/modules/nixos/submodules/basics/default.nix +++ b/modules/nixos/submodules/basics/default.nix @@ -1,17 +1,18 @@ { - options, config, lib, + namespace, + options, pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.submodules.basics; + cfg = config.${namespace}.submodules.basics; in { - options.wyrdgard.submodules.basics = with types; { + options.${namespace}.submodules.basics = with types; { enable = mkBoolOpt false "Whether or not to enable basic configuration."; }; @@ -31,7 +32,7 @@ in htop ]; - wyrdgard = { + ${namespace} = { nix = enabled; apps.cli-apps.helix = enabled; diff --git a/modules/nixos/submodules/games/default.nix b/modules/nixos/submodules/games/default.nix index 695b0bb..6f98066 100644 --- a/modules/nixos/submodules/games/default.nix +++ b/modules/nixos/submodules/games/default.nix @@ -1,24 +1,25 @@ { - options, config, lib, + namespace, + options, pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.submodules.games; + cfg = config.${namespace}.submodules.games; in { - options.wyrdgard.submodules.games = with types; { + options.${namespace}.submodules.games = with types; { enable = mkBoolOpt false "Whether or not you want to enable steam and other games"; }; config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ prismlauncher ]; - wyrdgard = { + ${namespace} = { apps = { steam = enabled; }; diff --git a/modules/nixos/submodules/socials/default.nix b/modules/nixos/submodules/socials/default.nix index cf988d5..e6bd256 100644 --- a/modules/nixos/submodules/socials/default.nix +++ b/modules/nixos/submodules/socials/default.nix @@ -1,20 +1,21 @@ { config, lib, + namespace, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.submodules.socials; + cfg = config.${namespace}.submodules.socials; in { - options.wyrdgard.submodules.socials = with types; { + options.${namespace}.submodules.socials = with types; { enable = mkBoolOpt false "Whether to enable social apps"; }; config = mkIf cfg.enable { - wyrdgard = { + ${namespace} = { apps = { discord = enabled; teamspeak = enabled; diff --git a/modules/nixos/system/autoUpgrade/default.nix b/modules/nixos/system/autoUpgrade/default.nix index b9947c1..203601c 100644 --- a/modules/nixos/system/autoUpgrade/default.nix +++ b/modules/nixos/system/autoUpgrade/default.nix @@ -1,18 +1,18 @@ { - options, config, - pkgs, - lib, inputs, + lib, + namespace, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.autoUpgrade; + cfg = config.${namespace}.system.autoUpgrade; in { - options.wyrdgard.system.autoUpgrade = with types; { + options.${namespace}.system.autoUpgrade = with types; { enable = mkEnableOption "Enable auto-upgrade"; time = mkOpt str "02:00" "Time to run auto-upgrade"; }; diff --git a/modules/nixos/system/boot/default.nix b/modules/nixos/system/boot/default.nix index 673bc32..a824815 100644 --- a/modules/nixos/system/boot/default.nix +++ b/modules/nixos/system/boot/default.nix @@ -1,16 +1,17 @@ { config, - pkgs, lib, + namespace, + pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.boot; + cfg = config.${namespace}.system.boot; in { - options.wyrdgard.system.boot = with types; { + options.${namespace}.system.boot = with types; { enable = mkBoolOpt false "Whether or not to enable booting."; }; diff --git a/modules/nixos/system/fonts/default.nix b/modules/nixos/system/fonts/default.nix index 3239eba..e46c9a8 100644 --- a/modules/nixos/system/fonts/default.nix +++ b/modules/nixos/system/fonts/default.nix @@ -1,17 +1,18 @@ { - options, config, - pkgs, lib, + namespace, + options, + pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.fonts; + cfg = config.${namespace}.system.fonts; in { - options.wyrdgard.system.fonts = with types; { + options.${namespace}.system.fonts = with types; { enable = mkBoolOpt false "Whether or not to manage fonts."; fonts = mkOpt (listOf package) [ ] "Custom font packages to install."; }; diff --git a/modules/nixos/system/hardware/audio/default.nix b/modules/nixos/system/hardware/audio/default.nix index 314c33a..2c01596 100644 --- a/modules/nixos/system/hardware/audio/default.nix +++ b/modules/nixos/system/hardware/audio/default.nix @@ -1,17 +1,18 @@ { - options, config, lib, + namespace, + options, pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.hardware.audio; + cfg = config.${namespace}.system.hardware.audio; in { - options.wyrdgard.system.hardware.audio = with types; { + options.${namespace}.system.hardware.audio = with types; { enable = mkBoolOpt false "Whether or not to enable audio"; }; @@ -34,8 +35,8 @@ in wireplumber.configPackages = [ (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/11-bluetooth-policy.conf" '' - wireplumber.settings = { - bluetooth.autoswitch-to-headset-profile = false + wireplumber.settings = { + bluetooth.autoswitch-to-headset-profile = false } '') (pkgs.writeTextDir "share/wireplumber/policy.lua.d/11-bluetooth-policy.conf" '' diff --git a/modules/nixos/system/hardware/bluetooth/default.nix b/modules/nixos/system/hardware/bluetooth/default.nix index 64de3e2..515ce9c 100644 --- a/modules/nixos/system/hardware/bluetooth/default.nix +++ b/modules/nixos/system/hardware/bluetooth/default.nix @@ -1,17 +1,18 @@ { - options, config, lib, + namespace, pkgs, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.hardware.bluetooth; + cfg = config.${namespace}.system.hardware.bluetooth; in { - options.wyrdgard.system.hardware.bluetooth = with types; { + options.${namespace}.system.hardware.bluetooth = with types; { enable = mkBoolOpt false "Whether or not to enable bluetooth"; }; diff --git a/modules/nixos/system/hardware/networking/default.nix b/modules/nixos/system/hardware/networking/default.nix index 7e493c4..73a2cea 100644 --- a/modules/nixos/system/hardware/networking/default.nix +++ b/modules/nixos/system/hardware/networking/default.nix @@ -1,17 +1,17 @@ { - options, config, lib, - pkgs, + namespace, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.hardware.networking; + cfg = config.${namespace}.system.hardware.networking; in { - options.wyrdgard.system.hardware.networking = with types; { + options.${namespace}.system.hardware.networking = with types; { enable = mkBoolOpt false "Whether or not to enable networking"; }; diff --git a/modules/nixos/system/locale/default.nix b/modules/nixos/system/locale/default.nix index 22effda..c52b33c 100644 --- a/modules/nixos/system/locale/default.nix +++ b/modules/nixos/system/locale/default.nix @@ -1,17 +1,17 @@ { - options, config, - pkgs, lib, + namespace, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.locale; + cfg = config.${namespace}.system.locale; in { - options.wyrdgard.system.locale = with types; { + options.${namespace}.system.locale = with types; { enable = mkBoolOpt false "Whether or not to manage locale settings."; }; diff --git a/modules/nixos/system/time/default.nix b/modules/nixos/system/time/default.nix index edaf4e9..2cf112d 100644 --- a/modules/nixos/system/time/default.nix +++ b/modules/nixos/system/time/default.nix @@ -1,17 +1,17 @@ { - options, config, - pkgs, lib, + namespace, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.time; + cfg = config.${namespace}.system.time; in { - options.wyrdgard.system.time = with types; { + options.${namespace}.system.time = with types; { enable = mkBoolOpt false "Whether or not to configure timezone information."; }; diff --git a/modules/nixos/system/xkb/default.nix b/modules/nixos/system/xkb/default.nix index 210cd4f..11044d8 100644 --- a/modules/nixos/system/xkb/default.nix +++ b/modules/nixos/system/xkb/default.nix @@ -1,16 +1,17 @@ { - options, config, lib, + namespace, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.system.xkb; + cfg = config.${namespace}.system.xkb; in { - options.wyrdgard.system.xkb = with types; { + options.${namespace}.system.xkb = with types; { enable = mkBoolOpt false "Whether or not to configure xkb."; }; diff --git a/modules/nixos/tools/direnv/default.nix b/modules/nixos/tools/direnv/default.nix index 384b9a0..7ef6fdf 100644 --- a/modules/nixos/tools/direnv/default.nix +++ b/modules/nixos/tools/direnv/default.nix @@ -1,22 +1,22 @@ { - options, config, lib, - pkgs, + namespace, + options, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.tools.direnv; + cfg = config.${namespace}.tools.direnv; in { - options.wyrdgard.tools.direnv = with types; { + options.${namespace}.tools.direnv = with types; { enable = mkBoolOpt false "Whether or not to enable direnv."; }; config = mkIf cfg.enable { - wyrdgard.home.extraOptions = { + ${namespace}.home.extraOptions = { programs.direnv = { enable = true; nix-direnv = enabled; diff --git a/modules/nixos/tools/git/default.nix b/modules/nixos/tools/git/default.nix index 15df135..ad7eb11 100644 --- a/modules/nixos/tools/git/default.nix +++ b/modules/nixos/tools/git/default.nix @@ -1,18 +1,19 @@ { - options, config, lib, + namespace, + options, pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.tools.git; - user = config.wyrdgard.user; + cfg = config.${namespace}.tools.git; + user = config.${namespace}.user; in { - options.wyrdgard.tools.git = with types; { + options.${namespace}.tools.git = with types; { enable = mkBoolOpt true "Wether or not to enable git (Default enabled)"; userName = mkOpt types.str user.fullName "The name to use git with"; userEmail = mkOpt types.str user.email "The email to use git with"; @@ -26,7 +27,7 @@ in gitbutler ]; - wyrdgard.home.extraOptions = { + ${namespace}.home.extraOptions = { programs.git = { enable = true; inherit (cfg) userName userEmail; diff --git a/modules/nixos/user/default.nix b/modules/nixos/user/default.nix index f986ba4..94c70fb 100644 --- a/modules/nixos/user/default.nix +++ b/modules/nixos/user/default.nix @@ -1,14 +1,15 @@ { - options, config, - pkgs, lib, + namespace, + options, + pkgs, ... }: with lib; -with lib.wyrdgard; +with lib.${namespace}; let - cfg = config.wyrdgard.user; + cfg = config.${namespace}.user; defaultIconFileName = "profile.png"; defaultIcon = pkgs.stdenvNoCC.mkDerivation { name = "default-icon"; @@ -32,14 +33,14 @@ let }; } '' - local target="$out/share/wyrdgard-icons/user/${cfg.name}" + local target="$out/share/${namespace}-icons/user/${cfg.name}" mkdir -p "$target" cp ${cfg.icon} "$target/${cfg.icon.fileName}" ''; in { - options.wyrdgard.user = with types; { + options.${namespace}.user = with types; { name = mkOpt str "cholli" "The name to use for the user account."; fullName = mkOpt str "Christoph Hollizeck" "The full name of the user."; email = mkOpt str "christoph.hollizeck@hey.com" "The email of the user."; @@ -55,7 +56,7 @@ in programs.fish = enabled; users.defaultUserShell = pkgs.fish; - wyrdgard.home = { + ${namespace}.home = { file = { "Desktop/.keep".text = ""; "Documents/.keep".text = ""; diff --git a/systems/x86_64-linux/yggdrasil/default.nix b/systems/x86_64-linux/yggdrasil/default.nix index a2024be..4bb6c64 100644 --- a/systems/x86_64-linux/yggdrasil/default.nix +++ b/systems/x86_64-linux/yggdrasil/default.nix @@ -1,10 +1,11 @@ { - pkgs, lib, + namespace, + pkgs, ... }: let - inherit (lib.wyrdgard) enabled; + inherit (lib.${namespace}) enabled; in { imports = [ ./hardware.nix ]; @@ -13,13 +14,14 @@ in path-of-building teams-for-linux obsidian + zed-editor ]; environment.pathsToLink = [ "/libexec" ]; virtualisation.waydroid = enabled; - wyrdgard = { + ${namespace} = { archetypes = { gaming.enable = true; };