aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/variables.nix27
-rw-r--r--home-manager/stvnliu/home.nix2
-rw-r--r--nixos/variables.nix19
3 files changed, 28 insertions, 20 deletions
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";
+ };
+}
diff --git a/home-manager/stvnliu/home.nix b/home-manager/stvnliu/home.nix
index 594f74e..79a91dc 100644
--- a/home-manager/stvnliu/home.nix
+++ b/home-manager/stvnliu/home.nix
@@ -16,7 +16,7 @@
#./swaywm.nix
./hypr
./shells
- ./variables.nix
+ ../../common/variables.nix
./mako.nix
./wechat
./editors.nix
diff --git a/nixos/variables.nix b/nixos/variables.nix
deleted file mode 100644
index fdf47b4..0000000
--- a/nixos/variables.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}: {
- # Type definitions for nix variables used in this configuration
- options = with lib;
- with types; {
- myUserName = mkOption {type = str;};
- myHostName = mkOption {type = str;};
- };
-
- # Default values for this configuration
- config = {
- myUserName = "stvnliu";
- myHostName = "homelab-nix";
- };
-}