Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
ec51278987 | |||
1250683996 | |||
bbb7548659 | |||
8216088c46 | |||
d05d353ee7 |
32
flake.lock
generated
32
flake.lock
generated
@ -8,11 +8,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722339003,
|
||||
"narHash": "sha256-ZeS51uJI30ehNkcZ4uKqT4ZDARPyqrHADSKAwv5vVCU=",
|
||||
"lastModified": 1723293904,
|
||||
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "3f1dae074a12feb7327b4bf43cbac0d124488bb7",
|
||||
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -388,11 +388,11 @@
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1723149858,
|
||||
"narHash": "sha256-3u51s7jdhavmEL1ggtd8wqrTH2clTy5yaZmhLvAXTqc=",
|
||||
"lastModified": 1723310128,
|
||||
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "107bb46eef1f05e86fc485ee8af9b637e5157988",
|
||||
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -459,11 +459,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1722813957,
|
||||
"narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=",
|
||||
"lastModified": 1723175592,
|
||||
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa",
|
||||
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -490,11 +490,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1722987190,
|
||||
"narHash": "sha256-68hmex5efCiM2aZlAAEcQgmFI4ZwWt8a80vOeB/5w3A=",
|
||||
"lastModified": 1723282977,
|
||||
"narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "21cc704b5e918c5fbf4f9fff22b4ac2681706d90",
|
||||
"rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -576,11 +576,11 @@
|
||||
"secrets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1722712220,
|
||||
"narHash": "sha256-gEmbk/DROfVZ+v/BAZHDloHzS0KdqIzxtW7z9g2eH4Y=",
|
||||
"lastModified": 1723385164,
|
||||
"narHash": "sha256-/z4nBwpHsGWl1gmGv7FQQgoOcPwUaVzL7rfjI5nTOLg=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "dfe0e95be5ef539bf28602ff47beeea26cc4d1b8",
|
||||
"revCount": 22,
|
||||
"rev": "b47efe67031e12a2d5560b94fdb4de7dca3df80c",
|
||||
"revCount": 24,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||
},
|
||||
|
@ -6,7 +6,7 @@
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(import ../overlays/gnome.nix)
|
||||
(import ../overlays/gnome)
|
||||
];
|
||||
|
||||
services.printing.enable = true;
|
||||
|
@ -55,7 +55,7 @@
|
||||
'';
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(import ./../../overlays/libcamera.nix)
|
||||
(import ./../../overlays/libcamera)
|
||||
];
|
||||
|
||||
networking = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, ... }:
|
||||
{ config, lib, self, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -41,6 +41,90 @@
|
||||
|
||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
||||
|
||||
services.postgresql = {
|
||||
ensureUsers = [
|
||||
{
|
||||
name = "zitadel";
|
||||
ensureDBOwnership = true;
|
||||
ensureClauses = {
|
||||
superuser = true;
|
||||
};
|
||||
}
|
||||
];
|
||||
ensureDatabases = [ "zitadel" ];
|
||||
};
|
||||
|
||||
age.secrets."files/services/zitadel/masterkey" = {
|
||||
file = "${self.inputs.secrets}/files/services/zitadel/masterkey.age";
|
||||
owner = "zitadel";
|
||||
group = "zitadel";
|
||||
};
|
||||
|
||||
systemd.services.zitadel = {
|
||||
requires = [ "postgresql.service" ];
|
||||
after = [ "postgresql.service" ];
|
||||
};
|
||||
|
||||
services.zitadel = {
|
||||
enable = true;
|
||||
masterKeyFile = config.age.secrets."files/services/zitadel/masterkey".path;
|
||||
settings = {
|
||||
Database.postgres = {
|
||||
Host = "/run/postgresql";
|
||||
Port = 5432;
|
||||
Database = "zitadel";
|
||||
User = {
|
||||
Username = "zitadel";
|
||||
SSL.Mode = "disable";
|
||||
};
|
||||
Admin = {
|
||||
ExistingDatabase = "zitadel";
|
||||
Username = "zitadel";
|
||||
SSL.Mode = "disable";
|
||||
};
|
||||
};
|
||||
ExternalDomain = "id.vimium.com";
|
||||
ExternalPort = 443;
|
||||
ExternalSecure = true;
|
||||
Machine = {
|
||||
Identification = {
|
||||
Hostname.Enabled = true;
|
||||
PrivateIp.Enabled = false;
|
||||
Webhook.Enabled = false;
|
||||
};
|
||||
};
|
||||
Port = 8081;
|
||||
WebAuthNName = "Vimium";
|
||||
};
|
||||
steps.FirstInstance = {
|
||||
InstanceName = "Vimium";
|
||||
Org.Name = "Vimium";
|
||||
Org.Human = {
|
||||
UserName = "jordan@vimium.com";
|
||||
FirstName = "Jordan";
|
||||
LastName = "Holt";
|
||||
Email = {
|
||||
Address = "jordan@vimium.com";
|
||||
Verified = true;
|
||||
};
|
||||
Password = "Password1!";
|
||||
PasswordChangeRequired = true;
|
||||
};
|
||||
LoginPolicy.AllowRegister = false;
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."id.vimium.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
grpc_pass grpc://localhost:${builtins.toString config.services.zitadel.settings.Port};
|
||||
grpc_set_header Host $host:$server_port;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
modules = rec {
|
||||
databases.postgresql.enable = true;
|
||||
services = {
|
||||
|
@ -17,6 +17,7 @@ in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
enableJIT = true;
|
||||
initdbArgs = [
|
||||
"--allow-group-access"
|
||||
"--encoding=UTF8"
|
||||
|
Loading…
x
Reference in New Issue
Block a user