Samba Share, Night Light, and Dev Packages

- Add default group with gid 1000
- Add redshift night light to dwm
- Add samba mount nix
- Add openssh and github cli packages
This commit is contained in:
Sravan Balaji
2024-03-31 09:58:40 -04:00
parent b51a77befa
commit 0adc8dadcd
5 changed files with 50 additions and 1 deletions

View File

@@ -56,10 +56,15 @@
LC_TIME = systemSettings.locale; LC_TIME = systemSettings.locale;
}; };
users.groups.${userSettings.username} = {
name = userSettings.username;
gid = 1000;
};
users.users.${userSettings.username} = { users.users.${userSettings.username} = {
isNormalUser = true; isNormalUser = true;
description = userSettings.name; description = userSettings.name;
extraGroups = [ "networkmanager" "wheel" "input" "dialout" ]; extraGroups = [ "${userSettings.username}" "networkmanager" "wheel" "input" "dialout" ];
packages = []; packages = [];
uid = 1000; uid = 1000;
}; };

View File

@@ -42,6 +42,13 @@
# Picom Compositor # Picom Compositor
services.picom.enable = true; services.picom.enable = true;
# Night Light
services.redshift = {
enable = true;
package = pkgs.redshift;
executable = "/bin/redshift-gtk";
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# X11 Utilities # X11 Utilities
arandr arandr

View File

@@ -8,5 +8,6 @@
./gaming.nix ./gaming.nix
./backups.nix ./backups.nix
./user-shell.nix ./user-shell.nix
./samba.nix
]; ];
} }

View File

@@ -12,5 +12,7 @@
home-manager home-manager
tree tree
btop btop
openssh
gh
]; ];
} }

View File

@@ -0,0 +1,34 @@
{ config, lib, pkgs, userSettings, ... }:
{
environment.systemPackages = with pkgs; [
cifs-utils
lxqt.lxqt-policykit # provides a default authentification client for policykit
];
fileSystems."/mnt/fileserver" = {
device = "//192.168.12.5/fileserver";
fsType = "cifs";
options = let
# this line prevents hanging on network split
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in [
"${automount_opts},
credentials=/etc/nixos/smb-secrets,
${config.users.users.${userSettings.username}.uid},
gid=${config.users.groups.${userSettings.username}.gid}"
];
# Make sure to create `/etc/nixos/smb-secrets` with following content
# where domain can be optional
# username=<USERNAME>
# domain=<DOMAIN>
# password=<PASSWORD>
};
# Samba discovery of machines and shares
networking.firewall.extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns'';
# GVFS
services.gvfs.enable = true;
}