thinkpad: sshfs music mount to home/Music

This commit is contained in:
Barna Máté 2025-01-24 21:06:15 +01:00
parent 5bbcc023d8
commit 57461fa37b
4 changed files with 44 additions and 4 deletions

View file

@ -281,11 +281,11 @@
"nixvim": "nixvim"
},
"locked": {
"lastModified": 1737310220,
"narHash": "sha256-2aS+mqzCPcPOaSMel+3ASRB2Xyh80jAEO3H7jT4JPuQ=",
"lastModified": 1737536685,
"narHash": "sha256-JWQ4Qyk8xVkR06zhbXXepKoXhxaA4zKDIUbWgrOxZMw=",
"ref": "refs/heads/master",
"rev": "a5a723785017784ce40be12521880dac8583c274",
"revCount": 19,
"rev": "f0313ee843435c4e01fece02b43b1d8afdcdf512",
"revCount": 21,
"type": "git",
"url": "https://git.4o1x5.dev/4o1x5/neo2005"
},

View file

@ -0,0 +1,9 @@
{ user, ... }:
{
home-manager.users.${user}.programs.cmus = {
enable = true;
# TODO shades of purple theme here
# extraConfig
};
}

View file

@ -0,0 +1,29 @@
{
user,
pkgs,
...
}:
let
remote_user = "root";
remote_ip = "32.54.31.180";
remote_path = "/home/jellyfin/music/Music";
in
{
environment.systemPackages = with pkgs; [
sshfs
];
# This took so fucking many tries
systemd.services.mount-music = {
description = "Mount remote Music directory using sshfs";
after = [ "network-online.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = user;
Group = "users";
ExecStart = "${pkgs.sshfs}/bin/sshfs -o IdentityFile=/home/${user}/.ssh/id_ed25519,debug ${remote_user}@${remote_ip}:${remote_path} /home/${user}/Music";
ExecStop = "${pkgs.fuse}/bin/fusermount -u /home/${user}/Music";
Restart = "always";
};
};
}

View file

@ -60,6 +60,8 @@
./configs/element.nix
./configs/nvim.nix
./configs/tmux.nix
./configs/cmus.nix
./configs/sshfs.nix
# terminal
#./configs/st.nix # too minimal, most things dont work without a million tweaks