mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat: mount network devices under ~/remote
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
...
|
||||
}: let
|
||||
inherit (lib.strings) makeBinPath;
|
||||
inherit (import ../lib) localAddresses kieran;
|
||||
inherit (import ../lib) localAddresses kieran remoteDir;
|
||||
defaultApplications = (import ../lib).defaultApplications {inherit pkgs;};
|
||||
in {
|
||||
imports = [
|
||||
@@ -264,7 +264,23 @@ in {
|
||||
./zsh.nix
|
||||
./tor.nix
|
||||
./stw-berlin.nix
|
||||
./fritzbox.nix
|
||||
./mastodon-bot.nix
|
||||
{
|
||||
fileSystems."${remoteDir}/fritz" = {
|
||||
device = "//192.168.178.1/FRITZ.NAS/Backup";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=ftpuser"
|
||||
"password=ftppassword"
|
||||
"noauto"
|
||||
"nounix"
|
||||
"rw"
|
||||
"noserverino" # ref https://askubuntu.com/a/1265165
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=1"
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
fileSystems."/media/fritz" = {
|
||||
device = "//192.168.178.1/FRITZ.NAS/Backup";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=ftpuser"
|
||||
"password=ftppassword"
|
||||
"guest"
|
||||
"noauto"
|
||||
"workgroup=WORKGROUP"
|
||||
"rw"
|
||||
"noserverino" # ref https://askubuntu.com/a/1265165
|
||||
"nounix"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.device-timeout=1"
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
}: let
|
||||
username = "meinhak99";
|
||||
inherit (import ../lib/email.nix) defaults pronouns;
|
||||
inherit (import ../lib) remoteDir;
|
||||
fu-defaults = rec {
|
||||
imap.host = "mail.zedat.fu-berlin.de";
|
||||
imap.port = 993;
|
||||
@@ -84,7 +85,7 @@ in {
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
in {
|
||||
"/media/fu-berlin/zodiac" = {
|
||||
"${remoteDir}/fu-berlin/zodiac" = {
|
||||
device = "//trove.storage.fu-berlin.de/GESCHKULT";
|
||||
fsType = "cifs";
|
||||
options =
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib/email.nix) defaults pronouns;
|
||||
inherit (import ../lib) remoteDir;
|
||||
hu-defaults = {
|
||||
imap.host = "mailbox.cms.hu-berlin.de";
|
||||
imap.port = 993;
|
||||
@@ -24,13 +25,13 @@
|
||||
"x-systemd.idle-timeout=1min"
|
||||
];
|
||||
in {
|
||||
fileSystems."/media/hu-berlin/germpro2" = {
|
||||
fileSystems."${remoteDir}/hu-berlin/germpro2" = {
|
||||
device = "//hugerm31c.user.hu-berlin.de/germpro2/ling";
|
||||
fsType = "cifs";
|
||||
options = hu-berlin-cifs-options;
|
||||
};
|
||||
|
||||
fileSystems."/media/hu-berlin/germhome" = {
|
||||
fileSystems."${remoteDir}/hu-berlin/germhome" = {
|
||||
device = "//hugerm31c.user.hu-berlin.de/germhome/ling/meinhaki";
|
||||
fsType = "cifs";
|
||||
options = hu-berlin-cifs-options;
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
repository = "rest:http://${host}:${toString port}/";
|
||||
};
|
||||
|
||||
remoteDir = "/home/kfm/remote";
|
||||
|
||||
firewall = lib: {
|
||||
accept = {
|
||||
source,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
inherit (import ../../lib) tmpfilesConfig;
|
||||
|
||||
mukkeMountPoint = "/mnt/mukke";
|
||||
fritzboxMountPoint = "/media/fritz";
|
||||
fritzboxMountPoint = "/mnt/fritz";
|
||||
|
||||
streams = import ../../lib/streams.nix {
|
||||
di-fm-key = "%DI_FM_KEY%"; # TODO lib.strings.fileContents <secrets/di.fm/key>;
|
||||
@@ -43,6 +43,19 @@ in {
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."${fritzboxMountPoint}" = {
|
||||
device = "//192.168.178.1/FRITZ.NAS/Backup";
|
||||
fsType = "cifs";
|
||||
options = [
|
||||
"username=ftpuser"
|
||||
"password=ftppassword"
|
||||
"noauto"
|
||||
"nounix"
|
||||
"ro"
|
||||
"noserverino" # ref https://askubuntu.com/a/1265165
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
(tmpfilesConfig {
|
||||
type = "L+";
|
||||
|
||||
Reference in New Issue
Block a user