aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongheng Liu <z.liu@outlook.com.gr>2024-08-09 16:15:06 +0800
committerZhongheng Liu <z.liu@outlook.com.gr>2024-08-09 16:15:06 +0800
commit362d2098bfec174de59255d8224e278822c40574 (patch)
tree495ff3c8f5821e4da75280e253029d4be7502ab0
parent899c1b4a26a4a6582b1dbebb5a507a59b6f7ba91 (diff)
downloadnixos-configuration-362d2098bfec174de59255d8224e278822c40574.tar.gz
nixos-configuration-362d2098bfec174de59255d8224e278822c40574.tar.bz2
nixos-configuration-362d2098bfec174de59255d8224e278822c40574.zip
feat: variable-based path interpolated hyprpaper config UNTESTED
-rw-r--r--home-manager/stvnliu/assets/gruvbox-wallpaper.pngbin0 -> 191722 bytes
-rw-r--r--home-manager/stvnliu/home.nix18
-rw-r--r--home-manager/stvnliu/hyprpaper.nix12
-rw-r--r--home-manager/stvnliu/variables.nix15
4 files changed, 38 insertions, 7 deletions
diff --git a/home-manager/stvnliu/assets/gruvbox-wallpaper.png b/home-manager/stvnliu/assets/gruvbox-wallpaper.png
new file mode 100644
index 0000000..6b99aba
--- /dev/null
+++ b/home-manager/stvnliu/assets/gruvbox-wallpaper.png
Binary files differ
diff --git a/home-manager/stvnliu/home.nix b/home-manager/stvnliu/home.nix
index db44749..360e8a4 100644
--- a/home-manager/stvnliu/home.nix
+++ b/home-manager/stvnliu/home.nix
@@ -7,10 +7,6 @@
pkgs,
...
}:
-let
- myUserName = "stvnliu";
- myEmail = "z.liu@outlook.com.gr";
-in
{
# You can import other home-manager modules here
imports = [
@@ -21,6 +17,7 @@ in
#./swaywm.nix
./hyprland.nix
./shells
+ ./variables.nix
];
nixpkgs = {
@@ -46,8 +43,11 @@ in
};
home = {
- username = "${myUserName}";
- homeDirectory = "/home/${myUserName}";
+ username = "${config.myUserName}";
+ homeDirectory = "/home/${config.myUserName}";
+ file = {
+ "wallpaper.png".source = ./assets/gruvbox-wallpaper.png;
+ };
};
programs.neovim.enable = true;
home.packages = with pkgs; [
@@ -55,7 +55,11 @@ in
devenv
];
programs.home-manager.enable = true;
- programs.git.enable = true;
+ programs.git = {
+ enable = true;
+ userName = config.myDisplayName;
+ userEmail = config.myEmail;
+ };
programs.firefox.enable = true;
# Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch";
diff --git a/home-manager/stvnliu/hyprpaper.nix b/home-manager/stvnliu/hyprpaper.nix
new file mode 100644
index 0000000..ff75f30
--- /dev/null
+++ b/home-manager/stvnliu/hyprpaper.nix
@@ -0,0 +1,12 @@
+{pkgs, config, ...}:
+{
+ services.hyprpaper = {
+ enable = true;
+ settings = {
+ ipc = "on";
+ splash = false;
+ preload = [ config.myWallPaperPathString ];
+ wallpapaer = ",${config.myWallPaperPathString}";
+ };
+ };
+}
diff --git a/home-manager/stvnliu/variables.nix b/home-manager/stvnliu/variables.nix
new file mode 100644
index 0000000..924e68e
--- /dev/null
+++ b/home-manager/stvnliu/variables.nix
@@ -0,0 +1,15 @@
+{pkgs, config, lib, ...}:
+{
+ options = with lib; with types; {
+ myWallPaperPathString = { type = str; };
+ myUserName = { type = str; };
+ myDisplayName = { type = str; };
+ myEmail = { type = str; };
+ };
+ config = rec {
+ myUserName = "stvnliu";
+ myWallPaperPathString = "/home/${config.myUserName}/wallpaper.png";
+ myDisplayName = "Zhongheng Liu";
+ myEmail = "z.liu@outlook.com.gr";
+ };
+}