mirror of
https://github.com/nmasur/dotfiles
synced 2025-12-16 20:42:41 +00:00
Compare commits
30 Commits
a57207dd5d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d6b29c30b | ||
|
|
fd589b66ef | ||
|
|
853aa644fa | ||
|
|
b6e7221cc6 | ||
|
|
235901b3b0 | ||
|
|
7cd74986df | ||
|
|
a6e15b71cd | ||
|
|
2e4467b6ea | ||
|
|
431ebd732c | ||
|
|
2d576bd25d | ||
|
|
a1615eda67 | ||
|
|
444582a5a5 | ||
|
|
fbabdadb32 | ||
|
|
f8dfa2a817 | ||
|
|
e4a8ef15ce | ||
|
|
5c922310f5 | ||
|
|
2f274cd652 | ||
|
|
407e9c3af8 | ||
|
|
c13e029805 | ||
|
|
c56bc30200 | ||
|
|
6064fdb0e0 | ||
|
|
5cf27d6d66 | ||
|
|
ceca1ffd5a | ||
|
|
ebbc9c5a5d | ||
|
|
aea3e95ef5 | ||
|
|
d79c1ba7df | ||
|
|
422131134a | ||
|
|
5d8e10b814 | ||
|
|
fdd5eb6418 | ||
|
|
72c548e707 |
122
flake.lock
generated
122
flake.lock
generated
@@ -22,11 +22,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761339987,
|
"lastModified": 1765065051,
|
||||||
"narHash": "sha256-IUaawVwItZKi64IA6kF6wQCLCzpXbk2R46dHn8sHkig=",
|
"narHash": "sha256-b7W9WsvyMOkUScNxbzS45KEJp0iiqRPyJ1I3JBE+oEE=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "7cd9aac79ee2924a85c211d21fafd394b06a38de",
|
"rev": "7e22bf538aa3e0937effcb1cee73d5f1bcc26f79",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760701190,
|
"lastModified": 1765326679,
|
||||||
"narHash": "sha256-y7UhnWlER8r776JsySqsbTUh2Txf7K30smfHlqdaIQw=",
|
"narHash": "sha256-fTLX9kDwLr9Y0rH/nG+h1XG5UU+jBcy0PFYn5eneRX8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "3a9450b26e69dcb6f8de6e2b07b3fc1c288d85f5",
|
"rev": "d64e5cdca35b5fad7c504f615357a7afe6d9c49e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -76,11 +76,11 @@
|
|||||||
"flake-compat_2": {
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747046372,
|
"lastModified": 1765121682,
|
||||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -148,27 +148,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"helix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1761141169,
|
|
||||||
"narHash": "sha256-5IZjbTvP5dNTD8CbEYlNbicdGcbCN9SC9ksMm2ZEXH0=",
|
|
||||||
"owner": "helix-editor",
|
|
||||||
"repo": "helix",
|
|
||||||
"rev": "d79cce4e4bfc24dd204f1b294c899ed73f7e9453",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "helix-editor",
|
|
||||||
"repo": "helix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -176,11 +155,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761344779,
|
"lastModified": 1765480374,
|
||||||
"narHash": "sha256-6LNSptFYhiAd0M/maJoixJw7V0Kp5BSoMRtIahcfu3M=",
|
"narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "c644cb018f9fdec55f5ac2afb4713a8c7beb757c",
|
"rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -259,11 +238,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1751903740,
|
"lastModified": 1764234087,
|
||||||
"narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=",
|
"narHash": "sha256-NHF7QWa0ZPT8hsJrvijREW3+nifmF2rTXgS2v0tpcEA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "032decf9db65efed428afd2fa39d80f7089085eb",
|
"rev": "032a1878682fafe829edfcf5fdfad635a2efe748",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -290,27 +269,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735563628,
|
"lastModified": 1765363881,
|
||||||
"narHash": "sha256-OnSAY7XDSx7CtDoqNh8jwVwh4xNL/2HaJxGjryLWzX8=",
|
"narHash": "sha256-3C3xWn8/2Zzr7sxVBmpc1H1QfxjNfta5IMFe3O9ZEPw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b134951a4c9f3c995fd7be05f3243f8ecd65d798",
|
"rev": "d2b1213bf5ec5e62d96b003ab4b5cbc42abfc0d0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-24.05",
|
"ref": "nixos-25.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761114652,
|
"lastModified": 1765186076,
|
||||||
"narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=",
|
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c",
|
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -322,11 +301,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728538411,
|
"lastModified": 1744536153,
|
||||||
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
|
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
|
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -344,11 +323,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761358507,
|
"lastModified": 1765598217,
|
||||||
"narHash": "sha256-2hvQzK+OYpNyKxTMevGOwBPFDJSvWQHBBASQVM94dDU=",
|
"narHash": "sha256-yJhIuiP6znKni5djRu+84X2ye4yyqqwz+Ob07gcgDbs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "cbe64052fb6a79ffaeba7d0b022d38d846e86334",
|
"rev": "da24c00523a3125a97b24783e2b59b5b98ac5da7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -361,7 +340,6 @@
|
|||||||
"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",
|
||||||
@@ -369,42 +347,22 @@
|
|||||||
"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": 1759631821,
|
|
||||||
"narHash": "sha256-V8A1L0FaU/aSXZ1QNJScxC12uP4hANeRBgI4YdhHeRM=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "1d7cbdaad90f8a5255a89a6eddd8af24dc89cafe",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay_2": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736476219,
|
"lastModified": 1765593578,
|
||||||
"narHash": "sha256-+qyv3QqdZCdZ3cSO/cbpEY6tntyYjfe1bB12mdpNFaY=",
|
"narHash": "sha256-qbl874bCIy9+OLImdfBfZ9ITUDDjjTAB04Dk4PlZFV0=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "de30cc5963da22e9742bbbbb9a3344570ed237b9",
|
"rev": "348b94ed9ddffccdf1a65582a2dcff0a4a3eeeb4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -484,11 +442,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1760536587,
|
"lastModified": 1765483419,
|
||||||
"narHash": "sha256-wfWqt+igns/VazjPLkyb4Z/wpn4v+XIjUeI3xY/1ENg=",
|
"narHash": "sha256-w6wznH1lBzlSH3+pWDkE+L6xA0F02drFAzu2E7PD/Jo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "f98ee1de1fa36eca63c67b600f5d617e184e82ea",
|
"rev": "0c040f28b44b18e0d4240e027096078e34dbb029",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -502,7 +460,9 @@
|
|||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"rust-overlay": "rust-overlay_2",
|
"rust-overlay": [
|
||||||
|
"rust-overlay"
|
||||||
|
],
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -522,11 +482,11 @@
|
|||||||
"zenyd-mpv-scripts": {
|
"zenyd-mpv-scripts": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707704915,
|
"lastModified": 1765050776,
|
||||||
"narHash": "sha256-9P/8q/OZXfaJMS08acQP4h3/zUA5mKRQee0JmkXcz1w=",
|
"narHash": "sha256-9gO+GkNoGsxAbMRrBWu0FfXEQtyTmHivlaxlYLpV2YM=",
|
||||||
"owner": "zenyd",
|
"owner": "zenyd",
|
||||||
"repo": "mpv-scripts",
|
"repo": "mpv-scripts",
|
||||||
"rev": "9bdce0050144cb24f92475f7bdd77180e0e4c26b",
|
"rev": "62f4bb313c6cb6366672e78dea940e9da8fec84a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
19
flake.nix
19
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-24.05";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
|
|
||||||
# Used for MacOS system config
|
# Used for MacOS system config
|
||||||
darwin = {
|
darwin = {
|
||||||
@@ -64,17 +64,23 @@
|
|||||||
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 = {
|
||||||
@@ -133,6 +139,7 @@
|
|||||||
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}";
|
||||||
|
|||||||
@@ -67,8 +67,9 @@ 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 = [
|
||||||
@@ -97,7 +98,10 @@ lib
|
|||||||
system:
|
system:
|
||||||
import inputs.nixpkgs {
|
import inputs.nixpkgs {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
config.permittedInsecurePackages = [ "litestream-0.3.13" ];
|
config.permittedInsecurePackages = [
|
||||||
|
"litestream-0.3.13"
|
||||||
|
"electron-36.9.5"
|
||||||
|
];
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -130,7 +134,8 @@ lib
|
|||||||
];
|
];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
} // specialArgs;
|
}
|
||||||
|
// specialArgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildNixos =
|
buildNixos =
|
||||||
@@ -152,8 +157,10 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
} // specialArgs;
|
}
|
||||||
} // homeModule.home-manager;
|
// specialArgs;
|
||||||
|
}
|
||||||
|
// homeModule.home-manager;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -178,8 +185,10 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
} // specialArgs;
|
}
|
||||||
} // homeModule.home-manager;
|
// specialArgs;
|
||||||
|
}
|
||||||
|
// homeModule.home-manager;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -222,12 +231,15 @@ lib
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit colorscheme;
|
inherit colorscheme;
|
||||||
} // specialArgs;
|
}
|
||||||
} // homeModule.home-manager;
|
// specialArgs;
|
||||||
|
}
|
||||||
|
// homeModule.home-manager;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
} // specialArgs;
|
}
|
||||||
|
// specialArgs;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
};
|
};
|
||||||
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
|
||||||
|
|||||||
@@ -2,6 +2,12 @@ inputs: _final: prev: {
|
|||||||
|
|
||||||
awscli2 = prev.awscli2.overrideAttrs (
|
awscli2 = prev.awscli2.overrideAttrs (
|
||||||
finalAttrs: previousAttrs: {
|
finalAttrs: previousAttrs: {
|
||||||
|
src = prev.fetchFromGitHub {
|
||||||
|
owner = "aws";
|
||||||
|
repo = "aws-cli";
|
||||||
|
rev = "2.31.27";
|
||||||
|
hash = "sha256-NnAEdbIZVri9Bi0KBlcZIVox+LbuD0/hBdtYB/UFHeo=";
|
||||||
|
};
|
||||||
disabledTestPaths = previousAttrs.disabledTestPaths ++ [
|
disabledTestPaths = previousAttrs.disabledTestPaths ++ [
|
||||||
"tests/unit/customizations"
|
"tests/unit/customizations"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -18,5 +18,5 @@
|
|||||||
}).withPlugins
|
}).withPlugins
|
||||||
{
|
{
|
||||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
||||||
hash = "sha256-XwZ0Hkeh2FpQL/fInaSq+/3rCLmQRVvwBM0Y1G1FZNU=";
|
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 --target \$(echo {} | cut -d' ' -f1))"
|
--bind "enter:become(aws ssm start-session --document-name 'AWS-StartInteractiveCommand' --parameters '{\"command\": [\"bash\"]}' --target \$(echo {} | cut -d' ' -f1))"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "rebuild" ''
|
pkgs.writeShellScriptBin "rebuild" ''
|
||||||
echo ${pkgs.system}
|
echo ${pkgs.stdenv.hostPlatform.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,8 +174,10 @@ 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.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
|
"!${pkgs.chawan}/bin/cha --type text/html --opt display.image-mode=kitty --opt display.columns=100 --opt display.force-columns=true";
|
||||||
# "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";
|
||||||
@@ -202,7 +204,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} aerc %u";
|
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} -e 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" =
|
||||||
@@ -212,7 +214,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 --command=aerc";
|
"--class=com.noah.aerc -e 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
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
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.extraConfig.safe.directory = cfg.path;
|
programs.git.settings.safe.directory = cfg.path;
|
||||||
programs.direnv.config.whitelist.prefix = [ cfg.path ];
|
programs.direnv.config.whitelist.prefix = [ cfg.path ];
|
||||||
|
|
||||||
home.activation = {
|
home.activation = {
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
# Set the i3 terminal
|
# Set the i3 terminal
|
||||||
nmasur.presets.services.i3.terminal = config.programs.ghostty.package;
|
nmasur.presets.services.i3.terminal =
|
||||||
|
if pkgs.stdenv.isDarwin then pkgs.alacritty else config.programs.ghostty.package;
|
||||||
|
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
userName = lib.mkForce cfg.work.name;
|
settings.user.name = lib.mkForce cfg.work.name;
|
||||||
userEmail = lib.mkForce cfg.work.email;
|
settings.user.email = 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,9 +29,11 @@ in
|
|||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userName = cfg.name;
|
settings = {
|
||||||
userEmail = cfg.email;
|
user = {
|
||||||
extraConfig = {
|
name = cfg.name;
|
||||||
|
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,6 +7,62 @@
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -16,13 +72,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.extraConfig.core.editor = lib.mkForce "${lib.getExe pkgs.helix}";
|
programs.git.settings.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";
|
||||||
};
|
};
|
||||||
@@ -62,6 +118,11 @@ 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}";
|
||||||
args = [ "serve" ];
|
args = [ "serve" ];
|
||||||
@@ -87,10 +148,16 @@ in
|
|||||||
{
|
{
|
||||||
name = "markdown";
|
name = "markdown";
|
||||||
auto-format = false;
|
auto-format = false;
|
||||||
language-servers = [ "marksman" ];
|
language-servers = [
|
||||||
|
"marksman"
|
||||||
|
"rumdl"
|
||||||
|
];
|
||||||
formatter = {
|
formatter = {
|
||||||
command = lib.getExe pkgs.mdformat;
|
command = lib.getExe pkgs.rumdl;
|
||||||
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 = [
|
||||||
@@ -102,9 +169,14 @@ in
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "tfvars";
|
name = "terraform";
|
||||||
|
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 = [
|
||||||
@@ -116,9 +188,9 @@ in
|
|||||||
{
|
{
|
||||||
name = "hcl";
|
name = "hcl";
|
||||||
auto-format = true;
|
auto-format = true;
|
||||||
language-servers = [ "terraform-ls" ];
|
file-types = [ "hcl" ];
|
||||||
formatter = {
|
formatter = {
|
||||||
command = lib.getExe pkgs.terraform;
|
command = "${pkgs.packer}/bin/packer";
|
||||||
args = [
|
args = [
|
||||||
"fmt"
|
"fmt"
|
||||||
"-"
|
"-"
|
||||||
@@ -179,18 +251,9 @@ 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 }'';
|
||||||
# Open yazi
|
space.i = '':open %sh{ ${blame_file_pretty}/bin/blame_file_pretty "%{buffer_name}" %{cursor_line} 3 }'';
|
||||||
# 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";
|
||||||
@@ -256,6 +319,10 @@ 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 = {
|
||||||
|
|||||||
@@ -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.userName;
|
name = config.programs.git.settings.user.name;
|
||||||
email = config.programs.git.userEmail;
|
email = config.programs.git.settings.user.email;
|
||||||
};
|
};
|
||||||
ui.paginate = "never";
|
ui.paginate = "never";
|
||||||
|
|
||||||
@@ -34,6 +34,9 @@ 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.extraConfig.core.editor = "${lib.getExe cfg.package}";
|
programs.git.settings.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
|
||||||
|
|||||||
@@ -29,6 +29,18 @@ 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
|
||||||
# insecurePackages = [ "electron-25.9.0" ];
|
# allowInsecurePackages = [ "electron-36.9.5" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ 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 {
|
||||||
@@ -85,7 +87,7 @@ in
|
|||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
attachExistingSession = true;
|
attachExistingSession = true;
|
||||||
exitShellOnExit = false;
|
exitShellOnExit = true;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
default_mode = "locked";
|
default_mode = "locked";
|
||||||
@@ -121,9 +123,15 @@ in
|
|||||||
shared = {
|
shared = {
|
||||||
"bind \"Alt Shift s\"" = {
|
"bind \"Alt Shift s\"" = {
|
||||||
Run = {
|
Run = {
|
||||||
_args = [
|
_args =
|
||||||
(lib.getExe zellij-switch-to-last)
|
if pkgs.stdenv.isDarwin then
|
||||||
];
|
[
|
||||||
|
"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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -186,9 +194,28 @@ 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.lazyjj)
|
(lib.getExe pkgs.yazi)
|
||||||
];
|
];
|
||||||
close_on_exit = true;
|
close_on_exit = true;
|
||||||
floating = true;
|
floating = true;
|
||||||
|
|||||||
@@ -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} --command="${pkgs.home-manager}/bin/home-manager switch --flake ${config.nmasur.presets.programs.dotfiles.path}#''${hostname} || read" '';
|
''exec --no-startup-id ${lib.getExe cfg.terminal} -e "${lib.getExe config.nmasur.presets.programs.nixpkgs.commands.rebuildHome} '';
|
||||||
"${modifier}+Mod1+r" =
|
"${modifier}+Mod1+r" =
|
||||||
"exec --no-startup-id ${lib.getExe cfg.terminal} --command='doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path} || read'";
|
"exec --no-startup-id ${lib.getExe cfg.terminal} -e ${lib.getExe config.nmasur.presets.programs.nixpkgs.commands.rebuildNixos}";
|
||||||
|
|
||||||
# Window options
|
# Window options
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+q" = "kill";
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ 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;
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ 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 = [
|
||||||
@@ -29,7 +28,8 @@ 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.chawan # Browser TUI
|
pkgs.crush # AI LLM Agent
|
||||||
|
pkgs.gemini-cli # AI LLM Agent
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,11 @@ 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.du-dust # Disk usage tree (ncdu)
|
pkgs.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
|
||||||
@@ -33,7 +34,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.tealdeer # Cheatsheets
|
pkgs.stable.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
|
||||||
@@ -42,7 +43,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.du-dust);
|
"ncdu" = lib.mkDefault (lib.getExe pkgs.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
|
||||||
@@ -63,8 +64,9 @@ 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.visidata # CSV inspector
|
pkgs.stable.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
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ in
|
|||||||
caps
|
caps
|
||||||
)
|
)
|
||||||
(defalias
|
(defalias
|
||||||
escctrl (tap-hold-press 1000 1000 esc lctrl)
|
escctrl (tap-hold-press 200 200 esc lctrl)
|
||||||
)
|
)
|
||||||
(deflayer base
|
(deflayer base
|
||||||
@escctrl
|
@escctrl
|
||||||
|
|||||||
40
platforms/nixos/modules/nmasur/presets/services/mealie.nix
Normal file
40
platforms/nixos/modules/nmasur/presets/services/mealie.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{ 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,7 +2,6 @@
|
|||||||
# 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;
|
||||||
@@ -18,18 +17,13 @@ in
|
|||||||
|
|
||||||
services.n8n = {
|
services.n8n = {
|
||||||
enable = true;
|
enable = true;
|
||||||
webhookUrl = "https://${hostnames.n8n}";
|
environment = {
|
||||||
settings = {
|
N8N_LISTEN_ADDRESS = "127.0.0.1";
|
||||||
listen_address = "127.0.0.1";
|
N8N_PORT = 5678;
|
||||||
port = 5678;
|
N8N_EDITOR_BASE_URL = "https://${hostnames.n8n}";
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
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 ];
|
||||||
|
|
||||||
@@ -40,7 +34,9 @@ in
|
|||||||
handle = [
|
handle = [
|
||||||
{
|
{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [ { dial = "localhost:${builtins.toString config.services.n8n.settings.port}"; } ];
|
upstreams = [
|
||||||
|
{ dial = "localhost:${builtins.toString config.services.n8n.environment.N8N_PORT}"; }
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,9 +30,10 @@ 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;
|
||||||
minecraft-server.enable = lib.mkDefault true;
|
mealie.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 false; # On by default for communications
|
nix-autoupgrade.enable = lib.mkDefault true; # 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;
|
||||||
|
|||||||
Reference in New Issue
Block a user