mirror of
https://github.com/nmasur/dotfiles
synced 2025-10-11 23:03:16 +00:00
Compare commits
4 Commits
a35e758c2f
...
caddy-clou
Author | SHA1 | Date | |
---|---|---|---|
|
68d8e60b7e | ||
|
774773c748 | ||
|
c85d292d1a | ||
|
78cc3559f6 |
46
flake.nix
46
flake.nix
@@ -247,30 +247,30 @@
|
||||
default = lib.pkgsBySystem.${system}.nmasur.dotfiles-devshell;
|
||||
});
|
||||
|
||||
checks = lib.forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = lib.overlays;
|
||||
};
|
||||
in
|
||||
{
|
||||
neovim =
|
||||
pkgs.runCommand "neovim-check-health" { buildInputs = [ inputs.self.packages.${system}.neovim ]; }
|
||||
''
|
||||
mkdir -p $out
|
||||
export HOME=$TMPDIR
|
||||
nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
|
||||
# checks = lib.forAllSystems (
|
||||
# system:
|
||||
# let
|
||||
# pkgs = import nixpkgs {
|
||||
# inherit system;
|
||||
# overlays = lib.overlays;
|
||||
# };
|
||||
# in
|
||||
# {
|
||||
# neovim =
|
||||
# pkgs.runCommand "neovim-check-health" { buildInputs = [ inputs.self.packages.${system}.neovim ]; }
|
||||
# ''
|
||||
# mkdir -p $out
|
||||
# export HOME=$TMPDIR
|
||||
# nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
|
||||
|
||||
# Check for errors inside the health log
|
||||
if $(grep "ERROR" $out/health.log); then
|
||||
cat $out/health.log
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
}
|
||||
);
|
||||
# # Check for errors inside the health log
|
||||
# if $(grep "ERROR" $out/health.log); then
|
||||
# cat $out/health.log
|
||||
# exit 1
|
||||
# fi
|
||||
# '';
|
||||
# }
|
||||
# );
|
||||
|
||||
formatter = lib.forAllSystems (
|
||||
system:
|
||||
|
15
pkgs/caddy/package.nix
Normal file
15
pkgs/caddy/package.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
# Caddy with Cloudflare DNS
|
||||
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
# Maintain a static version so that the plugin hash doesn't keep breaking
|
||||
(pkgs.caddy.override {
|
||||
version = "2.10.2";
|
||||
}).withPlugins
|
||||
{
|
||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
||||
hash = "sha256-AcWko5513hO8I0lvbCLqVbM1eWegAhoM0J0qXoWL/vI=";
|
||||
}
|
@@ -37,8 +37,8 @@ in
|
||||
fullscreen = if pkgs.stdenv.isDarwin then true else false;
|
||||
keybind = [
|
||||
"super+t=unbind" # Pass super-t to underlying tool (e.g. zellij tabs)
|
||||
"super+shift+]=unbind"
|
||||
"super+shift+[=unbind"
|
||||
"super+shift+bracket_right=unbind"
|
||||
"super+shift+bracket_left=unbind"
|
||||
"ctrl+tab=unbind"
|
||||
"ctrl+shift+tab=unbind"
|
||||
"ctrl+tab=text:\\x1b[9;5u"
|
||||
|
@@ -66,10 +66,7 @@ in
|
||||
nmasur.presets.services.caddy.cidrAllowlist = cloudflareIpRanges;
|
||||
|
||||
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
||||
services.caddy.package = pkgs.caddy.withPlugins {
|
||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
||||
hash = "sha256-AcWko5513hO8I0lvbCLqVbM1eWegAhoM0J0qXoWL/vI=";
|
||||
};
|
||||
services.caddy.package = pkgs.nmasur.caddy;
|
||||
nmasur.presets.services.caddy.tlsPolicies = [
|
||||
{
|
||||
issuers = [
|
||||
|
@@ -10,8 +10,8 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Use power button to sleep instead of poweroff
|
||||
services.logind.powerKey = "suspend";
|
||||
services.logind.powerKeyLongPress = "poweroff";
|
||||
services.logind.settings.Login.HandlePowerKey = "suspend";
|
||||
services.logind.settings.Login.HandlePowerKeyLongPress = "poweroff";
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user