mirror of
https://github.com/nmasur/dotfiles
synced 2025-10-11 18:23:17 +00:00
Compare commits
1 Commits
master
...
832a71a4a1
Author | SHA1 | Date | |
---|---|---|---|
|
832a71a4a1 |
48
flake.lock
generated
48
flake.lock
generated
@@ -22,11 +22,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758805352,
|
||||
"narHash": "sha256-BHdc43Lkayd+72W/NXRKHzX5AZ+28F3xaUs3a88/Uew=",
|
||||
"lastModified": 1757430124,
|
||||
"narHash": "sha256-MhDltfXesGH8VkGv3hmJ1QEKl1ChTIj9wmGAFfWj/Wk=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "c48e963a5558eb1c3827d59d21c5193622a1477c",
|
||||
"rev": "830b3f0b50045cf0bcfd4dab65fad05bf882e196",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -43,11 +43,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758287904,
|
||||
"narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=",
|
||||
"lastModified": 1757508292,
|
||||
"narHash": "sha256-7lVWL5bC6xBIMWWDal41LlGAG+9u2zUorqo3QCUL4p4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "67ff9807dd148e704baadbd4fd783b54282ca627",
|
||||
"rev": "146f45bee02b8bd88812cfce6ffc0f933788875a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -156,11 +156,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759850138,
|
||||
"narHash": "sha256-fYHIxjTvVIAEDWzenUROuzDPxy1rBCXZNPgh4b1dfgo=",
|
||||
"lastModified": 1757688164,
|
||||
"narHash": "sha256-IfSIZM7/4MwzxF769jVSBeB8JF4fHjYqaoan58HHw1E=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "5b0563419eeeaf0595c848865c46be4abad246a7",
|
||||
"rev": "c531b7a4faffe727adf78e1d3c2a54c0d85d0c0c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -176,11 +176,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760130406,
|
||||
"narHash": "sha256-GKMwBaFRw/C1p1VtjDz4DyhyzjKUWyi1K50bh8lgA2E=",
|
||||
"lastModified": 1757698511,
|
||||
"narHash": "sha256-UqHHGydF/q3jfYXCpvYLA0TWtvByOp1NwOKCUjhYmPs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d305eece827a3fe317a2d70138f53feccaf890a1",
|
||||
"rev": "a3fcc92180c7462082cd849498369591dfb20855",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -306,11 +306,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1760038930,
|
||||
"narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=",
|
||||
"lastModified": 1757487488,
|
||||
"narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3",
|
||||
"rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -344,11 +344,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760150127,
|
||||
"narHash": "sha256-McDmxx/bruodgHLD4sFIl0fKkEkNj5VE3DglImfslrk=",
|
||||
"lastModified": 1757733608,
|
||||
"narHash": "sha256-k8k4VpFuMMiRGBKaut2YIUCJsu0DR/QDV9058C96/Xw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "886a5646695563cbae3c1e10369c6070c7645e73",
|
||||
"rev": "8a93aa245ea5190634a6eaaa0e6a4faaba850f69",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -382,11 +382,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759631821,
|
||||
"narHash": "sha256-V8A1L0FaU/aSXZ1QNJScxC12uP4hANeRBgI4YdhHeRM=",
|
||||
"lastModified": 1740623427,
|
||||
"narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "1d7cbdaad90f8a5255a89a6eddd8af24dc89cafe",
|
||||
"rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -484,11 +484,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1759833546,
|
||||
"narHash": "sha256-rOfkgIiiZNPUbf61OqEym60wXEODeDG8XH+gV/SUoUc=",
|
||||
"lastModified": 1757671225,
|
||||
"narHash": "sha256-ZzoQXe7GV7QX3B3Iw59BogmrtHSP5Ig7MAPPD0cOFW4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "7c0c0f4c3a51761434f18209fa9499b8579ff730",
|
||||
"rev": "42666441c3ddf34a8583a77f07a2c7cae32513c3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
47
flake.nix
47
flake.nix
@@ -114,7 +114,6 @@
|
||||
bookmarks = "keep.${baseName}";
|
||||
books = "books.${baseName}";
|
||||
budget = "money.${baseName}";
|
||||
contacts = "contacts.${baseName}";
|
||||
content = "cloud.${baseName}";
|
||||
download = "download.${baseName}";
|
||||
files = "files.${baseName}";
|
||||
@@ -247,30 +246,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 = "25.05";
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
system.stateVersion = "23.05";
|
||||
# File systems must be declared in order to boot
|
||||
|
||||
# # This is the root filesystem containing NixOS
|
||||
|
@@ -21,7 +21,7 @@ in
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
|
||||
package = if pkgs.stdenv.isDarwin then null else pkgs.ghostty;
|
||||
package = if pkgs.stdenv.isDarwin then pkgs.nur.repos.DimitarNestorov.ghostty 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+bracket_right=unbind"
|
||||
"super+shift+bracket_left=unbind"
|
||||
"super+shift+]=unbind"
|
||||
"super+shift+[=unbind"
|
||||
"ctrl+tab=unbind"
|
||||
"ctrl+shift+tab=unbind"
|
||||
"ctrl+tab=text:\\x1b[9;5u"
|
||||
|
@@ -46,10 +46,6 @@ 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";
|
||||
};
|
||||
@@ -63,8 +59,7 @@ in
|
||||
};
|
||||
|
||||
language-server.terraform-ls = {
|
||||
command = "${lib.getExe pkgs.terraform-ls}";
|
||||
args = [ "serve" ];
|
||||
command = "${lib.getExe pkgs.terraform-ls} serve";
|
||||
};
|
||||
|
||||
language-server.bash-language-server = {
|
||||
|
@@ -57,7 +57,7 @@ function obj:init()
|
||||
self.launcher:bind("ctrl", "space", function() end)
|
||||
self.launcher:bind("", "return", function()
|
||||
-- self:switch("@wezterm@")
|
||||
self:switch("/Applications/Ghostty.app")
|
||||
self:switch("@ghostty@")
|
||||
end)
|
||||
self.launcher:bind("", "C", function()
|
||||
self:switch("Calendar.app")
|
||||
|
@@ -23,6 +23,7 @@ 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,8 +29,6 @@ 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,6 +6,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (config.nmasur.settings) username;
|
||||
cfg = config.nmasur.presets.services.dock;
|
||||
in
|
||||
|
||||
@@ -49,7 +50,7 @@ in
|
||||
"/System/Applications/Messages.app"
|
||||
"/System/Applications/Mail.app"
|
||||
"/Applications/zoom.us.app"
|
||||
"/Applications/Ghostty.app"
|
||||
"${config.home-manager.users.${username}.programs.ghostty.package}/Applications/Ghostty.app"
|
||||
"${pkgs.discord}/Applications/Discord.app"
|
||||
"${pkgs.obsidian}/Applications/Obsidian.app"
|
||||
];
|
||||
|
@@ -39,7 +39,6 @@ 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)
|
||||
];
|
||||
|
||||
};
|
||||
|
@@ -68,7 +68,7 @@ in
|
||||
# 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=";
|
||||
hash = "sha256-S1JN7brvH2KIu7DaDOH1zij3j8hWLLc0HdnUc+L89uU=";
|
||||
};
|
||||
nmasur.presets.services.caddy.tlsPolicies = [
|
||||
{
|
||||
|
@@ -158,7 +158,7 @@ in
|
||||
};
|
||||
script = ''
|
||||
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
|
||||
${giteaPath}/repositories/ \
|
||||
${giteaPath}/ \
|
||||
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.settings.Login.HandlePowerKey = "suspend";
|
||||
services.logind.settings.Login.HandlePowerKeyLongPress = "poweroff";
|
||||
services.logind.powerKey = "suspend";
|
||||
services.logind.powerKeyLongPress = "poweroff";
|
||||
|
||||
};
|
||||
|
||||
|
@@ -17,11 +17,9 @@ 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";
|
||||
|
@@ -1,56 +0,0 @@
|
||||
# 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,7 +36,6 @@ 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;
|
||||
|
Reference in New Issue
Block a user