diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-08-21 11:48:21 +0800 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-08-21 11:48:21 +0800 |
commit | 793491e2a187ca8975a46be0e385891ac8a31400 (patch) | |
tree | a2c8311442669360d0f63cf7282e356b9b7ecdfa | |
parent | 4fc96a3a599b0041a3b6a4b7052d942cebf94ec2 (diff) | |
download | nixos-configuration-793491e2a187ca8975a46be0e385891ac8a31400.tar.gz nixos-configuration-793491e2a187ca8975a46be0e385891ac8a31400.tar.bz2 nixos-configuration-793491e2a187ca8975a46be0e385891ac8a31400.zip |
feat: introduce flake var to shorten nh commands
-rw-r--r-- | common/variables.nix | 2 | ||||
-rw-r--r-- | nixos/configuration.nix | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/common/variables.nix b/common/variables.nix index d8c3e42..189aaa7 100644 --- a/common/variables.nix +++ b/common/variables.nix @@ -14,6 +14,7 @@ myEmail = mkOption {type = str;}; displayScale = mkOption {type = int;}; myAutostartCommands = mkOption {type = listOf str;}; + myConfigLocation = mkOption {type = str;}; }; # Default values for this configuration @@ -27,5 +28,6 @@ myAutostartCommands = [ "fcitx5" ]; + myConfigLocation = "/home/${myUserName}/nix-conf"; }; } diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 2463a7c..b0b1d9b 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -17,7 +17,10 @@ ./hardware-configuration.nix #./ags.nix ]; - environment.variables = {GDK_SCALE = config.displayScale;}; + environment.variables = { + GDK_SCALE = config.displayScale; + FLAKE = config.myConfigLocation; + }; security.pam.services.hyprlock = {}; i18n.inputMethod = { enabled = "fcitx5"; |