diff --git a/.sops.yaml b/.sops.yaml index 748cac2..9746bad 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -13,6 +13,7 @@ keys: - &fw age1wq82xjyj80htz33x7agxddjfumr3wkwh3r24tasagepxw7ka893sau68df - &fw-new age12msc2c6drsaw0yk2hjlaw0q0lyq0emjx5e8rq7qc7ql689k593kqfmhss2 - &netboot age14uarclad0ty5supc8ep09793xrnwkv8a4h9j0fq8d8lc92n2dadqkf64vw + - &gpd-win4 age1ceg548u5ma6rgu3xgvd254y5xefqrdqfqhcjsjp3255q976fgd2qaua53d creation_rules: - path_regex: ^[^/]+\.yaml$ @@ -27,6 +28,13 @@ creation_rules: - *bitwarden - *dominik - *dominik2 + - path_regex: hosts/gpd-win4/[^/]+\.yaml$ + key_groups: + - age: + - *bitwarden + - *dominik + - *dominik2 + - *gpd-win4 - path_regex: hosts/fw/[^/]+\.yaml$ key_groups: - age: diff --git a/esphome/livingroom-bulb-1.yaml b/esphome/livingroom-bulb-1.yaml index a9b5a3f..8de423e 100644 --- a/esphome/livingroom-bulb-1.yaml +++ b/esphome/livingroom-bulb-1.yaml @@ -1,29 +1,43 @@ substitutions: - device_name: "livingroom-bulb-1" + name: "livingroom-bulb-1" friendly_name: "Living Room Bulb 1" + room: "Living Room" + device_description: "athom 7w rgbcw light bulb" + project_name: "Athom Technology.Athom RGBCW Bulb" + dns_domain: ".cloonar.smart" + timezone: "" + sntp_update_interval: 6h + sntp_server_1: "0.pool.ntp.org" + sntp_server_2: "1.pool.ntp.org" + sntp_server_3: "2.pool.ntp.org" + log_level: "WARN" esphome: - name: ${device_name} - comment: ${friendly_name} - platform: ESP8266 - board: esp01_1m + name: "${name}" + friendly_name: "${friendly_name}" + comment: "${device_description}" + area: "${room}" + name_add_mac_suffix: false + min_version: 2024.6.0 + project: + name: "${project_name}" + version: "${project_version}" on_boot: - priority: 300 - then: - - light.turn_on: - id: my_light - - delay: 100ms - - light.turn_on: - id: my_light - brightness: 20% - - delay: 100ms - - light.turn_on: - id: my_light - red: 100% - green: 50% - blue: 0% - white: 100% - + then: + - light.turn_on: + id: rgbww_light + - delay: 100ms + - light.turn_on: + id: rgbww_light + brightness: 20% + - delay: 100ms + - light.turn_on: + id: rgbww_light + red: 100% + green: 50% + blue: 0% + white: 100% + interval: - interval: 15s then: @@ -32,16 +46,25 @@ interval: api.connected: # check if api connected else: - light.turn_on: - id: my_light + id: rgbww_light brightness: 100% -# Enable Home Assistant API +esp8266: + board: esp8285 + restore_from_flash: true + +preferences: + flash_write_interval: 1min + api: +ota: + - platform: esphome + logger: -ota: - platform: esphome +mdns: + disabled: false wifi: ssid: !secret wifi_ssid @@ -49,32 +72,158 @@ wifi: fast_connect: True domain: .cloonar.smart -light: - - platform: rgbw - id: my_light - name: ${friendly_name} - red: pwm_r - green: pwm_g - blue: pwm_b - white: pwm_w +captive_portal: + +dashboard_import: + package_import_url: github://athom-tech/athom-configs/athom-rgbww-light.yaml + +binary_sensor: + - platform: status + name: "Status" + entity_category: diagnostic + +sensor: + - platform: uptime + name: "Uptime Sensor" + id: uptime_sensor + entity_category: diagnostic + internal: true + + - platform: wifi_signal + name: "WiFi Signal dB" + id: wifi_signal_db + update_interval: 60s + entity_category: "diagnostic" + + - platform: copy + source_id: wifi_signal_db + name: "WiFi Signal Percent" + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: "Signal %" + entity_category: "diagnostic" + device_class: "" + +button: + - platform: restart + name: "Restart" + entity_category: config + + - platform: factory_reset + name: "Factory Reset" + id: Reset + entity_category: config + + - platform: safe_mode + name: "Safe Mode" + internal: false + entity_category: config output: - platform: esp8266_pwm - pin: GPIO13 - frequency: 1000 Hz - id: pwm_r - + id: red_output + pin: GPIO4 + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: green_output pin: GPIO12 - frequency: 1000 Hz - id: pwm_g - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: blue_output pin: GPIO14 - frequency: 1000 Hz - id: pwm_b - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: warm_white_output + pin: GPIO13 + min_power: 0.000499 + max_power: 0.9 + - platform: esp8266_pwm + id: white_output pin: GPIO5 - frequency: 1000 Hz - id: pwm_w \ No newline at end of file + min_power: 0.000499 + max_power: 0.9 + +light: + - platform: rgbww + id: rgbww_light + name: "RGBCW_Bulb" + red: red_output + green: green_output + blue: blue_output + warm_white: warm_white_output + cold_white: white_output + cold_white_color_temperature: 6000 K + warm_white_color_temperature: 3000 K + color_interlock: true + +text_sensor: + - platform: wifi_info + ip_address: + name: "IP Address" + entity_category: diagnostic + ssid: + name: "Connected SSID" + entity_category: diagnostic + mac_address: + name: "Mac Address" + entity_category: diagnostic + + # Creates a sensor showing when the device was last restarted + - platform: template + name: 'Last Restart' + id: device_last_restart + icon: mdi:clock + entity_category: diagnostic +# device_class: timestamp + + # Creates a sensor of the uptime of the device, in formatted days, hours, minutes and seconds + - platform: template + name: "Uptime" + entity_category: diagnostic + lambda: |- + int seconds = (id(uptime_sensor).state); + int days = seconds / (24 * 3600); + seconds = seconds % (24 * 3600); + int hours = seconds / 3600; + seconds = seconds % 3600; + int minutes = seconds / 60; + seconds = seconds % 60; + if ( days > 3650 ) { + return { "Starting up" }; + } else if ( days ) { + return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( hours ) { + return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( minutes ) { + return { (String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else { + return { (String(seconds) +"s").c_str() }; + } + icon: mdi:clock-start + +time: + - platform: sntp + id: sntp_time + # Define the timezone of the device + timezone: "${timezone}" + # Change sync interval from default 5min to 6 hours (or as set in substitutions) + update_interval: ${sntp_update_interval} + # Set specific sntp servers to use + servers: + - "${sntp_server_1}" + - "${sntp_server_2}" + - "${sntp_server_3}" + # Publish the time the device was last restarted + on_time_sync: + then: + # Update last restart time, but only once. + - if: + condition: + lambda: 'return id(device_last_restart).state == "";' + then: + - text_sensor.template.publish: + id: device_last_restart + state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");' \ No newline at end of file diff --git a/esphome/livingroom-bulb-2.yaml b/esphome/livingroom-bulb-2.yaml index 0521aca..9699e3e 100644 --- a/esphome/livingroom-bulb-2.yaml +++ b/esphome/livingroom-bulb-2.yaml @@ -1,29 +1,43 @@ substitutions: - device_name: "livingroom-bulb-2" + name: "livingroom-bulb-2" friendly_name: "Living Room Bulb 2" + room: "Living Room" + device_description: "athom 7w rgbcw light bulb" + project_name: "Athom Technology.Athom RGBCW Bulb" + dns_domain: ".cloonar.smart" + timezone: "" + sntp_update_interval: 6h + sntp_server_1: "0.pool.ntp.org" + sntp_server_2: "1.pool.ntp.org" + sntp_server_3: "2.pool.ntp.org" + log_level: "WARN" esphome: - name: ${device_name} - comment: ${friendly_name} - platform: ESP8266 - board: esp01_1m + name: "${name}" + friendly_name: "${friendly_name}" + comment: "${device_description}" + area: "${room}" + name_add_mac_suffix: false + min_version: 2024.6.0 + project: + name: "${project_name}" + version: "${project_version}" on_boot: - priority: 300 - then: - - light.turn_on: - id: my_light - - delay: 100ms - - light.turn_on: - id: my_light - brightness: 20% - - delay: 100ms - - light.turn_on: - id: my_light - red: 100% - green: 50% - blue: 0% - white: 100% - + then: + - light.turn_on: + id: rgbww_light + - delay: 100ms + - light.turn_on: + id: rgbww_light + brightness: 20% + - delay: 100ms + - light.turn_on: + id: rgbww_light + red: 100% + green: 50% + blue: 0% + white: 100% + interval: - interval: 15s then: @@ -32,16 +46,25 @@ interval: api.connected: # check if api connected else: - light.turn_on: - id: my_light + id: rgbww_light brightness: 100% -# Enable Home Assistant API +esp8266: + board: esp8285 + restore_from_flash: true + +preferences: + flash_write_interval: 1min + api: +ota: + - platform: esphome + logger: -ota: - platform: esphome +mdns: + disabled: false wifi: ssid: !secret wifi_ssid @@ -49,32 +72,158 @@ wifi: fast_connect: True domain: .cloonar.smart -light: - - platform: rgbw - id: my_light - name: ${friendly_name} - red: pwm_r - green: pwm_g - blue: pwm_b - white: pwm_w +captive_portal: + +dashboard_import: + package_import_url: github://athom-tech/athom-configs/athom-rgbww-light.yaml + +binary_sensor: + - platform: status + name: "Status" + entity_category: diagnostic + +sensor: + - platform: uptime + name: "Uptime Sensor" + id: uptime_sensor + entity_category: diagnostic + internal: true + + - platform: wifi_signal + name: "WiFi Signal dB" + id: wifi_signal_db + update_interval: 60s + entity_category: "diagnostic" + + - platform: copy + source_id: wifi_signal_db + name: "WiFi Signal Percent" + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: "Signal %" + entity_category: "diagnostic" + device_class: "" + +button: + - platform: restart + name: "Restart" + entity_category: config + + - platform: factory_reset + name: "Factory Reset" + id: Reset + entity_category: config + + - platform: safe_mode + name: "Safe Mode" + internal: false + entity_category: config output: - platform: esp8266_pwm - pin: GPIO13 - frequency: 1000 Hz - id: pwm_r - + id: red_output + pin: GPIO4 + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: green_output pin: GPIO12 - frequency: 1000 Hz - id: pwm_g - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: blue_output pin: GPIO14 - frequency: 1000 Hz - id: pwm_b - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: warm_white_output + pin: GPIO13 + min_power: 0.000499 + max_power: 0.9 + - platform: esp8266_pwm + id: white_output pin: GPIO5 - frequency: 1000 Hz - id: pwm_w \ No newline at end of file + min_power: 0.000499 + max_power: 0.9 + +light: + - platform: rgbww + id: rgbww_light + name: "RGBCW_Bulb" + red: red_output + green: green_output + blue: blue_output + warm_white: warm_white_output + cold_white: white_output + cold_white_color_temperature: 6000 K + warm_white_color_temperature: 3000 K + color_interlock: true + +text_sensor: + - platform: wifi_info + ip_address: + name: "IP Address" + entity_category: diagnostic + ssid: + name: "Connected SSID" + entity_category: diagnostic + mac_address: + name: "Mac Address" + entity_category: diagnostic + + # Creates a sensor showing when the device was last restarted + - platform: template + name: 'Last Restart' + id: device_last_restart + icon: mdi:clock + entity_category: diagnostic +# device_class: timestamp + + # Creates a sensor of the uptime of the device, in formatted days, hours, minutes and seconds + - platform: template + name: "Uptime" + entity_category: diagnostic + lambda: |- + int seconds = (id(uptime_sensor).state); + int days = seconds / (24 * 3600); + seconds = seconds % (24 * 3600); + int hours = seconds / 3600; + seconds = seconds % 3600; + int minutes = seconds / 60; + seconds = seconds % 60; + if ( days > 3650 ) { + return { "Starting up" }; + } else if ( days ) { + return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( hours ) { + return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( minutes ) { + return { (String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else { + return { (String(seconds) +"s").c_str() }; + } + icon: mdi:clock-start + +time: + - platform: sntp + id: sntp_time + # Define the timezone of the device + timezone: "${timezone}" + # Change sync interval from default 5min to 6 hours (or as set in substitutions) + update_interval: ${sntp_update_interval} + # Set specific sntp servers to use + servers: + - "${sntp_server_1}" + - "${sntp_server_2}" + - "${sntp_server_3}" + # Publish the time the device was last restarted + on_time_sync: + then: + # Update last restart time, but only once. + - if: + condition: + lambda: 'return id(device_last_restart).state == "";' + then: + - text_sensor.template.publish: + id: device_last_restart + state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");' \ No newline at end of file diff --git a/esphome/livingroom-bulb-3.yaml b/esphome/livingroom-bulb-3.yaml index 67f29de..a0ad908 100644 --- a/esphome/livingroom-bulb-3.yaml +++ b/esphome/livingroom-bulb-3.yaml @@ -1,29 +1,54 @@ substitutions: - device_name: "livingroom-bulb-3" + name: "livingroom-bulb-3" friendly_name: "Living Room Bulb 3" + room: "Living Room" + device_description: "athom 7w rgbcw light bulb" + project_name: "Athom Technology.Athom RGBCW Bulb" + dns_domain: ".cloonar.smart" + timezone: "" + sntp_update_interval: 6h + sntp_server_1: "0.pool.ntp.org" + sntp_server_2: "1.pool.ntp.org" + sntp_server_3: "2.pool.ntp.org" + log_level: "WARN" + +globals: + - id: fast_boot + type: int + restore_value: yes + initial_value: '0' + + - id: restore_mode + type: int + restore_value: yes + initial_value: "1" esphome: - name: ${device_name} - comment: ${friendly_name} - platform: ESP8266 - board: esp01_1m + name: "${name}" + friendly_name: "${friendly_name}" + comment: "${device_description}" + area: "${room}" + name_add_mac_suffix: false + min_version: 2024.6.0 + project: + name: "${project_name}" + version: "${project_version}" on_boot: - priority: 300 - then: - - light.turn_on: - id: my_light - - delay: 100ms - - light.turn_on: - id: my_light - brightness: 20% - - delay: 100ms - - light.turn_on: - id: my_light - red: 100% - green: 50% - blue: 0% - white: 100% - + then: + - light.turn_on: + id: rgbww_light + - delay: 100ms + - light.turn_on: + id: rgbww_light + brightness: 20% + - delay: 100ms + - light.turn_on: + id: rgbww_light + red: 100% + green: 50% + blue: 0% + white: 100% + interval: - interval: 15s then: @@ -32,16 +57,25 @@ interval: api.connected: # check if api connected else: - light.turn_on: - id: my_light + id: rgbww_light brightness: 100% - -# Enable Home Assistant API + +esp8266: + board: esp8285 + restore_from_flash: true + +preferences: + flash_write_interval: 1min + api: +ota: + - platform: esphome + logger: -ota: - platform: esphome +mdns: + disabled: false wifi: ssid: !secret wifi_ssid @@ -49,32 +83,158 @@ wifi: fast_connect: True domain: .cloonar.smart -light: - - platform: rgbw - id: my_light - name: ${friendly_name} - red: pwm_r - green: pwm_g - blue: pwm_b - white: pwm_w +captive_portal: + +dashboard_import: + package_import_url: github://athom-tech/athom-configs/athom-rgbww-light.yaml + +binary_sensor: + - platform: status + name: "Status" + entity_category: diagnostic + +sensor: + - platform: uptime + name: "Uptime Sensor" + id: uptime_sensor + entity_category: diagnostic + internal: true + + - platform: wifi_signal + name: "WiFi Signal dB" + id: wifi_signal_db + update_interval: 60s + entity_category: "diagnostic" + + - platform: copy + source_id: wifi_signal_db + name: "WiFi Signal Percent" + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: "Signal %" + entity_category: "diagnostic" + device_class: "" + +button: + - platform: restart + name: "Restart" + entity_category: config + + - platform: factory_reset + name: "Factory Reset" + id: Reset + entity_category: config + + - platform: safe_mode + name: "Safe Mode" + internal: false + entity_category: config output: - platform: esp8266_pwm - pin: GPIO13 - frequency: 1000 Hz - id: pwm_r - + id: red_output + pin: GPIO4 + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: green_output pin: GPIO12 - frequency: 1000 Hz - id: pwm_g - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: blue_output pin: GPIO14 - frequency: 1000 Hz - id: pwm_b - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: warm_white_output + pin: GPIO13 + min_power: 0.000499 + max_power: 0.9 + - platform: esp8266_pwm + id: white_output pin: GPIO5 - frequency: 1000 Hz - id: pwm_w \ No newline at end of file + min_power: 0.000499 + max_power: 0.9 + +light: + - platform: rgbww + id: rgbww_light + name: "RGBCW_Bulb" + red: red_output + green: green_output + blue: blue_output + warm_white: warm_white_output + cold_white: white_output + cold_white_color_temperature: 6000 K + warm_white_color_temperature: 3000 K + color_interlock: true + +text_sensor: + - platform: wifi_info + ip_address: + name: "IP Address" + entity_category: diagnostic + ssid: + name: "Connected SSID" + entity_category: diagnostic + mac_address: + name: "Mac Address" + entity_category: diagnostic + + # Creates a sensor showing when the device was last restarted + - platform: template + name: 'Last Restart' + id: device_last_restart + icon: mdi:clock + entity_category: diagnostic +# device_class: timestamp + + # Creates a sensor of the uptime of the device, in formatted days, hours, minutes and seconds + - platform: template + name: "Uptime" + entity_category: diagnostic + lambda: |- + int seconds = (id(uptime_sensor).state); + int days = seconds / (24 * 3600); + seconds = seconds % (24 * 3600); + int hours = seconds / 3600; + seconds = seconds % 3600; + int minutes = seconds / 60; + seconds = seconds % 60; + if ( days > 3650 ) { + return { "Starting up" }; + } else if ( days ) { + return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( hours ) { + return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( minutes ) { + return { (String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else { + return { (String(seconds) +"s").c_str() }; + } + icon: mdi:clock-start + +time: + - platform: sntp + id: sntp_time + # Define the timezone of the device + timezone: "${timezone}" + # Change sync interval from default 5min to 6 hours (or as set in substitutions) + update_interval: ${sntp_update_interval} + # Set specific sntp servers to use + servers: + - "${sntp_server_1}" + - "${sntp_server_2}" + - "${sntp_server_3}" + # Publish the time the device was last restarted + on_time_sync: + then: + # Update last restart time, but only once. + - if: + condition: + lambda: 'return id(device_last_restart).state == "";' + then: + - text_sensor.template.publish: + id: device_last_restart + state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");' \ No newline at end of file diff --git a/esphome/livingroom-bulb-4.yaml b/esphome/livingroom-bulb-4.yaml index cc99bff..68c8cb5 100644 --- a/esphome/livingroom-bulb-4.yaml +++ b/esphome/livingroom-bulb-4.yaml @@ -1,29 +1,54 @@ substitutions: - device_name: "livingroom-bulb-4" + name: "livingroom-bulb-4" friendly_name: "Living Room Bulb 4" + room: "Living Room" + device_description: "athom 7w rgbcw light bulb" + project_name: "Athom Technology.Athom RGBCW Bulb" + dns_domain: ".cloonar.smart" + timezone: "" + sntp_update_interval: 6h + sntp_server_1: "0.pool.ntp.org" + sntp_server_2: "1.pool.ntp.org" + sntp_server_3: "2.pool.ntp.org" + log_level: "WARN" + +globals: + - id: fast_boot + type: int + restore_value: yes + initial_value: '0' + + - id: restore_mode + type: int + restore_value: yes + initial_value: "1" esphome: - name: ${device_name} - comment: ${friendly_name} - platform: ESP8266 - board: esp01_1m + name: "${name}" + friendly_name: "${friendly_name}" + comment: "${device_description}" + area: "${room}" + name_add_mac_suffix: false + min_version: 2024.6.0 + project: + name: "${project_name}" + version: "${project_version}" on_boot: - priority: 300 - then: - - light.turn_on: - id: my_light - - delay: 100ms - - light.turn_on: - id: my_light - brightness: 20% - - delay: 100ms - - light.turn_on: - id: my_light - red: 100% - green: 50% - blue: 0% - white: 100% - + then: + - light.turn_on: + id: rgbww_light + - delay: 100ms + - light.turn_on: + id: rgbww_light + brightness: 20% + - delay: 100ms + - light.turn_on: + id: rgbww_light + red: 100% + green: 50% + blue: 0% + white: 100% + interval: - interval: 15s then: @@ -32,16 +57,25 @@ interval: api.connected: # check if api connected else: - light.turn_on: - id: my_light + id: rgbww_light brightness: 100% -# Enable Home Assistant API +esp8266: + board: esp8285 + restore_from_flash: true + +preferences: + flash_write_interval: 1min + api: +ota: + - platform: esphome + logger: -ota: - platform: esphome +mdns: + disabled: false wifi: ssid: !secret wifi_ssid @@ -49,32 +83,158 @@ wifi: fast_connect: True domain: .cloonar.smart -light: - - platform: rgbw - id: my_light - name: ${friendly_name} - red: pwm_r - green: pwm_g - blue: pwm_b - white: pwm_w +captive_portal: + +dashboard_import: + package_import_url: github://athom-tech/athom-configs/athom-rgbww-light.yaml + +binary_sensor: + - platform: status + name: "Status" + entity_category: diagnostic + +sensor: + - platform: uptime + name: "Uptime Sensor" + id: uptime_sensor + entity_category: diagnostic + internal: true + + - platform: wifi_signal + name: "WiFi Signal dB" + id: wifi_signal_db + update_interval: 60s + entity_category: "diagnostic" + + - platform: copy + source_id: wifi_signal_db + name: "WiFi Signal Percent" + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: "Signal %" + entity_category: "diagnostic" + device_class: "" + +button: + - platform: restart + name: "Restart" + entity_category: config + + - platform: factory_reset + name: "Factory Reset" + id: Reset + entity_category: config + + - platform: safe_mode + name: "Safe Mode" + internal: false + entity_category: config output: - platform: esp8266_pwm - pin: GPIO13 - frequency: 1000 Hz - id: pwm_r - + id: red_output + pin: GPIO4 + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: green_output pin: GPIO12 - frequency: 1000 Hz - id: pwm_g - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: blue_output pin: GPIO14 - frequency: 1000 Hz - id: pwm_b - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: warm_white_output + pin: GPIO13 + min_power: 0.000499 + max_power: 0.9 + - platform: esp8266_pwm + id: white_output pin: GPIO5 - frequency: 1000 Hz - id: pwm_w \ No newline at end of file + min_power: 0.000499 + max_power: 0.9 + +light: + - platform: rgbww + id: rgbww_light + name: "RGBCW_Bulb" + red: red_output + green: green_output + blue: blue_output + warm_white: warm_white_output + cold_white: white_output + cold_white_color_temperature: 6000 K + warm_white_color_temperature: 3000 K + color_interlock: true + +text_sensor: + - platform: wifi_info + ip_address: + name: "IP Address" + entity_category: diagnostic + ssid: + name: "Connected SSID" + entity_category: diagnostic + mac_address: + name: "Mac Address" + entity_category: diagnostic + + # Creates a sensor showing when the device was last restarted + - platform: template + name: 'Last Restart' + id: device_last_restart + icon: mdi:clock + entity_category: diagnostic +# device_class: timestamp + + # Creates a sensor of the uptime of the device, in formatted days, hours, minutes and seconds + - platform: template + name: "Uptime" + entity_category: diagnostic + lambda: |- + int seconds = (id(uptime_sensor).state); + int days = seconds / (24 * 3600); + seconds = seconds % (24 * 3600); + int hours = seconds / 3600; + seconds = seconds % 3600; + int minutes = seconds / 60; + seconds = seconds % 60; + if ( days > 3650 ) { + return { "Starting up" }; + } else if ( days ) { + return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( hours ) { + return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( minutes ) { + return { (String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else { + return { (String(seconds) +"s").c_str() }; + } + icon: mdi:clock-start + +time: + - platform: sntp + id: sntp_time + # Define the timezone of the device + timezone: "${timezone}" + # Change sync interval from default 5min to 6 hours (or as set in substitutions) + update_interval: ${sntp_update_interval} + # Set specific sntp servers to use + servers: + - "${sntp_server_1}" + - "${sntp_server_2}" + - "${sntp_server_3}" + # Publish the time the device was last restarted + on_time_sync: + then: + # Update last restart time, but only once. + - if: + condition: + lambda: 'return id(device_last_restart).state == "";' + then: + - text_sensor.template.publish: + id: device_last_restart + state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");' \ No newline at end of file diff --git a/esphome/livingroom-bulb-5.yaml b/esphome/livingroom-bulb-5.yaml index 56f4245..4aec363 100644 --- a/esphome/livingroom-bulb-5.yaml +++ b/esphome/livingroom-bulb-5.yaml @@ -1,29 +1,54 @@ substitutions: - device_name: "livingroom-bulb-5" + name: "livingroom-bulb-5" friendly_name: "Living Room Bulb 5" + room: "Living Room" + device_description: "athom 7w rgbcw light bulb" + project_name: "Athom Technology.Athom RGBCW Bulb" + dns_domain: ".cloonar.smart" + timezone: "" + sntp_update_interval: 6h + sntp_server_1: "0.pool.ntp.org" + sntp_server_2: "1.pool.ntp.org" + sntp_server_3: "2.pool.ntp.org" + log_level: "WARN" + +globals: + - id: fast_boot + type: int + restore_value: yes + initial_value: '0' + + - id: restore_mode + type: int + restore_value: yes + initial_value: "1" esphome: - name: ${device_name} - comment: ${friendly_name} - platform: ESP8266 - board: esp01_1m + name: "${name}" + friendly_name: "${friendly_name}" + comment: "${device_description}" + area: "${room}" + name_add_mac_suffix: false + min_version: 2024.6.0 + project: + name: "${project_name}" + version: "${project_version}" on_boot: - priority: 300 - then: - - light.turn_on: - id: my_light - - delay: 100ms - - light.turn_on: - id: my_light - brightness: 20% - - delay: 100ms - - light.turn_on: - id: my_light - red: 100% - green: 50% - blue: 0% - white: 100% - + then: + - light.turn_on: + id: rgbww_light + - delay: 100ms + - light.turn_on: + id: rgbww_light + brightness: 20% + - delay: 100ms + - light.turn_on: + id: rgbww_light + red: 100% + green: 50% + blue: 0% + white: 100% + interval: - interval: 15s then: @@ -32,16 +57,25 @@ interval: api.connected: # check if api connected else: - light.turn_on: - id: my_light + id: rgbww_light brightness: 100% -# Enable Home Assistant API +esp8266: + board: esp8285 + restore_from_flash: true + +preferences: + flash_write_interval: 1min + api: +ota: + - platform: esphome + logger: -ota: - platform: esphome +mdns: + disabled: false wifi: ssid: !secret wifi_ssid @@ -49,32 +83,158 @@ wifi: fast_connect: True domain: .cloonar.smart -light: - - platform: rgbw - id: my_light - name: ${friendly_name} - red: pwm_r - green: pwm_g - blue: pwm_b - white: pwm_w +captive_portal: + +dashboard_import: + package_import_url: github://athom-tech/athom-configs/athom-rgbww-light.yaml + +binary_sensor: + - platform: status + name: "Status" + entity_category: diagnostic + +sensor: + - platform: uptime + name: "Uptime Sensor" + id: uptime_sensor + entity_category: diagnostic + internal: true + + - platform: wifi_signal + name: "WiFi Signal dB" + id: wifi_signal_db + update_interval: 60s + entity_category: "diagnostic" + + - platform: copy + source_id: wifi_signal_db + name: "WiFi Signal Percent" + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: "Signal %" + entity_category: "diagnostic" + device_class: "" + +button: + - platform: restart + name: "Restart" + entity_category: config + + - platform: factory_reset + name: "Factory Reset" + id: Reset + entity_category: config + + - platform: safe_mode + name: "Safe Mode" + internal: false + entity_category: config output: - platform: esp8266_pwm - pin: GPIO13 - frequency: 1000 Hz - id: pwm_r - + id: red_output + pin: GPIO4 + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: green_output pin: GPIO12 - frequency: 1000 Hz - id: pwm_g - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: blue_output pin: GPIO14 - frequency: 1000 Hz - id: pwm_b - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: warm_white_output + pin: GPIO13 + min_power: 0.000499 + max_power: 0.9 + - platform: esp8266_pwm + id: white_output pin: GPIO5 - frequency: 1000 Hz - id: pwm_w \ No newline at end of file + min_power: 0.000499 + max_power: 0.9 + +light: + - platform: rgbww + id: rgbww_light + name: "RGBCW_Bulb" + red: red_output + green: green_output + blue: blue_output + warm_white: warm_white_output + cold_white: white_output + cold_white_color_temperature: 6000 K + warm_white_color_temperature: 3000 K + color_interlock: true + +text_sensor: + - platform: wifi_info + ip_address: + name: "IP Address" + entity_category: diagnostic + ssid: + name: "Connected SSID" + entity_category: diagnostic + mac_address: + name: "Mac Address" + entity_category: diagnostic + + # Creates a sensor showing when the device was last restarted + - platform: template + name: 'Last Restart' + id: device_last_restart + icon: mdi:clock + entity_category: diagnostic +# device_class: timestamp + + # Creates a sensor of the uptime of the device, in formatted days, hours, minutes and seconds + - platform: template + name: "Uptime" + entity_category: diagnostic + lambda: |- + int seconds = (id(uptime_sensor).state); + int days = seconds / (24 * 3600); + seconds = seconds % (24 * 3600); + int hours = seconds / 3600; + seconds = seconds % 3600; + int minutes = seconds / 60; + seconds = seconds % 60; + if ( days > 3650 ) { + return { "Starting up" }; + } else if ( days ) { + return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( hours ) { + return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( minutes ) { + return { (String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else { + return { (String(seconds) +"s").c_str() }; + } + icon: mdi:clock-start + +time: + - platform: sntp + id: sntp_time + # Define the timezone of the device + timezone: "${timezone}" + # Change sync interval from default 5min to 6 hours (or as set in substitutions) + update_interval: ${sntp_update_interval} + # Set specific sntp servers to use + servers: + - "${sntp_server_1}" + - "${sntp_server_2}" + - "${sntp_server_3}" + # Publish the time the device was last restarted + on_time_sync: + then: + # Update last restart time, but only once. + - if: + condition: + lambda: 'return id(device_last_restart).state == "";' + then: + - text_sensor.template.publish: + id: device_last_restart + state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");' \ No newline at end of file diff --git a/esphome/livingroom-bulb-6.yaml b/esphome/livingroom-bulb-6.yaml index f42f662..1e86304 100644 --- a/esphome/livingroom-bulb-6.yaml +++ b/esphome/livingroom-bulb-6.yaml @@ -1,29 +1,54 @@ substitutions: - device_name: "livingroom-bulb-6" + name: "livingroom-bulb-6" friendly_name: "Living Room Bulb 6" + room: "Living Room" + device_description: "athom 7w rgbcw light bulb" + project_name: "Athom Technology.Athom RGBCW Bulb" + dns_domain: ".cloonar.smart" + timezone: "" + sntp_update_interval: 6h + sntp_server_1: "0.pool.ntp.org" + sntp_server_2: "1.pool.ntp.org" + sntp_server_3: "2.pool.ntp.org" + log_level: "WARN" + +globals: + - id: fast_boot + type: int + restore_value: yes + initial_value: '0' + + - id: restore_mode + type: int + restore_value: yes + initial_value: "1" esphome: - name: ${device_name} - comment: ${friendly_name} - platform: ESP8266 - board: esp01_1m + name: "${name}" + friendly_name: "${friendly_name}" + comment: "${device_description}" + area: "${room}" + name_add_mac_suffix: false + min_version: 2024.6.0 + project: + name: "${project_name}" + version: "${project_version}" on_boot: - priority: 300 - then: - - light.turn_on: - id: my_light - - delay: 100ms - - light.turn_on: - id: my_light - brightness: 20% - - delay: 100ms - - light.turn_on: - id: my_light - red: 100% - green: 50% - blue: 0% - white: 100% - + then: + - light.turn_on: + id: rgbww_light + - delay: 100ms + - light.turn_on: + id: rgbww_light + brightness: 20% + - delay: 100ms + - light.turn_on: + id: rgbww_light + red: 100% + green: 50% + blue: 0% + white: 100% + interval: - interval: 15s then: @@ -32,16 +57,25 @@ interval: api.connected: # check if api connected else: - light.turn_on: - id: my_light + id: rgbww_light brightness: 100% -# Enable Home Assistant API +esp8266: + board: esp8285 + restore_from_flash: true + +preferences: + flash_write_interval: 1min + api: +ota: + - platform: esphome + logger: -ota: - platform: esphome +mdns: + disabled: false wifi: ssid: !secret wifi_ssid @@ -49,32 +83,158 @@ wifi: fast_connect: True domain: .cloonar.smart -light: - - platform: rgbw - id: my_light - name: ${friendly_name} - red: pwm_r - green: pwm_g - blue: pwm_b - white: pwm_w +captive_portal: + +dashboard_import: + package_import_url: github://athom-tech/athom-configs/athom-rgbww-light.yaml + +binary_sensor: + - platform: status + name: "Status" + entity_category: diagnostic + +sensor: + - platform: uptime + name: "Uptime Sensor" + id: uptime_sensor + entity_category: diagnostic + internal: true + + - platform: wifi_signal + name: "WiFi Signal dB" + id: wifi_signal_db + update_interval: 60s + entity_category: "diagnostic" + + - platform: copy + source_id: wifi_signal_db + name: "WiFi Signal Percent" + filters: + - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0); + unit_of_measurement: "Signal %" + entity_category: "diagnostic" + device_class: "" + +button: + - platform: restart + name: "Restart" + entity_category: config + + - platform: factory_reset + name: "Factory Reset" + id: Reset + entity_category: config + + - platform: safe_mode + name: "Safe Mode" + internal: false + entity_category: config output: - platform: esp8266_pwm - pin: GPIO13 - frequency: 1000 Hz - id: pwm_r - + id: red_output + pin: GPIO4 + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: green_output pin: GPIO12 - frequency: 1000 Hz - id: pwm_g - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: blue_output pin: GPIO14 - frequency: 1000 Hz - id: pwm_b - + min_power: 0.000499 + max_power: 1 - platform: esp8266_pwm + id: warm_white_output + pin: GPIO13 + min_power: 0.000499 + max_power: 0.9 + - platform: esp8266_pwm + id: white_output pin: GPIO5 - frequency: 1000 Hz - id: pwm_w \ No newline at end of file + min_power: 0.000499 + max_power: 0.9 + +light: + - platform: rgbww + id: rgbww_light + name: "RGBCW_Bulb" + red: red_output + green: green_output + blue: blue_output + warm_white: warm_white_output + cold_white: white_output + cold_white_color_temperature: 6000 K + warm_white_color_temperature: 3000 K + color_interlock: true + +text_sensor: + - platform: wifi_info + ip_address: + name: "IP Address" + entity_category: diagnostic + ssid: + name: "Connected SSID" + entity_category: diagnostic + mac_address: + name: "Mac Address" + entity_category: diagnostic + + # Creates a sensor showing when the device was last restarted + - platform: template + name: 'Last Restart' + id: device_last_restart + icon: mdi:clock + entity_category: diagnostic +# device_class: timestamp + + # Creates a sensor of the uptime of the device, in formatted days, hours, minutes and seconds + - platform: template + name: "Uptime" + entity_category: diagnostic + lambda: |- + int seconds = (id(uptime_sensor).state); + int days = seconds / (24 * 3600); + seconds = seconds % (24 * 3600); + int hours = seconds / 3600; + seconds = seconds % 3600; + int minutes = seconds / 60; + seconds = seconds % 60; + if ( days > 3650 ) { + return { "Starting up" }; + } else if ( days ) { + return { (String(days) +"d " + String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( hours ) { + return { (String(hours) +"h " + String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else if ( minutes ) { + return { (String(minutes) +"m "+ String(seconds) +"s").c_str() }; + } else { + return { (String(seconds) +"s").c_str() }; + } + icon: mdi:clock-start + +time: + - platform: sntp + id: sntp_time + # Define the timezone of the device + timezone: "${timezone}" + # Change sync interval from default 5min to 6 hours (or as set in substitutions) + update_interval: ${sntp_update_interval} + # Set specific sntp servers to use + servers: + - "${sntp_server_1}" + - "${sntp_server_2}" + - "${sntp_server_3}" + # Publish the time the device was last restarted + on_time_sync: + then: + # Update last restart time, but only once. + - if: + condition: + lambda: 'return id(device_last_restart).state == "";' + then: + - text_sensor.template.publish: + id: device_last_restart + state: !lambda 'return id(sntp_time).now().strftime("%a %d %b %Y - %I:%M:%S %p");' \ No newline at end of file diff --git a/gpd-win-4.md b/gpd-win-4.md new file mode 100644 index 0000000..21d01a5 --- /dev/null +++ b/gpd-win-4.md @@ -0,0 +1,57 @@ +I want a wall-mounted docking solution for my GPD Win 4, designed in OpenSCAD 2021.1. Here are the requirements and clarifications: + +Orientation & Fit + +The GPD Win 4 should be inserted upside down (top facing down), with the screen facing the wall. +It slides in from the top and is guided by side rails. +There should be a small clearance so the GPD Win 4 can be easily inserted/removed without excessive friction. +Front Rail (Lip) + +Side Rails: +The dock should have two side rails that run from top to bottom, guiding the GPD Win 4. + +The front is open for airflow. +However, there should be a small lip (front rail) on each side, running from top to bottom and connected to the side rails. This lip prevents the GPD Win 4 from falling out forward. +Back Plate / Wall Mount + +The dock has a solid back plate that mounts to the wall with two countersunk screws. +The default spacing and size of these screws can be parameterized (e.g., an M4 or M3 countersunk hole). +The back plate thickness should be sufficient for strength (e.g., 3–4 mm). +No special side or back vents are needed. +Cable Brackets + +At the bottom, back, inside the dock, there are two brackets, one for a 90° USB-C cable (standard USB-C power) and one for a 90° Oculink flat cable. +The back plate should be open where these two brackets are, so the cables can exit the dock. +Each bracket should have: +An opening on the side facing the wall, to allow the cable to pass behind (i.e., into or through the wall). +A hole for an M3 screw that presses against the cable from the side to lock it in place. +Enough space to seat a 90° connector so it points upwards to plug into the GPD Win 4. +Parametric Design + +The design should be fully parameterized in OpenSCAD, including (but not limited to) the following parameters: +device_width, device_thickness, device_length (for the GPD Win 4) +clearance_x, clearance_y, clearance_z (how much extra space around the device) +wall_plate_thickness +rail_thickness +front_rail_lip_width or front_rail_lip_thickness +wall_mount_screw_hole_diameter, wall_mount_screw_spacing (for countersunk screws) +bracket_inner_width_usbC, bracket_inner_height_usbC (for the USB-C connector dimensions) +bracket_inner_width_oculink, bracket_inner_height_oculink (for the Oculink connector dimensions) +m3_side_screw_hole_diameter (the hole that lets an M3 screw clamp the cable from the side) +Any other geometry parameters (openings for cables, bracket thickness, etc.) +Defaults + +Please choose default dimensions that accurately reflect: +Approximate GPD Win 4 size (if not exact, then close estimates). +Standard 90° USB-C and 90° Oculink connector sizes. +Typical M3 screws for cable clamps. +Countersunk holes for M3 or M4 wall screws (whichever you prefer). +Version + +This must render successfully in OpenSCAD 2021.1. +Summary + +The final output should be an OpenSCAD file that, when the parameters are set to their defaults, produces the described wall-mounted docking station for the GPD Win 4 with side rails, minimal front lip, bracket cutouts for cables, and properly sized holes for screws. + +If any additional measurements or details are needed, please ask. + diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index 674d81d..224a124 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -37,6 +37,9 @@ ./modules/gitea.nix ./modules/fwmetrics.nix + # ha customers + ./modules/ha-customers + # ./modules/firefox-sync.nix # home assistant diff --git a/hosts/fw/modules/gitea.nix b/hosts/fw/modules/gitea.nix index 34aaaf2..6a5a4a7 100644 --- a/hosts/fw/modules/gitea.nix +++ b/hosts/fw/modules/gitea.nix @@ -84,6 +84,9 @@ in HTTP_PORT = 3001; DOMAIN = domain; }; + repository = { + DEFAULT_BRANCH = "main"; + }; openid = { ENABLE_OPENID_SIGNIN = false; ENABLE_OPENID_SIGNUP = true; diff --git a/hosts/fw/modules/ha-customers/default.nix b/hosts/fw/modules/ha-customers/default.nix new file mode 100644 index 0000000..c255cfc --- /dev/null +++ b/hosts/fw/modules/ha-customers/default.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: +{ + imports = [ + ./ghetto.nix + ]; +} diff --git a/hosts/fw/modules/ha-customers/ghetto.nix b/hosts/fw/modules/ha-customers/ghetto.nix new file mode 100644 index 0000000..06546cb --- /dev/null +++ b/hosts/fw/modules/ha-customers/ghetto.nix @@ -0,0 +1,29 @@ +{ + lib, + pkgs, + ... +}: let + create_users = host: { + users.users."${host.username}.ghetto.at" = { + createHome = true; + home = "/home/customers/ghetto/" + host.username; + isNormalUser = false; + isSystemUser = true; + group = "sftp_users"; + openssh.authorizedKeys.keys = [ + host.key + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN/2SAFm50kraB1fepAizox/QRXxB7WbqVbH+5OPalDT47VIJGNKOKhixQoqhABHxEoLxdf/C83wxlCVlPV9poLfDgVkA3Lyt5r3tSFQ6QjjOJAgchWamMsxxyGBedhKvhiEzcr/Lxytnoz3kjDG8fqQJwEpdqMmJoMUfyL2Rqp16u+FQ7d5aJtwO8EUqovhMaNO7rggjPpV/uMOg+tBxxmscliN7DLuP4EMTA/FwXVzcFNbOx3K9BdpMRAaSJt4SWcJO2cS2KHA5n/H+PQI7nz5KN3Yr/upJN5fROhi/SHvK39QOx12Pv7FCuWlc+oR68vLaoCKYhnkl3DnCfc7A7" + ]; + shell = null; + }; + }; + + users = [ + { + username = "fw"; + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzJRWe8hsqAVnGSjPrcheloteWMzORoQ5Gj4IfhCROF"; + } + ]; +in { + imports = builtins.map create_users users; +} diff --git a/hosts/fw/modules/home-assistant/light.nix b/hosts/fw/modules/home-assistant/light.nix index 51edaff..dc9e944 100644 --- a/hosts/fw/modules/home-assistant/light.nix +++ b/hosts/fw/modules/home-assistant/light.nix @@ -140,8 +140,8 @@ entity_id = "{{ trigger.entity_id }}"; }; data = { - brightness_pct = 20; - rgbw_color = [ 255 126 0 255 ]; + brightness_pct = 30; + color_temp = 450; }; } ]; @@ -372,12 +372,12 @@ all = true; entities = [ "light.livingroom_switch" - "light.living_room_bulb_1" - "light.living_room_bulb_2" - "light.living_room_bulb_3" - "light.living_room_bulb_4" - "light.living_room_bulb_5" - "light.living_room_bulb_6" + "light.livingroom_bulb_1_rgbcw_bulb" + "light.livingroom_bulb_2_rgbcw_bulb" + "light.livingroom_bulb_3_rgbcw_bulb" + "light.livingroom_bulb_4_rgbcw_bulb" + "light.livingroom_bulb_5_rgbcw_bulb" + "light.livingroom_bulb_6_rgbcw_bulb" ]; } { diff --git a/hosts/gpd-win4/configuration.nix b/hosts/gpd-win4/configuration.nix index ac6ce7b..6ca8d6d 100644 --- a/hosts/gpd-win4/configuration.nix +++ b/hosts/gpd-win4/configuration.nix @@ -1,21 +1,89 @@ { config, lib, pkgs, ... }: -{ +let + unstable = import (fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) { + config = { allowUnfree = true; }; + }; + + impermanence = builtins.fetchTarball "https://github.com/nix-community/impermanence/archive/master.tar.gz"; +in { imports = [ + "${impermanence}/nixos.nix" ./hardware-configuration.nix - ./sway/sway.nix - ./nvim/default.nix + # (Optional) comment out if you don’t want Sway as default: + # ./modules/sway/sway.nix + + ./modules/nvim/default.nix ./utils/bento.nix ./utils/modules/sops.nix ./utils/modules/nur.nix ./utils/modules/autoupgrade.nix ./users - - # Import our new steam-deck-mode module ./modules/steam-deck-mode.nix ]; + nixpkgs.overlays = [ + (import ./utils/overlays/packages.nix) + ]; + + services.gvfs.enable = true; + + fonts.packages = with pkgs; [ + git + git-lfs + open-sans + nix-prefetch + jq + oh-my-zsh + zsh-autosuggestions + zsh-completions + zsh-syntax-highlighting + zsh-history-substring-search + creality-print + ]; + + programs.zsh = { + enable = true; + ohMyZsh = { + enable = true; # Enable Oh My Zsh + theme = "steeef"; # Set theme + plugins = [ "git" ]; # Add plugins + }; + }; + users.defaultUserShell = pkgs.zsh; + + services.fwupd.enable = true; + + environment.persistence."/nix/persist" = { + hideMounts = true; + directories = [ + "/home" + ]; + }; + environment.persistence."/nix/persist/system" = { + hideMounts = true; + directories = [ + "/etc/nixos" + "/root/.ssh" + "/var/bento" + "/var/log" + "/var/lib/bluetooth" + "/var/lib/docker" + "/var/lib/nixos" + "/etc/NetworkManager/system-connections" + ]; + files = [ + "/etc/machine-id" + { file = "/etc/ssh/ssh_host_ed25519_key"; parentDirectory = { mode = "u=rwx,g=,o="; }; } + { file = "/etc/ssh/ssh_host_ed25519_key.pub"; parentDirectory = { mode = "u=rwx,g=,o="; }; } + ]; + }; + + sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + sops.defaultSopsFile = ./secrets.yaml; + networking.hostName = "gpd-win4"; time.timeZone = "Europe/Vienna"; + nixpkgs.config.allowUnfree = true; nixpkgs.config.allowBroken = true; console.keyMap = "de"; @@ -26,19 +94,89 @@ users.users.dominik = { isNormalUser = true; - hashedPassword = ""; # Replace with real hash - extraGroups = [ "wheel" "video" "audio" "input" ]; + hashedPassword = "$y$j9T$btz9xel62NjCyLdQRm5ck1$iCm6R7u4wiMeSVfrB6Y.3UwoQJ/rfkXiYSrXI2RTYm/"; + extraGroups = [ "wheel" "disk" "video" "audio" "mysql" "docker" "vboxusers" "networkmanager" "onepassword" "onepassword-cli" "dialout" ]; # Enable ‘sudo’ for the user. }; powerManagement.cpuFreqGovernor = "powersave"; + virtualisation.docker.enable = true; - # In case you want a persistent /home or other directories: - # environment.persistence."/nix/persist" = { - # hideMounts = true; - # directories = [ "/home" ]; - # }; + sops.secrets.epicenter_vpn_ca = {}; + sops.secrets.epicenter_vpn_cert = {}; + sops.secrets.epicenter_vpn_key = {}; + sops.secrets.wg-cloonar-key = {}; - # This system tries to unify the "Steam Deck Mode" and "Sway" approach - # with toggling via systemd user services. - system.stateVersion = "24.05"; + environment.systemPackages = with pkgs; [ + bento + docker-compose + drone-cli + git-filter-repo + nix-prefetch-git + vim + wget + wireguard-tools + # Fingerprint packages for normal system (enrollment, management) + fprintd + libfprint-2-tod1-goodix + ]; + + environment.variables = { + TERMINAL_COMMAND = "alacritty"; + }; + + services.blueman.enable = true; + + networking.wireguard.interfaces = { + wg0 = { + ips = [ "10.42.98.203/32" ]; + privateKeyFile = config.sops.secrets.wg-cloonar-key.path; + peers = [ + { + publicKey = "TKQVDmBnf9av46kQxLQSBDhAeaK8r1zh8zpU64zuc1Q="; + allowedIPs = [ + "10.42.96.0/20" + "10.254.240.0/24" + "10.254.235.0/24" + "10.14.0.0/16" + "10.25.0.0/16" + ]; + endpoint = "vpn.cloonar.com:51820"; + persistentKeepalive = 25; + } + ]; + postSetup = '' + printf "nameserver 10.42.97.1\nsearch cloonar.com" | ${pkgs.openresolv}/bin/resolvconf -a wg0 -m 0 -x + ''; + }; + }; + + nix = { + settings.auto-optimise-store = true; + settings.experimental-features = [ "nix-command" "flakes" ]; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + extraOptions = '' + min-free = 104857600 + max-free = 1073741824 + ''; + }; + + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + services.displayManager.defaultSession = "gnome"; + + # Enable fprintd for fingerprint authentication in the OS + services.fprintd.enable = true; + + # In some NixOS releases, GDM forcibly sets fprintAuth = false. + # We'll override them with mkForce. Also note that the display manager’s + # PAM config might be "gdm-password" rather than just "gdm". + security.pam.services."login".fprintAuth = lib.mkForce true; + security.pam.services."gdm-password".fprintAuth = lib.mkForce true; + + system.stateVersion = "24.11"; } diff --git a/hosts/gpd-win4/hardware-configuration.nix b/hosts/gpd-win4/hardware-configuration.nix index d8a07ce..ac4b317 100644 --- a/hosts/gpd-win4/hardware-configuration.nix +++ b/hosts/gpd-win4/hardware-configuration.nix @@ -4,39 +4,54 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.loader.systemd-boot.enable = true; + boot.loader.systemd-boot = { + enable = true; + configurationLimit = 5; + }; boot.loader.efi.canTouchEfiVariables = true; - boot.initrd.kernelModules = [ "amdgpu" "kvm-amd" ]; + # Use systemd in the initrd + boot.initrd.systemd.enable = true; + + # Include fingerprint packages in the initrd so you can unlock LUKS with fingerprint + boot.initrd.systemd.packages = [ + pkgs.fprintd + pkgs.libfprint-2-tod1-goodix + ]; + + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + "usbhid" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = []; + boot.kernelModules = [ "amdgpu" "kvm-amd" ]; + boot.extraModulePackages = []; hardware.cpu.amd.updateMicrocode = lib.mkDefault true; - fileSystems."/" = - { - device = "none"; - fsType = "tmpfs"; - options = [ "size=16G" "mode=755" ]; - }; - fileSystems."/nix" = - { - device = "/dev/disk/by-uuid/856e1ebe-832f-422d-8d91-d43a5d852abb"; - fsType = "f2fs"; - }; - - boot.initrd = { - luks.devices."enc" = { - crypttabExtraOpts = [ "fido2-device=auto" ]; - device = "/dev/disk/by-uuid/08897ecb-23ce-4352-a1fc-fa442b9e0f72"; - }; - systemd.enable = true; + # Ephemeral root on tmpfs + fileSystems."/" = { + device = "none"; + fsType = "tmpfs"; + options = [ "size=16G" "mode=755" ]; }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/8BC1-69F5"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/1521-B173"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/7530231d-afe3-4571-934b-826d7b1702b2"; + fsType = "f2fs"; + }; + + boot.initrd.luks.devices."luks-1506e138-e941-43e1-a133-06ae3299b62b".device = + "/dev/disk/by-uuid/1506e138-e941-43e1-a133-06ae3299b62b"; hardware.graphics = { enable = true; diff --git a/hosts/gpd-win4/modules/steam-deck-mode.nix b/hosts/gpd-win4/modules/steam-deck-mode.nix index 2c5fe5d..a3695e1 100644 --- a/hosts/gpd-win4/modules/steam-deck-mode.nix +++ b/hosts/gpd-win4/modules/steam-deck-mode.nix @@ -2,77 +2,59 @@ let cfgUser = "dominik"; # Adjust to your username in { - #### 1) Provide two scripts: - #### - `steam-deck-mode.sh`: Runs Steam Big Picture with Gamescope (Wayland). - #### - `sway-session.sh`: Starts Sway. environment.etc."steam-deck-mode.sh".text = '' #!/usr/bin/env bash - - # This script launches Steam in Big Picture mode under Gamescope (Wayland). - # Once Steam (or Gamescope) exits, the systemd user service stops. - # The ExecStopPost hook in the user service will then start Sway automatically. - - # For safety, kill any existing Steam instance + # Launches Steam in Big Picture with Gamescope. + # On exit, user service stops, triggering ExecStopPost to start GNOME. pgrep steam && steam -shutdown || true sleep 1 - - # Use Gamescope in fullscreen mode, exit on Steam exit, run Steam in Gamepad UI exec gamescope -W 1280 -H 800 -f -e -- steam -gamepadui ''; - environment.etc."sway-session.sh".text = '' + environment.etc."gnome-session.sh".text = '' #!/usr/bin/env bash - - # This script starts a Sway session. When Sway exits, the user service stops, - # which triggers ExecStopPost to start Steam Big Picture again. - - exec sway + # Start a GNOME session + exec gnome-session ''; - #### Make these scripts executable via a simple systemd service: systemd.services."make-scripts-executable" = { - description = "Make steam-deck-mode.sh and sway-session.sh executable"; + description = "Make steam-deck-mode and gnome-session scripts executable"; wantedBy = [ "multi-user.target" ]; serviceConfig.ExecStart = [ "${pkgs.coreutils}/bin/chmod +x /etc/steam-deck-mode.sh" - "${pkgs.coreutils}/bin/chmod +x /etc/sway-session.sh" + "${pkgs.coreutils}/bin/chmod +x /etc/gnome-session.sh" ]; }; - #### 2) Create two systemd *user* services: - #### - steam-deck-mode: On stop, automatically start sway - #### - sway: On stop, automatically start steam-deck-mode + # Steam Deck Mode service systemd.user.services."steam-deck-mode" = { - description = "Steam Deck Mode (Wayland Gamescope + Steam Big Picture)"; - wantedBy = [ "default.target" ]; # So we can enable it for the user + description = "Steam Deck Mode (Gamescope + Steam Big Picture)"; + wantedBy = [ "default.target" ]; serviceConfig = { Type = "simple"; ExecStart = "/etc/steam-deck-mode.sh"; - # On exit, automatically trigger Sway - ExecStopPost = "${pkgs.systemd}/bin/systemctl --user start sway"; - Restart = "no"; # If Steam crashes, you can change to 'on-failure' if desired + ExecStopPost = "${pkgs.systemd}/bin/systemctl --user start gnome-session"; + Restart = "no"; }; }; - systemd.user.services."sway" = { - description = "Sway WM Session"; - wantedBy = [ ]; # We won't start this on login by default, but from steam or a script + # GNOME Session (Wayland) service + systemd.user.services."gnome-session" = { + description = "GNOME Session (Wayland)"; + wantedBy = [ ]; serviceConfig = { Type = "simple"; - ExecStart = "/etc/sway-session.sh"; - # On exit, automatically trigger Steam Deck Mode + ExecStart = "/etc/gnome-session.sh"; ExecStopPost = "${pkgs.systemd}/bin/systemctl --user start steam-deck-mode"; Restart = "no"; }; }; - #### 3) Provide a script & desktop entry to let you switch from Sway to Game Mode easily - #### (i.e., stop the 'sway' service, which triggers Steam). + # Quick script to switch from GNOME to Steam Big Picture environment.etc."switch-to-game-mode.sh".text = '' #!/usr/bin/env bash - # This script stops Sway, causing the user service to exit - # The ExecStopPost of that service will start steam-deck-mode automatically. - ${pkgs.systemd}/bin/systemctl --user stop sway + # Stop GNOME => triggers Steam in ExecStopPost + ${pkgs.systemd}/bin/systemctl --user stop gnome-session ''; systemd.services."make-switch-to-game-mode-executable" = { @@ -86,21 +68,24 @@ in { environment.etc."xdg/applications/switch-to-game-mode.desktop".text = '' [Desktop Entry] Name=Switch to Game Mode - Comment=Stop Sway and start Steam Big Picture (Gamescope) + Comment=Stop GNOME and start Steam (Gamescope) Exec=/etc/switch-to-game-mode.sh Terminal=false Type=Application Categories=Game; ''; - #### 4) If you want to start directly in Steam Deck Mode on boot (no display manager), - #### enable auto-login on TTY and run the user service for "dominik". - #### For example (uncomment if you want an immediate console login): - # services.getty.autologinUser = cfgUser; - # systemd.user.services."steam-deck-mode".wantedBy = [ "default.target" ]; # already set - # You'd do 'systemctl --user enable steam-deck-mode' as that user to start it on login. + # Update to new hardware.graphics.* options + hardware.graphics.enable = true; + hardware.graphics.enable32Bit = true; - #### 5) Additional recommended gaming packages if not set elsewhere: + # Include AMD Vulkan for 64bit & 32bit + hardware.graphics.extraPackages = [ + pkgs.amdvlk + pkgs.driversi686Linux.amdvlk + ]; + + # A recommended set of gaming packages environment.systemPackages = with pkgs; [ steam gamemode @@ -108,22 +93,11 @@ in { vulkan-tools vulkan-loader vulkan-headers - # ... ]; - #### 6) Enable 32-bit support for Steam - hardware.opengl.enable = true; - hardware.opengl.driSupport32Bit = true; - hardware.graphics.enable = true; - hardware.graphics.enable32Bit = true; - hardware.graphics.extraPackages = [ - pkgs.amdvlk - pkgs.driversi686Linux.amdvlk - ]; - - #### 7) Optionally handle udev rules for Steam/Controllers if needed - environment.etc."udev/rules.d/99-steamdeck-controller.rules".text = '' - SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666" - KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput" - ''; + # Move the Steam Deck controller rules to services.udev.extraRules + # services.udev.extraRules = '' + # SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666" + # KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput" + # ''; } diff --git a/hosts/gpd-win4/secrets.yaml b/hosts/gpd-win4/secrets.yaml new file mode 100644 index 0000000..4077ef0 --- /dev/null +++ b/hosts/gpd-win4/secrets.yaml @@ -0,0 +1,42 @@ +epicenter_vpn_ca: ENC[AES256_GCM,data:DUvpuL92zpQkK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vTR7/yh8mgp2k5XOBw2bdCqH79ctq50drdBnpLuILKuruO/A1isS6YkjD0vxXQZh3yt5D3iqlAAOHdIzaWf8q0zUQsHp0aOgZG0WSlVPg44oHEG40O+laDu62fgcI4JisL6KwdJIPidw==,iv:pB/cNgmHi14ugi6kd+J6poWXX79LMHiiakNa03ibZ0Q=,tag:nLfjOesXDm5/QtwHznJROw==,type:str] +wg-cloonar-key: ENC[AES256_GCM,data:raK+FXMb2EBzLEYQzDQ9TZSz5v1X+CGV9ghZuA/NoVwn4OnTWWhY9x/wTZA=,iv:kq2qdYAgoHogRoOzUaOc64uJF0ji/XuaLaO0HEp0l4A=,tag:1fKSyzv/FqxLl6Uv3DQv7Q==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age14grjcxaq4h55yfnjxvnqhtswxhj9sfdcvyas4lwvpa8py27pjy2sv3g6v7 + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGUG5oZ1BPL1hiRm5zQ3FO + Zks2RWg1ODZGYm4rY05wT2dWTHFCN1FhcEY4ClB5N29SclVxWUpGaHF1V0o1cHVK + TWtoTGFsRHVERWgxczlqdysrRmVDM3cKLS0tIFNISWhUbmV5dERHSXV3ZW5Gd0l3 + bHZHdy9jUHhLSTFUWHBxUTcrT3FoaHcKpKjzC3KDD6TXpbPm/ObztJQzkNnnTnvH + uWzRhQg7lHAKiiz4szzT64WCuisxFAOJP1KrSK9qP5DLBm8aKIDcPA== + -----END AGE ENCRYPTED FILE----- + - recipient: age16veg3fmvpfm7a89a9fc8dvvsxmsthlm70nfxqspr6t8vnf9wkcwsvdq38d + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4VU1JZ3FkQ2lPVE9KeGMw + c1lRWGlPU1BKbXlJc0lnVURNNjN4bDRNWFZ3CnQyRUE0MXllajgySHRkSTNRZ2U4 + K2w3bWEzNmxrZHRybXdFdnZCTmYySW8KLS0tIFduVUdYdDdVOS83QUxveG5lMDRi + M3E3bDhrM1FvMERESmI2RTdBTVNUMlkKoKhTGUYULeQvqMjwMCanDxD4yflGURgE + ROZe6d8R5Sya+RsS4uzNMs5KkjGeC/xjbNO22uSRennIwCqBaHNmgg== + -----END AGE ENCRYPTED FILE----- + - recipient: age1v6p8dan2t3w9h94fz4flldl32082j3s9x6zqq7u5j66keth9aphsd6pvch + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBMW1zeU5ubDloazBKNFR5 + M0xnbXQySWptOHFEQmQ0VHdvTWVieitYK1drCmI0VW5PVUFaTFo3STF2MUxSOXhC + T1YxY2lFMitKM29rS1FKQWRweStxUlUKLS0tIEFnQTlHcFJEcTAxem5QK2xrTm8r + L21ncjlQdGVDUjI2eXFIb3U2dW13bWsKuEwATNEUWtjuLsH7DQAt6J2l4blTId1W + A1kQ+0dfUKrZ0dsbvUA5L9+haUiK8f5RvapaKW+L2JEn7gW5wJSJEw== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2025-01-26T17:32:33Z" + mac: ENC[AES256_GCM,data:tYmCofgoeDlb1FI8dWNh9hy9tS/H3X4r2HzboKTRnTQqSz6M+nc4g/Gt7eb2OHcRzLqbg9WxanFeDrlOz5jIxKIDV+7PfNlPSPqXIQg/79u3g/qDiwbnSRa3s+2mVIK5GEN+5M5f11KfwHbtHn+bEUALGHPP1gpW6deKBUIITg4=,iv:xQBmQjsNuaTzUGXFrsqiXcKL79nN8nvaLDrnGYwR7rI=,tag:vmA465d7M19c1lc5X1qTqg==,type:str] + pgp: [] + unencrypted_suffix: _unencrypted + version: 3.9.2 diff --git a/hosts/nb/configuration.nix b/hosts/nb/configuration.nix index 2328735..b94cc86 100644 --- a/hosts/nb/configuration.nix +++ b/hosts/nb/configuration.nix @@ -18,6 +18,7 @@ in { imports = [ # Include the results of the hardware scan. "${impermanence}/nixos.nix" + (import ).nixosModules.default ./utils/bento.nix ./utils/modules/sops.nix @@ -25,9 +26,10 @@ in { ./modules/appimage.nix ./modules/sway/sway.nix ./modules/printer.nix - ./modules/cyberghost.nix + # ./modules/cyberghost.nix ./modules/nvim/default.nix ./utils/modules/autoupgrade.nix + ./modules/puppeteer.nix ./cachix.nix ./users @@ -38,6 +40,8 @@ in { ]; + services.snap.enable = true; + nixpkgs.overlays = [ (import ./utils/overlays/packages.nix) ]; @@ -72,24 +76,6 @@ in { } ]; - services.postgresql= { - enable = true; - ensureDatabases = ["dominik" "flowuser"]; - authentication = pkgs.lib.mkOverride 10 '' - local all all trust - host all all 127.0.0.1/32 trust - host all all ::1/128 trust - ''; - enableTCPIP = true; - ensureUsers = [ - { - name = "dominik"; # Replace with your actual Unix username - ensureClauses.superuser = true; - ensureClauses.login = true; - } - ]; - }; - programs.zsh = { enable = true; ohMyZsh = { @@ -226,7 +212,7 @@ in { environment.variables = { TERMINAL_COMMAND = "alacritty"; }; - + services.blueman.enable = true; system.stateVersion = "24.05"; # Did you read the comment? @@ -344,4 +330,3 @@ in { } - diff --git a/hosts/nb/modules/nvim/chatgpt.nix b/hosts/nb/modules/nvim/chatgpt.nix index d81fab1..c3384b5 100644 --- a/hosts/nb/modules/nvim/chatgpt.nix +++ b/hosts/nb/modules/nvim/chatgpt.nix @@ -5,8 +5,8 @@ self: super: { version = "1.0.0"; src = super.fetchgit { url = "https://git.cloonar.com/Cloonar/chatgpt.vim.git"; - rev = "aa12bca3abc868b4ebacbd22b6fde83deb656869"; - sha256 = "sha256-eK7GQNHR03fQ7j2ExX9QSA+AIW5c1b8fsat3kbS6f9k="; + rev = "7fb8671840181ca5166fcf7b8a8d5f5e10a5efa7"; + sha256 = "sha256-g4sEUoZqxlliKHj1TAxwNXN400yLN+QB4wV3drmvf9w="; }; }; }; diff --git a/hosts/nb/modules/nvim/config/lspconfig.lua b/hosts/nb/modules/nvim/config/lspconfig.lua index 4886a8e..47070df 100644 --- a/hosts/nb/modules/nvim/config/lspconfig.lua +++ b/hosts/nb/modules/nvim/config/lspconfig.lua @@ -41,5 +41,14 @@ lspc.yamlls.setup({ }, }); +-- autoformat json files with jq +vim.api.nvim_create_autocmd("FileType", { + pattern = "json", + callback = function(ev) + vim.bo[ev.buf].formatprg = “jq” + print("It's a json file") + end, +}) + -- lspc.intelephense.setup() diff --git a/hosts/nb/modules/nvim/default.nix b/hosts/nb/modules/nvim/default.nix index 2d882f1..c7509b3 100644 --- a/hosts/nb/modules/nvim/default.nix +++ b/hosts/nb/modules/nvim/default.nix @@ -1,4 +1,9 @@ { pkgs, ... }: +let + unstable = import (fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) { + config = { allowUnfree = true; }; + }; +in { environment.variables = { EDITOR = "vim"; }; nixpkgs.overlays = [ @@ -9,6 +14,7 @@ environment.systemPackages = with pkgs; [ nodePackages.typescript-language-server sumneko-lua-language-server + nest nodePackages.intelephense nodePackages.vscode-langservers-extracted nodePackages.yaml-language-server @@ -17,6 +23,7 @@ ripgrep lua luaPackages.lyaml + unstable.aider-chat (neovim.override { vimAlias = true; configure = { @@ -41,6 +48,7 @@ dracula-vim friendly-snippets gitsigns-nvim + jq lightline-vim lspkind-nvim mini-icons @@ -67,7 +75,8 @@ vim-sneak vim-vsnip which-key-nvim - rest-nvim + unstable.pkgs.vimPlugins.rest-nvim + aider-nvim ]; opt = []; }; diff --git a/hosts/nb/modules/puppeteer.nix b/hosts/nb/modules/puppeteer.nix new file mode 100644 index 0000000..c84529b --- /dev/null +++ b/hosts/nb/modules/puppeteer.nix @@ -0,0 +1,35 @@ +{ config, pkgs, ... }: { + environment.systemPackages = with pkgs; [ + chromium + nodejs + # Graphics and font dependencies + freetype + fontconfig + # Additional runtime dependencies + alsa-lib + atk + cairo + cups + dbus + expat + gdk-pixbuf + glib + gtk3 + libdrm + libxkbcommon + mesa + nspr + nss + pango + xorg.libX11 + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + ]; + + environment.variables = { + PUPPETEER_EXECUTABLE_PATH = "${pkgs.chromium}/bin/chromium"; + }; +} diff --git a/hosts/nb/modules/sway/sway.nix b/hosts/nb/modules/sway/sway.nix index 5514173..a1ab85e 100644 --- a/hosts/nb/modules/sway/sway.nix +++ b/hosts/nb/modules/sway/sway.nix @@ -36,6 +36,7 @@ in { # ./rustdesk.nix ./thunderbird.nix ./bitwarden.nix + # ./vscode.nix ]; environment.variables.XCURSOR_SIZE = "24"; @@ -82,8 +83,8 @@ in { fontforge hypnotix - code-cursor - vscode-fhs + unstable.code-cursor + # unstable.vscode-fhs quickemu @@ -132,6 +133,7 @@ in { mako mqttui moonlight-qt + nautilus netflix networkmanagerapplet nextcloud-client @@ -142,7 +144,8 @@ in { pinentry rbw rofi-rbw - rustdesk + # unstable.rustdesk + unstable.rustdesk-flutter slurp sway swaybg @@ -197,5 +200,18 @@ in { "xdg/waybar/config".text = builtins.readFile ./waybar.conf; "xdg/waybar/style.css".text = builtins.readFile ./waybar.css; "xdg/foot/foot.ini".text = builtins.readFile ./foot.ini; + + # dark mode + "xdg/gtk-2.0/gtkrc".text = "gtk-error-bell=0"; + "xdg/gtk-3.0/settings.ini".text = '' + [Settings] + gtk-error-bell=false + gtk-application-prefer-dark-theme=1 + ''; + "xdg/gtk-4.0/settings.ini".text = '' + [Settings] + gtk-error-bell=false + gtk-application-prefer-dark-theme=1 + ''; }; } diff --git a/hosts/nb/modules/sway/vscode.nix b/hosts/nb/modules/sway/vscode.nix new file mode 100644 index 0000000..c7dd118 --- /dev/null +++ b/hosts/nb/modules/sway/vscode.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: let + unstable = import (fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) { + config = { allowUnfree = true; }; + }; + vscode-insiders = (unstable.vscode.override { isInsiders = true; }).overrideAttrs (oldAttrs: rec { + src = (builtins.fetchTarball { + url = "https://update.code.visualstudio.com/1.98.0-insider/linux-x64/insider"; + sha256 = "sha256-tV0VxDLJJPD4jfNEgVh3wMXg899VJxCS5a3putdetkA="; + }); + version = "1.98.0"; + }); +in { + environment.systemPackages = with pkgs; [ + vscode-insiders + ]; +} diff --git a/hosts/nb/secrets.yaml b/hosts/nb/secrets.yaml index 7f41cab..986c2f2 100644 --- a/hosts/nb/secrets.yaml +++ b/hosts/nb/secrets.yaml @@ -4,10 +4,11 @@ epicenter_vpn_key: ENC[AES256_GCM,data:Kt33OLiauTrkzSwib2px/rZoQO6tlCzsy2exxIrZb wg_private_key: ENC[AES256_GCM,data:A80vGf9aMxowC2xME4FIVTmKpSRLNB2tWiUQeP1v8vCRk6Gt8BKYOuXYt04=,iv:vr7qvfr78syrI5pIytjLouPwZcw4xvBTvEUzzv7ibnQ=,tag:qjALlFkd8JocLJqMKFERaw==,type:str] wg_preshared_key: ENC[AES256_GCM,data:bhXoD95ahDRawoHd5Z35FY0G6Xv0PHwWJf300fHQ5jNsGN1TQKHsIswx8YI=,iv:fBsIWkVZUt8pahuO9daaRBIEEIWsSnFW5Velj9uP2ZY=,tag:RvbCYhnRv0OrjTxjsNFW6g==,type:str] wg-cloonar-key: ENC[AES256_GCM,data:ZMEeIZApOD0ij3nPMZeQRwJ4MwVx0sHu08F+m/u6IMHBGid5YwMgxZ7qbLk=,iv:OfIZ9TqBLjToIQi7zRUBATrynBtu0bzXeGVI/EAUPhQ=,tag:mJICT/ak5U76JE/IxJsCKw==,type:str] -wireguard_user_pass: ENC[AES256_GCM,data:pGs/Kx/j8bgVQ2MtnpnvPI+dBrUFew==,iv:oLYuxjbe88RqygmVTAVnwLUmpRyQLdWrLX/kMIK0MHE=,tag:CBOK/rpuJplurt6VKux0Kg==,type:str] +cyberghost_user_pass: ENC[AES256_GCM,data:Eaz8iEV9vNZh/bJePmacQ06zU8FfIA==,iv:GcnU10VLVJsoeIU6t6eVjopLsBamvk12DpMbM9BsBv0=,tag:rLYoghkD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y4tRAtCvkys3M=,tag:B0lyX7IRNHX1CqlvBZaSpg==,type:str] +openai_api_key: ENC[AES256_GCM,data:lH5Jf/xvtRRwuGYPM3g39J5DTQJowSKVqLtObgXRo+GOfpY/BKb46/R25rkWrOUv5pYK8PXmSm7obEkVBfoaYG0WufR6SzGH+R7hjrNgCzBA6g5pxmlE7CWPlPy6C6XqVgblL8aP2vD9qxJmIw8FYCLRgFHt5hK4d+Gd23BeBnkmPWIH23xyRFhCcb891CoiEEdXL5p1LNAOAW5ePmAyavc/Dlk=,iv:lWXy8/LlWeRVSect87/qsG2nOkmL5W7jpw/DVSnAbEs=,tag:n3pWUJ5uEMXtgt/kHG8J8w==,type:str] sops: kms: [] gcp_kms: [] @@ -41,8 +42,8 @@ sops: L21ncjlQdGVDUjI2eXFIb3U2dW13bWsKuEwATNEUWtjuLsH7DQAt6J2l4blTId1W A1kQ+0dfUKrZ0dsbvUA5L9+haUiK8f5RvapaKW+L2JEn7gW5wJSJEw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-02-03T12:21:26Z" - mac: ENC[AES256_GCM,data:VvYYibPesUGh5LpR5dXUbJy0mwN9NkBn9CNx+SmWPR+wsaRMGR0Nkhmjmv+WpRGatL+Ka5cGezFFjdOd6urWpcSmL32zcPumVo/CRsZi4JEiuT3qHJkrKM38IPV5WSv1RxQaYwsN4/e5rMdRqeHCLatHbD28LAZxGz1bENCdYbw=,iv:zntGu7xokETUufEK/63ukM+voCEhyuA+hyhVrTNHvrA=,tag:lg2S+e9QL56A/Jaw1Ha0ug==,type:str] + lastmodified: "2025-02-05T16:19:21Z" + mac: ENC[AES256_GCM,data:ERVdP6Nk+o7DAVsN24EFr23R/9eF98Vq8O9ov9tiUyKdFcE/N5N0rQg1IyESuVujpOKOp4/WF488/Ez3S9dM0gNfqIctLT5Qw4EmNV+gs1SbtXdFE0eU3KbmFHxFsWRftQSpz0xalXBAAUHMUJfMQf1lyV7+TgGccIkvQB12QDM=,iv:Nsn1ohLkh3NSMbaWnl3UHDKG1lhTSUxNB8M7CIYxwvM=,tag:6PQ7VCb+enUnbRVAKYNR2g==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.9.4 diff --git a/hosts/nb/users/configs/project_history b/hosts/nb/users/configs/project_history index 64a6b67..1b8a033 100644 --- a/hosts/nb/users/configs/project_history +++ b/hosts/nb/users/configs/project_history @@ -5,10 +5,18 @@ /home/dominik/projects/cloonar/phishguard /home/dominik/projects/cloonar/phishguard-frontend /home/dominik/projects/cloonar/gitapi -/home/dominik/projects/cloonar/flow -/home/dominik/projects/cloonar/flow-docs -/home/dominik/projects/cloonar/flow-api -/home/dominik/projects/cloonar/flow-frontend + +/home/dominik/projects/cloonar/flow/flow-docs +/home/dominik/projects/cloonar/flow/flow-user-service +/home/dominik/projects/cloonar/flow/flow-billing-service +/home/dominik/projects/cloonar/flow/flow-workflow-orchestration-service +/home/dominik/projects/cloonar/flow/flow-module-registry +/home/dominik/projects/cloonar/flow/flow-workflow-definition +/home/dominik/projects/cloonar/flow/flow-api-gateway + +/home/dominik/projects/home-automation/lego-hetzner-bridge +/home/dominik/projects/home-automation/ghetto-nixos + /home/dominik/projects/cloonar/typo3-basic /home/dominik/projects/cloonar/renovate-config /home/dominik/projects/cloonar/bento diff --git a/hosts/nb/users/dominik.nix b/hosts/nb/users/dominik.nix index 8ed425e..d88f66b 100644 --- a/hosts/nb/users/dominik.nix +++ b/hosts/nb/users/dominik.nix @@ -143,8 +143,17 @@ let in { + sops.secrets.openai_api_key = { + owner = "dominik"; + }; programs.fuse.userAllowOther = true; + programs.zsh = { + shellInit = '' + export OPENAI_API_KEY=$(cat ${config.sops.secrets.openai_api_key.path}) + ''; + }; + home-manager.users.dominik = { lib, pkgs, ... }: { # imports = [ "${impermanence}/home-manager.nix" ]; /* The home.stateVersion option does not have a default and must be set */ @@ -163,6 +172,7 @@ in ''; }; + /* Here goes the rest of your home-manager config, e.g. home.packages = [ pkgs.foo ]; */ # home.persistence."/nix/persist/user/dominik" = { # allowOther = true; @@ -207,6 +217,16 @@ in }; }; + dconf = { + enable = true; + + settings = { + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + }; + }; + systemd.user.services = { signald = { Unit = { @@ -419,7 +439,7 @@ in

