add alejandra formatter

This commit is contained in:
Fabian Montero 2024-08-24 01:52:56 -06:00
parent 9b3cc59d74
commit 806b00f634
Signed by untrusted user: fabian
GPG key ID: 1FFAC35E1798174F
17 changed files with 173 additions and 132 deletions

View file

@ -28,24 +28,24 @@
};
};
outputs =
flakes@{ self
, nixpkgs
, unstable
, home-manager
, impermanence
, flake-utils
, vpsadminos
, homepage
, conduwuit
, mediawikiSkinCitizen
}:
let
outputs = flakes @ {
self,
nixpkgs,
unstable,
home-manager,
impermanence,
flake-utils,
vpsadminos,
homepage,
conduwuit,
mediawikiSkinCitizen,
}: let
system = "x86_64-linux";
pkgs = importPkgs nixpkgs;
importPkgs = flake: import flake {
importPkgs = flake:
import flake {
inherit system;
config = import ./pkgs/config nixpkgs.lib;
@ -55,11 +55,10 @@
local = import ./pkgs;
in
with pkgs.lib; {
formatter.${system} = pkgs.nixpkgs-fmt;
formatter.${system} = pkgs.alejandra;
packages.${system} = pkgs.local;
overlays.default = final: prev:
let
overlays.default = final: prev: let
locals = local {
inherit final prev flakes;
};
@ -67,7 +66,8 @@
{
local = locals;
unstable = importPkgs unstable;
} // locals.override;
}
// locals.override;
nixosConfigurations.vps = makeOverridable nixpkgs.lib.nixosSystem {
inherit pkgs system;
@ -80,4 +80,3 @@
};
};
}

View file

@ -1,4 +1,8 @@
{ final, prev, flakes }: {
{
final,
prev,
flakes,
}: {
homepage = flakes.homepage.packages.${final.system}.default;
override = {};

View file

@ -1,6 +1,11 @@
{ config, pkgs, lib, flakes, ... }:
with lib;
{
config,
pkgs,
lib,
flakes,
...
}:
with lib; {
imports = [
flakes.vpsadminos.nixosConfigurations.container
flakes.home-manager.nixosModules.home-manager

View file

@ -1,6 +1,9 @@
{ lib, pkgs, ... }:
with lib;
{
lib,
pkgs,
...
}:
with lib; {
programs = {
zsh = {
enable = true;
@ -13,8 +16,7 @@ with lib;
};
neovim.enable = true;
};
home.packages = with pkgs;
[
home.packages = with pkgs; [
file
htop
killall

View file

@ -1,7 +1,11 @@
{ config, pkgs, lib, flakes, ... }:
with lib;
{
config,
pkgs,
lib,
flakes,
...
}:
with lib; {
imports = [
./cli.nix
];

View file

@ -1,8 +1,10 @@
{ lib, pkgs, ... }:
with lib;
{
lib,
pkgs,
...
}:
with lib; {
services = {
nginx = {
virtualHosts."send.posixlycorrect.com" = {
enableACME = true;
@ -14,7 +16,6 @@ with lib;
locations."/" = {
proxyPass = "http://127.0.0.1:8989";
};
};
};

View file

@ -1,6 +1,11 @@
{ config, pkgs, lib, flakes, ... }:
with lib;
{
config,
pkgs,
lib,
flakes,
...
}:
with lib; {
imports = [
./net.nix
./mediawiki.nix

View file

@ -1,6 +1,9 @@
{ config, lib, ... }:
with lib;
{
config,
lib,
...
}:
with lib; {
config = {
environment.etc."fail2ban/filter.d/gitea.local".text = ''
[Definition]

View file

@ -1,9 +1,10 @@
{ lib, pkgs, ... }:
with lib;
{
lib,
pkgs,
...
}:
with lib; {
services = {
nginx = {
virtualHosts."stream.posixlycorrect.com" = {
enableACME = true;

View file

@ -1,9 +1,10 @@
{ lib, pkgs, ... }:
with lib;
{
lib,
pkgs,
...
}:
with lib; {
services = {
nginx = {
virtualHosts."meet.posixlycorrect.com" = {
enableACME = true;
@ -22,7 +23,6 @@ with lib;
};
};
jitsi-meet = {
enable = true;
hostName = "meet.posixlycorrect.com";

View file

@ -1,6 +1,9 @@
{ lib, pkgs, ... }:
with lib;
{
lib,
pkgs,
...
}:
with lib; {
services = {
nginx = {
virtualHosts."status.posixlycorrect.com" = {

View file

@ -1,10 +1,14 @@
{ lib, pkgs, config, flakes, ... }:
with lib;
let
{
lib,
pkgs,
config,
flakes,
...
}:
with lib; let
subdomain = "matrix.posixlycorrect.com";
baseUrl = "https://${subdomain}";
in
{
in {
# ver https://nixos.org/manual/nixos/stable/#module-services-matrix
services = {
matrix-conduit = {
@ -23,8 +27,7 @@ in
};
};
nginx.virtualHosts =
let
nginx.virtualHosts = let
clientConfig."m.homeserver".base_url = baseUrl;
serverConfig."m.server" = "${subdomain}:443";
mkWellKnown = data: ''
@ -32,8 +35,7 @@ in
add_header Access-Control-Allow-Origin *;
return 200 '${builtins.toJSON data}';
'';
in
{
in {
"posixlycorrect.com" = {
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
@ -50,10 +52,7 @@ in
'';
locations."/_matrix".proxyPass = "http://[::1]:6167";
locations."/_synapse/client".proxyPass = "http://[::1]:6167";
};
};
};
}

View file

@ -1,6 +1,10 @@
{ lib, pkgs, flakes, ... }:
with lib;
{
lib,
pkgs,
flakes,
...
}:
with lib; {
services = {
nginx = {
virtualHosts."wiki.posixlycorrect.com" = {

View file

@ -1,6 +1,9 @@
{ lib, pkgs, ... }:
with lib;
{
lib,
pkgs,
...
}:
with lib; {
users.groups = {
mailsenders = {
members = ["fabian" "mediawiki"];

View file

@ -1,6 +1,9 @@
{ lib, pkgs, ... }:
with lib;
{
lib,
pkgs,
...
}:
with lib; {
networking = {
nftables.enable = true;
firewall = {

View file

@ -1,6 +1,9 @@
{ config, lib, ... }:
with lib;
{
config,
lib,
...
}:
with lib; {
services = {
nginx = {
virtualHosts."vault.posixlycorrect.com" = {
@ -18,10 +21,12 @@ with lib;
postgresql = {
ensureDatabases = ["vaultwarden"];
ensureUsers = [{
ensureUsers = [
{
name = "vaultwarden";
ensureDBOwnership = true;
}];
}
];
};
vaultwarden = {