Skip to content

Commit 74a58b5

Browse files
staaldraadsamrose
authored andcommitted
chore: add overlay
1 parent 7f2fd90 commit 74a58b5

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

ansible/tasks/setup-postgres.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,21 @@
139139
group: postgres
140140
when: debpkg_mode or nixpkg_mode
141141

142+
- name: Check if psql_version is psql_15
143+
set_fact:
144+
is_psql_15: "{{ psql_version in ['psql_15'] }}"
145+
146+
- name: create placeholder pam config
147+
file:
148+
path: '/etc/pam.d/{{ item }}'
149+
state: touch
150+
owner: postgres
151+
group: postgres
152+
mode: 0664
153+
with_items:
154+
- 'postgresql'
155+
when: (debpkg_mode or nixpkg_mode) and not is_psql_15
156+
142157
# Add pg_hba.conf
143158
- name: import pg_hba.conf
144159
template:

nix/overlays/default.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,14 @@
5252
buildPgrxExtension_0_14_3 = prev.buildPgrxExtension.override {
5353
cargo-pgrx = final.cargo-pgrx.cargo-pgrx_0_14_3;
5454
};
55+
56+
# place the gatekeeper module in the expected libpam location
57+
gatekeeper = self.inputs.gatekeeper.packages.${final.system}.default;
58+
linux-pam = prev.linux-pam.overrideAttrs (old: {
59+
postInstall = (old.postInstall or "") + ''
60+
mkdir -p $out/lib/security
61+
cp ${final.gatekeeper}/lib/security/pam_jwt_pg.so $out/lib/security/
62+
'';
63+
});
5564
};
5665
}

0 commit comments

Comments
 (0)