configuration.nix/home/ivand/default.nix
Ivan Dimitrov 1642dde323 bingwp but it's in nushell
Squashed commit of the following:

commit a8683efbd6a90b242f19a7f7527801cbabc600cc
Author: Ivan Dimitrov <ivan@idimitrov.dev>
Date:   Thu Feb 1 16:50:57 2024 +0200

    service config

commit c15c55f09c3915b1505052c51a8a471861691fba
Author: Ivan Dimitrov <ivan@idimitrov.dev>
Date:   Thu Feb 1 16:38:03 2024 +0200

    replace original bingwp with nushell v

commit d67d4832b0fb22aed660dafe2d6a52da1cc17e6f
Author: Ivan Dimitrov <ivan@idimitrov.dev>
Date:   Thu Feb 1 16:34:10 2024 +0200

    working bingwp in nushell

commit 5c5e52a0ea2b749d1ca9233d02388918a8752f79
Author: Ivan Dimitrov <ivan@idimitrov.dev>
Date:   Mon Jan 29 08:09:22 2024 +0000

    initial
2024-02-01 16:59:16 +02:00

86 lines
2.4 KiB
Nix

{ pkgs, lib, ... }: rec {
programs.home-manager = { enable = true; };
home = {
username = "ivand";
homeDirectory = "/home/ivand";
stateVersion = "23.11";
sessionPath = [
"$HOME/.local/bin"
];
pointerCursor = {
name = "Catppuccin-Mocha-Green-Cursors";
package = pkgs.catppuccin-cursors.mochaGreen;
};
};
systemd.user = {
timers = {
rbingwp = {
Timer = {
OnCalendar = "*-*-* 10:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
services = {
wpd = {
Service = {
Environment = [
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.swaybg}/bin"
];
ExecStart = [ "${pkgs.nushell}/bin/nu -c 'swaybg -i (ls ((xdg-user-dir PICTURES) | path join 'bg') | get name | last)'" ];
};
};
bingwp = {
Service = {
Type = "oneshot";
Environment = [
"PATH=${pkgs.curl}/bin:${pkgs.xdg-user-dirs}/bin:${pkgs.nushell}/bin"
];
ExecStart = [ "${pkgs.scripts}/bin/bingwp" ];
};
};
rbingwp = {
Service = {
Type = "oneshot";
ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ];
};
};
};
};
xdg = {
userDirs = {
enable = true;
createDirectories = true;
desktop = "${home.homeDirectory}/dt";
documents = "${home.homeDirectory}/doc";
download = "${home.homeDirectory}/dl";
pictures = "${home.homeDirectory}/pic";
videos = "${home.homeDirectory}/vid";
templates = "${home.homeDirectory}/tpl";
publicShare = "${home.homeDirectory}/pub";
music = "${home.homeDirectory}/mus";
};
mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
"x-scheme-handler/mailto" = "userapp-Thunderbird-LDALA2.desktop";
"message/rfc822" = "userapp-Thunderbird-LDALA2.desktop";
"x-scheme-handler/mid" = "userapp-Thunderbird-LDALA2.desktop";
};
};
};
}