From 279ff6251173e161cc50d8ae03cb3cd2e90a61a4 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Mon, 3 Jun 2024 18:28:35 +0530 Subject: global: init global contains shared data between home-manager and nixos modules. they're just structured data, it's doesn't contain any module functionally in the normal sense, an example is preferred monospace font or user's mail id `config.global.userdata.email` --- global/default.nix | 5 +++++ global/userdata.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 global/default.nix create mode 100644 global/userdata.nix (limited to 'global') diff --git a/global/default.nix b/global/default.nix new file mode 100644 index 0000000..5bcb1ba --- /dev/null +++ b/global/default.nix @@ -0,0 +1,5 @@ +{ ... }: { + imports = [ + ./userdata.nix + ]; +} diff --git a/global/userdata.nix b/global/userdata.nix new file mode 100644 index 0000000..d591920 --- /dev/null +++ b/global/userdata.nix @@ -0,0 +1,26 @@ +{ config, lib, ... }: let + cfg = config.global.userdata; +in { + options.global.userdata = { + name = lib.mkOption { + type = lib.types.str; + default = "sinan"; + description = "Owner's username"; + }; + nameFq = lib.mkOption { + type = lib.types.str; + default = "sinanmohd"; + description = "Owner's fully qualified username"; + }; + domain = lib.mkOption { + type = lib.types.str; + default = "sinanmohd.com"; + description = "Owner's domain"; + }; + email = lib.mkOption { + type = lib.types.str; + default = "${cfg.name}@${cfg.domain}"; + description = "Owner's email"; + }; + }; +} -- cgit v1.2.3