mirror of
https://github.com/nmasur/dotfiles
synced 2025-04-28 19:22:24 +00:00
Compare commits
No commits in common. "962515c10edfff34e4b4a4c5bfe712ec0b55f09c" and "97ccf1c1704e717329a01e991e50ccd2c3087deb" have entirely different histories.
962515c10e
...
97ccf1c170
25
flake.lock
generated
25
flake.lock
generated
@ -319,14 +319,14 @@
|
|||||||
"nextcloud-snappymail": {
|
"nextcloud-snappymail": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714909152,
|
"lastModified": 1713917355,
|
||||||
"narHash": "sha256-CsAUnbA/9XiVuk96pOK+E++lp8BlJITtfExWcb9rqPk=",
|
"narHash": "sha256-6mel49dSTujJnpdUt1aOJ87duXU/DBqpuqgZOKP1YII=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz"
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.36.1-nextcloud.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz"
|
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.36.1-nextcloud.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix2vim": {
|
"nix2vim": {
|
||||||
@ -402,22 +402,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-caddy": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1699107987,
|
|
||||||
"narHash": "sha256-nWXETr4Oqy/vOfzgWyMY04qzEN2iREFJc5ycQ3XNu0A=",
|
|
||||||
"owner": "jpds",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a33b02fa9d664f31dadc8a874eb1a5dbaa9f4ecf",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "jpds",
|
|
||||||
"ref": "caddy-external-plugins",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1714880338,
|
"lastModified": 1714880338,
|
||||||
@ -553,7 +537,6 @@
|
|||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-caddy": "nixpkgs-caddy",
|
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"nvim-lint-src": "nvim-lint-src",
|
"nvim-lint-src": "nvim-lint-src",
|
||||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||||
|
12
flake.nix
12
flake.nix
@ -7,9 +7,6 @@
|
|||||||
# Used for system packages
|
# Used for system packages
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
# Used for caddy plugins
|
|
||||||
nixpkgs-caddy.url = "github:jpds/nixpkgs/caddy-external-plugins";
|
|
||||||
|
|
||||||
# Used for MacOS system config
|
# Used for MacOS system config
|
||||||
darwin = {
|
darwin = {
|
||||||
url = "github:lnl7/nix-darwin/master";
|
url = "github:lnl7/nix-darwin/master";
|
||||||
@ -202,8 +199,7 @@
|
|||||||
};
|
};
|
||||||
nextcloud-snappymail = {
|
nextcloud-snappymail = {
|
||||||
# https://github.com/the-djmaze/snappymail/releases
|
# https://github.com/the-djmaze/snappymail/releases
|
||||||
# https://snappymail.eu/repository/nextcloud
|
url = "https://snappymail.eu/repository/nextcloud/snappymail-2.36.1-nextcloud.tar.gz";
|
||||||
url = "https://github.com/nmasur/snappymail-nextcloud/releases/download/v2.36.1/snappymail-2.36.1-nextcloud.tar.gz";
|
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -252,6 +248,7 @@
|
|||||||
(import ./overlays/calibre-web.nix)
|
(import ./overlays/calibre-web.nix)
|
||||||
(import ./overlays/disko.nix inputs)
|
(import ./overlays/disko.nix inputs)
|
||||||
(import ./overlays/tree-sitter.nix inputs)
|
(import ./overlays/tree-sitter.nix inputs)
|
||||||
|
(import ./overlays/caddy.nix inputs)
|
||||||
(import ./overlays/mpv-scripts.nix inputs)
|
(import ./overlays/mpv-scripts.nix inputs)
|
||||||
(import ./overlays/nextcloud-apps.nix inputs)
|
(import ./overlays/nextcloud-apps.nix inputs)
|
||||||
(import ./overlays/betterlockscreen.nix)
|
(import ./overlays/betterlockscreen.nix)
|
||||||
@ -330,12 +327,9 @@
|
|||||||
format = "iso";
|
format = "iso";
|
||||||
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; };
|
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; };
|
||||||
};
|
};
|
||||||
x86_64-linux.arrow-aws = inputs.nixos-generators.nixosGenerate rec {
|
x86_64-linux.arrow-aws = inputs.nixos-generators.nixosGenerate {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
format = "amazon";
|
format = "amazon";
|
||||||
specialArgs = {
|
|
||||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
|
||||||
};
|
|
||||||
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; } ++ [
|
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; } ++ [
|
||||||
# import
|
# import
|
||||||
# ./modules/aws
|
# ./modules/aws
|
||||||
|
@ -8,11 +8,9 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
inputs.nixpkgs.lib.nixosSystem rec {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = { };
|
||||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
|
||||||
};
|
|
||||||
modules = import ./modules.nix { inherit inputs globals overlays; } ++ [
|
modules = import ./modules.nix { inherit inputs globals overlays; } ++ [
|
||||||
{
|
{
|
||||||
# This is the root filesystem containing NixOS
|
# This is the root filesystem containing NixOS
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
pkgs-caddy,
|
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@ -63,16 +62,7 @@ in
|
|||||||
caddy.cidrAllowlist = cloudflareIpRanges;
|
caddy.cidrAllowlist = cloudflareIpRanges;
|
||||||
|
|
||||||
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
||||||
services.caddy.package = pkgs-caddy.caddy.override {
|
services.caddy.package = pkgs.caddy-cloudflare; # Patched overlay
|
||||||
externalPlugins = [
|
|
||||||
{
|
|
||||||
name = "cloudflare";
|
|
||||||
repo = "github.com/caddy-dns/cloudflare";
|
|
||||||
version = "master";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
vendorHash = "sha256-C7JOGd4sXsRZL561oP84V2/pTg7szEgF4OFOw35yS1s=";
|
|
||||||
};
|
|
||||||
caddy.tlsPolicies = [
|
caddy.tlsPolicies = [
|
||||||
{
|
{
|
||||||
issuers = [
|
issuers = [
|
||||||
|
64
overlays/caddy.nix
Normal file
64
overlays/caddy.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# Adds the Cloudflare DNS validation module
|
||||||
|
|
||||||
|
inputs: _final: prev:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
plugins = [ "github.com/caddy-dns/cloudflare" ];
|
||||||
|
goImports = prev.lib.flip prev.lib.concatMapStrings plugins (pkg: " _ \"${pkg}\"\n");
|
||||||
|
goGets = prev.lib.flip prev.lib.concatMapStrings plugins (pkg: "go get ${pkg}\n ");
|
||||||
|
main = ''
|
||||||
|
package main
|
||||||
|
import (
|
||||||
|
caddycmd "github.com/caddyserver/caddy/v2/cmd"
|
||||||
|
_ "github.com/caddyserver/caddy/v2/modules/standard"
|
||||||
|
${goImports}
|
||||||
|
)
|
||||||
|
func main() {
|
||||||
|
caddycmd.Main()
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
caddy-cloudflare = prev.buildGoModule {
|
||||||
|
pname = "caddy-cloudflare";
|
||||||
|
version = prev.caddy.version;
|
||||||
|
runVend = true;
|
||||||
|
|
||||||
|
subPackages = [ "cmd/caddy" ];
|
||||||
|
|
||||||
|
src = prev.caddy.src;
|
||||||
|
|
||||||
|
vendorHash = "sha256-zeuvCk7kZa/W/roC12faCQDav4RB8RT1dR2Suh2yjD8=";
|
||||||
|
|
||||||
|
overrideModAttrs = (
|
||||||
|
_: {
|
||||||
|
preBuild = ''
|
||||||
|
echo '${main}' > cmd/caddy/main.go
|
||||||
|
${goGets}
|
||||||
|
'';
|
||||||
|
postInstall = "cp go.sum go.mod $out/ && ls $out/";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
echo '${main}' > cmd/caddy/main.go
|
||||||
|
cat cmd/caddy/main.go
|
||||||
|
'';
|
||||||
|
|
||||||
|
postConfigure = ''
|
||||||
|
cp vendor/go.sum ./
|
||||||
|
cp vendor/go.mod ./
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with prev.lib; {
|
||||||
|
homepage = "https://caddyserver.com";
|
||||||
|
description = "Fast, cross-platform HTTP/2 web server with automatic HTTPS";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [
|
||||||
|
Br1ght0ne
|
||||||
|
techknowlogick
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user