temp add samba
This commit is contained in:
@@ -8,12 +8,12 @@ let
|
||||
password = "$y$j9T$EkPXmsmIMFFZ.WRrBYCxS1$P0kwo6e4.WM5DsqUcEqWC3MrZp5KfCjxffraMFZWu06";
|
||||
hostname = "jallen-nas";
|
||||
timezone = "America/Chicago";
|
||||
main-pool = ''"Main\ Pool"'';
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration-nas.nix
|
||||
./nas-samba/samba.nix
|
||||
./nas-apps/swag.nix
|
||||
./nas-apps/jellyfin.nix
|
||||
./nas-apps/sonarr.nix
|
||||
@@ -140,6 +140,32 @@ in
|
||||
defaultWindowManager = "startplasma-x11";
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
publish = {
|
||||
enable = true;
|
||||
addresses = true;
|
||||
domain = true;
|
||||
hinfo = true;
|
||||
userServices = true;
|
||||
workstation = true;
|
||||
};
|
||||
extraServiceFiles = {
|
||||
smb = ''
|
||||
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
|
||||
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
|
||||
<service-group>
|
||||
<name replace-wildcards="yes">%h</name>
|
||||
<service>
|
||||
<type>_smb._tcp</type>
|
||||
<port>445</port>
|
||||
</service>
|
||||
</service-group>
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# libnvidia-container does not support cgroups v2 (prior to 1.8.0)
|
||||
@@ -175,8 +201,10 @@ in
|
||||
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
allowedUDPPorts = [ 80 443 ];
|
||||
allowPing = true;
|
||||
extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns'';
|
||||
allowedTCPPorts = [ 80 443 445 139 ];
|
||||
allowedUDPPorts = [ 80 443 137 138 ];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -218,7 +246,7 @@ in
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users."${user}" = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [ "wheel" "networkmanager" "docker" "podman" ]; # Enable ‘sudo’ for the user.
|
||||
initialHashedPassword = password;
|
||||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
@@ -231,9 +259,18 @@ in
|
||||
aspellDicts.en-science
|
||||
aha
|
||||
papirus-icon-theme
|
||||
ffmpeg
|
||||
];
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.mjallen = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
initialHashedPassword = password;
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.enableNvidia = true;
|
||||
virtualisation.docker.enableOnBoot = true;
|
||||
|
||||
Reference in New Issue
Block a user