<Signature
  firstName="Dominik"
  lastName="Polakovics"
-   company="Cloonar e.U."
+   company="Cloonar Technologies GmbH"
  scope="IT Solutions"
  phone="+436688700600"
  email="dominik.polakovics@cloonar.com"
/>

@@ -528,10 +548,10 @@ in home.activation.symlinks = lib.hm.dag.entryAfter ["writeBoundary"] '' PATH="${pkgs.git}/bin:${pkgs.openssh}/bin:$PATH" set +eu - if [ ! -L ~/Documents ]; then + if [ ! -L ~/Documents/Documents ]; then ln -s /home/dominik/.local/share/Cryptomator/mnt/Documents ~/Documents fi - if [ ! -L ~/Downloads ]; then + if [ ! -L ~/Downloads/Downloads ]; then ln -s /home/dominik/.local/share/Cryptomator/mnt/Downloads ~/Downloads fi set -eu @@ -553,10 +573,13 @@ in git clone gitea@git.cloonar.com:Cloonar/phishguard-frontend.git ${persistHome}/projects/cloonar/phishguard-frontend 2>/dev/null git clone gitea@git.cloonar.com:Cloonar/gitapi.git ${persistHome}/projects/cloonar/gitapi 2>/dev/null git clone gitea@git.cloonar.com:Cloonar/ai.nvim.git ${persistHome}/cloonar/ai.nvim 2>/dev/null - git clone gitea@git.cloonar.com:Cloonar/flow.git ${persistHome}/projects/cloonar/flow 2>/dev/null - git clone gitea@git.cloonar.com:Cloonar/flow-docs.git ${persistHome}/projects/cloonar/flow-docs 2>/dev/null - git clone gitea@git.cloonar.com:Cloonar/flow-api.git ${persistHome}/projects/cloonar/flow-api 2>/dev/null - git clone gitea@git.cloonar.com:Cloonar/flow-frontend.git ${persistHome}/projects/cloonar/flow-frontend 2>/dev/null + + git clone gitea@git.cloonar.com:Cloonar/flow-docs.git ${persistHome}/projects/cloonar/flow/flow-docs 2>/dev/null + git clone gitea@git.cloonar.com:Cloonar/flow-user-service.git ${persistHome}/projects/cloonar/flow/flow-user-service 2>/dev/null + git clone gitea@git.cloonar.com:Cloonar/flow-billing-service.git ${persistHome}/projects/cloonar/flow/flow-billing-service 2>/dev/null + git clone gitea@git.cloonar.com:Cloonar/flow-module-registry.git ${persistHome}/projects/cloonar/flow/flow-module-registry 2>/dev/null + git clone gitea@git.cloonar.com:Cloonar/flow-workflow-definition.git ${persistHome}/projects/cloonar/flow/flow-workflow-definition 2>/dev/null + git clone gitea@git.cloonar.com:dominik.polakovics/flow-api-gateway.git ${persistHome}/projects/cloonar/flow/flow-api-gateway 2>/dev/null git clone gitea@git.cloonar.com:dominik.polakovics/typo3-basic.git ${persistHome}/cloonar/typo3-basic 2>/dev/null git clone gitea@git.cloonar.com:renovate/renovate-config.git ${persistHome}/cloonar/renovate-config 2>/dev/null @@ -579,6 +602,9 @@ in git clone gitea@git.cloonar.com:Cloonar/lena-schilling-website.git ${persistHome}/projects/cloonar/lena-schilling-website 2>/dev/null git clone gitea@git.cloonar.com:Cloonar/imperfect-perfect.com.git ${persistHome}/projects/cloonar/imperfect-perfect.com 2>/dev/null + git clone gitea@git.cloonar.com:Cloonar/lego-hetzner-bridge.git ${persistHome}/projects/home-automation/lego-hetzner-bridge 2>/dev/null + git clone gitea@git.cloonar.com:Cloonar/ghetto-nixos.git ${persistHome}/projects/home-automation/ghetto-nixos 2>/dev/null + git clone gitea@git.cloonar.com:socialgrow.tech/sgt-api.git ${persistHome}/projects/socialgrow.tech/sgt-api 2>/dev/null diff --git a/utils/overlays/packages.nix b/utils/overlays/packages.nix index 7c57e33..74797e0 100644 --- a/utils/overlays/packages.nix +++ b/utils/overlays/packages.nix @@ -3,4 +3,6 @@ self: super: { ykfde = (super.callPackage ../pkgs/ykfde { }); creality-print = (super.callPackage ../pkgs/creality-print.nix { }); openaudible = (super.callPackage ../pkgs/openaudible.nix { }); + + # vscode-insiders = (super.callPackage ../pkgs/vscode-insiders.nix { }); } diff --git a/utils/pkgs/vscode-insiders.nix b/utils/pkgs/vscode-insiders.nix new file mode 100644 index 0000000..f881202 --- /dev/null +++ b/utils/pkgs/vscode-insiders.nix @@ -0,0 +1,97 @@ +{ lib, stdenv, makeDesktopItem, makeWrapper, fetchurl +, atomEnv, at-spi2-atk, at-spi2-core, autoPatchelfHook, alsa-lib +, mesa, nss, nspr, systemd, libdrm, libxkbcommon, libX11, libXcomposite +, libXdamage, libXext, libXfixes, libXrandr, expat, libxcb +, libXScrnSaver, libXi, libxshmfence, libGL, libglvnd +, gtk3, pango, cairo, gdk-pixbuf, glib, dbus, cups, SDL2 +, libav_0_8, openssl, bash, findutils, xdg-utils, coreutils +}: + +stdenv.mkDerivation rec { + pname = "vscode-insiders"; + version = "1.87.0-1708777035"; + + src = fetchurl { + url = "https://az764295.vo.msecnd.net/insider/9319989589821514c6d3dea07e90292d59431d35/code-insider-${version}-linux-x64.tar.gz"; + hash = "sha256-Mm34T2/laoqxN8MR+H0rHxxA0WAKgc5d/ZvGGC+ETok="; + }; + + buildInputs = [ + atomEnv.packages + at-spi2-atk + at-spi2-core + alsa-lib + mesa + nss + nspr + systemd + libdrm + libxkbcommon + libX11 + libXcomposite + libXdamage + libXext + libXfixes + libXrandr + expat + libxcb + libXScrnSaver + libXi + libxshmfence + libGL + libglvnd + gtk3 + pango + cairo + gdk-pixbuf + glib + dbus + cups + SDL2 + libav_0_8 + openssl + ]; + + nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; + + installPhase = '' + mkdir -p $out/lib/vscode-insiders + cp -r . $out/lib/vscode-insiders + + mkdir -p $out/bin + ln -s $out/lib/vscode-insiders/bin/code-insiders $out/bin/code-insiders + + mkdir -p $out/share/applications + cp ${makeDesktopItem { + name = "code-insiders"; + desktopName = "Visual Studio Code - Insiders"; + comment = "Code Editing. Redefined."; + exec = "code-insiders %F"; + icon = "code-insiders"; + categories = [ "Utility" "TextEditor" "Development" "IDE" ]; + mimeTypes = [ "text/plain" "inode/directory" ]; + startupNotify = true; + startupWMClass = "Code - Insiders"; + }}/share/applications/code-insiders.desktop $out/share/applications/ + + mkdir -p $out/share/pixmaps + cp $out/lib/vscode-insiders/resources/app/resources/linux/code-insiders.png $out/share/pixmaps/ + ''; + + postFixup = '' + wrapProgram $out/bin/code-insiders \ + --prefix PATH : ${lib.makeBinPath [ xdg-utils ]} \ + --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs} + ''; + + meta = with lib; { + description = "Visual Studio Code Insiders - Open Source IDE by Microsoft"; + longDescription = '' + Visual Studio Code Insiders is a new choice of tool that combines the simplicity of a code editor with what developers need for the core edit-build-debug cycle. This is the insiders version, updated daily with the latest changes. + ''; + homepage = "https://code.visualstudio.com/insiders"; + license = licenses.unfree; + maintainers = with maintainers; [ ]; + platforms = [ "x86_64-linux" ]; + }; +}