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.
This commit is contained in:
parent
28506968d7
commit
2fcbfd8d88
3 changed files with 28 additions and 20 deletions
27
common/variables.nix
Normal file
27
common/variables.nix
Normal file
|
@ -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";
|
||||||
|
};
|
||||||
|
}
|
|
@ -16,7 +16,7 @@
|
||||||
#./swaywm.nix
|
#./swaywm.nix
|
||||||
./hypr
|
./hypr
|
||||||
./shells
|
./shells
|
||||||
./variables.nix
|
../../common/variables.nix
|
||||||
./mako.nix
|
./mako.nix
|
||||||
./wechat
|
./wechat
|
||||||
./editors.nix
|
./editors.nix
|
||||||
|
|
|
@ -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";
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue