nix
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "https://tangled.sh/@ocbwoy3.dev/nix";
|
description = "Dark World Exclusive Nix Flake (Totally not a Deltarune reference)";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Core
|
# Core
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||||
|
|
||||||
# Programs
|
# Programs
|
||||||
tuxstrap.url = "git+https://tangled.sh/@ocbwoy3.dev/tuxstrap";
|
tuxstrap.url = "git+https://tangled.org/kris.darkworld.download/tuxstrap";
|
||||||
|
|
||||||
# Package tooling
|
# Package tooling
|
||||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
nvf.url = "github:notashelf/nvf";
|
nvf.url = "github:notashelf/nvf";
|
||||||
|
|
||||||
# Extras
|
# Extras
|
||||||
tangled.url = "git+https://tangled.sh/@tangled.sh/core";
|
tangled.url = "git+https://tangled.sh/tangled.sh/core";
|
||||||
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||||
spacebar = {
|
spacebar = {
|
||||||
url = "github:spacebarchat/server";
|
url = "github:spacebarchat/server";
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
./modules/tangled.nix
|
./modules/tangled.nix
|
||||||
../../modules/force.nix
|
../../modules/force.nix
|
||||||
./modules/gitea.nix
|
./modules/gitea.nix
|
||||||
|
./modules/vaultwarden.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# gcc. shit breaks. wtf
|
# gcc. shit breaks. wtf
|
||||||
@@ -40,9 +41,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.settings = {
|
services.openssh.settings = lib.mkDefault {
|
||||||
PubkeyAuthentication = "yes";
|
PubkeyAuthentication = "yes";
|
||||||
TrustedUserCAKeys = "/etc/ssh/ca.pub";
|
TrustedUserCAKeys = "/etc/ssh/ca.pub";
|
||||||
|
PermitRootLogin = lib.mkDefault "prohibit-password";
|
||||||
|
KbdInteractiveAuthentication = lib.mkDefault false;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
@@ -62,6 +65,7 @@
|
|||||||
extraGroups = [
|
extraGroups = [
|
||||||
"wheel"
|
"wheel"
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
|
"docker"
|
||||||
];
|
];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|||||||
44
hosts/server/modules/vaultwarden.nix
Normal file
44
hosts/server/modules/vaultwarden.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.vaultwarden = {
|
||||||
|
enable = true;
|
||||||
|
dbBackend = "sqlite";
|
||||||
|
environmentFile = "/private/vaultwarden/vaultwarden.env";
|
||||||
|
config = {
|
||||||
|
# Keep data alongside the secret env file so we can back it up together.
|
||||||
|
DATA_FOLDER = "/private/vaultwarden/data";
|
||||||
|
PUSH_RELAY_URI = "https://api.bitwarden.eu";
|
||||||
|
PUSH_IDENTITY_URI = "https://identity.bitwarden.eu";
|
||||||
|
DOMAIN = "https://vault.ocbwoy3.dev";
|
||||||
|
ROCKET_ADDRESS = "0.0.0.0";
|
||||||
|
ROCKET_PORT = 8222;
|
||||||
|
WEBSOCKET_ENABLED = true;
|
||||||
|
WEBSOCKET_ADDRESS = "0.0.0.0";
|
||||||
|
WEBSOCKET_PORT = 3012;
|
||||||
|
SIGNUPS_ALLOWED = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allow vaultwarden to write under /private/vaultwarden and ensure the directory exists.
|
||||||
|
systemd.services.vaultwarden.serviceConfig = {
|
||||||
|
ReadWritePaths = [ "/private/vaultwarden" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.settings."10-vaultwarden-private"."/private/vaultwarden/data".d = {
|
||||||
|
user = "vaultwarden";
|
||||||
|
group = "vaultwarden";
|
||||||
|
mode = "0750";
|
||||||
|
};
|
||||||
|
|
||||||
|
# cloudflared!!
|
||||||
|
# networking.firewall.allowedTCPPorts = [
|
||||||
|
# 8222
|
||||||
|
# 3012
|
||||||
|
# ];
|
||||||
|
}
|
||||||
@@ -1,38 +1,39 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./nixos/bootloader.nix
|
./nixos/bootloader.nix
|
||||||
./nixos/hardware.nix
|
./nixos/hardware.nix
|
||||||
./nixos/i18n.nix
|
./nixos/i18n.nix
|
||||||
./nixos/network.nix
|
./nixos/network.nix
|
||||||
./nixos/nixpkgs.nix
|
./nixos/nixpkgs.nix
|
||||||
./nixos/nvidia.nix
|
./nixos/nvidia.nix
|
||||||
./nixos/programs.nix
|
./nixos/programs.nix
|
||||||
./stuff/nvim.nix
|
./stuff/nvim.nix
|
||||||
./stuff/zsh.nix
|
./stuff/zsh.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
tmux
|
tmux
|
||||||
gh
|
gh
|
||||||
file
|
file
|
||||||
glib
|
glib
|
||||||
openssl
|
openssl
|
||||||
nss
|
nss
|
||||||
glibc
|
glibc
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
killall
|
killall
|
||||||
deno
|
deno
|
||||||
bun
|
bun
|
||||||
imagemagick
|
imagemagick
|
||||||
unzip
|
unzip
|
||||||
libwebp
|
libwebp
|
||||||
nix-direnv
|
nix-direnv
|
||||||
htop
|
htop
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
nixd
|
nixd
|
||||||
ffmpeg-full
|
ffmpeg-full
|
||||||
gnupg
|
gnupg
|
||||||
];
|
codex
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user