From 104f681bb9b14927fdf80228f9c2d638b0ec28df Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Tue, 5 Dec 2023 14:15:37 +0100 Subject: [PATCH] WIP: loki recovery --- instances/loki/configuration.nix | 154 ++++++++++------------ instances/loki/hardware-configuration.nix | 30 ++--- 2 files changed, 81 insertions(+), 103 deletions(-) diff --git a/instances/loki/configuration.nix b/instances/loki/configuration.nix index 38921fe..afdd6c2 100644 --- a/instances/loki/configuration.nix +++ b/instances/loki/configuration.nix @@ -4,16 +4,10 @@ with lib; { boot = { binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; # kernelPackages = pkgs.linuxPackages_latest; - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; + loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; }; - console = { - font = "Lat2-Terminus16"; - keyMap = "it"; - }; + console = { font = "Lat2-Terminus16"; keyMap = "it"; }; environment = { pathsToLink = [ "/share/zsh" ]; @@ -39,10 +33,7 @@ with lib; { }; }; - bluetooth = { - enable = true; - # package = pkgs.bluezFull; - }; + bluetooth.enable = true; }; i18n.defaultLocale = "it_IT.UTF-8"; @@ -81,24 +72,11 @@ with lib; { ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service"; }; }; - bazarr = { - enable = true; - openFirewall = true; - group = "users"; - }; + # bazarr = { enable = true; openFirewall = true; group = "users"; }; blueman.enable = true; - dbus = { - packages = [ pkgs.dconf ]; - implementation = "broker"; - }; - esphome = { - enable = true; - openFirewall = true; - }; - fail2ban = { - enable = true; - bantime-increment.enable = true; - }; + dbus = { packages = [ pkgs.dconf ]; implementation = "broker"; }; + esphome = { enable = true; openFirewall = true; }; + fail2ban = { enable = true; bantime-increment.enable = true; }; gnome.gnome-keyring.enable = true; gvfs.enable = true; jackett = { enable = true; openFirewall = true; group = "users"; }; @@ -108,68 +86,68 @@ with lib; { openssh = { enable = true; openFirewall = true; }; # plex = { enable = true; openFirewall = true; group = "users"; }; power-profiles-daemon.enable = true; - prowlarr = { enable = true; openFirewall = true; }; - radarr = { enable = true; openFirewall = true; group = "users"; }; + # prowlarr = { enable = true; openFirewall = true; }; + # radarr = { enable = true; openFirewall = true; group = "users"; }; samba-wsdd = { enable = true; discovery = true; }; - samba = { - enable = true; - enableNmbd = true; - enableWinbindd = true; - nsswins = true; - extraConfig = '' - workgroup = WORKGROUP - load printers = no - smb encrypt = required - ''; - shares = - let - common = { - "public" = "no"; - "writeable" = "yes"; - "create mask" = "0700"; - "directory mask" = "2700"; - "browseable" = "yes"; - "guest ok" = "no"; - "read only" = "no"; - "force group" = "users"; - }; - in - { - bertof = recursiveUpdate common { - path = "/home/bertof/"; - comment = "Bertof samba share"; - "force user" = "bertof"; - "valid users" = "bertof"; - }; - tiziano = recursiveUpdate common { - path = "/home/tiziano/"; - comment = "Tiziano samba share"; - "force user" = "tiziano"; - "valid users" = "tiziano"; - }; - condiviso = recursiveUpdate common { - path = "/mnt/condiviso"; - comment = "Samba share condiviso"; - "valid users" = "bertof tiziano"; - "create mask" = "0770"; - "directory mask" = "2770"; - "force create mode" = "0660"; - "force directory mode" = "2770"; - }; - }; - }; + # samba = { + # enable = true; + # enableNmbd = true; + # enableWinbindd = true; + # nsswins = true; + # extraConfig = '' + # workgroup = WORKGROUP + # load printers = no + # smb encrypt = required + # ''; + # shares = + # let + # common = { + # "public" = "no"; + # "writeable" = "yes"; + # "create mask" = "0700"; + # "directory mask" = "2700"; + # "browseable" = "yes"; + # "guest ok" = "no"; + # "read only" = "no"; + # "force group" = "users"; + # }; + # in + # { + # bertof = recursiveUpdate common { + # path = "/home/bertof/"; + # comment = "Bertof samba share"; + # "force user" = "bertof"; + # "valid users" = "bertof"; + # }; + # tiziano = recursiveUpdate common { + # path = "/home/tiziano/"; + # comment = "Tiziano samba share"; + # "force user" = "tiziano"; + # "valid users" = "tiziano"; + # }; + # condiviso = recursiveUpdate common { + # path = "/mnt/condiviso"; + # comment = "Samba share condiviso"; + # "valid users" = "bertof tiziano"; + # "create mask" = "0770"; + # "directory mask" = "2770"; + # "force create mode" = "0660"; + # "force directory mode" = "2770"; + # }; + # }; + # }; smartd.enable = true; - sonarr = { enable = true; openFirewall = true; group = "users"; }; + # sonarr = { enable = true; openFirewall = true; group = "users"; }; thermald.enable = true; - transmission = { - enable = true; - openFirewall = true; - group = "users"; - settings = { - download-dir = "/mnt/condiviso/Torrent"; - incomplete-dir = "/mnt/condiviso/Torrent/.incomplete"; - }; - }; + # transmission = { + # enable = true; + # openFirewall = true; + # group = "users"; + # settings = { + # download-dir = "/mnt/condiviso/Torrent"; + # incomplete-dir = "/mnt/condiviso/Torrent/.incomplete"; + # }; + # }; xserver = { # enable = true; # videoDrivers = [ "nvidia" ]; diff --git a/instances/loki/hardware-configuration.nix b/instances/loki/hardware-configuration.nix index a148774..aa01cce 100644 --- a/instances/loki/hardware-configuration.nix +++ b/instances/loki/hardware-configuration.nix @@ -27,23 +27,23 @@ fsType = "vfat"; }; - "/home/bertof" = { - device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc"; - fsType = "btrfs"; - options = [ "subvol=@bertof" "compress=lzo" ]; - }; + # "/home/bertof" = { + # device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc"; + # fsType = "btrfs"; + # options = [ "subvol=@bertof" "compress=lzo" ]; + # }; - "/home/tiziano" = { - device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc"; - fsType = "btrfs"; - options = [ "subvol=@tiziano" "compress=lzo" ]; - }; + # "/home/tiziano" = { + # device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc"; + # fsType = "btrfs"; + # options = [ "subvol=@tiziano" "compress=lzo" ]; + # }; - "/mnt/condiviso" = { - device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc"; - fsType = "btrfs"; - options = [ "subvol=@condiviso" "compress=lzo" ]; - }; + # "/mnt/condiviso" = { + # device = "/dev/disk/by-uuid/2e897ea5-c8f9-4fa8-9cc6-3f5807ba8afc"; + # fsType = "btrfs"; + # options = [ "subvol=@condiviso" "compress=lzo" ]; + # }; }; swapDevices = [{