Skip to content

New setup for postgres users, on endoreg and other - #136

Open
maxhild wants to merge 5 commits into
mainfrom
datahub
Open

New setup for postgres users, on endoreg and other#136
maxhild wants to merge 5 commits into
mainfrom
datahub

Conversation

@maxhild

@maxhild maxhild commented Dec 30, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation

    • Updated cheatsheet with corrected text, new shortcuts (nhh / nh home switch), expanded Devenv Tasks, Database, Autoconf, Automatic Documentation sections; reorganized Table of Contents and added duplicated security‑improvements entries.
  • New Features

    • Added reusable automated DB setup with password workflow and a new datahub database/user for easier local provisioning.
  • Bug Fixes

    • Fixed typos and capitalization inconsistencies.
  • Chores

    • Disabled automatic maintenance updates on multiple systems and updated update source for two hosts.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 30, 2025

Copy link
Copy Markdown

Walkthrough

Documentation expanded and reorganized; many system profiles had automatic updates disabled. Major NixOS role change: added a reusable mkPostgresDbSetup that emits systemd oneshot services and setup scripts to manage PostgreSQL users, passwords, and initial databases.

Changes

Cohort / File(s) Summary
Documentation
LxCheatsheet.md, TABLE_OF_CONTENTS.md
Typo/capitalization fixes, new notes and sections (Devenv Tasks, Database, Autoconf, Automatic Documentation), new shortcut nhh, and insertion/duplication of security-improvements in the TOC.
PostgreSQL role module
modules/nixos/roles/postgres-default/default.nix
Added public mkPostgresDbSetup generator producing systemd oneshot services + setup scripts; replaced hard-coded endoreg flow with generic, idempotent passwordFileSource→passwordFileDest workflow (generate if missing, copy, apply via psql); added new DB/user entries (e.g., datahub) and new public options.
System configs (auto-updates & SSH keys)
systems/x86_64-linux/gc-02/default.nix, .../gc-04/default.nix, .../gc-05/default.nix, .../gc-07/default.nix, .../gc-08/default.nix, .../gc-09/default.nix, .../gc-10/default.nix, .../gs-01/default.nix, .../gs-02/default.nix, .../s-04/default.nix
Disabled maintenance.autoUpdates.enable (true → false) across many profiles; several profiles updated maintenance.autoUpdates.flake and replaced/rotated ssh-access.dev-03.idEd25519 values.
Minor option comment removal
modules/nixos/luxnix/maintenance/audo-update/default.nix
Removed an inline TODO-style comment from the flake default value (no behavior change).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant systemd as systemd (oneshot)
  participant script as setup script (root)
  participant fs as Filesystem / Secrets
  participant pg as PostgreSQL server

  rect rgba(40, 116, 166, 0.06)
    Note over systemd,script: mkPostgresDbSetup emits service + script
  end

  systemd->>script: start oneshot
  script->>fs: check `passwordFileSource` exists
  alt source missing
    script->>fs: generate random password -> write `passwordFileSource`
  end
  script->>fs: copy `passwordFileSource` -> `passwordFileDest` (postgres-readable)
  script->>pg: wait until postgres accepts connections
  script->>pg: run psql (CREATE DB / ALTER USER) using password (dollar-quoted)
  pg-->>script: success / error
  script->>systemd: exit (status)
  Note right of pg: Idempotent — safe to re-run
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Temp local postgres lxannotate #131 — Prior work refactoring postgres setup; directly related to generalizing postgres-endoreg-setup into mkPostgresDbSetup.
  • Prototype #112 — Introduced postgres user/password setup services and scripts; overlaps with the new generic setup flow.
  • Prototype #114 — Related changes around wiring postgres setup services to managed secrets and adjusting tmpfiles/password handling.

Poem

🐰 I nibble configs in the light,

mkPostgresDbSetup hops into sight.
Secrets tucked, services spring,
Docs bloom where shortcuts sing.
A jittery hop — deploy feels right!

