[archive] Creates archive mount point and adds it to Altair.
This commit is contained in:
35
home-manager/features/mounts/mcp-archive.nix
Normal file
35
home-manager/features/mounts/mcp-archive.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [ sshfs ];
|
||||||
|
|
||||||
|
systemd.user.services.mcp-archive = {
|
||||||
|
Unit = {
|
||||||
|
Description = "SSHFS mount for remote archive";
|
||||||
|
After = [ "network-online.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStartPre = "/run/current-system/sw/bin/mkdir -p %h/archive";
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.sshfs}/bin/sshfs \
|
||||||
|
-f \
|
||||||
|
-o reconnect \
|
||||||
|
-o ServerAliveInterval=15 \
|
||||||
|
-o ServerAliveCountMax=3 \
|
||||||
|
-o IdentityFile=%h/.ssh/id_ed25519 \
|
||||||
|
-o StrictHostKeyChecking=yes \
|
||||||
|
drew@mcp:/tank/archive/drew \
|
||||||
|
%h/archive
|
||||||
|
'';
|
||||||
|
ExecStop = "/run/wrappers/bin/fusermount -u %h/mnt/archive";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "10s";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -21,6 +21,7 @@ in
|
|||||||
"/features/gaming.nix"
|
"/features/gaming.nix"
|
||||||
"/features/image-editing.nix"
|
"/features/image-editing.nix"
|
||||||
"/features/linux-desktop.nix"
|
"/features/linux-desktop.nix"
|
||||||
|
"/features/mounts/mcp-archive.nix"
|
||||||
"/features/notes.nix"
|
"/features/notes.nix"
|
||||||
"/features/3d-printing.nix"
|
"/features/3d-printing.nix"
|
||||||
]
|
]
|
||||||
@@ -28,21 +29,22 @@ in
|
|||||||
(import ../../../home-manager/features/wallpaper.nix monitors)
|
(import ../../../home-manager/features/wallpaper.nix monitors)
|
||||||
];
|
];
|
||||||
|
|
||||||
# This config file is needed for nix shell to allow unfree programs. I'm not
|
home = {
|
||||||
# sure why this isn't a home-manager option.
|
stateVersion = "24.11";
|
||||||
home.file.".config/nixpkgs/config.nix".text = ''
|
username = "drew";
|
||||||
{ allowUnfree = true; }
|
homeDirectory = "/home/drew";
|
||||||
'';
|
|
||||||
|
|
||||||
home.stateVersion = "24.11";
|
# This config file is needed for nix shell to allow unfree programs. I'm not
|
||||||
|
# sure why this isn't a home-manager option.
|
||||||
home.username = "drew";
|
file.".config/nixpkgs/config.nix".text = ''
|
||||||
home.homeDirectory = "/home/drew";
|
{ allowUnfree = true; }
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
programs.git.settings = {
|
programs.git.settings = {
|
||||||
user = {
|
user = {
|
||||||
name = "Drew Haven";
|
name = "Drew Haven";
|
||||||
email = "drew.haven@gmail.com";
|
email = "periodic@blazestar.net";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user