mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51:34 +01:00
Wrap hyprpaper
This commit is contained in:
parent
554b05c33b
commit
97b608bf9a
4 changed files with 22 additions and 23 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
|
@ -13,16 +12,7 @@ in {
|
||||||
|
|
||||||
options.myConfig.de.hyprland.enable = lib.mkEnableOption "";
|
options.myConfig.de.hyprland.enable = lib.mkEnableOption "";
|
||||||
|
|
||||||
config = lib.mkIf cfg.hyprland.enable {
|
config = lib.mkIf config.myConfig.de.hyprland.enable {
|
||||||
home.packages = [pkgs.hyprpaper];
|
|
||||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
|
||||||
preload=${cfg.wallpaper}
|
|
||||||
wallpaper=,${cfg.wallpaper}
|
|
||||||
splash=false
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.dunst.enable = true;
|
|
||||||
|
|
||||||
myConfig.de = {
|
myConfig.de = {
|
||||||
hypridlelock.enable = true;
|
hypridlelock.enable = true;
|
||||||
waybar.enable = true;
|
waybar.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,7 @@
|
||||||
}: let
|
}: let
|
||||||
cfg = config.myConfig.de;
|
cfg = config.myConfig.de;
|
||||||
in {
|
in {
|
||||||
options.myConfig.de = {
|
options.myConfig.de.theme = lib.mkOption {type = lib.types.str;};
|
||||||
theme = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
wallpaper = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
config = lib.mkMerge [
|
||||||
(lib.mkIf (cfg.theme == "dark") {
|
(lib.mkIf (cfg.theme == "dark") {
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,7 @@
|
||||||
xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
xdg.userDirs.extraConfig.XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||||
|
|
||||||
myConfig = {
|
myConfig = {
|
||||||
de = {
|
de.hyprland.enable = osConfig.myConfig.de.hyprland.enable;
|
||||||
hyprland.enable = osConfig.myConfig.de.hyprland.enable;
|
|
||||||
wallpaper = ./wallpaper;
|
|
||||||
};
|
|
||||||
|
|
||||||
shell = {
|
shell = {
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
|
|
|
||||||
19
wrappers/hyprpaper.nix
Normal file
19
wrappers/hyprpaper.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
assembleWrapper,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
assembleWrapper {
|
||||||
|
basePackage = pkgs.hyprpaper;
|
||||||
|
|
||||||
|
flags = let
|
||||||
|
hyprpaper-config = pkgs.writeText "hyprpaper-config" ''
|
||||||
|
preload = ~/Pictures/.wallpaper
|
||||||
|
wallpaper = , ~/Pictures/.wallpaper
|
||||||
|
splash = false
|
||||||
|
'';
|
||||||
|
in [
|
||||||
|
"--config"
|
||||||
|
hyprpaper-config
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue