mirror of
https://github.com/nmasur/dotfiles
synced 2025-12-17 20:02:42 +00:00
Compare commits
1 Commits
master
...
832a71a4a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
832a71a4a1 |
122
flake.lock
generated
122
flake.lock
generated
@@ -22,11 +22,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765065051,
|
"lastModified": 1757430124,
|
||||||
"narHash": "sha256-b7W9WsvyMOkUScNxbzS45KEJp0iiqRPyJ1I3JBE+oEE=",
|
"narHash": "sha256-MhDltfXesGH8VkGv3hmJ1QEKl1ChTIj9wmGAFfWj/Wk=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "7e22bf538aa3e0937effcb1cee73d5f1bcc26f79",
|
"rev": "830b3f0b50045cf0bcfd4dab65fad05bf882e196",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765326679,
|
"lastModified": 1757508292,
|
||||||
"narHash": "sha256-fTLX9kDwLr9Y0rH/nG+h1XG5UU+jBcy0PFYn5eneRX8=",
|
"narHash": "sha256-7lVWL5bC6xBIMWWDal41LlGAG+9u2zUorqo3QCUL4p4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "d64e5cdca35b5fad7c504f615357a7afe6d9c49e",
|
"rev": "146f45bee02b8bd88812cfce6ffc0f933788875a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -76,11 +76,11 @@
|
|||||||
"flake-compat_2": {
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765121682,
|
"lastModified": 1747046372,
|
||||||
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
|
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
|
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -148,6 +148,27 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"helix": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1757688164,
|
||||||
|
"narHash": "sha256-IfSIZM7/4MwzxF769jVSBeB8JF4fHjYqaoan58HHw1E=",
|
||||||
|
"owner": "helix-editor",
|
||||||
|
"repo": "helix",
|
||||||
|
"rev": "c531b7a4faffe727adf78e1d3c2a54c0d85d0c0c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "helix-editor",
|
||||||
|
"repo": "helix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -155,11 +176,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765480374,
|
"lastModified": 1757698511,
|
||||||
"narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=",
|
"narHash": "sha256-UqHHGydF/q3jfYXCpvYLA0TWtvByOp1NwOKCUjhYmPs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3",
|
"rev": "a3fcc92180c7462082cd849498369591dfb20855",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -238,11 +259,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764234087,
|
"lastModified": 1751903740,
|
||||||
"narHash": "sha256-NHF7QWa0ZPT8hsJrvijREW3+nifmF2rTXgS2v0tpcEA=",
|
"narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "032a1878682fafe829edfcf5fdfad635a2efe748",
|
"rev": "032decf9db65efed428afd2fa39d80f7089085eb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -269,27 +290,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765363881,
|
"lastModified": 1735563628,
|
||||||
"narHash": "sha256-3C3xWn8/2Zzr7sxVBmpc1H1QfxjNfta5IMFe3O9ZEPw=",
|
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d2b1213bf5ec5e62d96b003ab4b5cbc42abfc0d0",
|
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-24.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765186076,
|
"lastModified": 1757487488,
|
||||||
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
|
"narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
|
"rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -301,11 +322,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1744536153,
|
"lastModified": 1728538411,
|
||||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -323,11 +344,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765598217,
|
"lastModified": 1757733608,
|
||||||
"narHash": "sha256-yJhIuiP6znKni5djRu+84X2ye4yyqqwz+Ob07gcgDbs=",
|
"narHash": "sha256-k8k4VpFuMMiRGBKaut2YIUCJsu0DR/QDV9058C96/Xw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "da24c00523a3125a97b24783e2b59b5b98ac5da7",
|
"rev": "8a93aa245ea5190634a6eaaa0e6a4faaba850f69",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -340,6 +361,7 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
|
"helix": "helix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"mac-app-util": "mac-app-util",
|
"mac-app-util": "mac-app-util",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
@@ -347,22 +369,42 @@
|
|||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"rust-overlay": "rust-overlay",
|
|
||||||
"wsl": "wsl",
|
"wsl": "wsl",
|
||||||
"zellij-switch": "zellij-switch",
|
"zellij-switch": "zellij-switch",
|
||||||
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"helix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1740623427,
|
||||||
|
"narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765593578,
|
"lastModified": 1736476219,
|
||||||
"narHash": "sha256-qbl874bCIy9+OLImdfBfZ9ITUDDjjTAB04Dk4PlZFV0=",
|
"narHash": "sha256-+qyv3QqdZCdZ3cSO/cbpEY6tntyYjfe1bB12mdpNFaY=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "348b94ed9ddffccdf1a65582a2dcff0a4a3eeeb4",
|
"rev": "de30cc5963da22e9742bbbbb9a3344570ed237b9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -442,11 +484,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765483419,
|
"lastModified": 1757671225,
|
||||||
"narHash": "sha256-w6wznH1lBzlSH3+pWDkE+L6xA0F02drFAzu2E7PD/Jo=",
|
"narHash": "sha256-ZzoQXe7GV7QX3B3Iw59BogmrtHSP5Ig7MAPPD0cOFW4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "0c040f28b44b18e0d4240e027096078e34dbb029",
|
"rev": "42666441c3ddf34a8583a77f07a2c7cae32513c3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -460,9 +502,7 @@
|
|||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"rust-overlay": [
|
"rust-overlay": "rust-overlay_2",
|
||||||
"rust-overlay"
|
|
||||||
],
|
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -482,11 +522,11 @@
|
|||||||
"zenyd-mpv-scripts": {
|
"zenyd-mpv-scripts": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765050776,
|
"lastModified": 1707704915,
|
||||||
"narHash": "sha256-9gO+GkNoGsxAbMRrBWu0FfXEQtyTmHivlaxlYLpV2YM=",
|
"narHash": "sha256-9P/8q/OZXfaJMS08acQP4h3/zUA5mKRQee0JmkXcz1w=",
|
||||||
"owner": "zenyd",
|
"owner": "zenyd",
|
||||||
"repo": "mpv-scripts",
|
"repo": "mpv-scripts",
|
||||||
"rev": "62f4bb313c6cb6366672e78dea940e9da8fec84a",
|
"rev": "9bdce0050144cb24f92475f7bdd77180e0e4c26b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
66
flake.nix
66
flake.nix
@@ -8,7 +8,7 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
# Used for specific stable packages
|
# Used for specific stable packages
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
|
||||||
# Used for MacOS system config
|
# Used for MacOS system config
|
||||||
darwin = {
|
darwin = {
|
||||||
@@ -64,23 +64,17 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
rust-overlay = {
|
|
||||||
url = "github:oxalica/rust-overlay";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Zellij Switcher
|
# Zellij Switcher
|
||||||
zellij-switch = {
|
zellij-switch = {
|
||||||
url = "github:mostafaqanbaryan/zellij-switch";
|
url = "github:mostafaqanbaryan/zellij-switch";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.rust-overlay.follows = "rust-overlay";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# # Text editor
|
# Text editor
|
||||||
# helix = {
|
helix = {
|
||||||
# url = "github:helix-editor/helix";
|
url = "github:helix-editor/helix";
|
||||||
# inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
# inputs.rust-overlay.follows = "rust-overlay";
|
};
|
||||||
# };
|
|
||||||
|
|
||||||
# # Nextcloud Apps
|
# # Nextcloud Apps
|
||||||
# nextcloud-news = {
|
# nextcloud-news = {
|
||||||
@@ -120,7 +114,6 @@
|
|||||||
bookmarks = "keep.${baseName}";
|
bookmarks = "keep.${baseName}";
|
||||||
books = "books.${baseName}";
|
books = "books.${baseName}";
|
||||||
budget = "money.${baseName}";
|
budget = "money.${baseName}";
|
||||||
contacts = "contacts.${baseName}";
|
|
||||||
content = "cloud.${baseName}";
|
content = "cloud.${baseName}";
|
||||||
download = "download.${baseName}";
|
download = "download.${baseName}";
|
||||||
files = "files.${baseName}";
|
files = "files.${baseName}";
|
||||||
@@ -139,7 +132,6 @@
|
|||||||
photos = "photos.${baseName}";
|
photos = "photos.${baseName}";
|
||||||
postgresql = "pg.${baseName}";
|
postgresql = "pg.${baseName}";
|
||||||
prometheus = "prom.${baseName}";
|
prometheus = "prom.${baseName}";
|
||||||
recipes = "cooking.${baseName}";
|
|
||||||
secrets = "vault.${baseName}";
|
secrets = "vault.${baseName}";
|
||||||
smtp = "smtp.purelymail.com";
|
smtp = "smtp.purelymail.com";
|
||||||
status = "status.${baseName}";
|
status = "status.${baseName}";
|
||||||
@@ -254,30 +246,30 @@
|
|||||||
default = lib.pkgsBySystem.${system}.nmasur.dotfiles-devshell;
|
default = lib.pkgsBySystem.${system}.nmasur.dotfiles-devshell;
|
||||||
});
|
});
|
||||||
|
|
||||||
# checks = lib.forAllSystems (
|
checks = lib.forAllSystems (
|
||||||
# system:
|
system:
|
||||||
# let
|
let
|
||||||
# pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
# inherit system;
|
inherit system;
|
||||||
# overlays = lib.overlays;
|
overlays = lib.overlays;
|
||||||
# };
|
};
|
||||||
# in
|
in
|
||||||
# {
|
{
|
||||||
# neovim =
|
neovim =
|
||||||
# pkgs.runCommand "neovim-check-health" { buildInputs = [ inputs.self.packages.${system}.neovim ]; }
|
pkgs.runCommand "neovim-check-health" { buildInputs = [ inputs.self.packages.${system}.neovim ]; }
|
||||||
# ''
|
''
|
||||||
# mkdir -p $out
|
mkdir -p $out
|
||||||
# export HOME=$TMPDIR
|
export HOME=$TMPDIR
|
||||||
# nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
|
nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
|
||||||
|
|
||||||
# # Check for errors inside the health log
|
# Check for errors inside the health log
|
||||||
# if $(grep "ERROR" $out/health.log); then
|
if $(grep "ERROR" $out/health.log); then
|
||||||
# cat $out/health.log
|
cat $out/health.log
|
||||||
# exit 1
|
exit 1
|
||||||
# fi
|
fi
|
||||||
# '';
|
'';
|
||||||
# }
|
}
|
||||||
# );
|
);
|
||||||
|
|
||||||
formatter = lib.forAllSystems (
|
formatter = lib.forAllSystems (
|
||||||
system:
|
system:
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ rec {
|
|||||||
power-user.enable = true;
|
power-user.enable = true;
|
||||||
};
|
};
|
||||||
nmasur.presets.programs.helix.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
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
# # This is the root filesystem containing NixOS
|
# # This is the root filesystem containing NixOS
|
||||||
|
|||||||
@@ -67,9 +67,8 @@ lib
|
|||||||
inputs.nur.overlays.default
|
inputs.nur.overlays.default
|
||||||
inputs.nix2vim.overlay
|
inputs.nix2vim.overlay
|
||||||
inputs.zellij-switch.overlays.default
|
inputs.zellij-switch.overlays.default
|
||||||
# inputs.helix.overlays.default
|
inputs.helix.overlays.default
|
||||||
]
|
] ++ (importOverlays ../overlays);
|
||||||
++ (importOverlays ../overlays);
|
|
||||||
|
|
||||||
# System types to support.
|
# System types to support.
|
||||||
supportedSystems = [
|
supportedSystems = [
|
||||||
@@ -98,10 +97,7 @@ lib
|
|||||||
system:
|
system:
|
||||||
import inputs.nixpkgs {
|
import inputs.nixpkgs {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
config.permittedInsecurePackages = [
|
config.permittedInsecurePackages = [ "litestream-0.3.13" ];
|
||||||
"litestream-0.3.13"
|
|
||||||
"electron-36.9.5"
|
|
||||||
];
|
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -134,8 +130,7 @@ lib
|
|||||||
];
|
];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
}
|
} // specialArgs;
|
||||||
// specialArgs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
buildNixos =
|
buildNixos =
|
||||||
@@ -157,10 +152,8 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
}
|
} // specialArgs;
|
||||||
// specialArgs;
|
} // homeModule.home-manager;
|
||||||
}
|
|
||||||
// homeModule.home-manager;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -185,10 +178,8 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
}
|
} // specialArgs;
|
||||||
// specialArgs;
|
} // homeModule.home-manager;
|
||||||
}
|
|
||||||
// homeModule.home-manager;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -231,15 +222,12 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
}
|
} // specialArgs;
|
||||||
// specialArgs;
|
} // homeModule.home-manager;
|
||||||
}
|
|
||||||
// homeModule.home-manager;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
}
|
} // specialArgs;
|
||||||
// specialArgs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
};
|
};
|
||||||
brews = [
|
brews = [
|
||||||
"trash" # Delete files and folders to trash instead of rm
|
"trash" # Delete files and folders to trash instead of rm
|
||||||
"jiratui" # Terminal program to manage Jira
|
|
||||||
];
|
];
|
||||||
casks = [
|
casks = [
|
||||||
"1password" # 1Password will not launch from Nix on macOS
|
"1password" # 1Password will not launch from Nix on macOS
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
inputs: _final: prev: {
|
|
||||||
|
|
||||||
awscli2 = prev.awscli2.overrideAttrs (
|
|
||||||
finalAttrs: previousAttrs: {
|
|
||||||
src = prev.fetchFromGitHub {
|
|
||||||
owner = "aws";
|
|
||||||
repo = "aws-cli";
|
|
||||||
rev = "2.31.27";
|
|
||||||
hash = "sha256-NnAEdbIZVri9Bi0KBlcZIVox+LbuD0/hBdtYB/UFHeo=";
|
|
||||||
};
|
|
||||||
disabledTestPaths = previousAttrs.disabledTestPaths ++ [
|
|
||||||
"tests/unit/customizations"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Caddy with Cloudflare DNS
|
|
||||||
|
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
fetchFromGitHub,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
# Maintain a static version so that the plugin hash doesn't keep breaking
|
|
||||||
(pkgs.caddy.overrideAttrs rec {
|
|
||||||
version = "2.10.2";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "caddyserver";
|
|
||||||
repo = "caddy";
|
|
||||||
tag = "v${version}";
|
|
||||||
hash = "sha256-KvikafRYPFZ0xCXqDdji1rxlkThEDEOHycK8GP5e8vk=";
|
|
||||||
};
|
|
||||||
}).withPlugins
|
|
||||||
{
|
|
||||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
|
||||||
hash = "sha256-iRzpN9awuEFsc7hqKzOMNiCFFEv833xhd4LM+VFQedI=";
|
|
||||||
}
|
|
||||||
@@ -6,17 +6,17 @@
|
|||||||
# Specify AWS_PROFILE and AWS_REGION before running this script
|
# Specify AWS_PROFILE and AWS_REGION before running this script
|
||||||
|
|
||||||
aws ec2 describe-instances \
|
aws ec2 describe-instances \
|
||||||
--filters "Name=instance-state-name,Values=running" |
|
--filters "Name=instance-state-name,Values=running" |
|
||||||
jq -r \
|
jq -r \
|
||||||
'.Reservations[]
|
'.Reservations[]
|
||||||
| .Instances[]
|
| .Instances[]
|
||||||
| .InstanceId + " - " +
|
| .InstanceId + " - " +
|
||||||
(.PrivateIpAddress // "n/a") + " - " +
|
(.PrivateIpAddress // "n/a") + " - " +
|
||||||
(.PublicIpAddress // "n/a") + " - " +
|
(.PublicIpAddress // "n/a") + " - " +
|
||||||
(.Tags // [] | from_entries | .Name // "n/a")' |
|
(.Tags // [] | from_entries | .Name // "n/a")' |
|
||||||
fzf \
|
fzf \
|
||||||
--height 100% \
|
--height 100% \
|
||||||
--layout reverse \
|
--layout reverse \
|
||||||
--header $'Press Enter to start SSM session\nInstance ID - Private IP - Public IP - Name' \
|
--header $'Press Enter to start SSM session\nInstance ID - Private IP - Public IP - Name' \
|
||||||
--preview "aws ec2 describe-instances --instance-ids \"\$(echo {} | cut -d' ' -f1)\" | jq -r '.Reservations[].Instances[0]'" \
|
--preview "aws ec2 describe-instances --instance-ids \"\$(echo {} | cut -d' ' -f1)\" | jq -r '.Reservations[].Instances[0]'" \
|
||||||
--bind "enter:become(aws ssm start-session --document-name 'AWS-StartInteractiveCommand' --parameters '{\"command\": [\"bash\"]}' --target \$(echo {} | cut -d' ' -f1))"
|
--bind "enter:become(aws ssm start-session --target \$(echo {} | cut -d' ' -f1))"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "rebuild" ''
|
pkgs.writeShellScriptBin "rebuild" ''
|
||||||
echo ${pkgs.stdenv.hostPlatform.system}
|
echo ${pkgs.system}
|
||||||
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
||||||
if [ "$SYSTEM" == "darwin" ]; then
|
if [ "$SYSTEM" == "darwin" ]; then
|
||||||
sudo darwin-rebuild switch --flake ${builtins.toString ../../../../.}
|
sudo darwin-rebuild switch --flake ${builtins.toString ../../../../.}
|
||||||
|
|||||||
@@ -174,10 +174,8 @@ in
|
|||||||
filters = {
|
filters = {
|
||||||
"text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
"text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
"text/calendar" = "${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar";
|
"text/calendar" = "${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar";
|
||||||
# "text/html" =
|
|
||||||
# "${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
|
|
||||||
"text/html" =
|
"text/html" =
|
||||||
"!${pkgs.chawan}/bin/cha --type text/html --opt display.image-mode=kitty --opt display.columns=100 --opt display.force-columns=true";
|
"${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
|
||||||
# "text/*" =
|
# "text/*" =
|
||||||
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
|
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
|
||||||
"message/delivery-status" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
"message/delivery-status" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
@@ -204,7 +202,7 @@ in
|
|||||||
|
|
||||||
xdg.desktopEntries.aerc = lib.mkIf (pkgs.stdenv.isLinux) {
|
xdg.desktopEntries.aerc = lib.mkIf (pkgs.stdenv.isLinux) {
|
||||||
name = "aerc";
|
name = "aerc";
|
||||||
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} -e aerc %u";
|
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} aerc %u";
|
||||||
};
|
};
|
||||||
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
"${config.xsession.windowManager.i3.config.modifier}+Shift+e" =
|
"${config.xsession.windowManager.i3.config.modifier}+Shift+e" =
|
||||||
@@ -214,7 +212,7 @@ in
|
|||||||
if terminal == pkgs.wezterm then
|
if terminal == pkgs.wezterm then
|
||||||
"start --class com.noah.aerc -- aerc"
|
"start --class com.noah.aerc -- aerc"
|
||||||
else
|
else
|
||||||
"--class=com.noah.aerc -e aerc";
|
"--class=com.noah.aerc --command=aerc";
|
||||||
in
|
in
|
||||||
"exec ${
|
"exec ${
|
||||||
# Don't name the script `aerc` or it will affect grep
|
# Don't name the script `aerc` or it will affect grep
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ in
|
|||||||
rustfmt
|
rustfmt
|
||||||
pkg-config
|
pkg-config
|
||||||
openssl
|
openssl
|
||||||
rust-analyzer
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.nmasur.presets.programs.chawan;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
options.nmasur.presets.programs.chawan.enable = lib.mkEnableOption "chawan TUI web browser";
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
programs.chawan = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
external.copy-cmd = if pkgs.stdenv.isLinux then "xclip -selection clipboard -in" else "pbcopy";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set Chawan as the default app for manual pages
|
|
||||||
home.sessionVariables = {
|
|
||||||
MANPAGER = "${lib.getExe pkgs.chawan} -T text/x-ansi";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.shellAbbrs.man = "mancha";
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -29,7 +29,7 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
# Always make the dotfiles directory considered safe for git and direnv
|
# Always make the dotfiles directory considered safe for git and direnv
|
||||||
programs.git.settings.safe.directory = cfg.path;
|
programs.git.extraConfig.safe.directory = cfg.path;
|
||||||
programs.direnv.config.whitelist.prefix = [ cfg.path ];
|
programs.direnv.config.whitelist.prefix = [ cfg.path ];
|
||||||
|
|
||||||
home.activation = {
|
home.activation = {
|
||||||
|
|||||||
@@ -16,13 +16,12 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
# Set the i3 terminal
|
# Set the i3 terminal
|
||||||
nmasur.presets.services.i3.terminal =
|
nmasur.presets.services.i3.terminal = config.programs.ghostty.package;
|
||||||
if pkgs.stdenv.isDarwin then pkgs.alacritty else config.programs.ghostty.package;
|
|
||||||
|
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
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;
|
enableFishIntegration = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
@@ -38,8 +37,8 @@ in
|
|||||||
fullscreen = if pkgs.stdenv.isDarwin then true else false;
|
fullscreen = if pkgs.stdenv.isDarwin then true else false;
|
||||||
keybind = [
|
keybind = [
|
||||||
"super+t=unbind" # Pass super-t to underlying tool (e.g. zellij tabs)
|
"super+t=unbind" # Pass super-t to underlying tool (e.g. zellij tabs)
|
||||||
"super+shift+bracket_right=unbind"
|
"super+shift+]=unbind"
|
||||||
"super+shift+bracket_left=unbind"
|
"super+shift+[=unbind"
|
||||||
"ctrl+tab=unbind"
|
"ctrl+tab=unbind"
|
||||||
"ctrl+shift+tab=unbind"
|
"ctrl+shift+tab=unbind"
|
||||||
"ctrl+tab=text:\\x1b[9;5u"
|
"ctrl+tab=text:\\x1b[9;5u"
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
settings.user.name = lib.mkForce cfg.work.name;
|
userName = lib.mkForce cfg.work.name;
|
||||||
settings.user.email = lib.mkForce cfg.work.email;
|
userEmail = lib.mkForce cfg.work.email;
|
||||||
includes = [
|
includes = [
|
||||||
{
|
{
|
||||||
path = "${config.home.homeDirectory}/${config.xdg.configFile."git/personal".target}";
|
path = "${config.home.homeDirectory}/${config.xdg.configFile."git/personal".target}";
|
||||||
|
|||||||
@@ -29,11 +29,9 @@ in
|
|||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
userName = cfg.name;
|
||||||
user = {
|
userEmail = cfg.email;
|
||||||
name = cfg.name;
|
extraConfig = {
|
||||||
email = cfg.email;
|
|
||||||
};
|
|
||||||
core.pager = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight | less --no-init";
|
core.pager = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight | less --no-init";
|
||||||
interactive.difffilter = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight";
|
interactive.difffilter = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight";
|
||||||
pager = {
|
pager = {
|
||||||
|
|||||||
@@ -7,62 +7,6 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.nmasur.presets.programs.helix;
|
cfg = config.nmasur.presets.programs.helix;
|
||||||
|
|
||||||
blame_file_pretty = pkgs.writeShellScriptBin "blame_file_pretty" ''
|
|
||||||
# Source: https://gist.github.com/gloaysa/828707f067e3bb20da18d72fa5d4963a
|
|
||||||
# Utility for Helix: open the patch for the commit that last touched the current line.
|
|
||||||
# If the line isn’t committed yet, it shows the working-tree diff for THIS file only.
|
|
||||||
# The script writes the diff to /tmp and prints the absolute path to stdout
|
|
||||||
# Adjust `context` to see more/fewer unchanged lines around the change (default: 3).
|
|
||||||
#
|
|
||||||
# usage: git-file_pretty.sh <file> <line> [context_lines]
|
|
||||||
# Helix mapping example:
|
|
||||||
# B = ':open %sh{ ~/.config/helix/utils/git-blame-commit.sh "%{buffer_name}" %{cursor_line} 3 }'
|
|
||||||
file="$1"
|
|
||||||
line="$2"
|
|
||||||
ctx="''${3:-3}"
|
|
||||||
|
|
||||||
# blame the exact line
|
|
||||||
porc="$(git blame -L "$line",+1 --porcelain -- "$file")" || exit 1
|
|
||||||
sha="$(printf '%s\n' "$porc" | awk 'NR==1{print $1}')"
|
|
||||||
commit_path="$(printf '%s\n' "$porc" | awk '/^filename /{print substr($0,10); exit}')"
|
|
||||||
|
|
||||||
out="/tmp/hx-blame_$(basename "$file")_''${sha:-wt}.diff"
|
|
||||||
|
|
||||||
if [ -z "$sha" ] || [ "$sha" = 0000000000000000000000000000000000000000 ] || [ "$sha" = "^" ]; then
|
|
||||||
# uncommitted line → working tree diff for this file
|
|
||||||
git --no-pager diff --no-color -U"$ctx" -- "$file" > "$out"
|
|
||||||
else
|
|
||||||
# committed line → only this file’s patch in that commit
|
|
||||||
git --no-pager show --no-color -M -C -U"$ctx" "$sha" -- "''${commit_path:-$file}" > "$out"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# "return" the path for :open %sh{…}
|
|
||||||
printf '%s' "$out"
|
|
||||||
'';
|
|
||||||
|
|
||||||
blame_line_pretty = pkgs.writeShellScriptBin "blame_line_pretty" ''
|
|
||||||
# Source: https://gist.github.com/gloaysa/828707f067e3bb20da18d72fa5d4963a
|
|
||||||
# Utility for Helix: pretty-print blame info for the line under the cursor.
|
|
||||||
# Quite basic.
|
|
||||||
#
|
|
||||||
# usage: blame_line_pretty <file> <line>
|
|
||||||
# Helix mapping example:
|
|
||||||
# b = ":run-shell-command ~/.config/helix/utils/blame_line_pretty.sh %{buffer_name} %{cursor_line}"
|
|
||||||
file="$1"; line="$2"
|
|
||||||
out="$(git blame -L "$line",+1 --porcelain -- "$file")" || return 1
|
|
||||||
|
|
||||||
sha="$(printf '%s\n' "$out" | awk 'NR==1{print $1}')"
|
|
||||||
author="$(printf '%s\n' "$out" | awk -F'author ' '/^author /{print $2; exit}')"
|
|
||||||
epoch="$(printf '%s\n' "$out" | awk '/^author-time /{print $2; exit}')"
|
|
||||||
# dd-mm-yyyy (macOS `date -r`; fallback to gdate if present)
|
|
||||||
date="$( (date -r "$epoch" +%d-%m-%Y\ %H:%M 2>/dev/null) || (gdate -d "@$epoch" +%d-%m-%Y\ %H:%M 2>/dev/null) || printf '%s' "$epoch")"
|
|
||||||
summary="$(printf '%s\n' "$out" | awk -F'summary ' '/^summary /{print $2; exit}')"
|
|
||||||
change="$(printf '%s\n' "$out" | tail -n 1)"
|
|
||||||
|
|
||||||
printf "%s\n%s\n%s\n%s\n%s\n" "$sha" "$author" "$date" "$summary" "$change"
|
|
||||||
'';
|
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -72,13 +16,13 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
# Use Neovim as the editor for git commit messages
|
# Use Neovim as the editor for git commit messages
|
||||||
programs.git.settings.core.editor = lib.mkForce "${lib.getExe pkgs.helix}";
|
programs.git.extraConfig.core.editor = lib.mkForce "${lib.getExe pkgs.helix}";
|
||||||
programs.jujutsu.settings.ui.editor = lib.mkForce "${lib.getExe pkgs.helix}";
|
programs.jujutsu.settings.ui.editor = lib.mkForce "${lib.getExe pkgs.helix}";
|
||||||
|
|
||||||
# Set Neovim as the default app for text editing and manual pages
|
# Set Neovim as the default app for text editing and manual pages
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = lib.mkForce "${lib.getExe pkgs.helix}";
|
EDITOR = lib.mkForce "${lib.getExe pkgs.helix}";
|
||||||
# MANPAGER = lib.mkForce "sh -c 'col -bx | ${lib.getExe pkgs.helix}'";
|
MANPAGER = lib.mkForce "sh -c 'col -bx | ${lib.getExe pkgs.helix}'";
|
||||||
MANWIDTH = 87;
|
MANWIDTH = 87;
|
||||||
MANROFFOPT = "-c";
|
MANROFFOPT = "-c";
|
||||||
};
|
};
|
||||||
@@ -102,10 +46,6 @@ in
|
|||||||
command = "${pkgs.nixd}/bin/nixd";
|
command = "${pkgs.nixd}/bin/nixd";
|
||||||
};
|
};
|
||||||
|
|
||||||
language-server.ty = {
|
|
||||||
command = "${pkgs.ty}/bin/ty";
|
|
||||||
};
|
|
||||||
|
|
||||||
language-server.fish-lsp = {
|
language-server.fish-lsp = {
|
||||||
command = "${pkgs.fish-lsp}/bin/fish-lsp";
|
command = "${pkgs.fish-lsp}/bin/fish-lsp";
|
||||||
};
|
};
|
||||||
@@ -118,14 +58,8 @@ in
|
|||||||
command = lib.getExe pkgs.marksman;
|
command = lib.getExe pkgs.marksman;
|
||||||
};
|
};
|
||||||
|
|
||||||
language-server.rumdl = {
|
|
||||||
command = lib.getExe pkgs.rumdl;
|
|
||||||
args = [ "server" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
language-server.terraform-ls = {
|
language-server.terraform-ls = {
|
||||||
command = "${lib.getExe pkgs.terraform-ls}";
|
command = "${lib.getExe pkgs.terraform-ls} serve";
|
||||||
args = [ "serve" ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
language-server.bash-language-server = {
|
language-server.bash-language-server = {
|
||||||
@@ -148,16 +82,10 @@ in
|
|||||||
{
|
{
|
||||||
name = "markdown";
|
name = "markdown";
|
||||||
auto-format = false;
|
auto-format = false;
|
||||||
language-servers = [
|
language-servers = [ "marksman" ];
|
||||||
"marksman"
|
|
||||||
"rumdl"
|
|
||||||
];
|
|
||||||
formatter = {
|
formatter = {
|
||||||
command = lib.getExe pkgs.rumdl;
|
command = lib.getExe pkgs.mdformat;
|
||||||
args = [
|
args = [ "-" ];
|
||||||
"fmt"
|
|
||||||
"-"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
# Allows return key to continue the token on the next line
|
# Allows return key to continue the token on the next line
|
||||||
comment-tokens = [
|
comment-tokens = [
|
||||||
@@ -169,14 +97,9 @@ in
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "terraform";
|
name = "tfvars";
|
||||||
scope = "source.tf";
|
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
language-servers = [ "terraform-ls" ];
|
language-servers = [ "terraform-ls" ];
|
||||||
file-types = [
|
|
||||||
"tf"
|
|
||||||
"tfvars"
|
|
||||||
];
|
|
||||||
formatter = {
|
formatter = {
|
||||||
command = lib.getExe pkgs.terraform;
|
command = lib.getExe pkgs.terraform;
|
||||||
args = [
|
args = [
|
||||||
@@ -188,9 +111,9 @@ in
|
|||||||
{
|
{
|
||||||
name = "hcl";
|
name = "hcl";
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
file-types = [ "hcl" ];
|
language-servers = [ "terraform-ls" ];
|
||||||
formatter = {
|
formatter = {
|
||||||
command = "${pkgs.packer}/bin/packer";
|
command = lib.getExe pkgs.terraform;
|
||||||
args = [
|
args = [
|
||||||
"fmt"
|
"fmt"
|
||||||
"-"
|
"-"
|
||||||
@@ -251,9 +174,18 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Commandline git blame
|
# 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)}";
|
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)}";
|
||||||
space.B = '':open %sh{ ${blame_line_pretty}/bin/blame_line_pretty "%{buffer_name}" %{cursor_line} 3 }'';
|
|
||||||
space.i = '':open %sh{ ${blame_file_pretty}/bin/blame_file_pretty "%{buffer_name}" %{cursor_line} 3 }'';
|
# Open yazi
|
||||||
|
# https://github.com/sxyazi/yazi/pull/2461
|
||||||
|
# Won't work until next Helix release
|
||||||
|
C-y = [
|
||||||
|
":sh rm -f /tmp/unique-file"
|
||||||
|
":insert-output ${lib.getExe pkgs.yazi} %{buffer_name} --chooser-file=/tmp/unique-file"
|
||||||
|
":insert-output echo \\x1b[?1049h\\x1b[?2004h > /dev/tty"
|
||||||
|
":open %sh{cat /tmp/unique-file}"
|
||||||
|
":redraw"
|
||||||
|
];
|
||||||
|
|
||||||
# Extend selection above
|
# Extend selection above
|
||||||
X = "select_line_above";
|
X = "select_line_above";
|
||||||
@@ -319,10 +251,6 @@ in
|
|||||||
git-exclude = true; # Skip excluded files
|
git-exclude = true; # Skip excluded files
|
||||||
};
|
};
|
||||||
|
|
||||||
completion-replace = true; # Replace whole word with completion
|
|
||||||
trim-trailing-whitespace = true;
|
|
||||||
# rainbow-brackets = true; # Make it easier to match parentheses
|
|
||||||
|
|
||||||
# Show whitespace visible to the user
|
# Show whitespace visible to the user
|
||||||
# Waiting for trailing whitespace option ideally
|
# Waiting for trailing whitespace option ideally
|
||||||
whitespace = {
|
whitespace = {
|
||||||
@@ -521,27 +449,6 @@ in
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Create a desktop option for launching Helix from a file manager
|
|
||||||
# (Requires launching the terminal and then executing Helix)
|
|
||||||
xdg.desktopEntries.helix =
|
|
||||||
lib.mkIf (pkgs.stdenv.isLinux && config.nmasur.presets.services.i3.enable)
|
|
||||||
{
|
|
||||||
name = "Helix wrapper";
|
|
||||||
exec = ''sh -c "${lib.getExe config.nmasur.presets.services.i3.terminal} --command='hx \$1'" _ %F ''; # TODO: change to work for any terminal
|
|
||||||
mimeType = [
|
|
||||||
"text/plain"
|
|
||||||
"text/markdown"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
xdg.mimeApps.defaultApplications = {
|
|
||||||
"text/plain" = lib.mkBefore [ "Helix.desktop" ];
|
|
||||||
"text/markdown" = lib.mkBefore [ "Helix.desktop" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = [
|
|
||||||
(pkgs.writers.writeDashBin "xterm" ''${lib.getExe config.nmasur.presets.services.i3.terminal} +new-window --command"$@" '')
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ in
|
|||||||
# https://github.com/martinvonz/jj/blob/main/docs/config.md
|
# https://github.com/martinvonz/jj/blob/main/docs/config.md
|
||||||
settings = {
|
settings = {
|
||||||
user = {
|
user = {
|
||||||
name = config.programs.git.settings.user.name;
|
name = config.programs.git.userName;
|
||||||
email = config.programs.git.settings.user.email;
|
email = config.programs.git.userEmail;
|
||||||
};
|
};
|
||||||
ui.paginate = "never";
|
ui.paginate = "never";
|
||||||
|
|
||||||
@@ -34,9 +34,6 @@ in
|
|||||||
home.packages = [
|
home.packages = [
|
||||||
# Required for the fsmonitor to auto-snapshot
|
# Required for the fsmonitor to auto-snapshot
|
||||||
pkgs.watchman
|
pkgs.watchman
|
||||||
|
|
||||||
# Required to be on path to work in Zellij
|
|
||||||
pkgs.jjui
|
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ in
|
|||||||
);
|
);
|
||||||
|
|
||||||
# Use Neovim as the editor for git commit messages
|
# Use Neovim as the editor for git commit messages
|
||||||
programs.git.settings.core.editor = "${lib.getExe cfg.package}";
|
programs.git.extraConfig.core.editor = "${lib.getExe cfg.package}";
|
||||||
programs.jujutsu.settings.ui.editor = "${lib.getExe cfg.package}";
|
programs.jujutsu.settings.ui.editor = "${lib.getExe cfg.package}";
|
||||||
|
|
||||||
# Set Neovim as the default app for text editing and manual pages
|
# Set Neovim as the default app for text editing and manual pages
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "${lib.getExe cfg.package}";
|
EDITOR = "${lib.getExe cfg.package}";
|
||||||
# MANPAGER = "${lib.getExe cfg.package} +Man!";
|
MANPAGER = "${lib.getExe cfg.package} +Man!";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Create quick aliases for launching Neovim
|
# Create quick aliases for launching Neovim
|
||||||
@@ -66,7 +66,7 @@ in
|
|||||||
lib.mkIf (pkgs.stdenv.isLinux && config.nmasur.presets.services.i3.enable)
|
lib.mkIf (pkgs.stdenv.isLinux && config.nmasur.presets.services.i3.enable)
|
||||||
{
|
{
|
||||||
name = "Neovim wrapper";
|
name = "Neovim wrapper";
|
||||||
exec = ''${lib.getExe config.nmasur.presets.services.i3.terminal} --command="nvim %F"''; # TODO: change to generic
|
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} nvim %F"; # TODO: change to generic
|
||||||
mimeType = [
|
mimeType = [
|
||||||
"text/plain"
|
"text/plain"
|
||||||
"text/markdown"
|
"text/markdown"
|
||||||
|
|||||||
@@ -29,18 +29,6 @@ in
|
|||||||
doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}
|
doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
rebuildNixosAndPause = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.writeShellScriptBin "rebuild-nixos-pause" ''
|
|
||||||
${lib.getExe cfg.commands.rebuildNixos} || read
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
rebuildHomeAndPause = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.writeShellScriptBin "rebuild-home-pause" ''
|
|
||||||
${lib.getExe cfg.commands.rebuildHome} || read
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,6 @@ in
|
|||||||
|
|
||||||
# Broken on 2023-12-11
|
# Broken on 2023-12-11
|
||||||
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
|
# https://forum.obsidian.md/t/electron-25-is-now-eol-please-upgrade-to-a-newer-version/72878/8
|
||||||
# allowInsecurePackages = [ "electron-36.9.5" ];
|
# insecurePackages = [ "electron-25.9.0" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.ghostty.settings.initial-command = lib.getExe pkgs.zellij;
|
|
||||||
|
|
||||||
xdg.configFile."zellij/layouts/compact-top.kdl".text = # kdl
|
xdg.configFile."zellij/layouts/compact-top.kdl".text = # kdl
|
||||||
''
|
''
|
||||||
layout {
|
layout {
|
||||||
@@ -87,7 +85,7 @@ in
|
|||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
attachExistingSession = true;
|
attachExistingSession = true;
|
||||||
exitShellOnExit = true;
|
exitShellOnExit = false;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
default_mode = "locked";
|
default_mode = "locked";
|
||||||
@@ -123,15 +121,9 @@ in
|
|||||||
shared = {
|
shared = {
|
||||||
"bind \"Alt Shift s\"" = {
|
"bind \"Alt Shift s\"" = {
|
||||||
Run = {
|
Run = {
|
||||||
_args =
|
_args = [
|
||||||
if pkgs.stdenv.isDarwin then
|
(lib.getExe zellij-switch-to-last)
|
||||||
[
|
];
|
||||||
"env"
|
|
||||||
"PATH=${config.home.homeDirectory}/.nix-profile/bin:/usr/bin:/bin"
|
|
||||||
(lib.getExe zellij-switch-to-last)
|
|
||||||
]
|
|
||||||
else
|
|
||||||
[ (lib.getExe zellij-switch-to-last) ];
|
|
||||||
close_on_exit = true;
|
close_on_exit = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -194,28 +186,9 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
"bind \"Alt Shift j\"" = {
|
"bind \"Alt Shift j\"" = {
|
||||||
Run = {
|
|
||||||
_args =
|
|
||||||
if pkgs.stdenv.isDarwin then
|
|
||||||
[
|
|
||||||
"env"
|
|
||||||
"PATH=${config.home.homeDirectory}/.nix-profile/bin:/usr/bin"
|
|
||||||
(lib.getExe pkgs.jjui)
|
|
||||||
]
|
|
||||||
else
|
|
||||||
[ (lib.getExe pkgs.jjui) ];
|
|
||||||
close_on_exit = true;
|
|
||||||
floating = true;
|
|
||||||
x = "1%";
|
|
||||||
y = "1%";
|
|
||||||
width = "99%";
|
|
||||||
height = "99%";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"bind \"Alt Shift y\"" = {
|
|
||||||
Run = {
|
Run = {
|
||||||
_args = [
|
_args = [
|
||||||
(lib.getExe pkgs.yazi)
|
(lib.getExe pkgs.lazyjj)
|
||||||
];
|
];
|
||||||
close_on_exit = true;
|
close_on_exit = true;
|
||||||
floating = true;
|
floating = true;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ function obj:init()
|
|||||||
self.launcher:bind("ctrl", "space", function() end)
|
self.launcher:bind("ctrl", "space", function() end)
|
||||||
self.launcher:bind("", "return", function()
|
self.launcher:bind("", "return", function()
|
||||||
-- self:switch("@wezterm@")
|
-- self:switch("@wezterm@")
|
||||||
self:switch("/Applications/Ghostty.app")
|
self:switch("@ghostty@")
|
||||||
end)
|
end)
|
||||||
self.launcher:bind("", "C", function()
|
self.launcher:bind("", "C", function()
|
||||||
self:switch("Calendar.app")
|
self:switch("Calendar.app")
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ in
|
|||||||
{
|
{
|
||||||
discord = "${pkgs.discord}/Applications/Discord.app";
|
discord = "${pkgs.discord}/Applications/Discord.app";
|
||||||
firefox = "${pkgs.firefox-unwrapped}/Applications/Firefox.app";
|
firefox = "${pkgs.firefox-unwrapped}/Applications/Firefox.app";
|
||||||
|
ghostty = "${config.programs.ghostty.package}/Applications/Ghostty.app";
|
||||||
obsidian = "${pkgs.obsidian}/Applications/Obsidian.app";
|
obsidian = "${pkgs.obsidian}/Applications/Obsidian.app";
|
||||||
slack = "${pkgs.slack}/Applications/Slack.app";
|
slack = "${pkgs.slack}/Applications/Slack.app";
|
||||||
wezterm = "${pkgs.wezterm}/Applications/WezTerm.app";
|
wezterm = "${pkgs.wezterm}/Applications/WezTerm.app";
|
||||||
|
|||||||
@@ -214,9 +214,9 @@ in
|
|||||||
cfg.commands.lockScreen != null
|
cfg.commands.lockScreen != null
|
||||||
) "exec ${cfg.commands.lockScreen}";
|
) "exec ${cfg.commands.lockScreen}";
|
||||||
"${modifier}+Mod1+h" =
|
"${modifier}+Mod1+h" =
|
||||||
''exec --no-startup-id ${lib.getExe cfg.terminal} -e "${lib.getExe config.nmasur.presets.programs.nixpkgs.commands.rebuildHome} '';
|
''exec --no-startup-id ${lib.getExe cfg.terminal} --command="${pkgs.home-manager}/bin/home-manager switch --flake ${config.nmasur.presets.programs.dotfiles.path}#''${hostname} || read" '';
|
||||||
"${modifier}+Mod1+r" =
|
"${modifier}+Mod1+r" =
|
||||||
"exec --no-startup-id ${lib.getExe cfg.terminal} -e ${lib.getExe config.nmasur.presets.programs.nixpkgs.commands.rebuildNixos}";
|
"exec --no-startup-id ${lib.getExe cfg.terminal} --command='doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path} || read'";
|
||||||
|
|
||||||
# Window options
|
# Window options
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+q" = "kill";
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ in
|
|||||||
nmasur.presets = {
|
nmasur.presets = {
|
||||||
programs = {
|
programs = {
|
||||||
bat.enable = lib.mkDefault true;
|
bat.enable = lib.mkDefault true;
|
||||||
chawan.enable = lib.mkDefault true;
|
|
||||||
fd.enable = lib.mkDefault true;
|
fd.enable = lib.mkDefault true;
|
||||||
ripgrep.enable = lib.mkDefault true;
|
ripgrep.enable = lib.mkDefault true;
|
||||||
starship.enable = lib.mkDefault true;
|
starship.enable = lib.mkDefault true;
|
||||||
|
|||||||
@@ -19,10 +19,6 @@ in
|
|||||||
pkgs.pgcli # Postgres client with autocomplete
|
pkgs.pgcli # Postgres client with autocomplete
|
||||||
];
|
];
|
||||||
|
|
||||||
nmasur.presets = {
|
|
||||||
programs.cargo.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ in
|
|||||||
|
|
||||||
nmasur.presets.programs = {
|
nmasur.presets.programs = {
|
||||||
zed-editor.enable = lib.mkDefault true;
|
zed-editor.enable = lib.mkDefault true;
|
||||||
|
jujutsu.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
@@ -28,9 +29,6 @@ in
|
|||||||
pkgs.charm # Manage account and filesystem
|
pkgs.charm # Manage account and filesystem
|
||||||
pkgs.pop # Send emails from a TUI
|
pkgs.pop # Send emails from a TUI
|
||||||
|
|
||||||
pkgs.crush # AI LLM Agent
|
|
||||||
pkgs.gemini-cli # AI LLM Agent
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.gh-dash.enable = lib.mkDefault true;
|
programs.gh-dash.enable = lib.mkDefault true;
|
||||||
|
|||||||
@@ -16,11 +16,10 @@ in
|
|||||||
pkgs.age # Encryption
|
pkgs.age # Encryption
|
||||||
pkgs.bc # Calculator
|
pkgs.bc # Calculator
|
||||||
pkgs.bottom # System monitor (top)
|
pkgs.bottom # System monitor (top)
|
||||||
pkgs.csvlens # CSV viewer (easier than visidata)
|
|
||||||
pkgs.delta # Fancy diffs
|
pkgs.delta # Fancy diffs
|
||||||
pkgs.difftastic # Other fancy diffs
|
pkgs.difftastic # Other fancy diffs
|
||||||
pkgs.doggo # DNS client (dig)
|
pkgs.doggo # DNS client (dig)
|
||||||
pkgs.dust # Disk usage tree (ncdu)
|
pkgs.du-dust # Disk usage tree (ncdu)
|
||||||
pkgs.dua # File sizes (du)
|
pkgs.dua # File sizes (du)
|
||||||
pkgs.duf # Basic disk information (df)
|
pkgs.duf # Basic disk information (df)
|
||||||
pkgs.jless # JSON viewer
|
pkgs.jless # JSON viewer
|
||||||
@@ -34,7 +33,7 @@ in
|
|||||||
pkgs.pandoc # Convert text documents
|
pkgs.pandoc # Convert text documents
|
||||||
pkgs.qrencode # Generate qr codes
|
pkgs.qrencode # Generate qr codes
|
||||||
pkgs.spacer # Output lines in terminal
|
pkgs.spacer # Output lines in terminal
|
||||||
pkgs.stable.tealdeer # Cheatsheets
|
pkgs.tealdeer # Cheatsheets
|
||||||
pkgs.tree # Print tree in terminal
|
pkgs.tree # Print tree in terminal
|
||||||
pkgs.vimv-rs # Batch rename files
|
pkgs.vimv-rs # Batch rename files
|
||||||
pkgs.yazi # TUI file explorer
|
pkgs.yazi # TUI file explorer
|
||||||
@@ -43,7 +42,7 @@ in
|
|||||||
|
|
||||||
programs.fish.shellAliases = {
|
programs.fish.shellAliases = {
|
||||||
"du" = lib.mkDefault (lib.getExe pkgs.dua);
|
"du" = lib.mkDefault (lib.getExe pkgs.dua);
|
||||||
"ncdu" = lib.mkDefault (lib.getExe pkgs.dust);
|
"ncdu" = lib.mkDefault (lib.getExe pkgs.du-dust);
|
||||||
"df" = lib.mkDefault (lib.getExe pkgs.duf);
|
"df" = lib.mkDefault (lib.getExe pkgs.duf);
|
||||||
|
|
||||||
# Use eza (exa) instead of ls for fancier output
|
# Use eza (exa) instead of ls for fancier output
|
||||||
@@ -64,9 +63,8 @@ in
|
|||||||
ghostty.enable = lib.mkDefault true;
|
ghostty.enable = lib.mkDefault true;
|
||||||
git.enable = lib.mkDefault true;
|
git.enable = lib.mkDefault true;
|
||||||
helix.enable = lib.mkDefault true;
|
helix.enable = lib.mkDefault true;
|
||||||
jujutsu.enable = lib.mkDefault true;
|
|
||||||
lazygit.enable = lib.mkDefault true;
|
lazygit.enable = lib.mkDefault true;
|
||||||
# neovim.enable = lib.mkDefault true;
|
neovim.enable = lib.mkDefault true;
|
||||||
nix-index.enable = lib.mkDefault true;
|
nix-index.enable = lib.mkDefault true;
|
||||||
nixpkgs.enable = lib.mkDefault true;
|
nixpkgs.enable = lib.mkDefault true;
|
||||||
notes.enable = lib.mkDefault true;
|
notes.enable = lib.mkDefault true;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.stable.visidata # CSV inspector
|
pkgs.visidata # CSV inspector
|
||||||
pkgs.dos2unix # Convert Windows text files
|
pkgs.dos2unix # Convert Windows text files
|
||||||
pkgs.inetutils # Includes telnet
|
pkgs.inetutils # Includes telnet
|
||||||
pkgs.gnupg # Encryption
|
pkgs.gnupg # Encryption
|
||||||
@@ -49,7 +49,6 @@ in
|
|||||||
aws-ssh.enable = lib.mkDefault true;
|
aws-ssh.enable = lib.mkDefault true;
|
||||||
bash.enable = lib.mkDefault true;
|
bash.enable = lib.mkDefault true;
|
||||||
bat.enable = lib.mkDefault true;
|
bat.enable = lib.mkDefault true;
|
||||||
cargo.enable = lib.mkDefault true;
|
|
||||||
direnv.enable = lib.mkDefault true;
|
direnv.enable = lib.mkDefault true;
|
||||||
dotfiles.enable = lib.mkDefault true;
|
dotfiles.enable = lib.mkDefault true;
|
||||||
fd.enable = lib.mkDefault true;
|
fd.enable = lib.mkDefault true;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
inherit (config.nmasur.settings) username;
|
||||||
cfg = config.nmasur.presets.services.dock;
|
cfg = config.nmasur.presets.services.dock;
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ in
|
|||||||
"/System/Applications/Messages.app"
|
"/System/Applications/Messages.app"
|
||||||
"/System/Applications/Mail.app"
|
"/System/Applications/Mail.app"
|
||||||
"/Applications/zoom.us.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.discord}/Applications/Discord.app"
|
||||||
"${pkgs.obsidian}/Applications/Obsidian.app"
|
"${pkgs.obsidian}/Applications/Obsidian.app"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ in
|
|||||||
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
||||||
"notunes" # Don't launch Apple Music with the play button
|
"notunes" # Don't launch Apple Music with the play button
|
||||||
"topnotch" # Darkens the menu bar to complete black
|
"topnotch" # Darkens the menu bar to complete black
|
||||||
"ghostty" # Terminal application (not buildable on Nix on macOS)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ let
|
|||||||
hostnames.download
|
hostnames.download
|
||||||
hostnames.photos
|
hostnames.photos
|
||||||
hostnames.audiobooks
|
hostnames.audiobooks
|
||||||
hostnames.paperless
|
|
||||||
];
|
];
|
||||||
mkRecord = service: "${service} A ${localIp}";
|
mkRecord = service: "${service} A ${localIp}";
|
||||||
localRecords = lib.concatLines (map mkRecord localServices);
|
localRecords = lib.concatLines (map mkRecord localServices);
|
||||||
|
|||||||
@@ -66,7 +66,10 @@ in
|
|||||||
nmasur.presets.services.caddy.cidrAllowlist = cloudflareIpRanges;
|
nmasur.presets.services.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.nmasur.caddy;
|
services.caddy.package = pkgs.caddy.withPlugins {
|
||||||
|
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
||||||
|
hash = "sha256-S1JN7brvH2KIu7DaDOH1zij3j8hWLLc0HdnUc+L89uU=";
|
||||||
|
};
|
||||||
nmasur.presets.services.caddy.tlsPolicies = [
|
nmasur.presets.services.caddy.tlsPolicies = [
|
||||||
{
|
{
|
||||||
issuers = [
|
issuers = [
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ in
|
|||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
|
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
|
||||||
${giteaPath}/repositories/ \
|
${giteaPath}/ \
|
||||||
s3://${config.nmasur.presets.services.litestream.s3.bucket}/gitea-data/ \
|
s3://${config.nmasur.presets.services.litestream.s3.bucket}/gitea-data/ \
|
||||||
--endpoint-url=https://${config.nmasur.presets.services.litestream.s3.endpoint}
|
--endpoint-url=https://${config.nmasur.presets.services.litestream.s3.endpoint}
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ in
|
|||||||
caps
|
caps
|
||||||
)
|
)
|
||||||
(defalias
|
(defalias
|
||||||
escctrl (tap-hold-press 200 200 esc lctrl)
|
escctrl (tap-hold-press 1000 1000 esc lctrl)
|
||||||
)
|
)
|
||||||
(deflayer base
|
(deflayer base
|
||||||
@escctrl
|
@escctrl
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
# Use power button to sleep instead of poweroff
|
# Use power button to sleep instead of poweroff
|
||||||
services.logind.settings.Login.HandlePowerKey = "suspend";
|
services.logind.powerKey = "suspend";
|
||||||
services.logind.settings.Login.HandlePowerKeyLongPress = "poweroff";
|
services.logind.powerKeyLongPress = "poweroff";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (config.nmasur.settings) hostnames;
|
|
||||||
cfg = config.nmasur.presets.services.mealie;
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
options.nmasur.presets.services.mealie.enable = lib.mkEnableOption "mealie recipe manager";
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
|
|
||||||
services.mealie = {
|
|
||||||
enable = true;
|
|
||||||
port = 9099;
|
|
||||||
database.createLocally = true;
|
|
||||||
listenAddress = "127.0.0.1";
|
|
||||||
};
|
|
||||||
|
|
||||||
nmasur.presets.services.caddy.routes = [
|
|
||||||
{
|
|
||||||
match = [ { host = [ hostnames.recipes ]; } ];
|
|
||||||
handle = [
|
|
||||||
{
|
|
||||||
handler = "reverse_proxy";
|
|
||||||
upstreams = [ { dial = "localhost:${builtins.toString config.services.mealie.port}"; } ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Configure Cloudflare DNS to point to this machine
|
|
||||||
services.cloudflare-dyndns.domains = [ hostnames.recipes ];
|
|
||||||
|
|
||||||
# Point localhost to the local domain
|
|
||||||
networking.hosts."127.0.0.1" = [ hostnames.recipes ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
# together with triggers.
|
# together with triggers.
|
||||||
|
|
||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (config.nmasur.settings) hostnames;
|
inherit (config.nmasur.settings) hostnames;
|
||||||
cfg = config.nmasur.presets.services.n8n;
|
cfg = config.nmasur.presets.services.n8n;
|
||||||
@@ -17,13 +18,18 @@ in
|
|||||||
|
|
||||||
services.n8n = {
|
services.n8n = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environment = {
|
webhookUrl = "https://${hostnames.n8n}";
|
||||||
N8N_LISTEN_ADDRESS = "127.0.0.1";
|
settings = {
|
||||||
N8N_PORT = 5678;
|
listen_address = "127.0.0.1";
|
||||||
N8N_EDITOR_BASE_URL = "https://${hostnames.n8n}";
|
port = 5678;
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.n8n.environment = {
|
||||||
|
N8N_EDITOR_BASE_URL = config.services.n8n.webhookUrl;
|
||||||
|
};
|
||||||
|
|
||||||
# Configure Cloudflare DNS to point to this machine
|
# Configure Cloudflare DNS to point to this machine
|
||||||
services.cloudflare-dyndns.domains = [ hostnames.n8n ];
|
services.cloudflare-dyndns.domains = [ hostnames.n8n ];
|
||||||
|
|
||||||
@@ -34,9 +40,7 @@ in
|
|||||||
handle = [
|
handle = [
|
||||||
{
|
{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [
|
upstreams = [ { dial = "localhost:${builtins.toString config.services.n8n.settings.port}"; } ];
|
||||||
{ dial = "localhost:${builtins.toString config.services.n8n.environment.N8N_PORT}"; }
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ in
|
|||||||
|
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud32; # Required to specify
|
package = pkgs.nextcloud31; # Required to specify
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
datadir = "/data/nextcloud";
|
datadir = "/data/nextcloud";
|
||||||
database.createLocally = true;
|
database.createLocally = true;
|
||||||
|
|||||||
@@ -17,11 +17,9 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
mediaDir = "/data/generic/paperless";
|
mediaDir = "/data/generic/paperless";
|
||||||
passwordFile = config.secrets.paperless.dest;
|
passwordFile = config.secrets.paperless.dest;
|
||||||
configureTika = true; # Enable processing of emails
|
|
||||||
settings = {
|
settings = {
|
||||||
PAPERLESS_OCR_USER_ARGS = builtins.toJSON { invalidate_digital_signatures = true; };
|
PAPERLESS_OCR_USER_ARGS = builtins.toJSON { invalidate_digital_signatures = true; };
|
||||||
PAPERLESS_URL = "https://${hostnames.paperless}";
|
PAPERLESS_URL = "https://${hostnames.paperless}";
|
||||||
PAPERLESS_DATE_ORDER = "MDY"; # Check document for US-formatted dates
|
|
||||||
|
|
||||||
# Enable if changing the path name in Caddy
|
# Enable if changing the path name in Caddy
|
||||||
# PAPERLESS_FORCE_SCRIPT_NAME = "/paperless";
|
# 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}"; }
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -30,14 +30,12 @@ in
|
|||||||
karakeep.enable = lib.mkDefault true;
|
karakeep.enable = lib.mkDefault true;
|
||||||
litestream.enable = lib.mkDefault true;
|
litestream.enable = lib.mkDefault true;
|
||||||
mathesar.enable = lib.mkDefault true;
|
mathesar.enable = lib.mkDefault true;
|
||||||
mealie.enable = lib.mkDefault true;
|
minecraft-server.enable = lib.mkDefault true;
|
||||||
minecraft-server.enable = lib.mkDefault false;
|
|
||||||
n8n.enable = lib.mkDefault true;
|
n8n.enable = lib.mkDefault true;
|
||||||
nix-autoupgrade.enable = lib.mkDefault true; # On by default for communications
|
nix-autoupgrade.enable = lib.mkDefault false; # On by default for communications
|
||||||
ntfy-sh.enable = lib.mkDefault true;
|
ntfy-sh.enable = lib.mkDefault true;
|
||||||
pgweb.enable = lib.mkDefault true;
|
pgweb.enable = lib.mkDefault true;
|
||||||
postgresql.enable = lib.mkDefault true;
|
postgresql.enable = lib.mkDefault true;
|
||||||
stalwart-mail.enable = lib.mkDefault true;
|
|
||||||
thelounge.enable = lib.mkDefault true;
|
thelounge.enable = lib.mkDefault true;
|
||||||
uptime-kuma.enable = lib.mkDefault true;
|
uptime-kuma.enable = lib.mkDefault true;
|
||||||
vaultwarden.enable = lib.mkDefault true;
|
vaultwarden.enable = lib.mkDefault true;
|
||||||
|
|||||||
Reference in New Issue
Block a user