Pre-merge checks

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'New setup for postgres users, on endoreg and other' is partially related to the changeset. It accurately describes the PostgreSQL user setup changes in the main module but does not capture the significant documentation updates, system configuration changes across multiple files, or the broader scope of modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@maxhild

maxhild commented Dec 30, 2025

Copy link
Copy Markdown
Member Author

@Maddonix @Hamzaukw please review

@coderabbitai
coderabbitai Bot requested a review from Maddonix December 30, 2025 16:05
@coderabbitai coderabbitai Bot added the enhancement New feature or request label Dec 30, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
modules/nixos/roles/postgres-default/default.nix (1)

229-256: Remove redundant "datahubUser" from ensureDatabases and clarify database ownership.

  1. "datahubUser" in ensureDatabases (line 233) is redundant—since the user entry has ensureDBOwnership = true (line 255), NixOS automatically creates a database named datahubUser. Remove the explicit entry.

  2. More critically: the configuration creates both a datahub database and a separate datahubUser database. The user datahubUser will own datahubUser, not datahub. Given that mkPostgresDbSetup names the setup service "datahub-local" with dbUser = "datahubUser", it appears datahubUser should own the datahub database. Either remove "datahub" from ensureDatabases (if datahubUser only needs its own database) or explicitly assign ownership of datahub to datahubUser.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 53cfb70 and e02404f.

⛔ Files ignored due to path filters (7)
  • ansible/inventory/group_vars/all.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • ansible/roles/postgres_host_sandbox/defaults/main.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • ansible/roles/postgres_host_sandbox/handlers/main.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • ansible/roles/postgres_host_sandbox/meta/main.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • ansible/roles/postgres_host_sandbox/tasks/main.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • ansible/roles/postgres_host_sandbox/vars/main.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • conf/_nix-configs/gs-02.yml is excluded by !**/*.{bin,csv,yaml,yml}
📒 Files selected for processing (5)
  • LxCheatsheet.md
  • TABLE_OF_CONTENTS.md
  • ansible/roles/postgres_host_sandbox/templates/postgres_cred.j2
  • modules/nixos/roles/postgres-default/default.nix
  • modules/nixos/roles/postgres-default/setup-user.nix
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-06T08:18:11.713Z
Learnt from: Maddonix
Repo: wg-lux/luxnix PR: 114
File: systems/x86_64-linux/gc-08/default.nix:141-146
Timestamp: 2025-08-06T08:18:11.713Z
Learning: The default.nix files in systems/x86_64-linux/*/ directories are automatically generated via script as a result of editing ansible inventory variables, not manually maintained files.

Applied to files:

  • LxCheatsheet.md
🪛 LanguageTool
LxCheatsheet.md

[grammar] ~3-~3: Ensure spelling is correct
Context: ...uxNix These shortcuts for building the sytem config (and more) are defined at: luxni...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (7)
LxCheatsheet.md (3)

31-32: Helpful clarification on ansible/nix config relationship.

The added note clearly documents the connection between ansible configuration and nix config files, which is useful context for maintainers.


86-135: Excellent additions to document key development workflows.

The new Devenv Tasks, Database, Autoconf, and Automatic Documentation sections are well-organized and provide clear command references. These additions directly support the PostgreSQL setup mechanisms and automation tooling that are central to this PR.


59-60: Correct command capitalization for accuracy.

The lowercasing of nix-collect-garbage and nix-store commands aligns with the actual CLI tool names and improves documentation accuracy.

Also applies to: 66-66

TABLE_OF_CONTENTS.md (2)

85-93: Hardware Setup section reorganized with more granular subsections.

The replacement of generic "Required Files" and "Example Configuration" with specific subsections (Essential Files and Directories, Ansible Configuration, Common Tasks and Commands, etc.) provides better navigation and clearer documentation structure.

Please verify that all referenced subsections in the reorganized Hardware Setup section are properly documented in docs/hardware-setup.md.


154-166: New security-improvements section properly structured and relevant to PostgreSQL hardening.

The addition of a dedicated security-improvements section documents important PostgreSQL security practices and permission hardening measures that align with the PR's focus on secure database setup. The subsections provide comprehensive coverage of SQL injection prevention and secrets management.

