feat: variable-based path interpolated hyprpaper config UNTESTED

This commit is contained in:
Zhongheng Liu 2024-08-09 16:15:06 +08:00
commit 362d2098bf
4 changed files with 38 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

View file

@ -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";

View file

@ -0,0 +1,12 @@
{pkgs, config, ...}:
{
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
preload = [ config.myWallPaperPathString ];
wallpapaer = ",${config.myWallPaperPathString}";
};
};
}

View file

@ -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";
};
}