restructured & first test of toggleable config
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
daemon.settings = {
|
||||
experimental = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,11 +8,17 @@ let
|
||||
'';
|
||||
in
|
||||
{
|
||||
# enable nfs with all exports
|
||||
services.nfs = {
|
||||
server = {
|
||||
enable = true;
|
||||
exports = nfsExports;
|
||||
options = {
|
||||
homelab.nfs.enable = lib.mkEnableOption "enables nfs";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homelab.nfs.enable {
|
||||
# enable nfs with all exports
|
||||
services.nfs = {
|
||||
server = {
|
||||
enable = true;
|
||||
exports = nfsExports;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,10 +18,15 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
# enable smb with all shares
|
||||
services.samba = {
|
||||
enable = true;
|
||||
settings = smbShares;
|
||||
options = {
|
||||
homelab.smb.enable = lib.mkEnableOption "enables smb";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.homelab.smb.enable {
|
||||
# enable smb with all shares
|
||||
services.samba = {
|
||||
enable = true;
|
||||
settings = smbShares;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,22 +1,28 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
# set network host id
|
||||
networking.hostId = "3e6e7055";
|
||||
options = {
|
||||
homelab.zfs.enable = lib.mkEnableOption "enables zfs";
|
||||
};
|
||||
|
||||
# enable zfs support
|
||||
boot.kernelModules = [ "zfs" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
config = lib.mkIf config.homelab.zfs.enable {
|
||||
# set network host id
|
||||
networking.hostId = "3e6e7055";
|
||||
|
||||
# enable smart monitoring
|
||||
services.smartd.enable = true;
|
||||
# enable zfs support
|
||||
boot.kernelModules = [ "zfs" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
# enable zfs
|
||||
services.zfs = {
|
||||
autoScrub.enable = true;
|
||||
autoScrub.interval = "weekly";
|
||||
# enable smart monitoring
|
||||
services.smartd.enable = true;
|
||||
|
||||
# enable zfs
|
||||
services.zfs = {
|
||||
autoScrub.enable = true;
|
||||
autoScrub.interval = "weekly";
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# enable nvidia proprietary driver
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true; # required
|
||||
open = false; # use proprietary driver
|
||||
nvidiaSettings = true; # no shit
|
||||
powerManagement.enable = false; # can cause sleep issues
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# install nvidia-smi
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-smi
|
||||
];
|
||||
|
||||
# enable docker gpu passthrough
|
||||
virtualisation.docker.enableNvidia = true;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# enable and configure openssh
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
PermitRootLogin = "no";
|
||||
X11Forwarding = false;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
user = "blake";
|
||||
group = "blake";
|
||||
|
||||
dataDir = "/home/blake/.local/state/syncthing";
|
||||
configDir = "/home/blake/.config/syncthing";
|
||||
|
||||
# webui
|
||||
guiAddress = "0.0.0.0:2222";
|
||||
openDefaultPorts = true;
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
|
||||
useRoutingFeatures = "both";
|
||||
authKeyFile = "/home/blake/.nix/.keyring/tailscale/authkey";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user