me like nix
0

Configure Feed

Select the types of activity you want to include in your feed.

1{ 2 pkgs, 3 config, 4 ... 5}: 6 7{ 8 imports = [ 9 # Include the results of the hardware scan. 10 ./hardware-configuration.nix 11 ../common/common.nix 12 ]; 13 14 networking.hostName = "mira"; # Define your hostname. 15 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. 16 17 # Configure network proxy if necessary 18 # networking.proxy.default = "http://user:password@proxy:port/"; 19 # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; 20 21 # this is like a network devices discovery thing 22 services.avahi = { 23 enable = true; 24 nssmdns4 = true; 25 openFirewall = true; 26 }; 27 28 services.copyparty.enable = true; 29 30 services.openssh = { 31 enable = true; 32 settings = { 33 PasswordAuthentication = false; 34 KbdInteractiveAuthentication = false; 35 PermitRootLogin = "no"; 36 AllowUsers = [ "sean" ]; 37 }; 38 }; 39 40 users.users.sean.openssh.authorizedKeys.keys = [ 41 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDCIqgZ7kedxo+mOW7YG73Vp3zel3h180y3GKvHtRsXfGlpIIvRDy7pgCBQ4AGXYD4y78URQmFohYSAPqCPOPaWcU2un3XG9KvCzEsHmsbskPonitUmCiKvrKkb6oW4jCBtd7AEtBn+AiajAQFtPZ7NN2Df3AmTypvR6Irg7R+nxnfc9NTIHmGvxSDyWcbb4pguL20sctUSqGL6xGh8q/bqhdOThSimM+z9bEUNxK/5rPhwkNniMrp4pJcUrUiAh5/4DiRFG6KT+oeg+/myoz/Z1sPvAs7u/8JDQI4RshRD8Hu0oTkRBN6Hxj478q2SXbeBUZlD6IdjP3RhGpmSecoDdtWqKbpuV3eVRtQtba3KL86GBeV/bugaOdJ1Aud+1SOFJreAAuvxzMMKT+cdQZk6oOPP148DA/No+mDm/2S43lcdCXh79wA6YRAmKQ8jmZxTCtPutrvuZK1rguvvUlEoG/vhdNHh7eDa4Td07V6bjCRPUl8qk/e4M0E3pwsTlZc=" 42 ]; 43 44 # List services that you want to enable: 45 services.flaresolverr.enable = true; 46 nixarr = { 47 enable = true; 48 mediaDir = "/mnt/storage1/nixarr/media"; 49 vpn = { 50 enable = true; 51 wgConf = "/mnt/storage1/nixarr/wireguard.conf"; 52 }; 53 54 jellyfin = { 55 enable = true; 56 openFirewall = true; 57 }; 58 59 transmission = { 60 enable = true; 61 vpn.enable = true; 62 }; 63 sabnzbd = { 64 enable = true; 65 vpn.enable = true; 66 openFirewall = true; 67 }; 68 69 prowlarr.enable = true; 70 radarr.enable = true; 71 sonarr.enable = true; 72 jellyseerr = { 73 enable = true; 74 openFirewall = true; 75 }; 76 77 recyclarr = { 78 enable = true; 79 configuration = { 80 sonarr = { 81 series = { 82 base_url = "http://localhost:8989"; 83 api_key = "!env_var SONARR_API_KEY"; 84 quality_definition = { 85 type = "series"; 86 }; 87 delete_old_custom_formats = true; 88 custom_formats = [ 89 { 90 trash_ids = [ 91 "85c61753df5da1fb2aab6f2a47426b09" # BR-DISK 92 "9c11cd3f07101cdba90a2d81cf0e56b4" # LQ 93 ]; 94 assign_scores_to = [ 95 { 96 name = "WEB-DL (1080p)"; 97 score = -10000; 98 } 99 ]; 100 } 101 ]; 102 }; 103 }; 104 radarr = { 105 movies = { 106 base_url = "http://localhost:7878"; 107 api_key = "!env_var RADARR_API_KEY"; 108 quality_definition = { 109 type = "movie"; 110 }; 111 delete_old_custom_formats = true; 112 custom_formats = [ 113 { 114 trash_ids = [ 115 "570bc9ebecd92723d2d21500f4be314c" # Remaster 116 "eca37840c13c6ef2dd0262b141a5482f" # 4K Remaster 117 ]; 118 assign_scores_to = [ 119 { 120 name = "HD Bluray + WEB"; 121 score = 25; 122 } 123 ]; 124 } 125 ]; 126 }; 127 }; 128 }; 129 }; 130 }; 131 132 # MQTT broker for Home Assistant (Tasmota devices) 133 services.mosquitto = { 134 enable = true; 135 listeners = [ 136 { 137 acl = [ "pattern readwrite #" ]; 138 omitPasswordAuth = true; 139 settings.allow_anonymous = true; 140 } 141 ]; 142 }; 143 144 # Home Assistant service 145 services.home-assistant = { 146 enable = true; 147 extraComponents = [ 148 "esphome" 149 "met" 150 "radio_browser" 151 "homekit" 152 "homekit_controller" 153 "isal" 154 "mqtt" 155 "tasmota" 156 "wiz" 157 "google_translate" # TTS - was missing gtts module 158 "ecobee" # Was missing pyecobee module 159 "ibeacon" # Was missing ibeacon_ble module 160 ]; 161 config = { 162 homeassistant = { 163 time_zone = "America/Toronto"; 164 }; 165 default_config = { }; 166 zeroconf = { }; 167 # MQTT configuration - broker must be set up via UI 168 mqtt = { }; 169 # Automations 170 automation = [ 171 { 172 id = "1761448856909"; 173 alias = "Lower heat at night"; 174 trigger = [ 175 { 176 platform = "time"; 177 at = "23:00:00"; 178 } 179 ]; 180 condition = [ ]; 181 action = [ 182 { 183 action = "climate.set_temperature"; 184 target.device_id = "bfe22d32a4532f8ae991d6daffb48267"; 185 data = { 186 hvac_mode = "heat"; 187 temperature = 18; 188 }; 189 } 190 ]; 191 mode = "single"; 192 } 193 { 194 id = "1766200000001"; 195 alias = "Raise heat in morning"; 196 trigger = [ 197 { 198 platform = "time"; 199 at = "06:00:00"; 200 } 201 ]; 202 condition = [ ]; 203 action = [ 204 { 205 action = "climate.set_temperature"; 206 target.device_id = "bfe22d32a4532f8ae991d6daffb48267"; 207 data = { 208 hvac_mode = "heat"; 209 temperature = 21; 210 }; 211 } 212 ]; 213 mode = "single"; 214 } 215 { 216 id = "1766153071796"; 217 alias = "Close Garage Door"; 218 trigger = [ 219 { 220 platform = "device"; 221 device_id = "d8dedd8cd0ce1488d9830c455bb0a761"; 222 domain = "cover"; 223 entity_id = "cf36763543169888aa106b1acb02ad72"; 224 type = "opened"; 225 for = { 226 hours = 0; 227 minutes = 10; 228 seconds = 0; 229 }; 230 } 231 ]; 232 condition = [ ]; 233 action = [ 234 { 235 device_id = "d8dedd8cd0ce1488d9830c455bb0a761"; 236 domain = "cover"; 237 entity_id = "cf36763543169888aa106b1acb02ad72"; 238 type = "close"; 239 } 240 ]; 241 mode = "single"; 242 } 243 ]; 244 }; 245 }; 246 247 # Enable the OpenSSH daemon. 248 # services.openssh.enable = true; 249 250 security.pam.loginLimits = [ 251 { 252 domain = "*"; 253 type = "soft"; 254 item = "nofile"; 255 value = "8192"; 256 } 257 ]; 258 259 # Open ports in the firewall. 260 networking.firewall.allowedTCPPorts = [ 261 8096 # jellyfin 262 5055 # jellyseer 263 3000 # vite dev port 264 1883 # MQTT for Tasmota devices 265 2300 # trmnl 266 config.services.home-assistant.config.http.server_port 267 ]; 268 networking.firewall.allowedUDPPorts = [ 269 ]; 270 # networking.firewall.enable = false; 271 272 # This value determines the NixOS release from which the default 273 # settings for stateful data, like file locations and database versions 274 # on your system were taken. It‘s perfectly fine and recommended to leave 275 # this value at the release version of the first install of this system. 276 # Before changing this value read the documentation for this option 277 # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 278 system.stateVersion = "25.05"; # Did you read the comment? 279 280}