From 2fcbfd8d885fc02bcd8c3d792037695efc04cb91 Mon Sep 17 00:00:00 2001 From: Zhongheng Liu Date: Mon, 12 Aug 2024 09:27:59 +0800 Subject: refactor: move common variables referenced into common/variables.nix In the future, should have independent variable files for home-manager and nixos-specific, in their respective directories. --- common/variables.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 common/variables.nix (limited to 'common/variables.nix') diff --git a/common/variables.nix b/common/variables.nix new file mode 100644 index 0000000..b3a062b --- /dev/null +++ b/common/variables.nix @@ -0,0 +1,27 @@ +{ + tmconfig, + pkgs, + lib, + ... +}: { + # Type definitions for nix variables used in this configuration + options = with lib; + with types; { + myUserName = mkOption {type = str;}; + myHostName = mkOption {type = str;}; + myWallPaperPathString = mkOption {type = str;}; + myDisplayName = mkOption {type = str;}; + myEmail = mkOption {type = str;}; + displayScale = mkOption {type = int;}; + }; + + # Default values for this configuration + config = rec { + myUserName = "stvnliu"; + myHostName = "homelab-nix"; + displayScale = 2; + myWallPaperPathString = "/home/${myUserName}/wallpaper.png"; + myDisplayName = "Zhongheng Liu"; + myEmail = "z.liu@outlook.com.gr"; + }; +} -- cgit