feat: declarative wallpapers1
Some checks failed
/ test (push) Failing after 2s

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

18
flake.lock generated
View file

@ -344,7 +344,8 @@
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nur": "nur", "nur": "nur",
"nysh": "nysh" "nysh": "nysh",
"wallpapers": "wallpapers"
} }
}, },
"snowfall-lib": { "snowfall-lib": {
@ -400,6 +401,21 @@
"repo": "default", "repo": "default",
"type": "github" "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", "root": "root",

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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