Please verify that:

  1. The docs/security-improvements.md file is included in this PR or already exists in the repository.
  2. The duplicate "Files Updated" entries (lines 161 and 166) are intentional and refer to different file sets (one for SQL injection prevention, one for directory permissions).
modules/nixos/roles/postgres-default/default.nix (2)

98-172: Well-designed reusable generator function.

The mkPostgresDbSetup function is well-structured with clear parameter documentation. The dollar-quoting approach ($securepass$...$securepass$) for SQL password injection is a good security practice.

Minor note: The combination of Type = "oneshot", RemainAfterExit = true, and Restart = "on-failure" means the service will only restart if ExecStart fails. Once successful, it stays in "active" state and won't re-run on subsequent boots (which is likely the intended idempotent behavior).


183-189: Clean compact option declarations.

The refactored single-line option declarations improve readability while maintaining clarity.

Comment thread LxCheatsheet.md Outdated
Comment on lines +268 to +283
(mkPostgresDbSetup {
name = "endoreg-local";
dbUser = cfg.defaultDbName;
passwordFileSource = "/etc/secrets/vault/SCRT_local_password_maintenance_password";
passwordFileDest = "/var/lib/postgresql/endoregDbLocal.password";
serviceName = "postgres-endoreg-setup";
aliases = [ "postgres-setup-endoreg-local.service" ];
})
(mkPostgresDbSetup {
name = "datahub-local";
dbUser = "datahubUser";
passwordFileSource = "/etc/secrets/vault/SCRT_local_password_maintenance_password";
passwordFileDest = "/var/lib/postgresql/datahub-local.password";
serviceName = "postgres-datahub-setup";
aliases = [ "postgres-setup-datahub-local.service" ];
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Security: Both database users share the same password source.

endoreg-local and datahub-local both use passwordFileSource = "/etc/secrets/vault/SCRT_local_password_maintenance_password". This means endoregDbLocal and datahubUser will have identical passwords.

This violates the principle of unique credentials per user/service. If one password is compromised, both database accounts are affected.

🔎 Suggested fix: Use separate password files
     (mkPostgresDbSetup {
       name = "endoreg-local";
       dbUser = cfg.defaultDbName;
       passwordFileSource = "/etc/secrets/vault/SCRT_local_password_maintenance_password";
       passwordFileDest = "/var/lib/postgresql/endoregDbLocal.password";
       serviceName = "postgres-endoreg-setup";
       aliases = [ "postgres-setup-endoreg-local.service" ];
     })
     (mkPostgresDbSetup {
       name = "datahub-local";
       dbUser = "datahubUser";
-      passwordFileSource = "/etc/secrets/vault/SCRT_local_password_maintenance_password";
+      passwordFileSource = "/etc/secrets/vault/SCRT_datahub_password";
       passwordFileDest = "/var/lib/postgresql/datahub-local.password";
       serviceName = "postgres-datahub-setup";
       aliases = [ "postgres-setup-datahub-local.service" ];
     })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
(mkPostgresDbSetup {
name = "endoreg-local";
dbUser = cfg.defaultDbName;
passwordFileSource = "/etc/secrets/vault/SCRT_local_password_maintenance_password";
passwordFileDest = "/var/lib/postgresql/endoregDbLocal.password";
serviceName = "postgres-endoreg-setup";
aliases = [ "postgres-setup-endoreg-local.service" ];
})
(mkPostgresDbSetup {
name = "datahub-local";
dbUser = "datahubUser";
passwordFileSource = "/etc/secrets/vault/SCRT_local_password_maintenance_password";
passwordFileDest = "/var/lib/postgresql/datahub-local.password";
serviceName = "postgres-datahub-setup";
aliases = [ "postgres-setup-datahub-local.service" ];
})
(mkPostgresDbSetup {
name = "endoreg-local";
dbUser = cfg.defaultDbName;
passwordFileSource = "/etc/secrets/vault/SCRT_local_password_maintenance_password";
passwordFileDest = "/var/lib/postgresql/endoregDbLocal.password";
serviceName = "postgres-endoreg-setup";
aliases = [ "postgres-setup-endoreg-local.service" ];
})
(mkPostgresDbSetup {
name = "datahub-local";
dbUser = "datahubUser";
passwordFileSource = "/etc/secrets/vault/SCRT_datahub_password";
passwordFileDest = "/var/lib/postgresql/datahub-local.password";
serviceName = "postgres-datahub-setup";
aliases = [ "postgres-setup-datahub-local.service" ];
})
🤖 Prompt for AI Agents
modules/nixos/roles/postgres-default/default.nix around lines 268 to 283: both
mkPostgresDbSetup blocks point to the same passwordFileSource, creating
identical credentials; change one setup to reference a distinct secret path
(e.g. create a new secret file in /etc/secrets/vault like
SCRT_local_password_datahub_password or similar), update the passwordFileSource
for the datahub-local block to that new path, ensure the corresponding secret is
provisioned with correct permissions and the service unit is reloaded/restarted
so each DB user has a unique password.

Comment thread modules/nixos/roles/postgres-default/setup-user.nix Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
LxCheatsheet.md (1)

112-122: Clarify the arrow notation on line 116.

The arrow notation ("-> Builds nix system configs") is somewhat informal and could be ambiguous. Consider rephrasing to more explicitly describe the relationship between running autoconf and nix system config generation—e.g., "This step generates nix system configs" or "Prerequisite: Builds nix system configs".

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e02404f and 37f688e.

📒 Files selected for processing (1)
  • LxCheatsheet.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-06T08:18:11.713Z
Learnt from: Maddonix
Repo: wg-lux/luxnix PR: 114
File: systems/x86_64-linux/gc-08/default.nix:141-146
Timestamp: 2025-08-06T08:18:11.713Z
Learning: The default.nix files in systems/x86_64-linux/*/ directories are automatically generated via script as a result of editing ansible inventory variables, not manually maintained files.

Applied to files:

  • LxCheatsheet.md
🔇 Additional comments (3)
LxCheatsheet.md (3)

3-3: Typo corrected: "sytem" → "system".

Good catch addressing the spelling error from the previous review.


31-32: Persistence note improves user guidance.

The newly added note explaining that changes to LuxNix systems/ need to be persisted into actual nix config files is valuable context for users working with the ansible/nix integration.


86-110: New Devenv Tasks and Database sections align well with PR objectives.

The expanded documentation sections properly introduce the new PostgreSQL setup workflow, with the Database section specifically covering endoreg-db initialization, migration, and full setup tasks. This aligns well with the PR's focus on generalized PostgreSQL user/database setup. The task references are clear and actionable.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
modules/nixos/luxnix/maintenance/audo-update/default.nix (1)

1-56: Consider fixing the directory name typo: "audo-update" → "auto-update".

The directory path contains "audo-update" which is a misspelling of "auto-update". No references to this directory name were found in the codebase, making it safe to rename for improved clarity and maintainability.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37f688e and 959b0da.

⛔ Files ignored due to path filters (2)
  • ansible/inventory/group_vars/gpu_client.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • ansible/inventory/group_vars/gpu_server.yml is excluded by !**/*.{bin,csv,yaml,yml}
📒 Files selected for processing (10)
  • modules/nixos/luxnix/maintenance/audo-update/default.nix
  • systems/x86_64-linux/gc-02/default.nix
  • systems/x86_64-linux/gc-04/default.nix
  • systems/x86_64-linux/gc-05/default.nix
  • systems/x86_64-linux/gc-07/default.nix
  • systems/x86_64-linux/gc-08/default.nix
  • systems/x86_64-linux/gc-09/default.nix
  • systems/x86_64-linux/gc-10/default.nix
  • systems/x86_64-linux/gs-01/default.nix
  • systems/x86_64-linux/gs-02/default.nix
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Maddonix
Repo: wg-lux/luxnix PR: 114
File: systems/x86_64-linux/gc-08/default.nix:141-146
Timestamp: 2025-08-06T08:18:11.713Z
Learning: The default.nix files in systems/x86_64-linux/*/ directories are automatically generated via script as a result of editing ansible inventory variables, not manually maintained files.
📚 Learning: 2025-08-06T08:18:11.713Z
Learnt from: Maddonix
Repo: wg-lux/luxnix PR: 114
File: systems/x86_64-linux/gc-08/default.nix:141-146
Timestamp: 2025-08-06T08:18:11.713Z
Learning: The default.nix files in systems/x86_64-linux/*/ directories are automatically generated via script as a result of editing ansible inventory variables, not manually maintained files.

Applied to files:

  • systems/x86_64-linux/gc-07/default.nix
  • systems/x86_64-linux/gc-02/default.nix
  • systems/x86_64-linux/gc-10/default.nix
  • systems/x86_64-linux/gs-02/default.nix
  • systems/x86_64-linux/gc-04/default.nix
  • systems/x86_64-linux/gc-05/default.nix
  • systems/x86_64-linux/gc-09/default.nix
  • systems/x86_64-linux/gs-01/default.nix
  • modules/nixos/luxnix/maintenance/audo-update/default.nix
🔇 Additional comments (10)
systems/x86_64-linux/gc-09/default.nix (1)

182-182: Automatic updates disabled as temporary measure.

This change aligns with the commit message "disable autoupdate for now," suggesting this is a temporary configuration. Consider documenting the conditions or timeline for re-enabling automatic updates to prevent this from being overlooked.

Based on learnings, this file is auto-generated from ansible inventory variables.

systems/x86_64-linux/gc-08/default.nix (1)

185-185: LGTM - consistent with temporary autoupdate disable.

This change matches the pattern across other gc-* systems in this PR.

systems/x86_64-linux/gc-05/default.nix (1)

186-186: LGTM - consistent with temporary autoupdate disable.

This change matches the pattern across other gc-* systems in this PR.

systems/x86_64-linux/gc-10/default.nix (1)

188-188: LGTM - consistent with temporary autoupdate disable.

This change matches the pattern across other gc-* systems in this PR.

systems/x86_64-linux/gc-02/default.nix (1)

185-185: LGTM - consistent with temporary autoupdate disable.

This change matches the pattern across other gc-* systems in this PR.

systems/x86_64-linux/gc-04/default.nix (1)

183-183: LGTM: Auto-updates disabled as intended.

This change disables automatic maintenance updates, aligning with the commit message "disable autoupdate for now". Based on learnings, this file is auto-generated from ansible inventory variables.

systems/x86_64-linux/gc-07/default.nix (1)

182-182: LGTM: Auto-updates disabled as intended.

This change disables automatic maintenance updates, consistent with the commit message and other systems in this PR. Based on learnings, this file is auto-generated from ansible inventory variables.

systems/x86_64-linux/gs-02/default.nix (1)

182-184: LGTM: Auto-updates disabled and flake source updated.

These changes disable automatic maintenance updates and update the flake source to the datahub branch, which aligns with the PR's source branch. Based on learnings, this file is auto-generated from ansible inventory variables.

systems/x86_64-linux/gs-01/default.nix (1)

182-184: LGTM: Auto-updates disabled and flake source updated.

These changes disable automatic maintenance updates and update the flake source to the datahub branch, which aligns with the PR's source branch. Based on learnings, this file is auto-generated from ansible inventory variables.

modules/nixos/luxnix/maintenance/audo-update/default.nix (1)

31-31: LGTM! Comment cleanup.

Removing the TODO-style comment while keeping the default value unchanged is a clean-up improvement with no functional impact.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
systems/x86_64-linux/gc-05/default.nix (1)

186-186: Automatic updates disabled - verify operational impact.

Automatic system updates have been disabled for gc-05. According to the AI summary, this change affects multiple gc-XX systems.

Please confirm:

  • Is this change intentional and permanent?
  • What is the rationale for disabling auto-updates?
  • What alternative update mechanism will be used to ensure timely security patches?
  • Are there documented procedures for manual updates?

Disabling automatic updates can impact the security posture and operational maintenance overhead of the system.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 959b0da and 853a84b.

⛔ Files ignored due to path filters (3)
  • ansible/inventory/group_vars/all.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • ansible/inventory/group_vars/core_dev_ssh_access.yml is excluded by !**/*.{bin,csv,yaml,yml}
  • ansible/roles/dev_access/vars/main.yml is excluded by !**/*.{bin,csv,yaml,yml}
📒 Files selected for processing (6)
  • systems/x86_64-linux/gc-04/default.nix
  • systems/x86_64-linux/gc-05/default.nix
  • systems/x86_64-linux/gc-10/default.nix
  • systems/x86_64-linux/gs-01/default.nix
  • systems/x86_64-linux/gs-02/default.nix
  • systems/x86_64-linux/s-04/default.nix
🚧 Files skipped from review as they are similar to previous changes (2)
  • systems/x86_64-linux/gc-10/default.nix
  • systems/x86_64-linux/gc-04/default.nix
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-06T08:18:11.713Z
Learnt from: Maddonix
Repo: wg-lux/luxnix PR: 114
File: systems/x86_64-linux/gc-08/default.nix:141-146
Timestamp: 2025-08-06T08:18:11.713Z
Learning: The default.nix files in systems/x86_64-linux/*/ directories are automatically generated via script as a result of editing ansible inventory variables, not manually maintained files.

Applied to files:

  • systems/x86_64-linux/gs-01/default.nix
  • systems/x86_64-linux/gs-02/default.nix
  • systems/x86_64-linux/gc-05/default.nix
🔇 Additional comments (7)
systems/x86_64-linux/gc-05/default.nix (2)

33-33: SSH key updated for dev-03.

The SSH public key for dev-03 has been changed. Since this file is auto-generated from ansible inventory (based on learnings), ensure the corresponding private key is properly secured and that dev-03 can successfully authenticate with the new key.

Based on learnings, this file is auto-generated from ansible inventory variables.


1-228: No PostgreSQL changes detected in this file.

The PR title indicates "New setup for postgres users" and the AI summary mentions adding mkPostgresDbSetup, but this file only shows:

  1. SSH key update for dev-03 (line 33)
  2. Auto-updates disabled (line 186)

No PostgreSQL user setup or related changes are visible in gc-05/default.nix. Please verify:

  • Are the PostgreSQL changes in other files not included in this review?
  • Or is this file included in the PR erroneously?
systems/x86_64-linux/gs-01/default.nix (2)

34-34: SSH key rotation verified.

This change is consistent with the SSH key update for dev-03 across multiple systems.


182-184: This configuration is intentional and correct—no action needed.

gs-01 and s-04 have different maintenance settings because they belong to different Ansible groups: gs-01 is in [gpu_server] while s-04 is in [base_server]. These groups intentionally have different configurations. The gpu_server group is configured to have updates disabled and use the datahub branch, while base_server has updates enabled and uses the main branch. This is expected behavior based on the Ansible inventory structure and is not an inconsistency or security concern.

Likely an incorrect or invalid review comment.

systems/x86_64-linux/gs-02/default.nix (2)

34-34: SSH key rotation verified.

This change is consistent with the SSH key update for dev-03 across multiple systems.


182-184: No action required — this configuration is auto-generated and intentional.

These files are automatically generated from Ansible inventory configuration, not manually maintained. The gs-01 and gs-02 systems both belong to the gpu_server group in the Ansible inventory, which explicitly configures maintenance.autoUpdates.enable: false and maintenance.autoUpdates.flake: "github:wg-lux/luxnix/datahub". This is intentional group-level configuration, not a concern requiring manual documentation. To modify this behavior, update the Ansible inventory group variables, not the generated .nix files.

Likely an incorrect or invalid review comment.

systems/x86_64-linux/s-04/default.nix (1)

43-43: SSH key rotation for dev-03 is complete and consistent across all systems.

The new key is properly distributed to all system configurations (s-04, gs-02, gs-01, gc-10, gc-05, gc-04), and no old dev-03 keys remain in the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants