Loki: fix mounting paths
This commit is contained in:
parent
f624fd2fcf
commit
0009556141
2 changed files with 208 additions and 278 deletions
|
|
@ -122,53 +122,53 @@ with lib; {
|
||||||
enable = true;
|
enable = true;
|
||||||
discovery = true;
|
discovery = true;
|
||||||
};
|
};
|
||||||
samba = {
|
# samba = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
enableNmbd = true;
|
# enableNmbd = true;
|
||||||
enableWinbindd = true;
|
# enableWinbindd = true;
|
||||||
nsswins = true;
|
# nsswins = true;
|
||||||
extraConfig = ''
|
# extraConfig = ''
|
||||||
workgroup = WORKGROUP
|
# workgroup = WORKGROUP
|
||||||
load printers = no
|
# load printers = no
|
||||||
smb encrypt = required
|
# smb encrypt = required
|
||||||
'';
|
# '';
|
||||||
shares =
|
# shares =
|
||||||
let
|
# let
|
||||||
common = {
|
# common = {
|
||||||
"public" = "no";
|
# "public" = "no";
|
||||||
"writeable" = "yes";
|
# "writeable" = "yes";
|
||||||
"create mask" = "0700";
|
# "create mask" = "0700";
|
||||||
"directory mask" = "2700";
|
# "directory mask" = "2700";
|
||||||
"browseable" = "yes";
|
# "browseable" = "yes";
|
||||||
"guest ok" = "no";
|
# "guest ok" = "no";
|
||||||
"read only" = "no";
|
# "read only" = "no";
|
||||||
"force group" = "users";
|
# "force group" = "users";
|
||||||
};
|
# };
|
||||||
in
|
# in
|
||||||
{
|
# {
|
||||||
bertof = recursiveUpdate common {
|
# bertof = recursiveUpdate common {
|
||||||
path = "/home/bertof/";
|
# path = "/home/bertof/";
|
||||||
comment = "Bertof samba share";
|
# comment = "Bertof samba share";
|
||||||
"force user" = "bertof";
|
# "force user" = "bertof";
|
||||||
"valid users" = "bertof";
|
# "valid users" = "bertof";
|
||||||
};
|
# };
|
||||||
tiziano = recursiveUpdate common {
|
# tiziano = recursiveUpdate common {
|
||||||
path = "/home/tiziano/";
|
# path = "/home/tiziano/";
|
||||||
comment = "Tiziano samba share";
|
# comment = "Tiziano samba share";
|
||||||
"force user" = "tiziano";
|
# "force user" = "tiziano";
|
||||||
"valid users" = "tiziano";
|
# "valid users" = "tiziano";
|
||||||
};
|
# };
|
||||||
condiviso = recursiveUpdate common {
|
# condiviso = recursiveUpdate common {
|
||||||
path = "/mnt/raid0/condiviso";
|
# path = "/mnt/raid0/condiviso";
|
||||||
comment = "Samba share condiviso";
|
# comment = "Samba share condiviso";
|
||||||
"valid users" = "bertof tiziano";
|
# "valid users" = "bertof tiziano";
|
||||||
"create mask" = "0770";
|
# "create mask" = "0770";
|
||||||
"directory mask" = "2770";
|
# "directory mask" = "2770";
|
||||||
"force create mode" = "0660";
|
# "force create mode" = "0660";
|
||||||
"force directory mode" = "2770";
|
# "force directory mode" = "2770";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
smartd.enable = true;
|
smartd.enable = true;
|
||||||
sonarr = {
|
sonarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -176,15 +176,15 @@ with lib; {
|
||||||
group = "users";
|
group = "users";
|
||||||
};
|
};
|
||||||
thermald.enable = true;
|
thermald.enable = true;
|
||||||
transmission = {
|
# transmission = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
openFirewall = true;
|
# openFirewall = true;
|
||||||
group = "users";
|
# group = "users";
|
||||||
settings = {
|
# settings = {
|
||||||
download-dir = "/mnt/raid0/condiviso/Scaricati/Torrent";
|
# download-dir = "/mnt/raid0/condiviso/Scaricati/Torrent";
|
||||||
incomplete-dir = "/mnt/raid0/condiviso/Scaricati/Torrent/.incomplete";
|
# incomplete-dir = "/mnt/raid0/condiviso/Scaricati/Torrent/.incomplete";
|
||||||
};
|
# };
|
||||||
};
|
# };
|
||||||
xserver = {
|
xserver = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# videoDrivers = [ "nvidia" ];
|
# videoDrivers = [ "nvidia" ];
|
||||||
|
|
@ -250,47 +250,33 @@ with lib; {
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
bertof_raid0 = {
|
bertof_raid0 = {
|
||||||
subvolume = "/home/bertof/raid0";
|
subvolume = "/home/bertof/";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
ALLOW_USERS="bertof"
|
ALLOW_USERS="bertof"
|
||||||
${commonExtraConfig}
|
${commonExtraConfig}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
tiziano_raid0 = {
|
tiziano_raid0 = {
|
||||||
subvolume = "/home/tiziano/raid0";
|
subvolume = "/home/tiziano/";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
ALLOW_USERS="tiziano"
|
ALLOW_USERS="tiziano"
|
||||||
${commonExtraConfig}
|
${commonExtraConfig}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
bertof_raid1 = {
|
# condiviso_raid0 = {
|
||||||
subvolume = "/home/bertof/raid1";
|
# subvolume = "/mnt/raid0/condiviso";
|
||||||
extraConfig = ''
|
# extraConfig = ''
|
||||||
ALLOW_USERS="bertof"
|
# ALLOW_USERS="bertof tiziano"
|
||||||
${commonExtraConfig}
|
# ${commonExtraConfig}
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
tiziano_raid1 = {
|
# condiviso_raid1 = {
|
||||||
subvolume = "/home/tiziano/raid1";
|
# subvolume = "/mnt/raid1/condiviso";
|
||||||
extraConfig = ''
|
# extraConfig = ''
|
||||||
ALLOW_USERS="tiziano"
|
# ALLOW_USERS="bertof tiziano"
|
||||||
${commonExtraConfig}
|
# ${commonExtraConfig}
|
||||||
'';
|
# '';
|
||||||
};
|
# };
|
||||||
condiviso_raid0 = {
|
|
||||||
subvolume = "/mnt/raid0/condiviso";
|
|
||||||
extraConfig = ''
|
|
||||||
ALLOW_USERS="bertof tiziano"
|
|
||||||
${commonExtraConfig}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
condiviso_raid1 = {
|
|
||||||
subvolume = "/mnt/raid1/condiviso";
|
|
||||||
extraConfig = ''
|
|
||||||
ALLOW_USERS="bertof tiziano"
|
|
||||||
${commonExtraConfig}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -332,125 +318,125 @@ with lib; {
|
||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
services.home-assistant = {
|
# services.home-assistant = {
|
||||||
enable = true;
|
# enable = true;
|
||||||
# openFirewall = true;
|
# # openFirewall = true;
|
||||||
config = {
|
# config = {
|
||||||
default_config = { };
|
# default_config = { };
|
||||||
|
|
||||||
homeassistant = {
|
# homeassistant = {
|
||||||
name = "Casa";
|
# name = "Casa";
|
||||||
latitude = "!secret home-latitude";
|
# latitude = "!secret home-latitude";
|
||||||
longitude = "!secret home-longitude";
|
# longitude = "!secret home-longitude";
|
||||||
elevation = 17;
|
# elevation = 17;
|
||||||
unit_system = "metric";
|
# unit_system = "metric";
|
||||||
time_zone = "Europe/Rome";
|
# time_zone = "Europe/Rome";
|
||||||
external_url = "https://home-assistant.bertof.net";
|
# external_url = "https://home-assistant.bertof.net";
|
||||||
};
|
# };
|
||||||
|
|
||||||
http = {
|
# http = {
|
||||||
use_x_forwarded_for = true;
|
# use_x_forwarded_for = true;
|
||||||
trusted_proxies = [ "172.23.4.159" "::1" "127.0.0.1" ];
|
# trusted_proxies = [ "172.23.4.159" "::1" "127.0.0.1" ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
automation = "!include automations.yaml";
|
# automation = "!include automations.yaml";
|
||||||
scene = "!include scenes.yaml";
|
# scene = "!include scenes.yaml";
|
||||||
|
|
||||||
cloud = { };
|
# cloud = { };
|
||||||
config = { };
|
# config = { };
|
||||||
device_tracker = [{
|
# device_tracker = [{
|
||||||
platform = "bluetooth_tracker";
|
# platform = "bluetooth_tracker";
|
||||||
request_rssi = true;
|
# request_rssi = true;
|
||||||
}];
|
# }];
|
||||||
esphome = { };
|
# esphome = { };
|
||||||
frontend = { };
|
# frontend = { };
|
||||||
# google_assistant = { project_id = "light-cathode-372118"; };
|
# # google_assistant = { project_id = "light-cathode-372118"; };
|
||||||
history = { };
|
# history = { };
|
||||||
logbook = { };
|
# logbook = { };
|
||||||
# logger.default = "debug";
|
# # logger.default = "debug";
|
||||||
logger.default = "info";
|
# logger.default = "info";
|
||||||
"map" = { };
|
# "map" = { };
|
||||||
mobile_app = { };
|
# mobile_app = { };
|
||||||
recorder.purge_keep_days = 30;
|
# recorder.purge_keep_days = 30;
|
||||||
shopping_list = { };
|
# shopping_list = { };
|
||||||
sun = { };
|
# sun = { };
|
||||||
system_health = { };
|
# system_health = { };
|
||||||
tts = [{
|
# tts = [{
|
||||||
platform = "google_translate";
|
# platform = "google_translate";
|
||||||
language = "it";
|
# language = "it";
|
||||||
# tld = "it";
|
# # tld = "it";
|
||||||
}];
|
# }];
|
||||||
};
|
# };
|
||||||
configDir = "/var/lib/hass";
|
# configDir = "/var/lib/hass";
|
||||||
configWritable = true;
|
# configWritable = true;
|
||||||
extraPackages = ps: with ps; [ securetar ];
|
# extraPackages = ps: with ps; [ securetar ];
|
||||||
extraComponents = [
|
# extraComponents = [
|
||||||
"default_config"
|
# "default_config"
|
||||||
|
|
||||||
"accuweather"
|
# "accuweather"
|
||||||
"alert"
|
# "alert"
|
||||||
"analytics"
|
# "analytics"
|
||||||
"bayesian"
|
# "bayesian"
|
||||||
"binary_sensor"
|
# "binary_sensor"
|
||||||
"blueprint"
|
# "blueprint"
|
||||||
"bluetooth_le_tracker"
|
# "bluetooth_le_tracker"
|
||||||
"bluetooth_tracker"
|
# "bluetooth_tracker"
|
||||||
"button"
|
# "button"
|
||||||
"camera"
|
# "camera"
|
||||||
"cast"
|
# "cast"
|
||||||
"caldav"
|
# "caldav"
|
||||||
"calendar"
|
# "calendar"
|
||||||
"citybikes"
|
# "citybikes"
|
||||||
"configurator"
|
# "configurator"
|
||||||
"coronavirus"
|
# "coronavirus"
|
||||||
"cover"
|
# "cover"
|
||||||
"default_config"
|
# "default_config"
|
||||||
"derivative"
|
# "derivative"
|
||||||
"device_automation"
|
# "device_automation"
|
||||||
"device_sun_light_trigger"
|
# "device_sun_light_trigger"
|
||||||
"device_tracker"
|
# "device_tracker"
|
||||||
"dlib_face_detect"
|
# "dlib_face_detect"
|
||||||
"dlib_face_identify"
|
# "dlib_face_identify"
|
||||||
"dlna_dmr"
|
# "dlna_dmr"
|
||||||
"dlna_dms"
|
# "dlna_dms"
|
||||||
"esphome"
|
# "esphome"
|
||||||
"flux"
|
# "flux"
|
||||||
"gdacs"
|
# "gdacs"
|
||||||
"google"
|
# "google"
|
||||||
"google_translate"
|
# "google_translate"
|
||||||
"group"
|
# "group"
|
||||||
"hassio"
|
# "hassio"
|
||||||
"jellyfin"
|
# "jellyfin"
|
||||||
"local_file"
|
# "local_file"
|
||||||
"media_player"
|
# "media_player"
|
||||||
"met"
|
# "met"
|
||||||
"meteoalarm"
|
# "meteoalarm"
|
||||||
"network"
|
# "network"
|
||||||
"nmap_tracker"
|
# "nmap_tracker"
|
||||||
"notify"
|
# "notify"
|
||||||
"ping"
|
# "ping"
|
||||||
"plex"
|
# "plex"
|
||||||
"proximity"
|
# "proximity"
|
||||||
"radarr"
|
# "radarr"
|
||||||
"radio_browser"
|
# "radio_browser"
|
||||||
"random"
|
# "random"
|
||||||
"scene"
|
# "scene"
|
||||||
"schedule"
|
# "schedule"
|
||||||
"sonarr"
|
# "sonarr"
|
||||||
"spotify"
|
# "spotify"
|
||||||
"tcp"
|
# "tcp"
|
||||||
"telegram"
|
# "telegram"
|
||||||
"telegram_bot"
|
# "telegram_bot"
|
||||||
"template"
|
# "template"
|
||||||
"threshold"
|
# "threshold"
|
||||||
"tod" # times of the day
|
# "tod" # times of the day
|
||||||
"trend"
|
# "trend"
|
||||||
"upnp"
|
# "upnp"
|
||||||
"wake_on_lan"
|
# "wake_on_lan"
|
||||||
"workday"
|
# "workday"
|
||||||
"zoneminder"
|
# "zoneminder"
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
security.sudo.extraConfig = ''
|
security.sudo.extraConfig = ''
|
||||||
Defaults pwfeedback
|
Defaults pwfeedback
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,12 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, modulesPath, ... }:
|
{ config, lib, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
"xhci_pci"
|
|
||||||
"ehci_pci"
|
|
||||||
"ahci"
|
|
||||||
"uas"
|
|
||||||
"usb_storage"
|
|
||||||
"sd_mod"
|
|
||||||
"rtsx_pci_sdmmc"
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
@ -26,85 +21,34 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
# fileSystems."/var/lib/zoneminder/events" = {
|
fileSystems."/home/bertof" = {
|
||||||
# device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
device = "/dev/disk/by-partlabel/5T";
|
||||||
# fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
# options = [ "subvol=@zoneminder" ];
|
options = [ "subvol=@bertof" ];
|
||||||
# };
|
};
|
||||||
|
|
||||||
# fileSystems."/mnt/raid0/condiviso" = {
|
fileSystems."/home/tiziano" = {
|
||||||
# device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
device = "/dev/disk/by-partlabel/5T";
|
||||||
# fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
# options = [ "subvol=@condiviso" ];
|
options = [ "subvol=@tiziano" ];
|
||||||
# };
|
};
|
||||||
|
|
||||||
# fileSystems."/mnt/raid1/condiviso" = {
|
swapDevices = [
|
||||||
# device = "/dev/disk/by-uuid/c84a38dc-9cc7-4762-b509-8fce1c1d95c8";
|
{
|
||||||
# fsType = "btrfs";
|
device = "/swapfile";
|
||||||
# options = [ "subvol=@condiviso" ];
|
size = 1024 * 4;
|
||||||
# };
|
}
|
||||||
|
];
|
||||||
# fileSystems."/home/bertof/raid0" = {
|
|
||||||
# device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
|
||||||
# fsType = "btrfs";
|
|
||||||
# options = [ "subvol=@bertof" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# fileSystems."/home/bertof/raid1" = {
|
|
||||||
# device = "/dev/disk/by-uuid/c84a38dc-9cc7-4762-b509-8fce1c1d95c8";
|
|
||||||
# fsType = "btrfs";
|
|
||||||
# options = [ "subvol=@bertof" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# fileSystems."/home/tiziano/raid0" = {
|
|
||||||
# device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
|
||||||
# fsType = "btrfs";
|
|
||||||
# options = [ "subvol=@tiziano" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# fileSystems."/home/tiziano/raid1" = {
|
|
||||||
# device = "/dev/disk/by-uuid/c84a38dc-9cc7-4762-b509-8fce1c1d95c8";
|
|
||||||
# fsType = "btrfs";
|
|
||||||
# options = [ "subvol=@tiziano" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# fileSystems."/home/tiziano/Condiviso/raid1" = {
|
|
||||||
# device = "/dev/disk/by-uuid/c84a38dc-9cc7-4762-b509-8fce1c1d95c8";
|
|
||||||
# fsType = "btrfs";
|
|
||||||
# options = [ "subvol=@condiviso" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# fileSystems."/home/tiziano/Condiviso/raid0" = {
|
|
||||||
# device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
|
||||||
# fsType = "btrfs";
|
|
||||||
# options = [ "subvol=@condiviso" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# fileSystems."/home/bertof/Condiviso/raid0" = {
|
|
||||||
# device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
|
||||||
# fsType = "btrfs";
|
|
||||||
# options = [ "subvol=@condiviso" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# fileSystems."/home/bertof/Condiviso/raid1" = {
|
|
||||||
# device = "/dev/disk/by-uuid/c84a38dc-9cc7-4762-b509-8fce1c1d95c8";
|
|
||||||
# fsType = "btrfs";
|
|
||||||
# options = [ "subvol=@condiviso" ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
# networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true;
|
# networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue