feat(desktop): add lnxlink module.
This commit is contained in:
parent
ca8570f469
commit
f2922095ec
4 changed files with 66 additions and 22 deletions
|
|
@ -21,6 +21,7 @@
|
|||
./secrets.nix
|
||||
./emacs.nix
|
||||
./zen-browser.nix
|
||||
./lnxlink.nix
|
||||
];
|
||||
|
||||
crony.river.enable = lib.mkDefault false;
|
||||
|
|
@ -44,4 +45,5 @@
|
|||
crony.home-secrets.enable = lib.mkDefault false;
|
||||
crony.emacs.enable = lib.mkDefault false;
|
||||
crony.zen-browser.enable = lib.mkDefault false;
|
||||
crony.lnxlink.enable = lib.mkDefault false;
|
||||
}
|
||||
|
|
|
|||
35
modules/linux/home-manager/lnxlink.nix
Normal file
35
modules/linux/home-manager/lnxlink.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
crony.lnxlink.enable = lib.mkEnableOption "Enable and setup lnxlink.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.crony.lnxlink.enable {
|
||||
home.packages = [
|
||||
inputs.lnxlink.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
systemd.user.services.lnxlink = {
|
||||
Unit = {
|
||||
Description = "LNXLlink";
|
||||
After = ["network-online.target" "mutli-user.target" "graphical.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["default.target"];
|
||||
};
|
||||
Service = {
|
||||
WorkingDirectory = "/home/crony/.config/lnxlink";
|
||||
Type = "simple";
|
||||
Restart = "always";
|
||||
RestartSec = 5;
|
||||
ExecStart = "${inputs.lnxlink.packages.${pkgs.system}.default}/bin/lnxlink --config /home/crony/.config/lnxlink/config.yaml";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
home,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
|
|
@ -24,5 +25,32 @@
|
|||
beets
|
||||
croc
|
||||
];
|
||||
|
||||
programs.rclone = {
|
||||
enable = true;
|
||||
remotes = {
|
||||
homeassistant = {
|
||||
config = {
|
||||
type = "sftp";
|
||||
host = "assistant.home.cronyakatsuki.xyz";
|
||||
user = "root";
|
||||
key_file = "${home.homeDirectory} ~/.ssh/main";
|
||||
};
|
||||
mounts = {
|
||||
"/var/lib/homeassistant" = {
|
||||
enable = true;
|
||||
mountPoint = "/home/crony/docs/assistant";
|
||||
options = {
|
||||
default-premissions = true;
|
||||
vfs-cache-mode = "writes";
|
||||
buffer-size = "64M";
|
||||
multi-thread-streams = 4;
|
||||
multi-thread-cutoff = "250M";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue