mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
chore: init
This commit is contained in:
commit
1b2c1ea359
891 changed files with 37053 additions and 0 deletions
49
modules/config/devices/config/ceres.nix
Executable file
49
modules/config/devices/config/ceres.nix
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
inherit (moduleFunctions.devicesFunctions)
|
||||
sshfsOptions
|
||||
fileModeAndDirMode
|
||||
ceresStorageDriveName
|
||||
ownerExclusiveReadWriteMask
|
||||
readWritePermissions
|
||||
sambaPermissions
|
||||
userIdForUser0
|
||||
ceresIP
|
||||
deviceNames
|
||||
;
|
||||
inherit (moduleFunctions.usersFunctions) user0;
|
||||
inherit (moduleFunctions.devicesFunctions) externalIP;
|
||||
|
||||
ceresName = deviceNames.server;
|
||||
in
|
||||
{
|
||||
label = deviceNames.serverLabel;
|
||||
name = ceresName;
|
||||
sync = {
|
||||
address0 = "";
|
||||
};
|
||||
ip = {
|
||||
address0 = ceresIP;
|
||||
};
|
||||
boot = {
|
||||
options = ownerExclusiveReadWriteMask;
|
||||
};
|
||||
wireguard = {
|
||||
ip0 = "10.100.0.1";
|
||||
};
|
||||
storage0 = {
|
||||
mount = "/mnt/media/${ceresStorageDriveName}";
|
||||
device = "/dev/disk/by-label/${ceresStorageDriveName}";
|
||||
options = readWritePermissions;
|
||||
};
|
||||
samba0 = {
|
||||
mount = "/mnt/media/${ceresName}";
|
||||
device = "//${ceresIP}";
|
||||
options = sambaPermissions ++ fileModeAndDirMode ++ userIdForUser0;
|
||||
};
|
||||
remote0 = {
|
||||
mount = "/mnt/media/remote";
|
||||
device = "${user0}@${externalIP}:/mnt/media/${ceresStorageDriveName}";
|
||||
options = sshfsOptions;
|
||||
};
|
||||
}
|
||||
24
modules/config/devices/config/deimos.nix
Executable file
24
modules/config/devices/config/deimos.nix
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
inherit (moduleFunctions.devicesFunctions)
|
||||
ownerWriteOthersReadMask
|
||||
deimosIP
|
||||
deviceNames
|
||||
;
|
||||
in
|
||||
{
|
||||
label = deviceNames.laptopLabel;
|
||||
name = deviceNames.laptop;
|
||||
sync = {
|
||||
address0 = deimosIP;
|
||||
};
|
||||
ip = {
|
||||
address0 = deimosIP;
|
||||
};
|
||||
wireguard = {
|
||||
ip0 = "10.100.0.3";
|
||||
};
|
||||
boot = {
|
||||
options = ownerWriteOthersReadMask;
|
||||
};
|
||||
}
|
||||
35
modules/config/devices/config/mars.nix
Executable file
35
modules/config/devices/config/mars.nix
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
inherit (moduleFunctions.devicesFunctions)
|
||||
ownerWriteOthersReadMask
|
||||
readWritePermissions
|
||||
marsIP
|
||||
deviceNames
|
||||
;
|
||||
in
|
||||
{
|
||||
label = deviceNames.desktopLabel;
|
||||
name = deviceNames.desktop;
|
||||
sync = {
|
||||
address0 = "";
|
||||
};
|
||||
ip = {
|
||||
address0 = marsIP;
|
||||
};
|
||||
boot = {
|
||||
options = ownerWriteOthersReadMask;
|
||||
};
|
||||
wireguard = {
|
||||
ip0 = "10.100.0.2";
|
||||
};
|
||||
storage0 = {
|
||||
mount = "/mnt/media/games";
|
||||
device = "/dev/disk/by-label/Games";
|
||||
options = readWritePermissions;
|
||||
};
|
||||
storage1 = {
|
||||
mount = "/mnt/media/storage";
|
||||
device = "/dev/disk/by-label/Storage";
|
||||
options = readWritePermissions;
|
||||
};
|
||||
}
|
||||
21
modules/config/devices/config/phobos.nix
Executable file
21
modules/config/devices/config/phobos.nix
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
inherit (moduleFunctions.devicesFunctions)
|
||||
ownerWriteOthersReadMask
|
||||
phobosIP
|
||||
deviceNames
|
||||
;
|
||||
in
|
||||
{
|
||||
label = deviceNames.laptop2Label;
|
||||
name = deviceNames.laptop2;
|
||||
sync = {
|
||||
address0 = phobosIP;
|
||||
};
|
||||
ip = {
|
||||
address0 = phobosIP;
|
||||
};
|
||||
boot = {
|
||||
options = ownerWriteOthersReadMask;
|
||||
};
|
||||
}
|
||||
18
modules/config/devices/config/phone.nix
Executable file
18
modules/config/devices/config/phone.nix
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
inherit (moduleFunctions.devicesFunctions)
|
||||
phoneIP
|
||||
dummy
|
||||
deviceNames
|
||||
;
|
||||
in
|
||||
{
|
||||
name = deviceNames.phone;
|
||||
label = dummy;
|
||||
sync = {
|
||||
address0 = "RMDKNJY-BTX6FYF-G6SR332-WS6HARI-PF74SC6-VPBSGRQ-MKVQZEQ-KSIB6QV"; # User0
|
||||
};
|
||||
ip = {
|
||||
address0 = phoneIP;
|
||||
};
|
||||
}
|
||||
12
modules/config/devices/config/printers/printer0.nix
Executable file
12
modules/config/devices/config/printers/printer0.nix
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
inherit (moduleFunctions.devicesFunctions) dummy;
|
||||
|
||||
in
|
||||
{
|
||||
name = dummy;
|
||||
label = "Canon-TR7620a";
|
||||
ip = {
|
||||
address0 = "";
|
||||
};
|
||||
}
|
||||
12
modules/config/devices/config/printers/printer1.nix
Executable file
12
modules/config/devices/config/printers/printer1.nix
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
inherit (moduleFunctions.devicesFunctions) brotherIP dummy;
|
||||
|
||||
in
|
||||
{
|
||||
name = dummy;
|
||||
label = "Brother-HL-2170W";
|
||||
ip = {
|
||||
address0 = brotherIP;
|
||||
};
|
||||
}
|
||||
34
modules/config/devices/config/synology.nix
Executable file
34
modules/config/devices/config/synology.nix
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
inherit (moduleFunctions.devicesFunctions)
|
||||
sambaPermissions
|
||||
userIdForUser0
|
||||
userIdForUser1
|
||||
synologyIP
|
||||
deviceNames
|
||||
;
|
||||
inherit (moduleFunctions.usersFunctions) user0 user0Label user1;
|
||||
synologyName = deviceNames.nas;
|
||||
in
|
||||
{
|
||||
label = deviceNames.nasLabel;
|
||||
sync = {
|
||||
address0 = "MWRGX2V-F5XKE5E-REP6ECT-OOPFBMF-22NHSMW-YFBU6MB-PLFUN63-R3MW2QX"; # User0
|
||||
};
|
||||
name = synologyName;
|
||||
ip = {
|
||||
address0 = synologyIP;
|
||||
};
|
||||
# Nick Home Folder
|
||||
folder0 = {
|
||||
mount = "/mnt/media/${synologyName}/${user0}";
|
||||
device = "//${synologyIP}/homes/${user0Label}";
|
||||
options = sambaPermissions ++ userIdForUser0;
|
||||
};
|
||||
# Streaming Folder
|
||||
folder1 = {
|
||||
mount = "/mnt/media/${synologyName}/${user1}";
|
||||
device = "//${synologyIP}/homes/${user0Label}";
|
||||
options = sambaPermissions ++ userIdForUser1;
|
||||
};
|
||||
}
|
||||
45
modules/config/devices/default.nix
Executable file
45
modules/config/devices/default.nix
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
{ moduleFunctions }:
|
||||
let
|
||||
|
||||
configPath = ./config;
|
||||
printerPath = configPath + /printers;
|
||||
|
||||
deviceswithFunctions = builtins.listToAttrs (
|
||||
map
|
||||
(name: {
|
||||
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||
value = import (configPath + "/${name}") {
|
||||
inherit
|
||||
moduleFunctions
|
||||
;
|
||||
};
|
||||
})
|
||||
(
|
||||
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
|
||||
builtins.attrNames (builtins.readDir configPath)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
devicesPrinters = builtins.listToAttrs (
|
||||
map
|
||||
(name: {
|
||||
name = builtins.substring 0 (builtins.stringLength name - 4) name;
|
||||
value = import (printerPath + "/${name}") {
|
||||
inherit
|
||||
moduleFunctions
|
||||
;
|
||||
};
|
||||
})
|
||||
(
|
||||
builtins.filter (name: builtins.match ".*\\.nix$" name != null) (
|
||||
builtins.attrNames (builtins.readDir printerPath)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
devices = deviceswithFunctions // devicesPrinters;
|
||||
in
|
||||
{
|
||||
devices = devices;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue