Skip to content

Commit

Permalink
Add NAS config
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Sep 30, 2024
1 parent 4ed0e45 commit 97d66ca
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/nixos/hosts-bak/kuchiki/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
display-manager.enable = false;
desktop-environment.enable = false;
media.enable = true;
nas.enable = true;

firefox.enable = false;
chrome.enable = false;
Expand Down
27 changes: 27 additions & 0 deletions modules/nixos/media/arr.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
config,
pkgs,
lib,
...
}: {
options = {
arr.enable = lib.mkEnableOption "Enable arr frameworks";
};

config = lib.mkIf config.arr.enable {
services = {
radarr = {
enable = true;
package = pkgs.unstable.radarr;
};
sonarr = {
enable = true;
package = pkgs.unstable.sonarr;
};
bazarr = {
enable = true;
# package = pkgs.unstable.bazarr;
};
};
};
}
2 changes: 2 additions & 0 deletions modules/nixos/media/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
...
}: {
imports = [
./arr.nix
./plex.nix
];
options = {
media.enable = lib.mkEnableOption "Enable media services";
};

config = lib.mkIf config.media.enable {
arr.enable = lib.mkDefault true;
plex.enable = lib.mkDefault true;
};
}
49 changes: 49 additions & 0 deletions nixos/services/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{lib, ...}: {
imports = [
./nas
./avahi.nix
./fingerprint.nix
./flatpak.nix
./fwupd.nix
./kanata.nix
./oneapi.nix
./printing.nix
./scanning.nix
./secrets.nix
./sound.nix
./ssd.nix
./ssh.nix
./suid.nix
./tailscale.nix
./vial.nix
];

nas.enable = lib.mkDefault false;

local-resolv.enable = lib.mkDefault true;
fingerprint.enable = lib.mkDefault false;
flatpak.enable = lib.mkDefault false;
fwupd.enable = lib.mkDefault true;
kanata.enable = lib.mkDefault true;
printing.enable = lib.mkDefault false;
scanning.enable = lib.mkDefault false;
secrets.enable = lib.mkDefault true;
oneapi.enable = lib.mkDefault false;
# oneapi.enable = lib.mkDefault true;
pipewire.enable = lib.mkDefault true;
drive-optimizations.enable = lib.mkDefault true;
ssh.enable = lib.mkDefault true;
tailscale.enable = lib.mkDefault true;
vial.enable = lib.mkDefault true;

# services.xserver = {
# enable = true;
# xkb = {
# layout = "de";
# variant = "";
# };
# excludePackages = with pkgs; [
# xterm
# ];
# };
}
17 changes: 17 additions & 0 deletions nixos/services/nas/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
config,
lib,
...
}: {
imports = [
./drives.nix
];

options = {
nas.enable = lib.mkEnableOption "NAS utilities and config";
};

config = lib.mkIf config.nas.enable {
drives.enable = lib.mkDefault true;
};
}
16 changes: 16 additions & 0 deletions nixos/services/nas/drives.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}: {
options = {
drives.enable = lib.mkEnableOption "Utilities for managing drives";
};

config = lib.mkIf config.drives.enable {
environment.systemPackages = with pkgs; [
smartmontools
];
};
}

0 comments on commit 97d66ca

Please sign in to comment.