From 020dee9b0f0a10a316fb29f94327b8ff08ed97b9 Mon Sep 17 00:00:00 2001 From: Atridad Lahiji Date: Thu, 22 Jan 2026 13:18:04 -0700 Subject: [PATCH] Please --- .DS_Store | Bin 0 -> 8196 bytes .gitignore | 1 - modules/aliases.nix | 6 +---- modules/networking.nix | 5 +--- modules/services.nix | 2 +- scripts/init.sh | 60 ----------------------------------------- settings.example.nix | 11 -------- settings.nix | 11 ++++++++ 8 files changed, 14 insertions(+), 82 deletions(-) create mode 100644 .DS_Store delete mode 100755 scripts/init.sh delete mode 100644 settings.example.nix create mode 100644 settings.nix diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..0c47e480687e5b9ca4c62bb8c3ec023c1e44a865 GIT binary patch literal 8196 zcmeHMPfrs;6n_HAO}igiNX zSEHsi9xxvGFFhd6hd5S&NsSeS^60=uUI7rBuv-?C@g5*Kag9lh6@`+DbE?||(Nv9XtMq`@uZY};tf&R&=1{=hpl;n43|zllO|1ta+PUqZq`!B3 z&Xqhj2#1G%kcP&l3(YN7i`8naq}Ta&I&{KvkaGMb@oS!QFISbF+=5HDvv$t}XQAUV z>Pv!Kps2F^)MW*}o#JIy2qZVH2CSGB%i8_ByQAYHgYi4VV|#<~-Fu_MDBr%jw->W| z6SwZqWjDM{#$V%pu@HT9Lc98X(7r(_vMV>grFTWXRd@B%wyXP!U2JV@ztmxOc6E35 zboTc4_FeA3(slJ(*6z+Z`HiA4);qyH?x(ym&DtFS?s_`U*{n~uaJQL|?u2Rg6%KVp z2y?XX?67P8WeIh94m;$ek9dmke4@170ad8)7<bv>U35}*)y)LUtvd7Kq-M6hBo z2UBQ!5}qIqVQ3WU!$*c&eLw_wDEJs^r4tU2+Td)#gQiCN+=Nfvu1xrx=kTd})RFLM z(|J_nM1~nMI6lY8tXLZsIzUeq8kMzvasQt>`TPH=uE`iP9xxs_T@R3^$@HXn(XYNW zM9qsA>^Rm{tfC0Lib6@jMyQB>c^yYQ_=h3NaXpsQSW$>0SWf*zfPAn1_pi@&Nx|fQ KlmE|n{{IU>OsYiy literal 0 HcmV?d00001 diff --git a/.gitignore b/.gitignore index 68451c8..2a9486f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ # User-specific configuration (generated by make init) -settings.nix hardware-configuration.nix diff --git a/modules/aliases.nix b/modules/aliases.nix index 7eda0cc..4440087 100644 --- a/modules/aliases.nix +++ b/modules/aliases.nix @@ -10,11 +10,7 @@ "nix:push" = "cd /etc/nixos && git add -A && git commit -m \"$(date -u +%s)\" && git push"; "nix:pull" = "cd /etc/nixos && git pull"; - # Git Config - "git:config:name" = "printf \"Enter Git Name: \"; read -r name; sudo sed -i \"s/gitName = \\\".*\\\";/gitName = \\\"$name\\\";/\" /etc/nixos/settings.nix"; - "git:config:email" = "printf \"Enter Git Email: \"; read -r email; sudo sed -i \"s/gitEmail = \\\".*\\\";/gitEmail = \\\"$email\\\";/\" /etc/nixos/settings.nix"; - "git:config:key" = "printf \"Enter Git Public Key: \"; read -r key; sudo sed -i \"s|gitKey = \\\".*\\\";|gitKey = \\\"$key\\\";|\" /etc/nixos/settings.nix"; - + # Utilities "fixaudio" = "systemctl --user restart pipewire pipewire-pulse wireplumber"; "nf" = "neofetch"; }; diff --git a/modules/networking.nix b/modules/networking.nix index a71ebd2..9e3f07e 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -16,14 +16,11 @@ in # Allowed ports allowedTCPPorts = [ - # Sunshine - 47984 47989 48010 # SyncThing 8384 22000 ]; allowedUDPPorts = [ - # Sunshine - 47998 47999 48000 48010 + # SyncThing 22000 21027 ]; diff --git a/modules/services.nix b/modules/services.nix index 5f822dc..ac041eb 100644 --- a/modules/services.nix +++ b/modules/services.nix @@ -40,8 +40,8 @@ in services.sunshine = { enable = true; autoStart = true; - openFirewall = true; capSysAdmin = true; + openFirewall = true; applications = { apps = [ { diff --git a/scripts/init.sh b/scripts/init.sh deleted file mode 100755 index fecee86..0000000 --- a/scripts/init.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash - -SETTINGS="settings.nix" -REPO_DIR=$(pwd) -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -RED='\033[0;31m' -NC='\033[0m' # No Color - -# 1. Generate settings.nix -if [ -f "$SETTINGS" ]; then - echo -e "${YELLOW}settings.nix exists. overwrite? [y/N]${NC}" - read -r confirm - if [[ "$confirm" != "y" && "$confirm" != "Y" ]]; then - echo "keeping existing settings" - else - GENERATE=true - fi -else - GENERATE=true -fi - -if [ "$GENERATE" = true ]; then - username=$(whoami) - userdesc=$(getent passwd "$username" | cut -d: -f5 | cut -d, -f1) - userdesc=${userdesc:-$username} - - echo "user: $username ($userdesc)" - echo "" - - echo "hostname:" - read -r hostname - - echo "timezone [America/Edmonton]:" - read -r tz - tz=${tz:-America/Edmonton} - - echo "locale [en_CA.UTF-8]:" - read -r locale - locale=${locale:-en_CA.UTF-8} - - echo "" - echo "{" > "$SETTINGS" - echo " hostname = \"$hostname\";" >> "$SETTINGS" - echo " username = \"$username\";" >> "$SETTINGS" - echo " userDescription = \"$userdesc\";" >> "$SETTINGS" - echo " timezone = \"$tz\";" >> "$SETTINGS" - echo " locale = \"$locale\";" >> "$SETTINGS" - echo " userGroups = [ \"networkmanager\" \"wheel\" \"docker\" \"plugdev\" ];" >> "$SETTINGS" - echo "}" >> "$SETTINGS" - echo "wrote $SETTINGS" -fi - -# 2. Copy hardware-configuration.nix -if [ -f "/etc/nixos/hardware-configuration.nix" ]; then - cp /etc/nixos/hardware-configuration.nix "$REPO_DIR/hardware-configuration.nix" - echo "copied hardware-configuration.nix" -else - echo -e "${YELLOW}no hardware-configuration.nix found - run nixos-generate-config first${NC}" -fi diff --git a/settings.example.nix b/settings.example.nix deleted file mode 100644 index 83ca3fb..0000000 --- a/settings.example.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - hostname = "nixos"; - username = "user"; - userDescription = "User"; - timezone = "America/Edmonton"; - locale = "en_CA.UTF-8"; - userGroups = [ "networkmanager" "wheel" "docker" "plugdev" ]; - gitName = "User Name"; - gitEmail = "user@email.com"; - gitKey = "ssh-ed25519 ..."; -} diff --git a/settings.nix b/settings.nix new file mode 100644 index 0000000..8930287 --- /dev/null +++ b/settings.nix @@ -0,0 +1,11 @@ +{ + hostname = "lavitz"; + username = "atridad"; + userDescription = "Atridad Lahiji"; + timezone = "America/Edmonton"; + locale = "en_CA.UTF-8"; + userGroups = [ "networkmanager" "wheel" "docker" "plugdev" ]; + gitName = "Atridad Lahiji"; + gitEmail = "me@atri.dad"; + gitKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILKb+pDgkHEKI7LDWvZbhoLJ11uJMaCmVyAqotDxNOI7 me@atri.dad"; +}