mirror of
https://github.com/nmasur/dotfiles
synced 2025-10-11 21:53:16 +00:00
Compare commits
31 Commits
4755a27089
...
caddy-clou
Author | SHA1 | Date | |
---|---|---|---|
|
68d8e60b7e | ||
|
774773c748 | ||
|
c85d292d1a | ||
|
78cc3559f6 | ||
|
a35e758c2f | ||
|
72f30cbab1 | ||
|
17b30de163 | ||
|
8b3ab57b34 | ||
|
483833cdcb | ||
|
57e593aabc | ||
|
b119256ba6 | ||
|
54948353dd | ||
|
9c4219da40 | ||
|
ae3735586e | ||
|
cb00bb2e72 | ||
|
e64a9f14d0 | ||
|
e2e179c0e5 | ||
|
e975db7385 | ||
|
08ec8ce4b8 | ||
|
7388eed876 | ||
|
e53d9eb1a9 | ||
|
b956f9dd82 | ||
|
d7969cc8fc | ||
|
21d66d2be1 | ||
|
518848181a | ||
|
f9bf763f91 | ||
|
ca20fa0732 | ||
|
56d10c2765 | ||
|
3b6b4bd2e6 | ||
|
6f06b0a0c5 | ||
|
d3e69faf2f |
97
flake.lock
generated
97
flake.lock
generated
@@ -22,11 +22,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751313918,
|
||||
"narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
|
||||
"lastModified": 1755825449,
|
||||
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
|
||||
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -43,11 +43,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753140376,
|
||||
"narHash": "sha256-7lrVrE0jSvZHrxEzvnfHFE/Wkk9DDqb+mYCodI5uuB8=",
|
||||
"lastModified": 1756115622,
|
||||
"narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "545aba02960caa78a31bd9a8709a0ad4b6320a5c",
|
||||
"rev": "bafad29f89e83b2d861b493aa23034ea16595560",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -156,11 +156,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753376980,
|
||||
"narHash": "sha256-h7Say1U7r1ke3mfg3yvbzYnk3izmJ2g1zXzX5APNA8Q=",
|
||||
"lastModified": 1756477005,
|
||||
"narHash": "sha256-e/FNNIT/LPuoruzRQZf5z5L5GApq1G2y2PShy+Lakhs=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "4281228da35b02b0dcca3b4772b93d48d79ce046",
|
||||
"rev": "77ff51caa440b1066e0a1920007ab5e148dd4856",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -176,11 +176,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753470191,
|
||||
"narHash": "sha256-hOUWU5L62G9sm8NxdiLWlLIJZz9H52VuFiDllHdwmVA=",
|
||||
"lastModified": 1756496801,
|
||||
"narHash": "sha256-IYIsnPy+cJxe8RbDHBrCtfJY0ry2bG2H7WvMcewiGS8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "a1817d1c0e5eabe7dfdfe4caa46c94d9d8f3fdb6",
|
||||
"rev": "77a71380c38fb2a440b4b5881bbc839f6230e1cb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -198,14 +198,15 @@
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
"systems": "systems",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1742156590,
|
||||
"narHash": "sha256-aTM/2CrNN5utdVEQGsOA+kl4UozgH7VPLBQL5OXtBrg=",
|
||||
"lastModified": 1756057867,
|
||||
"narHash": "sha256-ziR5eQGqRWhW8tf8r0TIplaqNt+HXu1G1X41LUr4IYo=",
|
||||
"owner": "hraban",
|
||||
"repo": "mac-app-util",
|
||||
"rev": "341ede93f290df7957047682482c298e47291b4d",
|
||||
"rev": "8414fa1e2cb775b17793104a9095aabeeada63ef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -222,11 +223,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1752588843,
|
||||
"narHash": "sha256-T4vw0himO8ami5uR7cry+El9HlQkqNcy/UtIFwkcTMw=",
|
||||
"lastModified": 1755344765,
|
||||
"narHash": "sha256-k/Cvh/mzb5lSvilKdgwNBCyAyYmD8YPr1nc0sTSgwxI=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "nix2vim",
|
||||
"rev": "94f136cece965e33aa4ccccb4ca1af04772851f4",
|
||||
"rev": "78467c8de07719f92397179844bf75cdf2e58b83",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -273,16 +274,16 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1753250450,
|
||||
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
|
||||
"lastModified": 1754340878,
|
||||
"narHash": "sha256-lgmUyVQL9tSnvvIvBp7x1euhkkCho7n3TMzgjdvgPoU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
|
||||
"rev": "cab778239e705082fe97bb4990e0d24c50924c04",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -304,6 +305,22 @@
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1756386758,
|
||||
"narHash": "sha256-1wxxznpW2CKvI9VdniaUnTT2Os6rdRJcRUf65ZK9OtE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dfb2f12e899db4876308eba6d93455ab7da304cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1728538411,
|
||||
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
|
||||
@@ -327,11 +344,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753502740,
|
||||
"narHash": "sha256-g6D9WfAHVq9D76D1t9FahCtuBq+MfTo4dChFde0XosI=",
|
||||
"lastModified": 1756524478,
|
||||
"narHash": "sha256-2oSBlcYCgwrVxUZwM8MV6hBFsfsWFbeN5ErQiCA+38s=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "dd7b97b8d11ebe7c7513d6c58e13104441862896",
|
||||
"rev": "e82a8b0095f54edb6bbbb1d862f3da502dca1396",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -349,7 +366,7 @@
|
||||
"mac-app-util": "mac-app-util",
|
||||
"nix2vim": "nix2vim",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nur": "nur",
|
||||
"wsl": "wsl",
|
||||
@@ -380,7 +397,7 @@
|
||||
},
|
||||
"rust-overlay_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736476219,
|
||||
@@ -441,6 +458,24 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1755934250,
|
||||
"narHash": "sha256-CsDojnMgYsfshQw3t4zjRUkmMmUdZGthl16bXVWgRYU=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "74e1a52d5bd9430312f8d1b8b0354c92c17453e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
@@ -449,11 +484,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753450337,
|
||||
"narHash": "sha256-l0QLEenVKuU6U2g1wI0zuf9IAm7QpisIbf8wAI6BUX4=",
|
||||
"lastModified": 1755261305,
|
||||
"narHash": "sha256-EOqCupB5X5WoGVHVcfOZcqy0SbKWNuY3kq+lj1wHdu8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "a8dfcd2962f6e788759a75b36ca86b14aa44d8e5",
|
||||
"rev": "203a7b463f307c60026136dd1191d9001c43457f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
47
flake.nix
47
flake.nix
@@ -114,6 +114,7 @@
|
||||
bookmarks = "keep.${baseName}";
|
||||
books = "books.${baseName}";
|
||||
budget = "money.${baseName}";
|
||||
contacts = "contacts.${baseName}";
|
||||
content = "cloud.${baseName}";
|
||||
download = "download.${baseName}";
|
||||
files = "files.${baseName}";
|
||||
@@ -246,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:
|
||||
|
@@ -31,10 +31,10 @@ rec {
|
||||
power-user.enable = true;
|
||||
};
|
||||
nmasur.presets.programs.helix.enable = true;
|
||||
home.stateVersion = "23.05";
|
||||
home.stateVersion = "25.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
system.stateVersion = "25.05";
|
||||
# File systems must be declared in order to boot
|
||||
|
||||
# # This is the root filesystem containing NixOS
|
||||
|
@@ -33,9 +33,6 @@ rec {
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
# Overrides
|
||||
services.automatic-timezoned.enable = false;
|
||||
|
||||
# Not sure what's necessary but too afraid to remove anything
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
|
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=";
|
||||
}
|
@@ -8,6 +8,5 @@ pkgs.rustPlatform.buildRustPackage {
|
||||
rev = "50c40172e354caffee48932266edd7c7a76a20fd";
|
||||
sha256 = "sha256-zVIt6Xp+Mvym6gySvHIZJt1QgzKVP/wbTGTubWk6kzI=";
|
||||
};
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-lSeO/GaJPZ8zosOIJRXVIEuPXaBg1GBvKBIuXtu1xZg=";
|
||||
}
|
||||
|
@@ -8,6 +8,5 @@ pkgs.rustPlatform.buildRustPackage {
|
||||
rev = "2a24f95170aa14b5182b2287125664a62f8688ef";
|
||||
sha256 = "sha256-gBxrbGCy6JEHnmgJmcm8sgtEvCAqra8/gPGsfCEfLqg=";
|
||||
};
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-t4tfQaFq4EV4ZWeU+IestSFiSAIeVQslTZhLbpKVoO4=";
|
||||
}
|
||||
|
@@ -74,6 +74,8 @@ in
|
||||
"svg.context-properties.content.enabled" = true; # Sidebery styling
|
||||
"browser.tabs.hoverPreview.enabled" = false; # Disable tab previews
|
||||
"browser.tabs.hoverPreview.showThumbnails" = false; # Disable tab previews
|
||||
"browser.gesture.swipe.left" = "cmd_scrollLeft"; # Disable swipe to go back
|
||||
"browser.gesture.swipe.right" = "cmd_scrollRight"; # Disable swipe to go forward
|
||||
};
|
||||
userChrome = ''
|
||||
:root {
|
||||
|
@@ -21,7 +21,7 @@ in
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
|
||||
package = if pkgs.stdenv.isDarwin then pkgs.nur.repos.DimitarNestorov.ghostty else pkgs.ghostty;
|
||||
package = if pkgs.stdenv.isDarwin then null else pkgs.ghostty;
|
||||
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
@@ -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"
|
||||
|
@@ -46,6 +46,10 @@ in
|
||||
command = "${pkgs.nixd}/bin/nixd";
|
||||
};
|
||||
|
||||
language-server.ty = {
|
||||
command = "${pkgs.ty}/bin/ty";
|
||||
};
|
||||
|
||||
language-server.fish-lsp = {
|
||||
command = "${pkgs.fish-lsp}/bin/fish-lsp";
|
||||
};
|
||||
@@ -59,7 +63,8 @@ in
|
||||
};
|
||||
|
||||
language-server.terraform-ls = {
|
||||
command = "${lib.getExe pkgs.terraform-ls} serve";
|
||||
command = "${lib.getExe pkgs.terraform-ls}";
|
||||
args = [ "serve" ];
|
||||
};
|
||||
|
||||
language-server.bash-language-server = {
|
||||
@@ -147,6 +152,10 @@ in
|
||||
"keep_primary_selection"
|
||||
];
|
||||
|
||||
# Quit shortcuts
|
||||
space.q = ":quit-all";
|
||||
space.x = ":quit-all!";
|
||||
|
||||
# Enable and disable inlay hints
|
||||
space.H = ":toggle lsp.display-inlay-hints";
|
||||
|
||||
@@ -161,7 +170,7 @@ in
|
||||
space.l = [
|
||||
":write-all"
|
||||
":new"
|
||||
":insert-output ${lib.getExe pkgs.lazygit}"
|
||||
":insert-output ${lib.getExe pkgs.lazygit} > /dev/tty"
|
||||
":buffer-close!"
|
||||
":redraw"
|
||||
":reload-all"
|
||||
@@ -169,8 +178,8 @@ in
|
||||
":set mouse true"
|
||||
];
|
||||
|
||||
# Open git blame in github
|
||||
space.B = ":sh git blame -L %{cursor_line},%{cursor_line} %{buffer_name}";
|
||||
# Commandline git blame
|
||||
space.B = ":echo %sh{git log -n1 --date=short --pretty=format:'%%h %%ad %%s' $(git blame -L %{cursor_line},+1 \"%{buffer_name}\" | cut -d' ' -f1)}";
|
||||
|
||||
# Open yazi
|
||||
# https://github.com/sxyazi/yazi/pull/2461
|
||||
@@ -347,7 +356,7 @@ in
|
||||
bg = config.theme.colors.base00;
|
||||
};
|
||||
"ui.cursor" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
fg = config.theme.colors.base04;
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.cursor.insert" = {
|
||||
@@ -359,11 +368,11 @@ in
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.cursor.match" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
fg = config.theme.colors.base03;
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.cursor.select" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
fg = config.theme.colors.base04;
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.gutter" = {
|
||||
|
@@ -81,10 +81,10 @@ in
|
||||
enable = true;
|
||||
|
||||
# Auto start on shell init
|
||||
enableBashIntegration = false;
|
||||
enableFishIntegration = false;
|
||||
enableZshIntegration = false;
|
||||
attachExistingSession = false;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
attachExistingSession = true;
|
||||
exitShellOnExit = false;
|
||||
|
||||
settings = {
|
||||
@@ -185,6 +185,19 @@ in
|
||||
];
|
||||
};
|
||||
};
|
||||
"bind \"Alt Shift j\"" = {
|
||||
Run = {
|
||||
_args = [
|
||||
(lib.getExe pkgs.lazyjj)
|
||||
];
|
||||
close_on_exit = true;
|
||||
floating = true;
|
||||
x = "1%";
|
||||
y = "1%";
|
||||
width = "99%";
|
||||
height = "99%";
|
||||
};
|
||||
};
|
||||
"bind \"Super Shift ]\"" = {
|
||||
GoToNextTab = { };
|
||||
};
|
||||
@@ -208,11 +221,6 @@ in
|
||||
_args = [ "scroll" ];
|
||||
};
|
||||
};
|
||||
"bind \"Alt k\"" = lib.mkIf pkgs.stdenv.isLinux {
|
||||
SwitchToMode = {
|
||||
_args = [ "scroll" ];
|
||||
};
|
||||
};
|
||||
"bind \"Super Shift e\"" = lib.mkIf pkgs.stdenv.isDarwin {
|
||||
EditScrollback = { };
|
||||
SwitchToMode = {
|
||||
|
@@ -57,7 +57,7 @@ function obj:init()
|
||||
self.launcher:bind("ctrl", "space", function() end)
|
||||
self.launcher:bind("", "return", function()
|
||||
-- self:switch("@wezterm@")
|
||||
self:switch("@ghostty@")
|
||||
self:switch("/Applications/Ghostty.app")
|
||||
end)
|
||||
self.launcher:bind("", "C", function()
|
||||
self:switch("Calendar.app")
|
||||
|
@@ -23,7 +23,6 @@ in
|
||||
{
|
||||
discord = "${pkgs.discord}/Applications/Discord.app";
|
||||
firefox = "${pkgs.firefox-unwrapped}/Applications/Firefox.app";
|
||||
ghostty = "${config.programs.ghostty.package}/Applications/Ghostty.app";
|
||||
obsidian = "${pkgs.obsidian}/Applications/Obsidian.app";
|
||||
slack = "${pkgs.slack}/Applications/Slack.app";
|
||||
wezterm = "${pkgs.wezterm}/Applications/WezTerm.app";
|
||||
|
@@ -29,6 +29,8 @@ in
|
||||
pkgs.charm # Manage account and filesystem
|
||||
pkgs.pop # Send emails from a TUI
|
||||
|
||||
pkgs.chawan # Browser TUI
|
||||
|
||||
];
|
||||
|
||||
programs.gh-dash.enable = lib.mkDefault true;
|
||||
|
@@ -6,7 +6,6 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (config.nmasur.settings) username;
|
||||
cfg = config.nmasur.presets.services.dock;
|
||||
in
|
||||
|
||||
@@ -50,7 +49,7 @@ in
|
||||
"/System/Applications/Messages.app"
|
||||
"/System/Applications/Mail.app"
|
||||
"/Applications/zoom.us.app"
|
||||
"${config.home-manager.users.${username}.programs.ghostty.package}/Applications/Ghostty.app"
|
||||
"/Applications/Ghostty.app"
|
||||
"${pkgs.discord}/Applications/Discord.app"
|
||||
"${pkgs.obsidian}/Applications/Obsidian.app"
|
||||
];
|
||||
|
@@ -39,6 +39,7 @@ in
|
||||
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
||||
"notunes" # Don't launch Apple Music with the play button
|
||||
"topnotch" # Darkens the menu bar to complete black
|
||||
"ghostty" # Terminal application (not buildable on Nix on macOS)
|
||||
];
|
||||
|
||||
};
|
||||
|
@@ -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-2D7dnG50CwtCho+U+iHmSj2w14zllQXPjmTHr6lJZ/A=";
|
||||
};
|
||||
services.caddy.package = pkgs.nmasur.caddy;
|
||||
nmasur.presets.services.caddy.tlsPolicies = [
|
||||
{
|
||||
issuers = [
|
||||
@@ -159,12 +156,13 @@ in
|
||||
requires = [ "cloudflare-api-secret.service" ];
|
||||
script =
|
||||
let
|
||||
args =
|
||||
[ "--cache-file /var/lib/cloudflare-dyndns/ip.cache" ]
|
||||
++ (if config.services.cloudflare-dyndns.ipv4 then [ "-4" ] else [ "-no-4" ])
|
||||
++ (if config.services.cloudflare-dyndns.ipv6 then [ "-6" ] else [ "-no-6" ])
|
||||
++ lib.optional config.services.cloudflare-dyndns.deleteMissing "--delete-missing"
|
||||
++ lib.optional config.services.cloudflare-dyndns.proxied "--proxied";
|
||||
args = [
|
||||
"--cache-file /var/lib/cloudflare-dyndns/ip.cache"
|
||||
]
|
||||
++ (if config.services.cloudflare-dyndns.ipv4 then [ "-4" ] else [ "-no-4" ])
|
||||
++ (if config.services.cloudflare-dyndns.ipv6 then [ "-6" ] else [ "-no-6" ])
|
||||
++ lib.optional config.services.cloudflare-dyndns.deleteMissing "--delete-missing"
|
||||
++ lib.optional config.services.cloudflare-dyndns.proxied "--proxied";
|
||||
in
|
||||
lib.mkForce ''
|
||||
export CLOUDFLARE_API_TOKEN=$(cat ''${CREDENTIALS_DIRECTORY}/apiToken)
|
||||
|
@@ -158,7 +158,7 @@ in
|
||||
};
|
||||
script = ''
|
||||
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
|
||||
${giteaPath}/ \
|
||||
${giteaPath}/repositories/ \
|
||||
s3://${config.nmasur.presets.services.litestream.s3.bucket}/gitea-data/ \
|
||||
--endpoint-url=https://${config.nmasur.presets.services.litestream.s3.endpoint}
|
||||
'';
|
||||
|
@@ -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";
|
||||
|
||||
};
|
||||
|
||||
|
@@ -17,9 +17,11 @@ in
|
||||
enable = true;
|
||||
mediaDir = "/data/generic/paperless";
|
||||
passwordFile = config.secrets.paperless.dest;
|
||||
configureTika = true; # Enable processing of emails
|
||||
settings = {
|
||||
PAPERLESS_OCR_USER_ARGS = builtins.toJSON { invalidate_digital_signatures = true; };
|
||||
PAPERLESS_URL = "https://${hostnames.paperless}";
|
||||
PAPERLESS_DATE_ORDER = "MDY"; # Check document for US-formatted dates
|
||||
|
||||
# Enable if changing the path name in Caddy
|
||||
# PAPERLESS_FORCE_SCRIPT_NAME = "/paperless";
|
||||
|
@@ -0,0 +1,56 @@
|
||||
# Stalwart is a self-hosted email service, but in my case I want to use it as a
|
||||
# vCard contacts database server and ignore the email component.
|
||||
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (config.nmasur.settings) hostnames;
|
||||
cfg = config.nmasur.presets.services.stalwart-mail;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.presets.services.stalwart-mail = {
|
||||
enable = lib.mkEnableOption "Stalwart mail and contacts server";
|
||||
port = lib.mkOption {
|
||||
type = lib.types.port;
|
||||
description = "Port to use for the localhost";
|
||||
default = 7982;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
services.stalwart-mail = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server.listener.http = {
|
||||
bind = [ "127.0.0.1:${builtins.toString cfg.port}" ];
|
||||
protocol = "http";
|
||||
};
|
||||
authentication.fallback-admin = {
|
||||
user = "admin";
|
||||
secret = "$6$W/zXJP0xtZSUQqIe$DedCz9ncAn8mtfQVCg8Fzguuz.x8u1dfVU/d7wKyc6ujLuY4WCdtY0OeYwpv8huJfKAgBKE3go2MTrT99ID7I1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Configure Cloudflare DNS to point to this machine
|
||||
services.cloudflare-dyndns.domains = [ hostnames.contacts ];
|
||||
|
||||
# Allow web traffic to Caddy
|
||||
nmasur.presets.services.caddy.routes = [
|
||||
{
|
||||
match = [ { host = [ hostnames.contacts ]; } ];
|
||||
handle = [
|
||||
{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [
|
||||
{ dial = "localhost:${builtins.toString cfg.port}"; }
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
@@ -36,6 +36,7 @@ in
|
||||
ntfy-sh.enable = lib.mkDefault true;
|
||||
pgweb.enable = lib.mkDefault true;
|
||||
postgresql.enable = lib.mkDefault true;
|
||||
stalwart-mail.enable = lib.mkDefault true;
|
||||
thelounge.enable = lib.mkDefault true;
|
||||
uptime-kuma.enable = lib.mkDefault true;
|
||||
vaultwarden.enable = lib.mkDefault true;
|
||||
|
@@ -24,6 +24,11 @@ in
|
||||
|
||||
# Enable automatic timezone updates based on location
|
||||
services.automatic-timezoned.enable = lib.mkDefault true;
|
||||
services.geoclue2 = {
|
||||
# see: https://github.com/NixOS/nixpkgs/issues/68489#issuecomment-1484030107
|
||||
enableDemoAgent = lib.mkForce true;
|
||||
geoProviderUrl = "https://beacondb.net/v1/geolocate";
|
||||
};
|
||||
|
||||
# Allow reading from Windows drives
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
Reference in New Issue
Block a user