probably broken, car ride modularizing
This commit is contained in:
@@ -1,20 +1,52 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config = {
|
||||
users.users.jawz.packages = (with pkgs; [ gallery-dl yt-dlp ]);
|
||||
home-manager.users.jawz = {
|
||||
programs = {
|
||||
xdg.configFile = {
|
||||
"gallery-dl/config.json".source = ../dotfiles/gallery-dl/config.json;
|
||||
};
|
||||
bash = {
|
||||
shellAliases = {
|
||||
comic = ''download -u jawz -i "$(cat $LC | fzf --multi --exact -i)"'';
|
||||
gallery = ''download -u jawz -i "$(cat $LW | fzf --multi --exact -i)"'';
|
||||
dl = "download -u jawz -i";
|
||||
};
|
||||
initExtra = ''
|
||||
list_root="${config.xdg.configHome}"/jawz/lists/jawz
|
||||
export LW=$list_root/watch.txt
|
||||
export LI=$list_root/instant.txt
|
||||
export LC=$list_root/comic.txt
|
||||
'';
|
||||
};
|
||||
};
|
||||
services.lorri.enable = true;
|
||||
};
|
||||
users.users.jawz.packages = (with pkgs; [ gallery-dl ]);
|
||||
my.scripts.download = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = false;
|
||||
name = "download";
|
||||
package = with pkgs.python3Packages;
|
||||
package =
|
||||
with pkgs.python3Packages;
|
||||
(buildPythonApplication rec {
|
||||
pname = "download";
|
||||
version = "2.0";
|
||||
version = "2.5";
|
||||
src = ../../scripts/download/.;
|
||||
doCheck = false;
|
||||
buildInputs = [ setuptools ];
|
||||
propagatedBuildInputs = [ pyyaml types-pyyaml ];
|
||||
propagatedBuildInputs = [
|
||||
pyyaml
|
||||
types-pyyaml
|
||||
yt-dlp
|
||||
];
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
18
modules/scripts/find-dup-episode.nix
Normal file
18
modules/scripts/find-dup-episode.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.find-dup-episodes = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = false;
|
||||
name = "find-dup-episodes";
|
||||
package = pkgs.writeScriptBin "find-dup-episodes" (
|
||||
builtins.readFile ../../scripts/find-dup-episodes.sh
|
||||
);
|
||||
};
|
||||
}
|
||||
18
modules/scripts/manage-library.nix
Normal file
18
modules/scripts/manage-library.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.manage-library = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = true;
|
||||
name = "manage-library";
|
||||
timer = "00:30";
|
||||
description = "scans the library directory and sorts files";
|
||||
package = pkgs.writeScriptBin "manage-library" (builtins.readFile ../../scripts/manage-library.sh);
|
||||
};
|
||||
}
|
||||
20
modules/scripts/nextcloud-cronjob.nix
Normal file
20
modules/scripts/nextcloud-cronjob.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.nextcloud-cronjob = {
|
||||
enable = true;
|
||||
install = false;
|
||||
service = true;
|
||||
timer = "*:0/10";
|
||||
name = "nextcloud-cronjob";
|
||||
description = "runs tasks for nextcloud";
|
||||
package = pkgs.writeScriptBin "nextcloud-cronjob" (
|
||||
builtins.readFile ../../scripts/nextcloud-cronjob.sh
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.run = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = false;
|
||||
name = "run";
|
||||
package =
|
||||
pkgs.writeScriptBin "run" (builtins.readFile ../../scripts/run.sh);
|
||||
package = pkgs.writeScriptBin "run" (builtins.readFile ../../scripts/run.sh);
|
||||
};
|
||||
}
|
||||
|
||||
18
modules/scripts/sub-sync.nix
Normal file
18
modules/scripts/sub-sync.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.sub-sync = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = true;
|
||||
name = "sub-sync";
|
||||
timer = "22:00";
|
||||
description = "Syncronixes subtitles downloaded and modified the last day";
|
||||
package = pkgs.writeScriptBin "sub-sync" (builtins.readFile ../../scripts/sub-sync.sh);
|
||||
};
|
||||
}
|
||||
18
modules/scripts/update-dns.nix
Normal file
18
modules/scripts/update-dns.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [ ./base.nix ];
|
||||
config.my.scripts.update-dns = {
|
||||
enable = true;
|
||||
install = true;
|
||||
service = true;
|
||||
name = "update-dns";
|
||||
timer = "*:0/30";
|
||||
description = "Updates the IP of all my domains";
|
||||
package = pkgs.writeScriptBin "update-dns" (builtins.readFile ../../scripts/update-dns.sh);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user