feat: declarative wallpapers1

This commit is contained in:
nydragon 2025-02-24 19:45:04 +01:00
parent 532055085f
commit 83a672b3a9
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE
7 changed files with 30 additions and 16 deletions

18
flake.lock generated
View file

@ -389,7 +389,8 @@
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2",
"nur": "nur",
"nysh": "nysh"
"nysh": "nysh",
"wallpapers": "wallpapers"
}
},
"snowfall-lib": {
@ -445,6 +446,21 @@
"repo": "default",
"type": "github"
}
},
"wallpapers": {
"locked": {
"lastModified": 1740422160,
"narHash": "sha256-nHQOBJU/ZXnhHeOIv1InIjCKeFjnHZshGj/BcCdRjnQ=",
"ref": "refs/heads/main",
"rev": "f7857fa316d70847b02dc266099ce2b4eb10f5ea",
"revCount": 3,
"type": "git",
"url": "https://git.ccnlc.eu/nydragon/wallpapers.git"
},
"original": {
"type": "git",
"url": "https://git.ccnlc.eu/nydragon/wallpapers.git"
}
}
},
"root": "root",

View file

@ -45,6 +45,8 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.hjem.follows = "hjem";
};
wallpapers.url = "git+https://git.ccnlc.eu/nydragon/wallpapers.git";
};
outputs =

View file

@ -1,24 +1,20 @@
{
self,
lib,
pkgs,
config,
...
}:
let
inherit (lib.my) getExe';
in
{
systemd.user.services.swww = {
Install.WantedBy = [ "graphical-session.target" ];
Unit.After = [ "graphical-session.target" ];
Unit = {
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.swww}/bin/swww-daemon";
ExecStartPost = "${pkgs.swww}/bin/swww img ${
self + "/assets/landscape-pink-pastel.jpg"
} -t wipe --transition-fps 144";
ExecStart = getExe' pkgs.swww "swww-daemon";
Restart = "on-failure";
BindPaths = "/run/user /home/${config.home.username}/.cache/swww";
TemporaryFileSystem = "/home /run/user /root";

View file

@ -1,10 +1,10 @@
{ self, ... }:
{ inputs, ... }:
{
services.hyprpaper = {
enable = false;
settings =
let
wp = "${self}/assets/wallpapers/nix-flake-pastel.jpg";
wp = inputs.wallpapers.wallpapers.pastel.nix-flake-pastel.path;
in
{
ipc = "on";

View file

@ -87,7 +87,6 @@
fish.enable = true;
firefox.enable = true;
thunderbird.enable = true;
sway.enable = true;
hyprland.enable = true;
pulseview.enable = true;
gnupg.agent = {

View file

@ -1,7 +1,8 @@
{ pkgs, ... }:
{ pkgs, inputs, ... }:
{
environment.sessionVariables = {
MANROFFOPT = "-c";
MANPAGER = "sh -c 'col -bx | ${pkgs.bat}/bin/bat -l man -p'";
WALLPAPERS = "${inputs.wallpapers}";
};
}

View file

@ -1,8 +1,8 @@
{
self,
pkgs,
lib,
config,
inputs,
...
}:
lib.mkIf config.services.displayManager.sddm.enable {
@ -18,7 +18,7 @@ lib.mkIf config.services.displayManager.sddm.enable {
flavor = "mocha";
font = "Noto Sans";
fontSize = "9";
background = "${self}/assets/wallpapers/nix-flake-pastel.jpg";
background = inputs.wallpapers.wallpapers.pastel.nix-flake-pastel.path;
loginBackground = true;
})
];