Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
ec51278987
|
|||
1250683996
|
|||
bbb7548659
|
|||
8216088c46
|
|||
d05d353ee7
|
80
flake.lock
generated
80
flake.lock
generated
@ -66,11 +66,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727447169,
|
"lastModified": 1718194053,
|
||||||
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=",
|
"narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "deploy-rs",
|
"repo": "deploy-rs",
|
||||||
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76",
|
"rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -107,11 +107,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727359191,
|
"lastModified": 1723080788,
|
||||||
"narHash": "sha256-5PltTychnExFwzpEnY3WhOywaMV/M6NxYI/y3oXuUtw=",
|
"narHash": "sha256-C5LbM5VMdcolt9zHeLQ0bYMRjUL+N+AL5pK7/tVTdes=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "67dc29be3036cc888f0b9d4f0a788ee0f6768700",
|
"rev": "ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -206,11 +206,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725234343,
|
"lastModified": 1722555600,
|
||||||
"narHash": "sha256-+ebgonl3NbiKD2UD0x4BszCZQ6sTfL4xioaM49o5B3Y=",
|
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "567b938d64d4b4112ee253b9274472dc3a346eb6",
|
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -233,11 +233,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724857454,
|
"lastModified": 1722857853,
|
||||||
"narHash": "sha256-Qyl9Q4QMTLZnnBb/8OuQ9LSkzWjBU1T5l5zIzTxkkhk=",
|
"narHash": "sha256-3Zx53oz/MSIyevuWO/SumxABkrIvojnB7g9cimxkhiE=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "4509ca64f1084e73bc7a721b20c669a8d4c5ebe6",
|
"rev": "06939f6b7ec4d4f465bf3132a05367cccbbf64da",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -313,11 +313,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726989464,
|
"lastModified": 1720042825,
|
||||||
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
|
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
|
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -373,11 +373,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725189302,
|
"lastModified": 1722924007,
|
||||||
"narHash": "sha256-IhXok/kwQqtusPsoguQLCHA+h6gKvgdCrkhIaN+kByA=",
|
"narHash": "sha256-+CQDamNwqO33REJLft8c26NbUi2Td083hq6SvAm2xkU=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "7c4b53a7d9f3a3df902b3fddf2ae245ef20ebcda",
|
"rev": "91010a5613ffd7ee23ee9263213157a1c422b705",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -388,11 +388,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727437159,
|
"lastModified": 1723310128,
|
||||||
"narHash": "sha256-v4qLwEw5OmprgQZTT7KZMNU7JjXJzRypw8+Cw6++fWk=",
|
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "d830ad47cc992b4a46b342bbc79694cbd0e980b2",
|
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -459,11 +459,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727122398,
|
"lastModified": 1723175592,
|
||||||
"narHash": "sha256-o8VBeCWHBxGd4kVMceIayf5GApqTavJbTa44Xcg5Rrk=",
|
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "30439d93eb8b19861ccbe3e581abf97bdc91b093",
|
"rev": "5e0ca22929f3342b19569b21b2f3462f053e497b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -490,11 +490,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727264057,
|
"lastModified": 1723282977,
|
||||||
"narHash": "sha256-KQPI8CTTnB9CrJ7LrmLC4VWbKZfljEPBXOFGZFRpxao=",
|
"narHash": "sha256-oTK91aOlA/4IsjNAZGMEBz7Sq1zBS0Ltu4/nIQdYDOg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "759537f06e6999e141588ff1c9be7f3a5c060106",
|
"rev": "a781ff33ae258bbcfd4ed6e673860c3e923bf2cc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -517,11 +517,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725350106,
|
"lastModified": 1722925293,
|
||||||
"narHash": "sha256-TaMMlI2KPJ3wCyxJk6AShOLhNuTeabHCnvYRkLBlEFs=",
|
"narHash": "sha256-saXm5dd/e3PMsYTEcp1Qbzifm3KsZtNFkrWjmLhXHGE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "0f2c31e6a57a83ed4e6fa3adc76749620231055d",
|
"rev": "170df9814c3e41d5a4d6e3339e611801b1f02ce2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -541,11 +541,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727210241,
|
"lastModified": 1723232379,
|
||||||
"narHash": "sha256-lufS6uzSbSrggNCSgubymMQWnQMh7PvQ+lRZ8qH9Uoc=",
|
"narHash": "sha256-F4Y3f9305aHGWKqAd3s2GyNRONdpDBuNuK4TCSdaHz8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "plasma-manager",
|
"repo": "plasma-manager",
|
||||||
"rev": "a02fef2ece8084aff0b41700bb57d24d73574cd1",
|
"rev": "22bea90404c5ff6457913a03c1a54a3caa5b1c57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -576,11 +576,11 @@
|
|||||||
"secrets": {
|
"secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724093899,
|
"lastModified": 1723385164,
|
||||||
"narHash": "sha256-VohYwTIBq7NEssFibuu+HMXXwuCoLmMOmEwQf7sESSI=",
|
"narHash": "sha256-/z4nBwpHsGWl1gmGv7FQQgoOcPwUaVzL7rfjI5nTOLg=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "7f5901bb5d6eeaa94d7e1f18f66093be9df014e4",
|
"rev": "b47efe67031e12a2d5560b94fdb4de7dca3df80c",
|
||||||
"revCount": 27,
|
"revCount": 24,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||||
},
|
},
|
||||||
@ -658,11 +658,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724833132,
|
"lastModified": 1722330636,
|
||||||
"narHash": "sha256-F4djBvyNRAXGusJiNYInqR6zIMI3rvlp6WiKwsRISos=",
|
"narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "3ffd842a5f50f435d3e603312eefa4790db46af5",
|
"rev": "768acdb06968e53aa1ee8de207fd955335c754b7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -112,12 +112,7 @@
|
|||||||
magicRollback = true;
|
magicRollback = true;
|
||||||
autoRollback = true;
|
autoRollback = true;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
nodes = lib.genAttrs [
|
nodes = lib.genAttrs [ "mail" "pi" "skycam" "vps1" ] mkDeployNode;
|
||||||
"mail"
|
|
||||||
# "pi"
|
|
||||||
# "skycam"
|
|
||||||
"vps1"
|
|
||||||
] mkDeployNode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) inputs.deploy-rs.lib;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(import ../overlays/gnome.nix)
|
(import ../overlays/gnome)
|
||||||
];
|
];
|
||||||
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
@ -7,12 +7,11 @@
|
|||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
|
initrd.kernelModules = [ ];
|
||||||
initrd.supportedFilesystems = [ "zfs" ];
|
initrd.supportedFilesystems = [ "zfs" ];
|
||||||
kernel.sysctl = {
|
kernelModules = [ ];
|
||||||
"kernel.nmi_watchdog" = 0;
|
|
||||||
"vm.laptop_mode" = 5;
|
|
||||||
};
|
|
||||||
kernelParams = [ "elevator=none" ];
|
kernelParams = [ "elevator=none" ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
supportedFilesystems = [ "zfs" ];
|
supportedFilesystems = [ "zfs" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7,10 +7,6 @@
|
|||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
kernel.sysctl = {
|
|
||||||
"kernel.nmi_watchdog" = 0;
|
|
||||||
"vm.laptop_mode" = 5;
|
|
||||||
};
|
|
||||||
kernelModules = [ "applesmc" "kvm-intel" "wl" ];
|
kernelModules = [ "applesmc" "kvm-intel" "wl" ];
|
||||||
extraModulePackages = [
|
extraModulePackages = [
|
||||||
config.boot.kernelPackages.broadcom_sta
|
config.boot.kernelPackages.broadcom_sta
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(import ./../../overlays/libcamera.nix)
|
(import ./../../overlays/libcamera)
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, self, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@ -37,44 +37,91 @@
|
|||||||
groups = {
|
groups = {
|
||||||
jellyfin = { };
|
jellyfin = { };
|
||||||
};
|
};
|
||||||
extraGroups.acme.members = [ "kanidm" "nginx" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
||||||
|
|
||||||
security.acme.certs."auth.vimium.com" = {
|
services.postgresql = {
|
||||||
postRun = "systemctl restart kanidm.service";
|
ensureUsers = [
|
||||||
group = "acme";
|
{
|
||||||
|
name = "zitadel";
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
ensureClauses = {
|
||||||
|
superuser = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
ensureDatabases = [ "zitadel" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.kanidm = let
|
age.secrets."files/services/zitadel/masterkey" = {
|
||||||
baseDomain = "vimium.com";
|
file = "${self.inputs.secrets}/files/services/zitadel/masterkey.age";
|
||||||
domain = "auth.${baseDomain}";
|
owner = "zitadel";
|
||||||
uri = "https://${domain}";
|
group = "zitadel";
|
||||||
in {
|
|
||||||
package = pkgs.unstable.kanidm;
|
|
||||||
enableClient = true;
|
|
||||||
enableServer = true;
|
|
||||||
clientSettings = {
|
|
||||||
inherit uri;
|
|
||||||
};
|
|
||||||
serverSettings = {
|
|
||||||
bindaddress = "[::1]:3013";
|
|
||||||
ldapbindaddress = "[::1]:636";
|
|
||||||
domain = baseDomain;
|
|
||||||
origin = uri;
|
|
||||||
tls_chain = "${config.security.acme.certs.${domain}.directory}/full.pem";
|
|
||||||
tls_key = "${config.security.acme.certs.${domain}.directory}/key.pem";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
systemd.services.zitadel = {
|
||||||
"auth.vimium.com" = {
|
requires = [ "postgresql.service" ];
|
||||||
useACMEHost = "auth.vimium.com";
|
after = [ "postgresql.service" ];
|
||||||
forceSSL = true;
|
};
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "https://[::1]:3013";
|
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;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ in {
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableJIT = true;
|
||||||
initdbArgs = [
|
initdbArgs = [
|
||||||
"--allow-group-access"
|
"--allow-group-access"
|
||||||
"--encoding=UTF8"
|
"--encoding=UTF8"
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
./editors/neovim
|
./editors/neovim
|
||||||
./editors/vscode.nix
|
./editors/vscode.nix
|
||||||
./hardware/presonus-studio.nix
|
./hardware/presonus-studio.nix
|
||||||
./networking/netbird.nix
|
|
||||||
./networking/tailscale.nix
|
./networking/tailscale.nix
|
||||||
./networking/wireless.nix
|
./networking/wireless.nix
|
||||||
./security/gpg.nix
|
./security/gpg.nix
|
||||||
@ -43,7 +42,6 @@
|
|||||||
./services/gitea
|
./services/gitea
|
||||||
./services/gitea-runner
|
./services/gitea-runner
|
||||||
./services/headscale
|
./services/headscale
|
||||||
./services/immich
|
|
||||||
./services/mail
|
./services/mail
|
||||||
./services/matrix
|
./services/matrix
|
||||||
./services/nginx
|
./services/nginx
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
{ config, lib, self, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.modules.networking.netbird;
|
|
||||||
hostname = config.networking.hostName;
|
|
||||||
in {
|
|
||||||
options.modules.networking.netbird = {
|
|
||||||
enable = lib.mkEnableOption "netbird";
|
|
||||||
coordinatorDomain = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "netbird.vimium.net";
|
|
||||||
};
|
|
||||||
meshDomain = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "mesh.vimium.net";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
age.secrets."passwords/services/netbird/data-store-encryption-key" = {
|
|
||||||
file = "${self.inputs.secrets}/passwords/services/netbird/data-store-encryption-key.age";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.netbird = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.netbird.server = {
|
|
||||||
domain = cfg.coordinatorDomain;
|
|
||||||
enable = true;
|
|
||||||
enableNginx = true;
|
|
||||||
dashboard.settings = {
|
|
||||||
AUTH_AUTHORITY = "https://auth.vimium.com/oauth2/openid/netbird";
|
|
||||||
};
|
|
||||||
management = rec {
|
|
||||||
disableAnonymousMetrics = true;
|
|
||||||
dnsDomain = cfg.meshDomain;
|
|
||||||
oidcConfigEndpoint = "https://auth.vimium.com/oauth2/openid/netbird/.well-known/openid-configuration";
|
|
||||||
settings = {
|
|
||||||
DataStoreEncryptionKey = {
|
|
||||||
_secret = config.age.secrets."passwords/services/netbird/data-store-encryption-key".path;
|
|
||||||
};
|
|
||||||
HttpConfig = {
|
|
||||||
AuthAudience = "netbird";
|
|
||||||
};
|
|
||||||
StoreConfig = { Engine = "sqlite"; };
|
|
||||||
TURNConfig = {
|
|
||||||
Secret._secret = config.age.secrets."passwords/services/coturn/static-auth-secret".path;
|
|
||||||
TimeBasedCredentials = true;
|
|
||||||
};
|
|
||||||
PKCEAuthorizationFlow.ProviderConfig = {
|
|
||||||
AuthorizationEndpoint = "https://auth.vimium.com/ui/oauth2";
|
|
||||||
TokenEndpoint = "https://auth.vimium.com/oauth2/token";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
singleAccountModeDomain = dnsDomain;
|
|
||||||
turnDomain = config.services.coturn.realm;
|
|
||||||
turnPort = config.services.coturn.listening-port;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.netbird-signal.serviceConfig.RestartSec = "60";
|
|
||||||
systemd.services.netbird-management.serviceConfig.RestartSec = "60";
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."netbird.vimium.net" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,17 +1,19 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.services.headscale;
|
cfg = config.modules.services.headscale;
|
||||||
fqdn = "headscale.vimium.net";
|
fqdn = "headscale.vimium.net";
|
||||||
in {
|
in {
|
||||||
options.modules.services.headscale = {
|
options.modules.services.headscale = {
|
||||||
enable = lib.mkOption {
|
enable = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
example = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.headscale ];
|
environment.systemPackages = [ pkgs.headscale ];
|
||||||
|
|
||||||
services.headscale = {
|
services.headscale = {
|
||||||
@ -20,16 +22,10 @@ in {
|
|||||||
port = 8080;
|
port = 8080;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
acl_policy_path = null;
|
|
||||||
ip_prefixes = [
|
ip_prefixes = [
|
||||||
"100.64.0.0/10"
|
"100.64.0.0/10"
|
||||||
];
|
];
|
||||||
server_url = "https://${fqdn}";
|
server_url = "https://${fqdn}";
|
||||||
derp = {
|
|
||||||
auto_update_enable = false;
|
|
||||||
update_frequency = "24h";
|
|
||||||
urls = [];
|
|
||||||
};
|
|
||||||
dns_config = {
|
dns_config = {
|
||||||
base_domain = "vimium.net";
|
base_domain = "vimium.net";
|
||||||
extra_records = [
|
extra_records = [
|
||||||
@ -44,10 +40,6 @@ in {
|
|||||||
value = "100.64.0.7";
|
value = "100.64.0.7";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
magic_dns = true;
|
|
||||||
nameservers = [
|
|
||||||
"9.9.9.9"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
logtail.enabled = false;
|
logtail.enabled = false;
|
||||||
};
|
};
|
||||||
|
@ -1,54 +0,0 @@
|
|||||||
{ config, lib, self, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let cfg = config.modules.services.immich;
|
|
||||||
in {
|
|
||||||
options.modules.services.immich = {
|
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
example = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
services.nginx = {
|
|
||||||
virtualHosts = {
|
|
||||||
"gallery.vimium.com" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:${toString config.services.immich.port}";
|
|
||||||
extraConfig = ''
|
|
||||||
client_max_body_size 50000M;
|
|
||||||
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_redirect off;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
|
|
||||||
proxy_read_timeout 600s;
|
|
||||||
proxy_send_timeout 600s;
|
|
||||||
send_timeout 600s;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
age.secrets."files/services/immich/envfile" = {
|
|
||||||
file = "${self.inputs.secrets}/files/services/immich/envfile.age";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.immich = {
|
|
||||||
enable = true;
|
|
||||||
secretsFile = config.age.secrets."files/services/immich/envfile".path;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -171,11 +171,6 @@ in {
|
|||||||
};
|
};
|
||||||
} else {});
|
} else {});
|
||||||
|
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
|
||||||
"jitsi-meet-1.0.8043"
|
|
||||||
"olm-3.2.16"
|
|
||||||
];
|
|
||||||
|
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableRegistrationScript = true;
|
enableRegistrationScript = true;
|
||||||
|
@ -118,12 +118,8 @@ in {
|
|||||||
serverAliases = [ "www.jdholt.com" ];
|
serverAliases = [ "www.jdholt.com" ];
|
||||||
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
|
extraConfig = nginxErrorPages + nginxEdgeHeaders + nginxStrictHeaders;
|
||||||
locations."/skycam/snapshot.jpg" = {
|
locations."/skycam/snapshot.jpg" = {
|
||||||
|
proxyPass = "http://skycam.mesh.vimium.net:8080/snapshot";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set $backend "skycam.mesh.vimium.net:8080";
|
|
||||||
|
|
||||||
resolver 100.100.100.100;
|
|
||||||
|
|
||||||
proxy_pass http://$backend/snapshot;
|
|
||||||
proxy_cache skycam_cache;
|
proxy_cache skycam_cache;
|
||||||
proxy_cache_valid any 10s;
|
proxy_cache_valid any 10s;
|
||||||
proxy_ignore_headers Cache-Control Expires Set-Cookie;
|
proxy_ignore_headers Cache-Control Expires Set-Cookie;
|
||||||
|
@ -4,7 +4,7 @@ final: prev:
|
|||||||
mutter = gsuper.mutter.overrideAttrs (oldAttrs: {
|
mutter = gsuper.mutter.overrideAttrs (oldAttrs: {
|
||||||
src = prev.fetchurl {
|
src = prev.fetchurl {
|
||||||
url = "https://gitlab.gnome.org/Community/Ubuntu/mutter/-/archive/triple-buffering-v4-46/mutter-triple-buffering-v4-46.tar.gz";
|
url = "https://gitlab.gnome.org/Community/Ubuntu/mutter/-/archive/triple-buffering-v4-46/mutter-triple-buffering-v4-46.tar.gz";
|
||||||
sha256 = "9MVb53tcOTkcXJ025bF2kX1+fGSfffliA43q00x2c/Y=";
|
sha256 = "mmFABDsRMzYnLO3+Cf3CJ60XyUBl3y9NAUj+vs7nLqE=";
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
});
|
});
|
Reference in New Issue
Block a user