mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-12 04:30:14 +00:00
Compare commits
70 Commits
b36895f108
...
platform
Author | SHA1 | Date | |
---|---|---|---|
6933083cda | |||
39d9cb7e5a | |||
b270e1643c | |||
cdbd94e64e | |||
9e3b003241 | |||
802544575f | |||
a85180beee | |||
b901b9abd9 | |||
870ab6894d | |||
12604f3109 | |||
59e67fb406 | |||
6a7706ca85 | |||
12d0bccb42 | |||
cf7966d73d | |||
fa1482dcfc | |||
8e7ccbda59 | |||
59c5ca4816 | |||
442249c242 | |||
5eb2b003d4 | |||
ef6070fe6d | |||
38906a802d | |||
852ecf0b91 | |||
a611b0ab69 | |||
6802c4de2f | |||
4dc9590ff8 | |||
e0588878b1 | |||
98356634cd | |||
1833b4b46c | |||
3087b1a39c | |||
a3ad019f4b | |||
bdf163a50a | |||
bf273925ad | |||
1eae89b8ab | |||
90fd9f54a7 | |||
2b1106ec94 | |||
fbb00d9504 | |||
75d4dbe868 | |||
37d1d7724a | |||
f59ac536a2 | |||
e90c6b1724 | |||
2722a8bf61 | |||
3e8b14d671 | |||
a3dcca556f | |||
97fdb76328 | |||
cd0b7debd4 | |||
1b05fa3745 | |||
350c94af3c | |||
9d7c6b3215 | |||
50a1be634c | |||
bcf1737858 | |||
c36ca39a0d | |||
98c561f462 | |||
1276bcf19e | |||
dd95c94b6e | |||
8f5b3e86e3 | |||
fc8f460559 | |||
05e3996eb3 | |||
eed097f270 | |||
50863e7232 | |||
a4bebe653c | |||
e7366f9510 | |||
3206b48f28 | |||
7007567207 | |||
1d4ad5b0af | |||
2b988b1e9c | |||
78076b0de7 | |||
ebd7b88909 | |||
7de88ba2b6 | |||
1062369a78 | |||
dc6b6f8328 |
67
README.md
67
README.md
@ -8,38 +8,38 @@ configuration may be difficult to translate to a non-Nix system.
|
||||
|
||||
## System Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
|----------------|-----------------------------------------------------|-----------------------------------------------|
|
||||
| OS | [NixOS](https://nixos.org) | [Link](./modules/nixos) |
|
||||
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./modules/nixos/graphical/xorg.nix) |
|
||||
| Compositor | [Picom](https://github.com/yshui/picom) | [Link](./modules/nixos/graphical/picom.nix) |
|
||||
| Window Manager | [i3](https://i3wm.org/) | [Link](./modules/nixos/graphical/i3.nix) |
|
||||
| Panel | [Polybar](https://polybar.github.io/) | [Link](./modules/nixos/graphical/polybar.nix) |
|
||||
| Font | [Victor Mono](https://rubjo.github.io/victor-mono/) | [Link](./modules/nixos/graphical/fonts.nix) |
|
||||
| Launcher | [Rofi](https://github.com/davatorium/rofi) | [Link](./modules/nixos/graphical/rofi.nix) |
|
||||
| Feature | Program | Configuration |
|
||||
|----------------|-----------------------------------------------------|-----------------------------------------------------------------------------------|
|
||||
| OS | [NixOS](https://nixos.org) | [Link](./platforms/nixos) |
|
||||
| Display Server | [X11](https://www.x.org/wiki/) | [Link](./platforms/nixos/modules/nmasur/profiles/gui.nix) |
|
||||
| Compositor | [Picom](https://github.com/yshui/picom) | [Link](./platforms/home-manager/modules/nmasur/presets/services/picom.nix) |
|
||||
| Window Manager | [i3](https://i3wm.org/) | [Link](./platforms/home-manager/modules/nmasur/presets/services/i3.nix) |
|
||||
| Panel | [Polybar](https://polybar.github.io/) | [Link](./platforms/home-manager/modules/nmasur/presets/services/polybar.nix) |
|
||||
| Font | [Victor Mono](https://rubjo.github.io/victor-mono/) | [Link](./platforms/home-manager/modules/nmasur/presets/fonts.nix) |
|
||||
| Launcher | [Rofi](https://github.com/davatorium/rofi) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/rofi/default.nix) |
|
||||
|
||||
## User Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
|--------------|----------------------------------------------------------------------------------|----------------------------------------------------|
|
||||
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./modules/common) |
|
||||
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
|
||||
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starship.nix) |
|
||||
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
|
||||
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) |
|
||||
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
||||
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./modules/common/applications/firefox.nix) |
|
||||
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./modules/common/mail/aerc.nix) |
|
||||
| File Manager | [Nautilus](https://wiki.gnome.org/action/show/Apps/Files) | [Link](./modules/common/applications/nautilus.nix) |
|
||||
| PDF Reader | [Zathura](https://pwmt.org/projects/zathura/) | [Link](./modules/common/applications/media.nix) |
|
||||
| Video Player | [mpv](https://mpv.io/) | [Link](./modules/common/applications/media.nix) |
|
||||
| Feature | Program | Configuration |
|
||||
|--------------|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
|
||||
| Dotfiles | [Home-Manager](https://github.com/nix-community/home-manager) | [Link](./platforms/home-manager) |
|
||||
| Terminal | [Ghostty](https://sw.kovidgoyal.net/kitty/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/ghostty.nix) |
|
||||
| Shell | [Fish](https://fishshell.com/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/fish.nix) |
|
||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/starship.nix) |
|
||||
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
|
||||
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/x86_64-linux/tempest/default.nix) |
|
||||
| Text Editor | [Neovim](https://neovim.io/) | [Link](./pkgs/applications/editors/neovim/nmasur/neovim/package.nix) |
|
||||
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/firefox.nix) |
|
||||
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/aerc.nix) |
|
||||
| File Manager | [Nautilus](https://wiki.gnome.org/action/show/Apps/Files) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/nautilus.nix) |
|
||||
| PDF Reader | [Zathura](https://pwmt.org/projects/zathura/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/zathura.nix) |
|
||||
| Video Player | [mpv](https://mpv.io/) | [Link](./platforms/home-manager/modules/nmasur/presets/programs/mpv.nix) |
|
||||
|
||||
## macOS Features
|
||||
|
||||
| Feature | Program | Configuration |
|
||||
|----------|---------------------------------------------|--------------------------------------|
|
||||
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./modules/darwin/hammerspoon) |
|
||||
| Keybinds | [Hammerspoon](https://www.hammerspoon.org/) | [Link](./platforms/home-manager/modules/nmasur/presets/services/hammerspoon/) |
|
||||
|
||||
# Diagram
|
||||
|
||||
@ -51,15 +51,16 @@ configuration may be difficult to translate to a non-Nix system.
|
||||
|
||||
This repo contains a few more elaborate elements of configuration.
|
||||
|
||||
- [Neovim config](./modules/common/neovim/default.nix) generated with Nix2Vim
|
||||
and source-controlled plugins, differing based on installed LSPs, for example.
|
||||
- [Caddy JSON](./modules/nixos/services/caddy.nix) file (routes, etc.) based
|
||||
dynamically on enabled services rendered with Nix.
|
||||
- [Grafana config](./modules/nixos/services/grafana.nix) rendered with Nix.
|
||||
- Custom [secrets deployment](./modules/nixos/services/secrets.nix) similar to
|
||||
agenix.
|
||||
- Base16 [colorschemes](./colorscheme/) applied to multiple applications,
|
||||
including Firefox userChrome.
|
||||
- [Neovim config](./pkgs/applications/editors/neovim/nmasur/neovim/package.nix)
|
||||
generated with Nix2Vim and source-controlled plugins,
|
||||
differing based on installed LSPs, for example. - [Caddy
|
||||
JSON](./platforms/nixos/modules/nmasur/presets/services/caddy.nix) file (routes,
|
||||
etc.) based dynamically on enabled services rendered with Nix. - [Grafana
|
||||
config](./platforms/nixos/modules/nmasur/presets/services/grafana/grafana.nix)
|
||||
rendered with Nix. - Custom [secrets
|
||||
deployment](./platforms/nixos/modules/secrets.nix) similar to agenix. - Base16
|
||||
[colorschemes](./colorscheme/) applied to multiple applications, including
|
||||
Firefox userChrome.
|
||||
|
||||
---
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Apps
|
||||
|
||||
These are all my miscellaneous utilies and scripts to accompany this project.
|
||||
|
||||
They can be run with:
|
||||
|
||||
```
|
||||
nix run github:nmasur/dotfiles#appname
|
||||
```
|
@ -1,31 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
rec {
|
||||
|
||||
# Show quick helper
|
||||
default = import ./help.nix { inherit pkgs; };
|
||||
|
||||
# Format primary disk
|
||||
format-root = import ./format-root.nix { inherit pkgs; };
|
||||
|
||||
# Format and install from nothing (deprecated)
|
||||
installer = import ./installer.nix { inherit pkgs; };
|
||||
|
||||
# Display the readme for this repository
|
||||
readme = import ./readme.nix { inherit pkgs; };
|
||||
|
||||
# Rebuild
|
||||
rebuild = import ./rebuild.nix { inherit pkgs; };
|
||||
|
||||
# Load the SSH key for this machine
|
||||
loadkey = import ./loadkey.nix { inherit pkgs; };
|
||||
|
||||
# Encrypt secret for all machines
|
||||
encrypt-secret = import ./encrypt-secret.nix { inherit pkgs; };
|
||||
|
||||
# Re-encrypt secrets for all machines
|
||||
reencrypt-secrets = import ./reencrypt-secrets.nix { inherit pkgs; };
|
||||
|
||||
# Run neovim as an app
|
||||
neovim = import ./neovim.nix { inherit pkgs; };
|
||||
nvim = neovim;
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
# nix run github:nmasur/dotfiles#encrypt-secret > private/mysecret.age
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (
|
||||
pkgs.writeShellScript "encrypt-secret" ''
|
||||
printf "\nEnter the secret data to encrypt for all hosts...\n\n" 1>&2
|
||||
read -p "Secret: " secret
|
||||
printf "\nEncrypting...\n\n" 1>&2
|
||||
tmpfile=$(mktemp)
|
||||
echo "''${secret}" > ''${tmpfile}
|
||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${builtins.toString ../misc/public-keys} $tmpfile
|
||||
rm $tmpfile
|
||||
''
|
||||
);
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
# This script will partition and format drives; use at your own risk!
|
||||
|
||||
type = "app";
|
||||
|
||||
program = pkgs.lib.getExe pkgs.format-root;
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (
|
||||
pkgs.writeShellScript "default" ''
|
||||
${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options"
|
||||
${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.'
|
||||
echo ""
|
||||
echo ""
|
||||
${pkgs.gum}/bin/gum format --type=template -- \
|
||||
' • {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \
|
||||
' • {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \
|
||||
' • {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \
|
||||
' • {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \
|
||||
' • {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \
|
||||
' • {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \
|
||||
' • {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}' \
|
||||
echo ""
|
||||
echo ""
|
||||
''
|
||||
);
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
# Inspired by https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
|
||||
# This script will partition and format drives; use at your own risk!
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (
|
||||
pkgs.writeShellScript "installer" ''
|
||||
set -e
|
||||
|
||||
DISK=$1
|
||||
FLAKE=$2
|
||||
PARTITION_PREFIX=""
|
||||
|
||||
if [ -z "$DISK" ] || [ -z "$FLAKE" ]; then
|
||||
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
|
||||
--foreground "#fb4934" \
|
||||
"Missing required parameter." \
|
||||
"Usage: installer -- <disk> <host>" \
|
||||
"Example: installer -- nvme0n1 tempest" \
|
||||
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest"
|
||||
echo "(exiting)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$DISK" in nvme*)
|
||||
PARTITION_PREFIX="p"
|
||||
esac
|
||||
|
||||
${pkgs.gum}/bin/gum confirm \
|
||||
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
|
||||
--default=false
|
||||
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mklabel gpt
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart primary 512MiB 100%
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart ESP fat32 1MiB 512MiB
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- set 3 esp on
|
||||
mkfs.ext4 -L nixos /dev/''${DISK}''${PARTITION_PREFIX}1
|
||||
mkfs.fat -F 32 -n boot /dev/''${DISK}''${PARTITION_PREFIX}2
|
||||
|
||||
mount /dev/disk/by-label/nixos /mnt
|
||||
mkdir --parents /mnt/boot
|
||||
mount /dev/disk/by-label/boot /mnt/boot
|
||||
|
||||
${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
|
||||
''
|
||||
);
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
# TODO: just replace with packages instead of apps
|
||||
|
||||
type = "app";
|
||||
|
||||
program = "${pkgs.loadkey}/bin/loadkey";
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
type = "app";
|
||||
|
||||
program = "${
|
||||
(import ../modules/common/neovim/package {
|
||||
inherit pkgs;
|
||||
colors = (import ../colorscheme/nord).dark;
|
||||
})
|
||||
}/bin/nvim";
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (
|
||||
pkgs.writeShellScript "readme" ''
|
||||
${pkgs.glow}/bin/glow --pager ${builtins.toString ../README.md}
|
||||
''
|
||||
);
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (
|
||||
pkgs.writeShellScript "rebuild" ''
|
||||
echo ${pkgs.system}
|
||||
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
||||
if [ "$SYSTEM" == "darwin" ]; then
|
||||
sudo darwin-rebuild switch --flake ${builtins.toString ../.}
|
||||
else
|
||||
doas nixos-rebuild switch --flake ${builtins.toString ../.}
|
||||
fi
|
||||
''
|
||||
);
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
# nix run github:nmasur/dotfiles#reencrypt-secrets ./private
|
||||
|
||||
type = "app";
|
||||
|
||||
program = builtins.toString (
|
||||
pkgs.writeShellScript "reencrypt-secrets" ''
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Must provide directory to reencrypt."
|
||||
exit 1
|
||||
fi
|
||||
encrypted=$1
|
||||
for encryptedfile in ''${1}/*; do
|
||||
tmpfile=$(mktemp)
|
||||
echo "Decrypting ''${encryptedfile}..."
|
||||
${pkgs.age}/bin/age --decrypt \
|
||||
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
||||
echo "Encrypting ''${encryptedfile}..."
|
||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${builtins.toString ../misc/public-keys} $tmpfile > $encryptedfile
|
||||
rm $tmpfile
|
||||
done
|
||||
echo "Finished."
|
||||
''
|
||||
);
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
# Disks
|
||||
|
||||
These are my [disko](https://github.com/nix-community/disko) configurations,
|
||||
which allow me to save desired disk formatting layouts as a declarative file so
|
||||
I don't have to remember how to format my disks later on.
|
504
flake.lock
generated
504
flake.lock
generated
@ -1,54 +1,5 @@
|
||||
{
|
||||
"nodes": {
|
||||
"baleia-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1721805312,
|
||||
"narHash": "sha256-qA1x5kplP2I8bURO0I4R0gt/zeznu9hQQ+XHptLGuwc=",
|
||||
"owner": "m00qek",
|
||||
"repo": "baleia.nvim",
|
||||
"rev": "1b25eac3ac03659c3d3af75c7455e179e5f197f7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "m00qek",
|
||||
"repo": "baleia.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716483968,
|
||||
"narHash": "sha256-GRF/6AobXHamw8TZ3FjL7SI6ulcpwpcohsIuZeCSh2A=",
|
||||
"owner": "RRethy",
|
||||
"repo": "base16-nvim",
|
||||
"rev": "6ac181b5733518040a33017dde654059cd771b7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "RRethy",
|
||||
"repo": "base16-nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"bufferline-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716555412,
|
||||
"narHash": "sha256-8PCkY1zrlMrPGnQOb7MjqDXNlkeX46jrT4ScIL+MOwM=",
|
||||
"owner": "akinsho",
|
||||
"repo": "bufferline.nvim",
|
||||
"rev": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"ref": "v4.6.1",
|
||||
"repo": "bufferline.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cl-nix-lite": {
|
||||
"locked": {
|
||||
"lastModified": 1728174978,
|
||||
@ -64,22 +15,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cmp-nvim-lsp-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733823748,
|
||||
"narHash": "sha256-iaihXNCF5bB5MdeoosD/kc3QtpA/QaIDZVLiLIurBSM=",
|
||||
"owner": "hrsh7th",
|
||||
"repo": "cmp-nvim-lsp",
|
||||
"rev": "99290b3ec1322070bcfb9e846450a46f6efa50f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hrsh7th",
|
||||
"repo": "cmp-nvim-lsp",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -87,11 +22,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737162735,
|
||||
"narHash": "sha256-5T+HkouTMGaRm0rh3kgD4Z1O7ONKfgjyoPQH5rSyreU=",
|
||||
"lastModified": 1742013980,
|
||||
"narHash": "sha256-34YbfwABU5nb0F5eaaJE3ujldaNDhmyxw7CWqhXJV08=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "87131f51f8256952d1a306b5521cedc2dc61aa08",
|
||||
"rev": "9175b4bb5f127fb7b5784b14f7e01abff24c378f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -108,11 +43,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737038063,
|
||||
"narHash": "sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk=",
|
||||
"lastModified": 1741786315,
|
||||
"narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "bf0abfde48f469c256f2b0f481c6281ff04a5db2",
|
||||
"rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -121,23 +56,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fidget-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716093309,
|
||||
"narHash": "sha256-Gpk/G0ByOAIE8uX4Xr94CvAjJBSJMEOwBuvrhmYYGsg=",
|
||||
"owner": "j-hui",
|
||||
"repo": "fidget.nvim",
|
||||
"rev": "ef99df04a1c53a453602421bc0f756997edc8289",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "j-hui",
|
||||
"ref": "v1.4.5",
|
||||
"repo": "fidget.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -230,22 +148,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hmts-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1729786258,
|
||||
"narHash": "sha256-V5dwIJdxBulFVKk1iSlf4H5NRz1UH7uYQeMvwtgkpIs=",
|
||||
"owner": "calops",
|
||||
"repo": "hmts.nvim",
|
||||
"rev": "c7ff4c3ad96cd05664b18fb5bbbe2abbd7682dd2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "calops",
|
||||
"repo": "hmts.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -253,11 +155,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737120639,
|
||||
"narHash": "sha256-p5e/45V41YD3tMELuiNIoVCa25/w4nhOTm0B9MtdHFI=",
|
||||
"lastModified": 1741955947,
|
||||
"narHash": "sha256-2lbURKclgKqBNm7hVRtWh0A7NrdsibD0EaWhahUVhhY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "a0046af169ce7b1da503974e1b22c48ef4d71887",
|
||||
"rev": "4e12151c9e014e2449e0beca2c0e9534b96a26b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -278,11 +180,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732920695,
|
||||
"narHash": "sha256-1fxvJZUznwrmEtYqpPuWi2tPcL9kj6v7p1J7ZZncAPE=",
|
||||
"lastModified": 1739821351,
|
||||
"narHash": "sha256-QlVtMzAhECs9Esq3txqVW7/vM78ipB5IcI8uyCbTP7A=",
|
||||
"owner": "hraban",
|
||||
"repo": "mac-app-util",
|
||||
"rev": "548672d0cb661ce11d08ee8bde92b87d2a75c872",
|
||||
"rev": "c00d5b21ca1fdab8acef65e696795f0f15ec1158",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -307,7 +209,7 @@
|
||||
"nextcloud-external": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1729501349,
|
||||
"lastModified": 1729501365,
|
||||
"narHash": "sha256-OV6HhFBzmnQBO5btGEnqmKlaUMY7/t2Qm3XebclpBlM=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.5.2/external-v5.5.2.tar.gz"
|
||||
@ -320,7 +222,7 @@
|
||||
"nextcloud-news": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1729667621,
|
||||
"lastModified": 1729667622,
|
||||
"narHash": "sha256-pnvyMZQ+NYMgH0Unfh5S19HdZSjnghgoUDAoi2KIXNI=",
|
||||
"type": "tarball",
|
||||
"url": "https://github.com/nextcloud/news/releases/download/25.0.0-alpha12/news.tar.gz"
|
||||
@ -333,7 +235,7 @@
|
||||
"nextcloud-snappymail": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1737171597,
|
||||
"lastModified": 1728502660,
|
||||
"narHash": "sha256-oCw6Brs85rINBHvz3UJXheyLVqvA3RgPXG03b30Fx7E=",
|
||||
"type": "tarball",
|
||||
"url": "https://snappymail.eu/repository/nextcloud/snappymail-2.38.2-nextcloud.tar.gz"
|
||||
@ -351,11 +253,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1732820845,
|
||||
"narHash": "sha256-YPXk41l4PzKb5rtcxkYhymwjHJG95fxl4iXIzXnftr8=",
|
||||
"lastModified": 1740943170,
|
||||
"narHash": "sha256-A0F7T/euSMen004cVQN/ZkMpLkgLXDs+mq/merhd+0Y=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "nix2vim",
|
||||
"rev": "e2c511ea553418dd432005875c649b09d56b7e58",
|
||||
"rev": "a562f32ff2393d0ed198103c65a3035bcdf83d4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -387,11 +289,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737057290,
|
||||
"narHash": "sha256-3Pe0yKlCc7EOeq1X/aJVDH0CtNL+tIBm49vpepwL1MQ=",
|
||||
"lastModified": 1740947705,
|
||||
"narHash": "sha256-Co2kAD2SZalOm+5zoxmzEVZNvZ17TyafuFsD46BwSdY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "d002ce9b6e7eb467cd1c6bb9aef9c35d191b5453",
|
||||
"rev": "507911df8c35939050ae324caccc7cf4ffb76565",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -402,11 +304,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1737062831,
|
||||
"narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=",
|
||||
"lastModified": 1742069588,
|
||||
"narHash": "sha256-C7jVfohcGzdZRF6DO+ybyG/sqpo1h6bZi9T56sxLy+k=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c",
|
||||
"rev": "c80f6a7e10b39afcc1894e02ef785b1ad0b0d7e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -432,6 +334,22 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1728538411,
|
||||
"narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
@ -441,11 +359,11 @@
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737170882,
|
||||
"narHash": "sha256-Km700i1Eg72bFsU2X2ZgH4qEgx6SrdZFJURJGTSQH2M=",
|
||||
"lastModified": 1742145955,
|
||||
"narHash": "sha256-ju1J45e22ebpLH3eSm0ZZYg7WHkN01ryTFv+4UNwCOA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "62cdd681201843553ec740a85ccf2f0a6fca75c6",
|
||||
"rev": "d6ba59dd58ebe6c184f955e1d3a4bbca9484c018",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -454,82 +372,10 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-lint-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736154173,
|
||||
"narHash": "sha256-OChCLXHAqa129NiGfmwddq0Hj5F9AtC3TmFbnNCZqfo=",
|
||||
"owner": "mfussenegger",
|
||||
"repo": "nvim-lint",
|
||||
"rev": "dfa45de973c3ce7bd1b9a6d346f896a68ad07e44",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mfussenegger",
|
||||
"repo": "nvim-lint",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-lspconfig-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716281382,
|
||||
"narHash": "sha256-foJ7a59N0a3QaBW24PtwbyYDQVlIsFxiatADLO/hQvc=",
|
||||
"owner": "neovim",
|
||||
"repo": "nvim-lspconfig",
|
||||
"rev": "0b8165cf95806bc4bb8f745bb0c92021b2ed4b98",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "neovim",
|
||||
"ref": "v0.1.8",
|
||||
"repo": "nvim-lspconfig",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-tree-lua-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1737156486,
|
||||
"narHash": "sha256-b8YOOIYML9aKy4Y7S+iLKIaTfCqrxK1wB/ZaeFRCUmo=",
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "fca0b67c0b5a31727fb33addc4d9c100736a2894",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nvim-treesitter-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1705679158,
|
||||
"narHash": "sha256-zAyiitJIgOCZTB0CmgNt0MHENM70SOHLIoWrVwOJKFg=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"rev": "f197a15b0d1e8d555263af20add51450e5aaa1f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-treesitter",
|
||||
"ref": "v0.9.2",
|
||||
"repo": "nvim-treesitter",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"baleia-nvim-src": "baleia-nvim-src",
|
||||
"base16-nvim-src": "base16-nvim-src",
|
||||
"bufferline-nvim-src": "bufferline-nvim-src",
|
||||
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
||||
"darwin": "darwin",
|
||||
"disko": "disko",
|
||||
"fidget-nvim-src": "fidget-nvim-src",
|
||||
"hmts-nvim-src": "hmts-nvim-src",
|
||||
"home-manager": "home-manager",
|
||||
"mac-app-util": "mac-app-util",
|
||||
"nextcloud-cookbook": "nextcloud-cookbook",
|
||||
@ -541,40 +387,26 @@
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nur": "nur",
|
||||
"nvim-lint-src": "nvim-lint-src",
|
||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
||||
"nvim-treesitter-src": "nvim-treesitter-src",
|
||||
"snipe-nvim-src": "snipe-nvim-src",
|
||||
"telescope-nvim-src": "telescope-nvim-src",
|
||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||
"tiny-inline-diagnostic-nvim-src": "tiny-inline-diagnostic-nvim-src",
|
||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||
"tree-sitter-bash": "tree-sitter-bash",
|
||||
"tree-sitter-ini": "tree-sitter-ini",
|
||||
"tree-sitter-lua": "tree-sitter-lua",
|
||||
"tree-sitter-puppet": "tree-sitter-puppet",
|
||||
"tree-sitter-python": "tree-sitter-python",
|
||||
"tree-sitter-rasi": "tree-sitter-rasi",
|
||||
"tree-sitter-vimdoc": "tree-sitter-vimdoc",
|
||||
"wallpapers": "wallpapers",
|
||||
"wsl": "wsl",
|
||||
"zellij-switch": "zellij-switch",
|
||||
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||
}
|
||||
},
|
||||
"snipe-nvim-src": {
|
||||
"flake": false,
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736108869,
|
||||
"narHash": "sha256-sJ71eiE0XmMJkhNCkbY82R4eHzBOOKFrPa+nxLc1f8s=",
|
||||
"owner": "leath-dub",
|
||||
"repo": "snipe.nvim",
|
||||
"rev": "0d0a482ac713370196e4fc0025d5aaac5030104d",
|
||||
"lastModified": 1736476219,
|
||||
"narHash": "sha256-+qyv3QqdZCdZ3cSO/cbpEY6tntyYjfe1bB12mdpNFaY=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "de30cc5963da22e9742bbbbb9a3344570ed237b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "leath-dub",
|
||||
"repo": "snipe.nvim",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@ -608,184 +440,18 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telescope-nvim-src": {
|
||||
"flake": false,
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1716532947,
|
||||
"narHash": "sha256-e1ulhc4IIvUgpjKQrSqPY4WpXuez6wlxL6Min9U0o5Q=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope.nvim",
|
||||
"rev": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026",
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-telescope",
|
||||
"ref": "0.1.8",
|
||||
"repo": "telescope.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telescope-project-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1733083023,
|
||||
"narHash": "sha256-qEORRWYKBpK7fn7se8g+5uuVBJNu0T4JHSc0C2QzNDY=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope-project.nvim",
|
||||
"rev": "1d7920e799fc5001dffc7bd10909a86e0358eaf4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope-project.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tiny-inline-diagnostic-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736959343,
|
||||
"narHash": "sha256-11+Z54shcy5oRevfTOu3dt5DtXhnYaH9zvktH6Lvxjs=",
|
||||
"owner": "rachartier",
|
||||
"repo": "tiny-inline-diagnostic.nvim",
|
||||
"rev": "aaa6f0dd097f8ca2478cad259e61b7cb26ec0eb8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rachartier",
|
||||
"repo": "tiny-inline-diagnostic.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"toggleterm-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1721232722,
|
||||
"narHash": "sha256-hJ6nBCgSyYF1pY4lX+b8WZd49i5F6BwOmrl7xVSIwRw=",
|
||||
"owner": "akinsho",
|
||||
"repo": "toggleterm.nvim",
|
||||
"rev": "48be57eaba817f038d61bbf64d2c597f578c0827",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"ref": "v2.12.0",
|
||||
"repo": "toggleterm.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tree-sitter-bash": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1731338420,
|
||||
"narHash": "sha256-JW+30zIyq8Xc7NG9V+YoFqC+57BjZXIbAvWPD2lqvIE=",
|
||||
"owner": "tree-sitter",
|
||||
"repo": "tree-sitter-bash",
|
||||
"rev": "49c31006d8307dcb12bc5770f35b6d5b9e2be68e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tree-sitter",
|
||||
"ref": "master",
|
||||
"repo": "tree-sitter-bash",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tree-sitter-ini": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1725233451,
|
||||
"narHash": "sha256-G11Aynq2rnkRwdkhspjYqtBD/h5k4aD+NvuE0QfploU=",
|
||||
"owner": "justinmk",
|
||||
"repo": "tree-sitter-ini",
|
||||
"rev": "962568c9efa71d25720ab42c5d36e222626ef3a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "justinmk",
|
||||
"repo": "tree-sitter-ini",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tree-sitter-lua": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1729494737,
|
||||
"narHash": "sha256-v+fFcIOv+bu+2IGI/Lh/Xbqd5BzbBjaa51ECd0hG7Ow=",
|
||||
"owner": "MunifTanjim",
|
||||
"repo": "tree-sitter-lua",
|
||||
"rev": "34e60e7f45fc313463c68090d88d742a55d1bd7a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "MunifTanjim",
|
||||
"ref": "main",
|
||||
"repo": "tree-sitter-lua",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tree-sitter-puppet": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1734835631,
|
||||
"narHash": "sha256-bO5g5AdhzpB13yHklpAndUHIX7Rvd7OMjH0Ds2ATA6Q=",
|
||||
"owner": "amaanq",
|
||||
"repo": "tree-sitter-puppet",
|
||||
"rev": "15f192929b7d317f5914de2b4accd37b349182a6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "amaanq",
|
||||
"repo": "tree-sitter-puppet",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tree-sitter-python": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736288149,
|
||||
"narHash": "sha256-IIAL2qteFPBCPmDK1N2EdDgpI4CwfMuuVL8t5tYueLU=",
|
||||
"owner": "tree-sitter",
|
||||
"repo": "tree-sitter-python",
|
||||
"rev": "409b5d671eb0ea4972eeacaaca24bbec1acf79b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tree-sitter",
|
||||
"ref": "master",
|
||||
"repo": "tree-sitter-python",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tree-sitter-rasi": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1716296585,
|
||||
"narHash": "sha256-sPrIVgGGaBaXeqHNxjcdJ/S2FvxyV6rD9UPKU/tpspw=",
|
||||
"owner": "Fymyte",
|
||||
"repo": "tree-sitter-rasi",
|
||||
"rev": "6c9bbcfdf5f0f553d9ebc01750a3aa247a37b8aa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Fymyte",
|
||||
"repo": "tree-sitter-rasi",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tree-sitter-vimdoc": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1729686839,
|
||||
"narHash": "sha256-Vrl4/cZL+TWlUMEeWZoHCAWhvlefcl3ajGcwyTNKOhI=",
|
||||
"owner": "neovim",
|
||||
"repo": "tree-sitter-vimdoc",
|
||||
"rev": "d2e4b5c172a109966c2ce0378f73df6cede39400",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "neovim",
|
||||
"repo": "tree-sitter-vimdoc",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@ -810,22 +476,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wallpapers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1657544922,
|
||||
"narHash": "sha256-1c1uDz37MhksWC75myv6jao5q2mIzD8X8I+TykXXmWg=",
|
||||
"owner": "exorcist365",
|
||||
"repo": "wallpapers",
|
||||
"rev": "8d2860ac6c05cec0f78d5c9d07510f4ff5da90dc",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "exorcist365",
|
||||
"repo": "wallpapers",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"wsl": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_2",
|
||||
@ -834,11 +484,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736095716,
|
||||
"narHash": "sha256-csysw/Szu98QDiA2lhWk9seYOyCebeVEWL89zh1cduM=",
|
||||
"lastModified": 1741870048,
|
||||
"narHash": "sha256-odXRdNZGdXg1LmwlAeWL85kgy/FVHsgKlDwrvbR2BsU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "63c3b4ed1712a3a0621002cd59bfdc80875ecbb0",
|
||||
"rev": "5d76001e33ee19644a598ad80e7318ab0957b122",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -847,6 +497,28 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zellij-switch": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay",
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737011317,
|
||||
"narHash": "sha256-A8VGuw/jIw+NCo5aCYy8MFrWpKzZLf77RApGGMzHxCY=",
|
||||
"owner": "mostafaqanbaryan",
|
||||
"repo": "zellij-switch",
|
||||
"rev": "15b02834c8be735fca0d9fb41f48709f97cc9afc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mostafaqanbaryan",
|
||||
"repo": "zellij-switch",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"zenyd-mpv-scripts": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
464
flake.nix
464
flake.nix
@ -34,12 +34,6 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# # Use official Firefox binary for macOS
|
||||
# firefox-darwin = {
|
||||
# url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
|
||||
# Better App install management in macOS
|
||||
mac-app-util = {
|
||||
url = "github:hraban/mac-app-util";
|
||||
@ -52,12 +46,6 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Wallpapers
|
||||
wallpapers = {
|
||||
url = "gitlab:exorcist365/wallpapers";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Used to generate NixOS images for other platforms
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
@ -70,117 +58,17 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Neovim plugins
|
||||
base16-nvim-src = {
|
||||
url = "github:RRethy/base16-nvim";
|
||||
flake = false;
|
||||
};
|
||||
nvim-lspconfig-src = {
|
||||
# https://github.com/neovim/nvim-lspconfig/tags
|
||||
url = "github:neovim/nvim-lspconfig/v0.1.8";
|
||||
flake = false;
|
||||
};
|
||||
cmp-nvim-lsp-src = {
|
||||
url = "github:hrsh7th/cmp-nvim-lsp";
|
||||
flake = false;
|
||||
};
|
||||
baleia-nvim-src = {
|
||||
# https://github.com/m00qek/baleia.nvim/tags
|
||||
url = "github:m00qek/baleia.nvim";
|
||||
flake = false;
|
||||
};
|
||||
nvim-treesitter-src = {
|
||||
# https://github.com/nvim-treesitter/nvim-treesitter/tags
|
||||
url = "github:nvim-treesitter/nvim-treesitter/v0.9.2";
|
||||
flake = false;
|
||||
};
|
||||
telescope-nvim-src = {
|
||||
# https://github.com/nvim-telescope/telescope.nvim/releases
|
||||
url = "github:nvim-telescope/telescope.nvim/0.1.8";
|
||||
flake = false;
|
||||
};
|
||||
telescope-project-nvim-src = {
|
||||
url = "github:nvim-telescope/telescope-project.nvim";
|
||||
flake = false;
|
||||
};
|
||||
toggleterm-nvim-src = {
|
||||
# https://github.com/akinsho/toggleterm.nvim/tags
|
||||
url = "github:akinsho/toggleterm.nvim/v2.12.0";
|
||||
flake = false;
|
||||
};
|
||||
bufferline-nvim-src = {
|
||||
# https://github.com/akinsho/bufferline.nvim/releases
|
||||
url = "github:akinsho/bufferline.nvim/v4.6.1";
|
||||
flake = false;
|
||||
};
|
||||
nvim-tree-lua-src = {
|
||||
url = "github:kyazdani42/nvim-tree.lua";
|
||||
flake = false;
|
||||
};
|
||||
hmts-nvim-src = {
|
||||
url = "github:calops/hmts.nvim";
|
||||
flake = false;
|
||||
};
|
||||
fidget-nvim-src = {
|
||||
# https://github.com/j-hui/fidget.nvim/tags
|
||||
url = "github:j-hui/fidget.nvim/v1.4.5";
|
||||
flake = false;
|
||||
};
|
||||
nvim-lint-src = {
|
||||
url = "github:mfussenegger/nvim-lint";
|
||||
flake = false;
|
||||
};
|
||||
tiny-inline-diagnostic-nvim-src = {
|
||||
url = "github:rachartier/tiny-inline-diagnostic.nvim";
|
||||
flake = false;
|
||||
};
|
||||
snipe-nvim-src = {
|
||||
url = "github:leath-dub/snipe.nvim";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# Tree-Sitter Grammars
|
||||
tree-sitter-bash = {
|
||||
url = "github:tree-sitter/tree-sitter-bash/master";
|
||||
flake = false;
|
||||
};
|
||||
tree-sitter-python = {
|
||||
url = "github:tree-sitter/tree-sitter-python/master";
|
||||
flake = false;
|
||||
};
|
||||
tree-sitter-lua = {
|
||||
url = "github:MunifTanjim/tree-sitter-lua/main";
|
||||
flake = false;
|
||||
};
|
||||
tree-sitter-ini = {
|
||||
url = "github:justinmk/tree-sitter-ini";
|
||||
flake = false;
|
||||
};
|
||||
tree-sitter-puppet = {
|
||||
url = "github:amaanq/tree-sitter-puppet";
|
||||
flake = false;
|
||||
};
|
||||
tree-sitter-rasi = {
|
||||
url = "github:Fymyte/tree-sitter-rasi";
|
||||
flake = false;
|
||||
};
|
||||
tree-sitter-vimdoc = {
|
||||
url = "github:neovim/tree-sitter-vimdoc";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# MPV Scripts
|
||||
zenyd-mpv-scripts = {
|
||||
url = "github:zenyd/mpv-scripts";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# # Git alternative
|
||||
# # Fixes: https://github.com/martinvonz/jj/issues/4784
|
||||
# jujutsu = {
|
||||
# url = "github:martinvonz/jj";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
# Zellij Switcher
|
||||
zellij-switch = {
|
||||
url = "github:mostafaqanbaryan/zellij-switch";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Nextcloud Apps
|
||||
nextcloud-news = {
|
||||
@ -211,255 +99,128 @@
|
||||
{ nixpkgs, ... }@inputs:
|
||||
|
||||
let
|
||||
|
||||
# Global configuration for my systems
|
||||
globals =
|
||||
hostnames =
|
||||
let
|
||||
baseName = "masu.rs";
|
||||
in
|
||||
rec {
|
||||
user = "noah";
|
||||
fullName = "Noah Masur";
|
||||
gitName = fullName;
|
||||
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
||||
mail.server = "noahmasur.com";
|
||||
mail.imapHost = "imap.purelymail.com";
|
||||
mail.smtpHost = "smtp.purelymail.com";
|
||||
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
||||
hostnames = {
|
||||
audiobooks = "read.${baseName}";
|
||||
budget = "money.${baseName}";
|
||||
files = "files.${baseName}";
|
||||
git = "git.${baseName}";
|
||||
influxdb = "influxdb.${baseName}";
|
||||
irc = "irc.${baseName}";
|
||||
metrics = "metrics.${baseName}";
|
||||
minecraft = "minecraft.${baseName}";
|
||||
n8n = "n8n.${baseName}";
|
||||
notifications = "ntfy.${baseName}";
|
||||
prometheus = "prom.${baseName}";
|
||||
paperless = "paper.${baseName}";
|
||||
photos = "photos.${baseName}";
|
||||
secrets = "vault.${baseName}";
|
||||
stream = "stream.${baseName}";
|
||||
content = "cloud.${baseName}";
|
||||
books = "books.${baseName}";
|
||||
download = "download.${baseName}";
|
||||
status = "status.${baseName}";
|
||||
transmission = "transmission.${baseName}";
|
||||
};
|
||||
};
|
||||
|
||||
# Common overlays to always use
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
inputs.nix2vim.overlay
|
||||
# inputs.jujutsu.overlays.default # Fix: https://github.com/martinvonz/jj/issues/4784
|
||||
(import ./overlays/neovim-plugins.nix inputs)
|
||||
(import ./overlays/tree-sitter.nix inputs)
|
||||
(import ./overlays/mpv-scripts.nix inputs)
|
||||
(import ./overlays/nextcloud-apps.nix inputs)
|
||||
];
|
||||
|
||||
# System types to support.
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
|
||||
# { system -> pkgs }
|
||||
pkgsBySystem = forAllSystems (system: import nixpkgs { inherit system overlays; });
|
||||
# stablePkgsBySystem = forAllSystems (system: import nixpkgs { inherit system overlays; });
|
||||
|
||||
buildHome =
|
||||
{ pkgs, modules }:
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = modules ++ [
|
||||
./platforms/home-manager
|
||||
];
|
||||
};
|
||||
|
||||
buildNixos =
|
||||
{ pkgs, modules }:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit pkgs;
|
||||
modules = modules ++ [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.wsl.nixosModules.wsl
|
||||
./platforms/nixos
|
||||
];
|
||||
};
|
||||
|
||||
buildDarwin =
|
||||
{ pkgs, modules }:
|
||||
inputs.darwin.lib.darwinSystem {
|
||||
inherit pkgs;
|
||||
modules = modules ++ [
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
inputs.mac-app-util.darwinModules.default
|
||||
./platforms/nix-darwin
|
||||
];
|
||||
{
|
||||
audiobooks = "read.${baseName}";
|
||||
books = "books.${baseName}";
|
||||
budget = "money.${baseName}";
|
||||
content = "cloud.${baseName}";
|
||||
download = "download.${baseName}";
|
||||
files = "files.${baseName}";
|
||||
git = "git.${baseName}";
|
||||
imap = "imap.purelymail.com";
|
||||
influxdb = "influxdb.${baseName}";
|
||||
irc = "irc.${baseName}";
|
||||
mail = "noahmasur.com";
|
||||
metrics = "metrics.${baseName}";
|
||||
minecraft = "minecraft.${baseName}";
|
||||
n8n = "n8n.${baseName}";
|
||||
notifications = "ntfy.${baseName}";
|
||||
paperless = "paper.${baseName}";
|
||||
photos = "photos.${baseName}";
|
||||
prometheus = "prom.${baseName}";
|
||||
secrets = "vault.${baseName}";
|
||||
smtp = "smtp.purelymail.com";
|
||||
status = "status.${baseName}";
|
||||
stream = "stream.${baseName}";
|
||||
transmission = "transmission.${baseName}";
|
||||
};
|
||||
|
||||
in
|
||||
rec {
|
||||
|
||||
# The plan
|
||||
# Import all the host configurations as modules
|
||||
# Setup the modules as nixosModules, homeModules, darwinModules
|
||||
# Create nixosConfigurations using the different pkgs for each system
|
||||
# What to do with home config?
|
||||
lib = import ./lib inputs;
|
||||
|
||||
nixosModules = import ./hosts/x86_64-linux nixpkgs // import ./hosts/aarch64-linux nixpkgs;
|
||||
|
||||
# Contains my full system builds, including home-manager
|
||||
# nixos-rebuild switch --flake .#tempest
|
||||
nixosConfigurations =
|
||||
(builtins.mapAttrs (
|
||||
nixosConfigurations = builtins.mapAttrs (
|
||||
system: hosts:
|
||||
builtins.mapAttrs (
|
||||
name: module:
|
||||
buildNixos {
|
||||
pkgs = pkgsBySystem.x86_64-linux;
|
||||
modules = [ module ];
|
||||
lib.buildNixos {
|
||||
inherit system module;
|
||||
specialArgs = { inherit hostnames; };
|
||||
}
|
||||
) nixosModules)
|
||||
// (builtins.mapAttrs (
|
||||
) hosts
|
||||
) lib.linuxHosts;
|
||||
|
||||
darwinConfigurations = builtins.mapAttrs (
|
||||
system: hosts:
|
||||
builtins.mapAttrs (
|
||||
name: module:
|
||||
buildNixos {
|
||||
pkgs = pkgsBySystem.aarch64-linux;
|
||||
modules = [ module ];
|
||||
lib.buildDarwin {
|
||||
inherit system module;
|
||||
specialArgs = { inherit hostnames; };
|
||||
}
|
||||
) nixosModules);
|
||||
# builtins.mapAttrs buildNixos {
|
||||
# pkgs = pkgsBySystem.x86_64-linux;
|
||||
# modules = import ./hosts/x86_64-linux;
|
||||
# }
|
||||
# // builtins.mapAttrs buildNixos {
|
||||
# pkgs = pkgsBySystem.aarch64-linux;
|
||||
# modules = import ./hosts/aarch64-linux;
|
||||
# };
|
||||
) hosts
|
||||
) lib.darwinHosts;
|
||||
|
||||
# Contains my full Mac system builds, including home-manager
|
||||
# darwin-rebuild switch --flake .#lookingglass
|
||||
darwinConfigurations = builtins.mapAttrs buildDarwin {
|
||||
pkgs = pkgsBySystem.aarch64-darwin;
|
||||
modules = import ./hosts/darwin;
|
||||
};
|
||||
homeModules = builtins.mapAttrs (
|
||||
system: hosts:
|
||||
builtins.mapAttrs (
|
||||
name: module: (builtins.head (lib.attrsToList module.home-manager.users)).value
|
||||
) hosts
|
||||
) lib.hosts;
|
||||
|
||||
# For quickly applying home-manager settings with:
|
||||
# home-manager switch --flake .#tempest
|
||||
homeConfigurations = rec {
|
||||
default = personal;
|
||||
work = buildHome {
|
||||
pkgs = pkgsBySystem.aarch64-darwin;
|
||||
modules = { };
|
||||
};
|
||||
personal = buildHome {
|
||||
};
|
||||
tempest = nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
|
||||
lookingglass = darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
||||
};
|
||||
homeConfigurations = builtins.mapAttrs (
|
||||
system: hosts:
|
||||
builtins.mapAttrs (
|
||||
name: module:
|
||||
lib.buildHome {
|
||||
inherit system module;
|
||||
specialArgs = { inherit hostnames; };
|
||||
}
|
||||
) hosts
|
||||
) homeModules;
|
||||
|
||||
# Disk formatting, only used once
|
||||
diskoConfigurations = {
|
||||
root = import ./disks/root.nix;
|
||||
root = import ./hosts/x86_64-linux/swan/root.nix;
|
||||
};
|
||||
|
||||
packages =
|
||||
let
|
||||
staff =
|
||||
system:
|
||||
import ./hosts/staff {
|
||||
inherit
|
||||
inputs
|
||||
globals
|
||||
overlays
|
||||
system
|
||||
;
|
||||
};
|
||||
neovim =
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
in
|
||||
import ./modules/common/neovim/package {
|
||||
inherit pkgs;
|
||||
colors = (import ./colorscheme/gruvbox-dark).dark;
|
||||
};
|
||||
in
|
||||
{
|
||||
x86_64-linux.staff = staff "x86_64-linux";
|
||||
x86_64-linux.arrow = inputs.nixos-generators.nixosGenerate rec {
|
||||
system = "x86_64-linux";
|
||||
format = "iso";
|
||||
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; };
|
||||
};
|
||||
x86_64-linux.arrow-aws = inputs.nixos-generators.nixosGenerate rec {
|
||||
system = "x86_64-linux";
|
||||
generators = builtins.mapAttrs (
|
||||
system: hosts:
|
||||
builtins.mapAttrs (name: module: {
|
||||
aws = lib.generateImage {
|
||||
inherit system module;
|
||||
format = "amazon";
|
||||
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; } ++ [
|
||||
(
|
||||
{ ... }:
|
||||
{
|
||||
boot.kernelPackages = inputs.nixpkgs.legacyPackages.x86_64-linux.linuxKernel.packages.linux_6_6;
|
||||
amazonImage.sizeMB = 16 * 1024;
|
||||
permitRootLogin = "prohibit-password";
|
||||
boot.loader.systemd-boot.enable = inputs.nixpkgs.lib.mkForce false;
|
||||
boot.loader.efi.canTouchEfiVariables = inputs.nixpkgs.lib.mkForce false;
|
||||
services.amazon-ssm-agent.enable = true;
|
||||
users.users.ssm-user.extraGroups = [ "wheel" ];
|
||||
}
|
||||
)
|
||||
];
|
||||
specialArgs = { inherit hostnames; };
|
||||
};
|
||||
iso = lib.generateImage {
|
||||
inherit system module;
|
||||
format = "iso";
|
||||
specialArgs = { inherit hostnames; };
|
||||
};
|
||||
}) hosts
|
||||
) lib.linuxHosts;
|
||||
|
||||
# Package Neovim config into standalone package
|
||||
x86_64-linux.neovim = neovim "x86_64-linux";
|
||||
x86_64-darwin.neovim = neovim "x86_64-darwin";
|
||||
aarch64-linux.neovim = neovim "aarch64-linux";
|
||||
aarch64-darwin.neovim = neovim "aarch64-darwin";
|
||||
};
|
||||
|
||||
# Programs that can be run by calling this flake
|
||||
apps = forAllSystems (
|
||||
packages = lib.forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
in
|
||||
import ./apps { inherit pkgs; }
|
||||
# Get the configurations that we normally use
|
||||
{
|
||||
nixosConfigurations = nixosConfigurations.${system};
|
||||
darwinConfigurations = darwinConfigurations.${system};
|
||||
homeConfigurations = homeConfigurations.${system};
|
||||
generators = generators.${system};
|
||||
}
|
||||
//
|
||||
# Get the custom packages that I have placed under the nmasur namespace
|
||||
lib.pkgsBySystem.${system}.nmasur
|
||||
);
|
||||
|
||||
# Development environments
|
||||
devShells = forAllSystems (
|
||||
devShells = lib.forAllSystems (system: {
|
||||
default = lib.pkgsBySystem.${system}.nmasur.dotfiles-devshell;
|
||||
});
|
||||
|
||||
checks = lib.forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
in
|
||||
{
|
||||
|
||||
# Used to run commands and edit files in this repo
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
git
|
||||
stylua
|
||||
nixfmt-rfc-style
|
||||
shfmt
|
||||
shellcheck
|
||||
];
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = lib.overlays;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
checks = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
in
|
||||
{
|
||||
neovim =
|
||||
@ -478,37 +239,18 @@
|
||||
}
|
||||
);
|
||||
|
||||
formatter = forAllSystems (
|
||||
formatter = lib.forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system overlays; };
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
inherit (lib) overlays;
|
||||
};
|
||||
in
|
||||
pkgs.nixfmt-rfc-style
|
||||
);
|
||||
|
||||
# Templates for starting other projects quickly
|
||||
templates = rec {
|
||||
default = basic;
|
||||
basic = {
|
||||
path = ./templates/basic;
|
||||
description = "Basic program template";
|
||||
};
|
||||
poetry = {
|
||||
path = ./templates/poetry;
|
||||
description = "Poetry template";
|
||||
};
|
||||
python = {
|
||||
path = ./templates/python;
|
||||
description = "Legacy Python template";
|
||||
};
|
||||
haskell = {
|
||||
path = ./templates/haskell;
|
||||
description = "Haskell template";
|
||||
};
|
||||
rust = {
|
||||
path = ./templates/rust;
|
||||
description = "Rust template";
|
||||
};
|
||||
};
|
||||
templates = (import ./templates nixpkgs.lib);
|
||||
};
|
||||
}
|
||||
|
@ -1,26 +0,0 @@
|
||||
# Hosts
|
||||
|
||||
These are the individual machines managed by this flake.
|
||||
|
||||
| Host | Purpose |
|
||||
| --- | --- |
|
||||
| [aws](./aws/default.nix) | AWS AMI |
|
||||
| [staff](./staff/default.nix) | Live USB stick |
|
||||
| [flame](./flame/default.nix) | Oracle cloud server |
|
||||
| [hydra](./hydra/default.nix) | WSL config |
|
||||
| [lookingglass](./lookingglass/default.nix) | Work MacBook |
|
||||
| [swan](./swan/default.nix) | Home server |
|
||||
| [tempest](./tempest/default.nix) | Linux desktop |
|
||||
|
||||
## NixOS Workflow
|
||||
|
||||
Each hosts file is imported into [nixosConfigurations](../flake.nix) and passed
|
||||
the arguments from the flake (inputs, globals, overlays). The `nixosSystem`
|
||||
function in that hosts file will be called by the NixOS module system during a
|
||||
nixos-rebuild.
|
||||
|
||||
Each module in the each host's `modules` list is either a function or an
|
||||
attrset. The attrsets will simply apply values to options that have been
|
||||
declared in the config by other modules. Meanwhile, the functions will be
|
||||
passed various arguments, several of which you will see listed at the top of
|
||||
each of their files.
|
@ -1,16 +0,0 @@
|
||||
# Return a list of all nix-darwin hosts
|
||||
|
||||
{ lib, ... }:
|
||||
|
||||
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
|
||||
# Get only files ending in default.nix
|
||||
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||
# Import each host function
|
||||
map
|
||||
(file: {
|
||||
name = builtins.baseNameOf (builtins.dirOf file);
|
||||
value = import file;
|
||||
})
|
||||
# Convert to an attrset of hostname -> host function
|
||||
(builtins.listToAttrs)
|
||||
]
|
@ -1,60 +1,40 @@
|
||||
# The Looking Glass
|
||||
# System configuration for my work Macbook
|
||||
|
||||
{
|
||||
inputs,
|
||||
globals,
|
||||
overlays,
|
||||
...
|
||||
}:
|
||||
rec {
|
||||
networking.hostName = "NYCM-NMASUR2";
|
||||
networking.computerName = "NYCM-NMASUR2";
|
||||
|
||||
inputs.darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
specialArgs = { };
|
||||
modules = [
|
||||
../../modules/common
|
||||
../../modules/darwin
|
||||
(
|
||||
globals
|
||||
// rec {
|
||||
user = "Noah.Masur";
|
||||
gitName = "Noah-Masur_1701";
|
||||
gitEmail = "${user}@take2games.com";
|
||||
}
|
||||
)
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
inputs.mac-app-util.darwinModules.default
|
||||
{
|
||||
nixpkgs.overlays = [ inputs.firefox-darwin.overlay ] ++ overlays;
|
||||
networking.hostName = "NYCM-NMASUR2";
|
||||
networking.computerName = "NYCM-NMASUR2";
|
||||
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
||||
gui.enable = true;
|
||||
theme = {
|
||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||
dark = true;
|
||||
};
|
||||
mail.user = globals.user;
|
||||
atuin.enable = true;
|
||||
charm.enable = true;
|
||||
neovim.enable = true;
|
||||
mail.enable = true;
|
||||
mail.aerc.enable = true;
|
||||
mail.himalaya.enable = false;
|
||||
kitty.enable = true;
|
||||
discord.enable = true;
|
||||
firefox.enable = true;
|
||||
dotfiles.enable = true;
|
||||
terraform.enable = true;
|
||||
python.enable = true;
|
||||
rust.enable = true;
|
||||
lua.enable = true;
|
||||
obsidian.enable = true;
|
||||
kubernetes.enable = true;
|
||||
_1password.enable = true;
|
||||
slack.enable = true;
|
||||
wezterm.enable = true;
|
||||
yt-dlp.enable = true;
|
||||
}
|
||||
];
|
||||
nmasur.settings = {
|
||||
username = "Noah.Masur";
|
||||
fullName = "Noah Masur";
|
||||
};
|
||||
|
||||
nmasur.profiles = {
|
||||
base.enable = true;
|
||||
work.enable = true;
|
||||
extra.enable = true;
|
||||
gaming.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users."Noah.Masur" = {
|
||||
nmasur.settings = {
|
||||
username = nmasur.settings.username;
|
||||
fullName = nmasur.settings.fullName;
|
||||
};
|
||||
nmasur.profiles = {
|
||||
common.enable = true;
|
||||
darwin-base.enable = true;
|
||||
power-user.enable = true;
|
||||
work.enable = true;
|
||||
experimental.enable = true;
|
||||
};
|
||||
nmasur.presets.programs.git-work.work = {
|
||||
name = "Noah-Masur_1701";
|
||||
email = "${nmasur.settings.username}@take2games.com";
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
system.stateVersion = 5;
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
# Return a list of all NixOS hosts
|
||||
|
||||
{ nixpkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
in
|
||||
|
||||
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
|
||||
# Get only files ending in default.nix
|
||||
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||
# Import each host function
|
||||
map
|
||||
(file: {
|
||||
name = builtins.baseNameOf (builtins.dirOf file);
|
||||
value = import file;
|
||||
})
|
||||
# Convert to an attrset of hostname -> host function
|
||||
(builtins.listToAttrs)
|
||||
]
|
@ -6,7 +6,6 @@
|
||||
# These days, probably use nixos-anywhere instead.
|
||||
|
||||
rec {
|
||||
# Hardware
|
||||
networking.hostName = "flame";
|
||||
|
||||
nmasur.settings = {
|
||||
@ -21,13 +20,19 @@ rec {
|
||||
};
|
||||
|
||||
home-manager.users."noah" = {
|
||||
nmasur.settings = nmasur.settings;
|
||||
nmasur.settings = {
|
||||
username = nmasur.settings.username;
|
||||
fullName = nmasur.settings.fullName;
|
||||
};
|
||||
nmasur.profiles = {
|
||||
common.enable = true;
|
||||
linux-base.enable = true;
|
||||
power-user.enable = true;
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
# File systems must be declared in order to boot
|
||||
|
||||
# This is the root filesystem containing NixOS
|
||||
@ -47,7 +52,7 @@ rec {
|
||||
nmasur.presets.services.cloudflared = {
|
||||
tunnel = {
|
||||
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
||||
credentialsFile = ../../private/cloudflared-flame.age;
|
||||
credentialsFile = ./cloudflared-flame.age;
|
||||
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
|
||||
};
|
||||
};
|
@ -1,6 +1,47 @@
|
||||
# Return a list of all hosts
|
||||
|
||||
nixpkgs:
|
||||
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
in
|
||||
|
||||
{
|
||||
darwin-hosts = import ./aarch64-darwin;
|
||||
linux-hosts = import ./x86_64-linux // import ./aarch64-linux;
|
||||
# darwin-hosts = import ./darwin;
|
||||
aarch64-darwin-hosts = lib.pipe (lib.filesystem.listFilesRecursive ./aarch64-darwin) [
|
||||
# Get only files ending in default.nix
|
||||
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||
# Import each host function
|
||||
(map (file: {
|
||||
name = builtins.baseNameOf (builtins.dirOf file);
|
||||
value = import file;
|
||||
}))
|
||||
# Convert to an attrset of hostname -> host function
|
||||
(builtins.listToAttrs)
|
||||
];
|
||||
aarch64-linux-hosts = lib.pipe (lib.filesystem.listFilesRecursive ./aarch64-linux) [
|
||||
# Get only files ending in default.nix
|
||||
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||
# Remove the first file
|
||||
(builtins.filter (name: name != ./aarch64-linux/default.nix))
|
||||
# Import each host function
|
||||
(map (file: {
|
||||
name = builtins.baseNameOf (builtins.dirOf file);
|
||||
value = import file;
|
||||
}))
|
||||
# Convert to an attrset of hostname -> host function
|
||||
(builtins.listToAttrs)
|
||||
];
|
||||
x86_64-linux-hosts = lib.pipe (lib.filesystem.listFilesRecursive ./x86_64-linux) [
|
||||
# Get only files ending in default.nix
|
||||
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||
# Import each host function
|
||||
(map (file: {
|
||||
# name = lib.removeSuffix ".nix" (builtins.baseNameOf file);
|
||||
name = builtins.baseNameOf (builtins.dirOf file);
|
||||
value = import file;
|
||||
}))
|
||||
# Convert to an attrset of hostname -> host function
|
||||
(builtins.listToAttrs)
|
||||
];
|
||||
}
|
||||
|
@ -1,41 +1,32 @@
|
||||
# The Arrow
|
||||
# System configuration for temporary VM
|
||||
|
||||
{
|
||||
inputs,
|
||||
globals,
|
||||
overlays,
|
||||
...
|
||||
}:
|
||||
rec {
|
||||
# Hardware
|
||||
networking.hostName = "arrow";
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
||||
nmasur.settings = {
|
||||
username = "noah";
|
||||
fullName = "Noah Masur";
|
||||
};
|
||||
modules = import ./modules.nix { inherit inputs globals overlays; } ++ [
|
||||
{
|
||||
# This is the root filesystem containing NixOS
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# This is the boot filesystem for Grub
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
nmasur.profiles = {
|
||||
base.enable = true;
|
||||
server.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users."noah" = {
|
||||
nmasur.settings = {
|
||||
username = nmasur.settings.username;
|
||||
fullName = nmasur.settings.fullName;
|
||||
};
|
||||
nmasur.profiles = {
|
||||
common.enable = true;
|
||||
linux-base.enable = true;
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
virtualisation.vmVariant = {
|
||||
virtualisation.forwardPorts = [
|
||||
{
|
||||
from = "host";
|
||||
host.port = 2222;
|
||||
guest.port = 22;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -1,32 +0,0 @@
|
||||
{
|
||||
inputs,
|
||||
globals,
|
||||
overlays,
|
||||
}:
|
||||
|
||||
[
|
||||
globals
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
networking.hostName = "arrow";
|
||||
physical = false;
|
||||
server = true;
|
||||
gui.enable = false;
|
||||
theme.colors = (import ../../colorscheme/gruvbox).dark;
|
||||
publicKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKpPU2G9rSF8Q6waH62IJexDCQ6lY+8ZyVufGE3xMDGw deploy"
|
||||
];
|
||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||
cloudflare.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.caddy.enable = true;
|
||||
services.n8n.enable = true;
|
||||
|
||||
# nix-index seems to eat up too much memory for Vultr
|
||||
home-manager.users.${globals.user}.programs.nix-index.enable = inputs.nixpkgs.lib.mkForce false;
|
||||
}
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
]
|
@ -1,20 +0,0 @@
|
||||
# Return a list of all NixOS hosts
|
||||
|
||||
{ nixpkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
in
|
||||
|
||||
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
|
||||
# Get only files ending in default.nix
|
||||
(builtins.filter (name: lib.hasSuffix "default.nix" name))
|
||||
# Import each host function
|
||||
map
|
||||
(file: {
|
||||
name = builtins.baseNameOf (builtins.dirOf file);
|
||||
value = import file;
|
||||
})
|
||||
# Convert to an attrset of hostname -> host function
|
||||
(builtins.listToAttrs)
|
||||
]
|
@ -1,51 +1,33 @@
|
||||
# The Hydra
|
||||
# System configuration for WSL
|
||||
|
||||
# See [readme](../README.md) to explain how this file works.
|
||||
rec {
|
||||
# Hardware
|
||||
networking.hostName = "hydra";
|
||||
|
||||
{
|
||||
inputs,
|
||||
globals,
|
||||
overlays,
|
||||
...
|
||||
}:
|
||||
nmasur.settings = {
|
||||
username = "noah";
|
||||
fullName = "Noah Masur";
|
||||
};
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { };
|
||||
modules = [
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
../../modules/wsl
|
||||
globals
|
||||
inputs.wsl.nixosModules.wsl
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
networking.hostName = "hydra";
|
||||
nixpkgs.overlays = overlays;
|
||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||
gui.enable = false;
|
||||
theme = {
|
||||
colors = (import ../../colorscheme/gruvbox).dark;
|
||||
dark = true;
|
||||
};
|
||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
||||
wsl = {
|
||||
enable = true;
|
||||
wslConf.automount.root = "/mnt";
|
||||
defaultUser = globals.user;
|
||||
startMenuLaunchers = true;
|
||||
nativeSystemd = true;
|
||||
wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN
|
||||
interop.includePath = false; # Including Windows PATH will slow down Neovim command mode
|
||||
};
|
||||
nmasur.profiles = {
|
||||
base.enable = true;
|
||||
wsl.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users."noah" = {
|
||||
nmasur.settings = {
|
||||
username = nmasur.settings.username;
|
||||
fullName = nmasur.settings.fullName;
|
||||
};
|
||||
nmasur.profiles = {
|
||||
common.enable = true;
|
||||
linux-base.enable = true;
|
||||
power-user.enable = true;
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
neovim.enable = true;
|
||||
mail.enable = true;
|
||||
mail.aerc.enable = true;
|
||||
mail.himalaya.enable = true;
|
||||
dotfiles.enable = true;
|
||||
lua.enable = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -1,53 +1,64 @@
|
||||
# The Staff
|
||||
# ISO configuration for my USB drive
|
||||
# System configuration test
|
||||
|
||||
{
|
||||
inputs,
|
||||
system,
|
||||
overlays,
|
||||
...
|
||||
}:
|
||||
rec {
|
||||
# Hardware
|
||||
networking.hostName = "staff";
|
||||
|
||||
inputs.nixos-generators.nixosGenerate {
|
||||
inherit system;
|
||||
format = "install-iso";
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
networking.hostName = "staff";
|
||||
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
|
||||
];
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 22 ];
|
||||
allowSFTP = true;
|
||||
settings = {
|
||||
GatewayPorts = "no";
|
||||
X11Forwarding = false;
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "yes";
|
||||
};
|
||||
};
|
||||
environment.systemPackages =
|
||||
let
|
||||
pkgs = import inputs.nixpkgs { inherit system overlays; };
|
||||
in
|
||||
with pkgs;
|
||||
[
|
||||
git
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
(import ../../modules/common/neovim/package {
|
||||
inherit pkgs;
|
||||
colors = (import ../../colorscheme/gruvbox).dark;
|
||||
})
|
||||
];
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
warn-dirty = false
|
||||
'';
|
||||
}
|
||||
];
|
||||
nmasur.settings = {
|
||||
username = "noah";
|
||||
fullName = "Noah Masur";
|
||||
};
|
||||
|
||||
nmasur.profiles = {
|
||||
base.enable = true;
|
||||
home.enable = true;
|
||||
gui.enable = true;
|
||||
};
|
||||
nmasur.presets.services.cloudflared.enable = false;
|
||||
nmasur.presets.services.kanata.enable = false;
|
||||
nmasur.presets.services.openssh.enable = true;
|
||||
|
||||
home-manager.users."noah" = {
|
||||
nmasur.settings = {
|
||||
username = nmasur.settings.username;
|
||||
fullName = nmasur.settings.fullName;
|
||||
};
|
||||
nmasur.profiles = {
|
||||
common.enable = true;
|
||||
linux-base.enable = true;
|
||||
linux-gui.enable = true;
|
||||
power-user.enable = true;
|
||||
};
|
||||
nmasur.presets.services.mbsync = {
|
||||
user = nmasur.settings.username;
|
||||
server = "noahmasur.com";
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
# Not sure what's necessary but too afraid to remove anything
|
||||
# File systems must be declared in order to boot
|
||||
|
||||
# This is the root filesystem containing NixOS
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# This is the boot filesystem for Grub
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
# Allows private remote access over the internet
|
||||
# nmasur.presets.services.cloudflared = {
|
||||
# tunnel = {
|
||||
# id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||
# credentialsFile = ../../private/cloudflared-tempest.age;
|
||||
# ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||
# };
|
||||
# };
|
||||
}
|
||||
|
@ -1,142 +1,81 @@
|
||||
# The Swan
|
||||
# System configuration for my home NAS server
|
||||
|
||||
{
|
||||
inputs,
|
||||
globals,
|
||||
overlays,
|
||||
...
|
||||
}:
|
||||
rec {
|
||||
networking.hostName = "swan";
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
globals
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.disko.nixosModules.disko
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
nmasur.settings = {
|
||||
username = "noah";
|
||||
fullName = "Noah Masur";
|
||||
};
|
||||
|
||||
# Hardware
|
||||
server = true;
|
||||
physical = true;
|
||||
networking.hostName = "swan";
|
||||
nmasur.profiles = {
|
||||
base.enable = true;
|
||||
server.enable = true;
|
||||
home.enable = true;
|
||||
nas.enable = true;
|
||||
shared-media.enable = true;
|
||||
};
|
||||
|
||||
# Not sure what's necessary but too afraid to remove anything
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
home-manager.users."noah" = {
|
||||
nmasur.settings = {
|
||||
username = nmasur.settings.username;
|
||||
fullName = nmasur.settings.fullName;
|
||||
};
|
||||
nmasur.profiles = {
|
||||
common.enable = true;
|
||||
linux-base.enable = true;
|
||||
power-user.enable = true;
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
# Required for transcoding
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelParams = [
|
||||
"radeon.si_support=0"
|
||||
"amdgpu.si_support=1"
|
||||
"radeon.cik_support=0"
|
||||
"amdgpu.cik_support=1"
|
||||
"amdgpu.dc=1"
|
||||
];
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
# Required binary blobs to boot on this machine
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Prioritize efficiency over performance
|
||||
powerManagement.cpuFreqGovernor = "powersave";
|
||||
|
||||
# Allow firmware updates
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# ZFS
|
||||
zfs.enable = true;
|
||||
# Generated with: head -c 8 /etc/machine-id
|
||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||
|
||||
# Sets root ext4 filesystem instead of declaring it manually
|
||||
disko = {
|
||||
enableConfig = true;
|
||||
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
||||
};
|
||||
|
||||
zramSwap.enable = true;
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 4 * 1024; # 4 GB
|
||||
}
|
||||
];
|
||||
|
||||
boot.zfs = {
|
||||
# Automatically load the ZFS pool on boot
|
||||
extraPools = [ "tank" ];
|
||||
# Only try to decrypt datasets with keyfiles
|
||||
requestEncryptionCredentials = [
|
||||
"tank/archive"
|
||||
"tank/generic"
|
||||
"tank/nextcloud"
|
||||
"tank/generic/git"
|
||||
];
|
||||
# If password is requested and fails, continue to boot eventually
|
||||
passwordTimeout = 300;
|
||||
};
|
||||
|
||||
# Theming
|
||||
|
||||
# Server doesn't require GUI
|
||||
gui.enable = false;
|
||||
|
||||
# Still require colors for programs like Neovim, K9S
|
||||
theme = {
|
||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||
};
|
||||
|
||||
# Programs and services
|
||||
atuin.enable = true;
|
||||
neovim.enable = true;
|
||||
cloudflare.enable = true;
|
||||
dotfiles.enable = true;
|
||||
arrs.enable = true;
|
||||
filebrowser.enable = true;
|
||||
services.audiobookshelf.enable = true;
|
||||
services.bind.enable = true;
|
||||
services.caddy.enable = true;
|
||||
services.immich.enable = true;
|
||||
services.jellyfin.enable = true;
|
||||
services.nextcloud.enable = true;
|
||||
services.calibre-web.enable = true;
|
||||
services.openssh.enable = true;
|
||||
services.prometheus.enable = false;
|
||||
services.vmagent.enable = true;
|
||||
services.samba.enable = true;
|
||||
services.paperless.enable = true;
|
||||
services.postgresql.enable = true;
|
||||
system.autoUpgrade.enable = false;
|
||||
|
||||
# Allows private remote access over the internet
|
||||
cloudflareTunnel = {
|
||||
enable = true;
|
||||
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
||||
credentialsFile = ../../private/cloudflared-swan.age;
|
||||
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
||||
};
|
||||
|
||||
# Send regular backups and litestream for DBs to an S3-like bucket
|
||||
backup.s3 = {
|
||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||
bucket = "noahmasur-backup";
|
||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||
resticBucket = "noahmasur-restic";
|
||||
};
|
||||
|
||||
# Disable passwords, only use SSH key
|
||||
publicKeys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal"
|
||||
];
|
||||
}
|
||||
# Not sure what's necessary but too afraid to remove anything
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
|
||||
# Required for transcoding
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelParams = [
|
||||
"radeon.si_support=0"
|
||||
"amdgpu.si_support=1"
|
||||
"radeon.cik_support=0"
|
||||
"amdgpu.cik_support=1"
|
||||
"amdgpu.dc=1"
|
||||
];
|
||||
|
||||
# Required binary blobs to boot on this machine
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Prioritize efficiency over performance
|
||||
powerManagement.cpuFreqGovernor = "powersave";
|
||||
|
||||
# Allow firmware updates
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# ZFS
|
||||
# Generated with: head -c 8 /etc/machine-id
|
||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||
|
||||
# Sets root ext4 filesystem instead of declaring it manually
|
||||
disko = {
|
||||
enableConfig = true;
|
||||
devices = (import ./root.nix { disk = "/dev/nvme0n1"; });
|
||||
};
|
||||
|
||||
# Allows private remote access over the internet
|
||||
nmasur.presets.services.cloudflared = {
|
||||
tunnel = {
|
||||
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
||||
credentialsFile = ./cloudflared-swan.age;
|
||||
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,153 +1,109 @@
|
||||
# The Tempest
|
||||
# System configuration for my desktop
|
||||
|
||||
{
|
||||
inputs,
|
||||
globals,
|
||||
overlays,
|
||||
...
|
||||
}:
|
||||
rec {
|
||||
# Hardware
|
||||
networking.hostName = "tempest";
|
||||
|
||||
inputs.nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
|
||||
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
|
||||
nmasur.settings = {
|
||||
username = "noah";
|
||||
fullName = "Noah Masur";
|
||||
};
|
||||
modules = [
|
||||
globals
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
|
||||
# Hardware
|
||||
physical = true;
|
||||
networking.hostName = "tempest";
|
||||
nmasur.profiles = {
|
||||
base.enable = true;
|
||||
home.enable = true;
|
||||
gui.enable = true;
|
||||
gaming.enable = true;
|
||||
};
|
||||
|
||||
# Not sure what's necessary but too afraid to remove anything
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
nmasur.presets.services.grub.enable = true;
|
||||
|
||||
# Graphics and VMs
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
home-manager.users."noah" = {
|
||||
nmasur.settings = {
|
||||
username = nmasur.settings.username;
|
||||
fullName = nmasur.settings.fullName;
|
||||
};
|
||||
nmasur.profiles = {
|
||||
common.enable = true;
|
||||
linux-base.enable = true;
|
||||
linux-gui.enable = true;
|
||||
linux-gaming.enable = true;
|
||||
power-user.enable = true;
|
||||
developer.enable = true;
|
||||
experimental.enable = true;
|
||||
};
|
||||
home.stateVersion = "23.05";
|
||||
};
|
||||
|
||||
# I don't think I need this?
|
||||
# boot.kernelParams = [
|
||||
# "video=DP-0:2560x1440@165"
|
||||
# "video=DP-1:1920x1080@60"
|
||||
# ];
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
# Required binary blobs to boot on this machine
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Prioritize performance over efficiency
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
|
||||
# Allow firmware updates
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
# Helps reduce GPU fan noise under idle loads
|
||||
hardware.fancontrol.enable = true;
|
||||
hardware.fancontrol.config = ''
|
||||
# Configuration file generated by pwmconfig, changes will be lost
|
||||
INTERVAL=10
|
||||
DEVPATH=hwmon0=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
||||
DEVNAME=hwmon0=amdgpu
|
||||
FCTEMPS=hwmon0/pwm1=hwmon0/temp1_input
|
||||
FCFANS= hwmon0/pwm1=hwmon0/fan1_input
|
||||
MINTEMP=hwmon0/pwm1=50
|
||||
MAXTEMP=hwmon0/pwm1=70
|
||||
MINSTART=hwmon0/pwm1=100
|
||||
MINSTOP=hwmon0/pwm1=10
|
||||
MINPWM=hwmon0/pwm1=10
|
||||
MAXPWM=hwmon0/pwm1=240
|
||||
'';
|
||||
|
||||
# File systems must be declared in order to boot
|
||||
|
||||
# This is the root filesystem containing NixOS
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# This is the boot filesystem for Grub
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
# Secrets must be prepared ahead before deploying
|
||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
||||
|
||||
# Theming
|
||||
|
||||
# Turn on all features related to desktop and graphical applications
|
||||
gui.enable = true;
|
||||
|
||||
# Set the system-wide theme, also used for non-graphical programs
|
||||
theme = {
|
||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||
dark = true;
|
||||
};
|
||||
wallpaper = "${inputs.wallpapers}/gruvbox/road.jpg";
|
||||
gtk.theme.name = inputs.nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||
|
||||
# Programs and services
|
||||
atuin.enable = true;
|
||||
charm.enable = true;
|
||||
neovim.enable = true;
|
||||
media.enable = true;
|
||||
dotfiles.enable = true;
|
||||
firefox.enable = true;
|
||||
kitty.enable = true;
|
||||
_1password.enable = true;
|
||||
discord.enable = true;
|
||||
nautilus.enable = true;
|
||||
obsidian.enable = true;
|
||||
mail.enable = true;
|
||||
mail.aerc.enable = true;
|
||||
mail.himalaya.enable = true;
|
||||
keybase.enable = true;
|
||||
mullvad.enable = false;
|
||||
rust.enable = true;
|
||||
terraform.enable = true;
|
||||
wezterm.enable = true;
|
||||
yt-dlp.enable = true;
|
||||
gaming = {
|
||||
dwarf-fortress.enable = true;
|
||||
enable = true;
|
||||
steam.enable = true;
|
||||
moonlight.enable = true;
|
||||
legendary.enable = true;
|
||||
lutris.enable = true;
|
||||
ryujinx.enable = true;
|
||||
};
|
||||
services.vmagent.enable = true; # Enables Prometheus metrics
|
||||
services.openssh.enable = true; # Required for Cloudflare tunnel and identity file
|
||||
|
||||
# Allows private remote access over the internet
|
||||
cloudflareTunnel = {
|
||||
enable = true;
|
||||
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||
credentialsFile = ../../private/cloudflared-tempest.age;
|
||||
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||
};
|
||||
|
||||
# Allows requests to force machine to wake up
|
||||
# This network interface might change, needs to be set specifically for each machine.
|
||||
# Or set usePredictableInterfaceNames = false
|
||||
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
||||
}
|
||||
# Not sure what's necessary but too afraid to remove anything
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
|
||||
# Graphics and VMs
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
# Required binary blobs to boot on this machine
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# Prioritize performance over efficiency
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
|
||||
# Allow firmware updates
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
# Helps reduce GPU fan noise under idle loads
|
||||
hardware.fancontrol.enable = true;
|
||||
hardware.fancontrol.config = ''
|
||||
# Configuration file generated by pwmconfig, changes will be lost
|
||||
INTERVAL=10
|
||||
DEVPATH=hwmon0=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
||||
DEVNAME=hwmon0=amdgpu
|
||||
FCTEMPS=hwmon0/pwm1=hwmon0/temp1_input
|
||||
FCFANS= hwmon0/pwm1=hwmon0/fan1_input
|
||||
MINTEMP=hwmon0/pwm1=50
|
||||
MAXTEMP=hwmon0/pwm1=70
|
||||
MINSTART=hwmon0/pwm1=100
|
||||
MINSTOP=hwmon0/pwm1=10
|
||||
MINPWM=hwmon0/pwm1=10
|
||||
MAXPWM=hwmon0/pwm1=240
|
||||
'';
|
||||
|
||||
# File systems must be declared in order to boot
|
||||
|
||||
# This is the root filesystem containing NixOS
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
# This is the boot filesystem for Grub
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
# Allows private remote access over the internet
|
||||
nmasur.presets.services.cloudflared = {
|
||||
tunnel = {
|
||||
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||
credentialsFile = ./cloudflared-tempest.age;
|
||||
ca = "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||
};
|
||||
};
|
||||
|
||||
# Allows requests to force machine to wake up
|
||||
# This network interface might change, needs to be set specifically for each machine.
|
||||
# Or set usePredictableInterfaceNames = false
|
||||
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
||||
}
|
||||
|
223
lib/default.nix
Normal file
223
lib/default.nix
Normal file
@ -0,0 +1,223 @@
|
||||
inputs:
|
||||
|
||||
let
|
||||
lib = inputs.nixpkgs.lib;
|
||||
in
|
||||
|
||||
lib
|
||||
// rec {
|
||||
|
||||
# Returns all files in a directory matching a suffix
|
||||
filesInDirectoryWithSuffix =
|
||||
directory: suffix:
|
||||
lib.pipe (lib.filesystem.listFilesRecursive directory) [
|
||||
# Get only files ending in .nix
|
||||
(builtins.filter (name: lib.hasSuffix suffix name))
|
||||
];
|
||||
|
||||
# Returns all files ending in .nix for a directory
|
||||
nixFiles = directory: filesInDirectoryWithSuffix directory ".nix";
|
||||
|
||||
# Returns all files ending in default.nix for a directory
|
||||
defaultFiles = directory: filesInDirectoryWithSuffix directory "default.nix";
|
||||
|
||||
# Imports all files in a directory and passes inputs
|
||||
importOverlays =
|
||||
directory:
|
||||
lib.pipe (nixFiles directory) [
|
||||
# Import each overlay file
|
||||
(map (file: (import file) inputs))
|
||||
];
|
||||
|
||||
# Import default files as attrset with keys provided by parent directory
|
||||
defaultFilesToAttrset =
|
||||
directory:
|
||||
lib.pipe (defaultFiles directory) [
|
||||
# Import each file
|
||||
(map (file: {
|
||||
name = builtins.baseNameOf (builtins.dirOf file);
|
||||
value = import file;
|
||||
}))
|
||||
# Convert to an attrset of parent dir name -> file
|
||||
(builtins.listToAttrs)
|
||||
];
|
||||
|
||||
# [ package1/package.nix package2/package.nix package2/hello.sh ]
|
||||
buildPkgsFromDirectoryAndPkgs =
|
||||
directory: pkgs:
|
||||
lib.pipe (filesInDirectoryWithSuffix directory "package.nix") [
|
||||
|
||||
# Apply callPackage to create a derivation
|
||||
# Must use final.callPackage to avoid infinite recursion
|
||||
# [ package1.drv package2.drv ]
|
||||
(builtins.map (name: pkgs.callPackage name { }))
|
||||
|
||||
# Convert the list to an attrset with keys from pname or name attr
|
||||
# { package1 = package1.drv, package2 = package2.drv }
|
||||
(builtins.listToAttrs (
|
||||
map (v: {
|
||||
name = v."pname" or v."name";
|
||||
value = v;
|
||||
})
|
||||
))
|
||||
];
|
||||
|
||||
# Common overlays to always use
|
||||
overlays = [
|
||||
inputs.nur.overlays.default
|
||||
inputs.nix2vim.overlay
|
||||
inputs.zellij-switch.overlays.default
|
||||
] ++ (importOverlays ../overlays);
|
||||
|
||||
# System types to support.
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
# Split system types by operating system
|
||||
linuxSystems = builtins.filter (lib.hasSuffix "linux") supportedSystems;
|
||||
darwinSystems = builtins.filter (lib.hasSuffix "darwin") supportedSystems;
|
||||
|
||||
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
||||
forSystems = systems: lib.genAttrs systems;
|
||||
forAllSystems = lib.genAttrs supportedSystems;
|
||||
|
||||
# { x86_64-linux = { tempest = { settings = ...; }; }; };
|
||||
hosts = forAllSystems (system: defaultFilesToAttrset ../hosts/${system});
|
||||
|
||||
linuxHosts = lib.filterAttrs (name: value: builtins.elem name linuxSystems) hosts;
|
||||
darwinHosts = lib.filterAttrs (name: value: builtins.elem name darwinSystems) hosts;
|
||||
|
||||
# { system -> pkgs }
|
||||
pkgsBySystem = forAllSystems (
|
||||
system:
|
||||
import inputs.nixpkgs {
|
||||
inherit system overlays;
|
||||
config.permittedInsecurePackages = [ "litestream-0.3.13" ];
|
||||
config.allowUnfree = true;
|
||||
}
|
||||
);
|
||||
|
||||
colorscheme = defaultFilesToAttrset ../colorscheme;
|
||||
|
||||
homeModule = {
|
||||
home-manager = {
|
||||
# Include home-manager config in NixOS
|
||||
sharedModules = nixFiles ../platforms/home-manager;
|
||||
# Use the system-level nixpkgs instead of Home Manager's
|
||||
useGlobalPkgs = lib.mkDefault true;
|
||||
# Install packages to /etc/profiles instead of ~/.nix-profile, useful when
|
||||
# using multiple profiles for one user
|
||||
useUserPackages = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
buildHome =
|
||||
{
|
||||
system,
|
||||
module,
|
||||
specialArgs,
|
||||
}:
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = pkgsBySystem.${system};
|
||||
modules = [
|
||||
{ imports = (nixFiles ../platforms/home-manager); }
|
||||
module
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit colorscheme;
|
||||
} // specialArgs;
|
||||
};
|
||||
|
||||
buildNixos =
|
||||
{
|
||||
system,
|
||||
module,
|
||||
specialArgs,
|
||||
}:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
inherit specialArgs;
|
||||
pkgs = pkgsBySystem.${system};
|
||||
modules = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.wsl.nixosModules.wsl
|
||||
{ imports = (nixFiles ../platforms/nixos); }
|
||||
module
|
||||
{
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit colorscheme;
|
||||
} // specialArgs;
|
||||
} // homeModule.home-manager;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
buildDarwin =
|
||||
{
|
||||
system,
|
||||
module,
|
||||
specialArgs,
|
||||
}:
|
||||
inputs.darwin.lib.darwinSystem {
|
||||
inherit system specialArgs;
|
||||
modules = [
|
||||
inputs.home-manager.darwinModules.home-manager
|
||||
inputs.mac-app-util.darwinModules.default
|
||||
{
|
||||
imports = (nixFiles ../platforms/nix-darwin);
|
||||
nixpkgs.pkgs = pkgsBySystem.${system};
|
||||
}
|
||||
module
|
||||
{
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit colorscheme;
|
||||
} // specialArgs;
|
||||
} // homeModule.home-manager;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
generatorOptions = {
|
||||
amazon = {
|
||||
aws.enable = true;
|
||||
};
|
||||
iso = { };
|
||||
};
|
||||
|
||||
generateImage =
|
||||
{
|
||||
system,
|
||||
module,
|
||||
format,
|
||||
specialArgs,
|
||||
}:
|
||||
inputs.nixos-generators.nixosGenerate {
|
||||
inherit system format;
|
||||
modules = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.wsl.nixosModules.wsl
|
||||
{
|
||||
imports = (nixFiles ../platforms/nixos) ++ (nixFiles ../platforms/generators);
|
||||
}
|
||||
generatorOptions.${format}
|
||||
module
|
||||
{
|
||||
home-manager = {
|
||||
extraSpecialArgs = {
|
||||
inherit colorscheme;
|
||||
} // specialArgs;
|
||||
} // homeModule.home-manager;
|
||||
}
|
||||
];
|
||||
specialArgs = {
|
||||
} // specialArgs;
|
||||
};
|
||||
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
# Modules
|
||||
|
||||
| Module | Purpose |
|
||||
| --- | --- |
|
||||
| [common](./common/default.nix) | User programs and OS-agnostic configuration |
|
||||
| [darwin](./darwin/default.nix) | macOS-specific configuration |
|
||||
| [nixos](./nixos/default.nix) | NixOS-specific configuration |
|
||||
| [wsl](./wsl/default.nix) | WSL-specific configuration |
|
||||
|
@ -1,167 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
imports = [
|
||||
./applications
|
||||
./mail
|
||||
./neovim
|
||||
./programming
|
||||
./repositories
|
||||
./shell
|
||||
];
|
||||
|
||||
options = {
|
||||
# user = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Primary user of the system";
|
||||
# };
|
||||
# fullName = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Human readable name of the user";
|
||||
# };
|
||||
# userDirs = {
|
||||
# # Required to prevent infinite recursion when referenced by himalaya
|
||||
# download = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "XDG directory for downloads";
|
||||
# default = if pkgs.stdenv.isDarwin then "$HOME/Downloads" else "$HOME/downloads";
|
||||
# };
|
||||
# };
|
||||
# identityFile = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Path to existing private key file.";
|
||||
# default = "/etc/ssh/ssh_host_ed25519_key";
|
||||
# };
|
||||
# homePath = lib.mkOption {
|
||||
# type = lib.types.path;
|
||||
# description = "Path of user's home directory.";
|
||||
# default = builtins.toPath (
|
||||
# if pkgs.stdenv.isDarwin then "/Users/${config.user}" else "/home/${config.user}"
|
||||
# );
|
||||
# };
|
||||
# dotfilesPath = lib.mkOption {
|
||||
# type = lib.types.path;
|
||||
# description = "Path of dotfiles repository.";
|
||||
# default = config.homePath + "/dev/personal/dotfiles";
|
||||
# };
|
||||
# dotfilesRepo = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Link to dotfiles repository HTTPS URL.";
|
||||
# };
|
||||
# unfreePackages = lib.mkOption {
|
||||
# type = lib.types.listOf lib.types.str;
|
||||
# description = "List of unfree packages to allow.";
|
||||
# default = [ ];
|
||||
# };
|
||||
# insecurePackages = lib.mkOption {
|
||||
# type = lib.types.listOf lib.types.str;
|
||||
# description = "List of insecure packages to allow.";
|
||||
# default = [ ];
|
||||
# };
|
||||
# hostnames = {
|
||||
# audiobooks = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for audiobook server (Audiobookshelf).";
|
||||
# };
|
||||
# budget = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for budgeting server (ActualBudget).";
|
||||
# };
|
||||
# files = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for files server (Filebrowser).";
|
||||
# };
|
||||
# git = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for git server (Gitea).";
|
||||
# };
|
||||
# metrics = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for metrics server.";
|
||||
# };
|
||||
# minecraft = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for Minecraft server.";
|
||||
# };
|
||||
# paperless = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for document server (paperless-ngx).";
|
||||
# };
|
||||
# photos = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for photo management (Immich).";
|
||||
# };
|
||||
# prometheus = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for Prometheus server.";
|
||||
# };
|
||||
# influxdb = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for InfluxDB2 server.";
|
||||
# };
|
||||
# secrets = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for passwords and secrets (Vaultwarden).";
|
||||
# };
|
||||
# stream = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for video/media library (Jellyfin).";
|
||||
# };
|
||||
# content = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for personal content system (Nextcloud).";
|
||||
# };
|
||||
# books = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for books library (Calibre-Web).";
|
||||
# };
|
||||
# download = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for download services.";
|
||||
# };
|
||||
# irc = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for IRC services.";
|
||||
# };
|
||||
# n8n = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for n8n automation.";
|
||||
# };
|
||||
# notifications = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for push notification services (ntfy).";
|
||||
# };
|
||||
# status = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for status page (Uptime-Kuma).";
|
||||
# };
|
||||
# transmission = lib.mkOption {
|
||||
# type = lib.types.str;
|
||||
# description = "Hostname for peer2peer downloads (Transmission).";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
stateVersion = "23.05";
|
||||
in
|
||||
{
|
||||
|
||||
# Allow specified unfree packages (identified elsewhere)
|
||||
# Retrieves package object based on string name
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) config.unfreePackages;
|
||||
|
||||
# Allow specified insecure packages (identified elsewhere)
|
||||
nixpkgs.config.permittedInsecurePackages = config.insecurePackages;
|
||||
|
||||
# Pin a state version to prevent warnings
|
||||
home-manager.users.${config.user}.home.stateVersion = stateVersion;
|
||||
home-manager.users.root.home.stateVersion = stateVersion;
|
||||
};
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
# Disable dunst so that it's not attempting to reach a non-existent dunst service
|
||||
_final: prev: { betterlockscreen = prev.betterlockscreen.override { withDunst = false; }; }
|
@ -1,22 +0,0 @@
|
||||
inputs: _final: prev: {
|
||||
|
||||
# Based on:
|
||||
# https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/default.nix#L34
|
||||
|
||||
bypass-paywalls-clean =
|
||||
let
|
||||
addonId = "magnolia@12.34";
|
||||
in
|
||||
prev.stdenv.mkDerivation rec {
|
||||
pname = "bypass-paywalls-clean";
|
||||
version = "3.6.6.0";
|
||||
src = inputs.bypass-paywalls-clean;
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
buildCommand = ''
|
||||
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
mkdir -p "$dst"
|
||||
install -v -m644 "${src}" "$dst/${addonId}.xpi"
|
||||
'';
|
||||
};
|
||||
}
|
@ -23,22 +23,22 @@ in
|
||||
|
||||
vimPlugins = prev.vimPlugins // {
|
||||
|
||||
nvim-lspconfig = withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig-src;
|
||||
cmp-nvim-lsp = withSrc prev.vimPlugins.cmp-nvim-lsp inputs.cmp-nvim-lsp-src;
|
||||
nvim-treesitter = withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter-src;
|
||||
telescope-nvim = withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim-src;
|
||||
telescope-project-nvim = withSrc prev.vimPlugins.telescope-project-nvim inputs.telescope-project-nvim-src;
|
||||
toggleterm-nvim = withSrc prev.vimPlugins.toggleterm-nvim inputs.toggleterm-nvim-src;
|
||||
bufferline-nvim = withSrc prev.vimPlugins.bufferline-nvim inputs.bufferline-nvim-src;
|
||||
nvim-tree-lua = withSrc prev.vimPlugins.nvim-tree-lua inputs.nvim-tree-lua-src;
|
||||
fidget-nvim = withSrc prev.vimPlugins.fidget-nvim inputs.fidget-nvim-src;
|
||||
nvim-lint = withSrc prev.vimPlugins.nvim-lint inputs.nvim-lint-src;
|
||||
# nvim-lspconfig = withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig-src;
|
||||
# cmp-nvim-lsp = withSrc prev.vimPlugins.cmp-nvim-lsp inputs.cmp-nvim-lsp-src;
|
||||
# nvim-treesitter = withSrc prev.vimPlugins.nvim-treesitter inputs.nvim-treesitter-src;
|
||||
# telescope-nvim = withSrc prev.vimPlugins.telescope-nvim inputs.telescope-nvim-src;
|
||||
# telescope-project-nvim = withSrc prev.vimPlugins.telescope-project-nvim inputs.telescope-project-nvim-src;
|
||||
# toggleterm-nvim = withSrc prev.vimPlugins.toggleterm-nvim inputs.toggleterm-nvim-src;
|
||||
# bufferline-nvim = withSrc prev.vimPlugins.bufferline-nvim inputs.bufferline-nvim-src;
|
||||
# nvim-tree-lua = withSrc prev.vimPlugins.nvim-tree-lua inputs.nvim-tree-lua-src;
|
||||
# fidget-nvim = withSrc prev.vimPlugins.fidget-nvim inputs.fidget-nvim-src;
|
||||
# nvim-lint = withSrc prev.vimPlugins.nvim-lint inputs.nvim-lint-src;
|
||||
|
||||
# Packaging plugins entirely with Nix
|
||||
base16-nvim = plugin "base16-nvim" inputs.base16-nvim-src;
|
||||
baleia-nvim = plugin "baleia-nvim" inputs.baleia-nvim-src;
|
||||
hmts-nvim = plugin "hmts-nvim" inputs.hmts-nvim-src;
|
||||
tiny-inline-diagnostic-nvim = plugin "tiny-inline-diagnostic-nvim" inputs.tiny-inline-diagnostic-nvim-src;
|
||||
snipe-nvim = plugin "snipe-nvim" inputs.snipe-nvim-src;
|
||||
# base16-nvim = plugin "base16-nvim" inputs.base16-nvim-src;
|
||||
# baleia-nvim = plugin "baleia-nvim" inputs.baleia-nvim-src;
|
||||
# hmts-nvim = plugin "hmts-nvim" inputs.hmts-nvim-src;
|
||||
# tiny-inline-diagnostic-nvim = plugin "tiny-inline-diagnostic-nvim" inputs.tiny-inline-diagnostic-nvim-src;
|
||||
# snipe-nvim = plugin "snipe-nvim" inputs.snipe-nvim-src;
|
||||
};
|
||||
}
|
||||
|
@ -1,24 +1,32 @@
|
||||
_final: prev:
|
||||
_inputs: _final: prev:
|
||||
|
||||
let
|
||||
listToAttrsByField =
|
||||
field: list:
|
||||
listToAttrsByPnameOrName =
|
||||
list:
|
||||
builtins.listToAttrs (
|
||||
map (v: {
|
||||
name = v.${field};
|
||||
name = v."pname" or v."name";
|
||||
value = v;
|
||||
}) list
|
||||
);
|
||||
lib = prev.lib;
|
||||
packagesDirectory = lib.filesystem.listFilesRecursive ../pkgs;
|
||||
packages = lib.pipe packagesDirectory [
|
||||
# [ package1/package.nix package2/package.nix package2/hello.sh ]
|
||||
packages = lib.pipe (lib.filesystem.listFilesRecursive ../pkgs) [
|
||||
# Get only files called package.nix
|
||||
(builtins.filter (name: lib.hasSuffix "package.nix"))
|
||||
# [ package1/package.nix package2/package.nix ]
|
||||
(builtins.filter (name: lib.hasSuffix "package.nix" name))
|
||||
|
||||
# Apply callPackage to create a derivation
|
||||
(builtins.map prev.callPackage)
|
||||
# Must use final.callPackage to avoid infinite recursion
|
||||
# [ package1.drv package2.drv ]
|
||||
(builtins.map (name: prev.callPackage name { }))
|
||||
|
||||
# Convert the list to an attrset
|
||||
(listToAttrsByField "name")
|
||||
# { package1 = package1.drv, package2 = package2.drv }
|
||||
listToAttrsByPnameOrName
|
||||
];
|
||||
in
|
||||
|
||||
packages
|
||||
{
|
||||
nmasur = packages;
|
||||
}
|
||||
|
@ -1,43 +0,0 @@
|
||||
inputs: _final: prev: {
|
||||
tree-sitter-grammars = prev.tree-sitter-grammars // {
|
||||
|
||||
# Fix: bash highlighting doesn't work as of this commit:
|
||||
# https://github.com/NixOS/nixpkgs/commit/49cce41b7c5f6b88570a482355d9655ca19c1029
|
||||
tree-sitter-bash = prev.tree-sitter-grammars.tree-sitter-bash.overrideAttrs (old: {
|
||||
src = inputs.tree-sitter-bash;
|
||||
});
|
||||
|
||||
# Fix: invalid node in position. Broken as of this commit (replaced with newer):
|
||||
# https://github.com/NixOS/nixpkgs/commit/8ec3627796ecc899e6f47f5bf3c3220856ead9c5
|
||||
tree-sitter-python = prev.tree-sitter-grammars.tree-sitter-python.overrideAttrs (old: {
|
||||
src = inputs.tree-sitter-python;
|
||||
});
|
||||
|
||||
# Fix: invalid structure in position.
|
||||
tree-sitter-lua = prev.tree-sitter-grammars.tree-sitter-lua.overrideAttrs (old: {
|
||||
src = inputs.tree-sitter-lua;
|
||||
});
|
||||
|
||||
# Add grammars not in nixpks
|
||||
tree-sitter-ini = prev.tree-sitter.buildGrammar {
|
||||
language = "ini";
|
||||
version = "1.0.0";
|
||||
src = inputs.tree-sitter-ini;
|
||||
};
|
||||
tree-sitter-puppet = prev.tree-sitter.buildGrammar {
|
||||
language = "puppet";
|
||||
version = "1.0.0";
|
||||
src = inputs.tree-sitter-puppet;
|
||||
};
|
||||
tree-sitter-rasi = prev.tree-sitter.buildGrammar {
|
||||
language = "rasi";
|
||||
version = "0.1.1";
|
||||
src = inputs.tree-sitter-rasi;
|
||||
};
|
||||
tree-sitter-vimdoc = prev.tree-sitter.buildGrammar {
|
||||
language = "vimdoc";
|
||||
version = "2.1.0";
|
||||
src = inputs.tree-sitter-vimdoc;
|
||||
};
|
||||
};
|
||||
}
|
@ -11,9 +11,28 @@
|
||||
options.colors = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
description = "Attrset of base16 colorscheme key value pairs.";
|
||||
default = {
|
||||
# Nord
|
||||
base00 = "#2E3440";
|
||||
base01 = "#3B4252";
|
||||
base02 = "#434C5E";
|
||||
base03 = "#4C566A";
|
||||
base04 = "#D8DEE9";
|
||||
base05 = "#E5E9F0";
|
||||
base06 = "#ECEFF4";
|
||||
base07 = "#8FBCBB";
|
||||
base08 = "#88C0D0";
|
||||
base09 = "#81A1C1";
|
||||
base0A = "#5E81AC";
|
||||
base0B = "#BF616A";
|
||||
base0C = "#D08770";
|
||||
base0D = "#EBCB8B";
|
||||
base0E = "#A3BE8C";
|
||||
base0F = "#B48EAD";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.colors {
|
||||
config = {
|
||||
plugins = [ pkgs.vimPlugins.base16-nvim ];
|
||||
setup.base16-colorscheme = config.colors;
|
||||
|
||||
|
@ -2,26 +2,24 @@
|
||||
{
|
||||
|
||||
plugins = [
|
||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (
|
||||
_plugins: with pkgs.tree-sitter-grammars; [
|
||||
tree-sitter-bash
|
||||
tree-sitter-c
|
||||
tree-sitter-fish
|
||||
tree-sitter-hcl
|
||||
tree-sitter-ini
|
||||
tree-sitter-json
|
||||
tree-sitter-lua
|
||||
tree-sitter-markdown
|
||||
tree-sitter-markdown-inline
|
||||
tree-sitter-nix
|
||||
tree-sitter-puppet
|
||||
tree-sitter-python
|
||||
tree-sitter-rasi
|
||||
tree-sitter-toml
|
||||
tree-sitter-vimdoc
|
||||
tree-sitter-yaml
|
||||
]
|
||||
))
|
||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins: [
|
||||
pkgs.nmasur.ini-grammar
|
||||
pkgs.nmasur.puppet-grammar
|
||||
pkgs.nmasur.rasi-grammar
|
||||
pkgs.nmasur.vimdoc-grammar
|
||||
pkgs.tree-sitter-grammars.tree-sitter-bash
|
||||
pkgs.tree-sitter-grammars.tree-sitter-c
|
||||
pkgs.tree-sitter-grammars.tree-sitter-fish
|
||||
pkgs.tree-sitter-grammars.tree-sitter-hcl
|
||||
pkgs.tree-sitter-grammars.tree-sitter-json
|
||||
pkgs.tree-sitter-grammars.tree-sitter-lua
|
||||
pkgs.tree-sitter-grammars.tree-sitter-markdown
|
||||
pkgs.tree-sitter-grammars.tree-sitter-markdown-inline
|
||||
pkgs.tree-sitter-grammars.tree-sitter-nix
|
||||
pkgs.tree-sitter-grammars.tree-sitter-python
|
||||
pkgs.tree-sitter-grammars.tree-sitter-toml
|
||||
pkgs.tree-sitter-grammars.tree-sitter-yaml
|
||||
]))
|
||||
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
||||
pkgs.vimPlugins.playground # Tree-sitter experimenting
|
||||
pkgs.vimPlugins.nginx-vim
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
{ pkgs, lib, ... }:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "volnoti-unstable";
|
||||
pname = "volnoti";
|
||||
version = "2013-09-23";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "davidbrazdil";
|
||||
|
@ -0,0 +1,12 @@
|
||||
{ pkgs, fetchFromGitHub }:
|
||||
|
||||
pkgs.tree-sitter.buildGrammar {
|
||||
language = "ini";
|
||||
version = "1.3.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "justinmk";
|
||||
repo = "tree-sitter-ini";
|
||||
rev = "32b31863f222bf22eb43b07d4e9be8017e36fb31";
|
||||
sha256 = "sha256-kWCaOIC81GP5EHCqzPZP9EUgYy39CZ6/8TVS6soB6Wo=";
|
||||
};
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{ pkgs, fetchFromGitHub }:
|
||||
|
||||
pkgs.tree-sitter.buildGrammar {
|
||||
language = "puppet";
|
||||
version = "1.3.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tree-sitter-grammars";
|
||||
repo = "tree-sitter-puppet";
|
||||
rev = "15f192929b7d317f5914de2b4accd37b349182a6";
|
||||
sha256 = "sha256-bO5g5AdhzpB13yHklpAndUHIX7Rvd7OMjH0Ds2ATA6Q=";
|
||||
};
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{ pkgs, fetchFromGitHub }:
|
||||
|
||||
pkgs.tree-sitter.buildGrammar {
|
||||
language = "rasi";
|
||||
version = "0.1.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Fymyte";
|
||||
repo = "tree-sitter-rasi";
|
||||
rev = "6c9bbcfdf5f0f553d9ebc01750a3aa247a37b8aa";
|
||||
sha256 = "sha256-sPrIVgGGaBaXeqHNxjcdJ/S2FvxyV6rD9UPKU/tpspw=";
|
||||
};
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{ pkgs, fetchFromGitHub }:
|
||||
|
||||
pkgs.tree-sitter.buildGrammar {
|
||||
language = "vimdoc";
|
||||
version = "3.0.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "neovim";
|
||||
repo = "tree-sitter-vimdoc";
|
||||
rev = "d2e4b5c172a109966c2ce0378f73df6cede39400";
|
||||
sha256 = "sha256-Vrl4/cZL+TWlUMEeWZoHCAWhvlefcl3ajGcwyTNKOhI=";
|
||||
};
|
||||
}
|
21
pkgs/misc/bypass-paywalls-clean/package.nix
Normal file
21
pkgs/misc/bypass-paywalls-clean/package.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
# Based on:
|
||||
# https://git.sr.ht/~rycee/nur-expressions/tree/master/item/pkgs/firefox-addons/default.nix#L34
|
||||
|
||||
pkgs.stdenv.mkDerivation rec {
|
||||
pname = "bypass-paywalls-clean";
|
||||
version = "4.0.6.1";
|
||||
src = builtins.fetchGit {
|
||||
url = "https://gitflic.ru/project/magnolia1234/bpc_uploads.git";
|
||||
ref = "main";
|
||||
rev = "85a367220f5ae2181354f65fb1093e2f1ac9e417";
|
||||
};
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
buildCommand = ''
|
||||
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
mkdir -p "$dst"
|
||||
install -v -m644 "${src}/bypass_paywalls_clean-${version}.xpi" "$dst/magnolia@12.34.xpi"
|
||||
'';
|
||||
}
|
15
pkgs/misc/wallpapers/package.nix
Normal file
15
pkgs/misc/wallpapers/package.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "wallpapers";
|
||||
version = "0.1";
|
||||
src = pkgs.fetchFromGitLab {
|
||||
owner = "exorcist365";
|
||||
repo = "wallpapers";
|
||||
rev = "8d2860ac6c05cec0f78d5c9d07510f4ff5da90dc";
|
||||
sha256 = "sha256-1c1uDz37MhksWC75myv6jao5q2mIzD8X8I+TykXXmWg=";
|
||||
};
|
||||
installPhase = ''
|
||||
cp -r $src/ $out/
|
||||
'';
|
||||
}
|
18
pkgs/tools/misc/default/package.nix
Normal file
18
pkgs/tools/misc/default/package.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "default" ''
|
||||
${pkgs.gum}/bin/gum style --margin "1 2" --padding "0 2" --foreground "15" --background "55" "Options"
|
||||
${pkgs.gum}/bin/gum format --type=template -- ' {{ Italic "Run with" }} {{ Color "15" "69" " nix run github:nmasur/dotfiles#" }}{{ Color "15" "62" "someoption" }}{{ Color "15" "69" " " }}.'
|
||||
echo ""
|
||||
echo ""
|
||||
${pkgs.gum}/bin/gum format --type=template -- \
|
||||
' • {{ Color "15" "57" " readme " }} {{ Italic "Documentation for this repository." }}' \
|
||||
' • {{ Color "15" "57" " rebuild " }} {{ Italic "Switch to this configuration." }}' \
|
||||
' • {{ Color "15" "57" " installer " }} {{ Italic "Format and install from nothing." }}' \
|
||||
' • {{ Color "15" "57" " neovim " }} {{ Italic "Test out the Neovim package." }}' \
|
||||
' • {{ Color "15" "57" " loadkey " }} {{ Italic "Load an ssh key for this machine using melt." }}' \
|
||||
' • {{ Color "15" "57" " encrypt-secret " }} {{ Italic "Encrypt a secret for all machines." }}' \
|
||||
' • {{ Color "15" "57" " reencrypt-secrets " }} {{ Italic "Reencrypt all secrets when new machine is added." }}'
|
||||
echo ""
|
||||
echo ""
|
||||
''
|
12
pkgs/tools/misc/dotfiles-devshell/package.nix
Normal file
12
pkgs/tools/misc/dotfiles-devshell/package.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.mkShell {
|
||||
name = "dotfiles-devshell";
|
||||
buildInputs = with pkgs; [
|
||||
git
|
||||
stylua
|
||||
nixfmt-rfc-style
|
||||
shfmt
|
||||
shellcheck
|
||||
];
|
||||
}
|
11
pkgs/tools/misc/encrypt-secret/package.nix
Normal file
11
pkgs/tools/misc/encrypt-secret/package.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "encrypt-secret" ''
|
||||
printf "\nEnter the secret data to encrypt for all hosts...\n\n" 1>&2
|
||||
read -p "Secret: " secret
|
||||
printf "\nEncrypting...\n\n" 1>&2
|
||||
tmpfile=$(mktemp)
|
||||
echo "''${secret}" > ''${tmpfile}
|
||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${builtins.toString ../../../../misc/public-keys} $tmpfile
|
||||
rm $tmpfile
|
||||
''
|
@ -1,13 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{ buildGoModule, fetchFromGitHub }:
|
||||
|
||||
pkgs.buildGoModule rec {
|
||||
buildGoModule rec {
|
||||
pname = "gh-collaborators";
|
||||
version = "v3.0.0";
|
||||
src = {
|
||||
src = fetchFromGitHub {
|
||||
owner = "katiem0";
|
||||
repo = "gh-collaborators";
|
||||
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
|
||||
sha256 = pkgs.lib.fakeHash;
|
||||
rev = "bf412dde50605e48af86f291c2ac8714f2c1b228";
|
||||
sha256 = "sha256-SGmP/8Fvf2rcYkwscMOFG01Y0VJGb/TXrNZtLacurxA=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-9qmvG2q9t1Zj8yhKFyA99IaJ90R/gRVdQVjdliVKLRE";
|
||||
|
44
pkgs/tools/misc/installer/package.nix
Normal file
44
pkgs/tools/misc/installer/package.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
# Inspired by https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix
|
||||
# This script will partition and format drives; use at your own risk!
|
||||
|
||||
pkgs.writeShellScriptBin "installer" ''
|
||||
set -e
|
||||
|
||||
DISK=$1
|
||||
FLAKE=$2
|
||||
PARTITION_PREFIX=""
|
||||
|
||||
if [ -z "$DISK" ] || [ -z "$FLAKE" ]; then
|
||||
${pkgs.gum}/bin/gum style --width 50 --margin "1 2" --padding "2 4" \
|
||||
--foreground "#fb4934" \
|
||||
"Missing required parameter." \
|
||||
"Usage: installer -- <disk> <host>" \
|
||||
"Example: installer -- nvme0n1 tempest" \
|
||||
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest"
|
||||
echo "(exiting)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$DISK" in nvme*)
|
||||
PARTITION_PREFIX="p"
|
||||
esac
|
||||
|
||||
${pkgs.gum}/bin/gum confirm \
|
||||
"This will ERASE ALL DATA on the disk /dev/''${DISK}. Are you sure you want to continue?" \
|
||||
--default=false
|
||||
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mklabel gpt
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart primary 512MiB 100%
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- mkpart ESP fat32 1MiB 512MiB
|
||||
${pkgs.parted}/bin/parted /dev/''${DISK} -- set 3 esp on
|
||||
mkfs.ext4 -L nixos /dev/''${DISK}''${PARTITION_PREFIX}1
|
||||
mkfs.fat -F 32 -n boot /dev/''${DISK}''${PARTITION_PREFIX}2
|
||||
|
||||
mount /dev/disk/by-label/nixos /mnt
|
||||
mkdir --parents /mnt/boot
|
||||
mount /dev/disk/by-label/boot /mnt/boot
|
||||
|
||||
${pkgs.nixos-install-tools}/bin/nixos-install --flake github:nmasur/dotfiles#''${FLAKE}
|
||||
''
|
@ -7,4 +7,4 @@ pkgs.writers.writeFishBin "ip-check" {
|
||||
":"
|
||||
"${lib.makeBinPath [ pkgs.curl ]}"
|
||||
];
|
||||
} builtins.readFile ./ip.fish
|
||||
} (builtins.readFile ./ip.fish)
|
||||
|
@ -8,7 +8,7 @@ TEXT_FILE="/tmp/ocr.txt"
|
||||
IMAGE_FILE="/tmp/ocr.png"
|
||||
|
||||
function notify-send() {
|
||||
/usr/bin/osascript -e "display notification \"$2\" with title \"OCR\""
|
||||
/usr/bin/osascript -e "display notification \"$2\" with title \"OCR\""
|
||||
}
|
||||
|
||||
PATH="/usr/local/bin/:$PATH"
|
||||
@ -32,8 +32,8 @@ STATUS=$?
|
||||
# specify /tmp/ocr.txt as the file path, tesseract would out the text to
|
||||
# /tmp/ocr.txt.txt
|
||||
cd /tmp || {
|
||||
echo "Failed to jump to directory."
|
||||
exit 1
|
||||
echo "Failed to jump to directory."
|
||||
exit 1
|
||||
}
|
||||
tesseract "$IMAGE_FILE" "${TEXT_FILE//\.txt/}"
|
||||
|
||||
@ -41,8 +41,8 @@ tesseract "$IMAGE_FILE" "${TEXT_FILE//\.txt/}"
|
||||
# of lines in the file
|
||||
LINES=$(wc -l <$TEXT_FILE)
|
||||
if [ "$LINES" -eq 0 ]; then
|
||||
notify-send "ocr" "no text was detected"
|
||||
exit 1
|
||||
notify-send "ocr" "no text was detected"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copy text to clipboard
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, writeShellApplication }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
writeShellApplication {
|
||||
name = "ocr";
|
||||
runtimeInputs = [ pkgs.tesseract ];
|
||||
text = builtins.readFile ./ocr.sh;
|
||||
|
@ -1,15 +1,19 @@
|
||||
# Clipboard over SSH
|
||||
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.buildGoModule {
|
||||
buildGoModule {
|
||||
pname = "osc";
|
||||
version = "v0.4.6";
|
||||
src = {
|
||||
version = "v0.4.7";
|
||||
src = fetchFromGitHub {
|
||||
owner = "theimpostor";
|
||||
repo = "osc";
|
||||
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
|
||||
sha256 = pkgs.lib.fakeHash;
|
||||
rev = "c8e1e2f42a5d5fb628eaa48e889bde578deb8d33";
|
||||
sha256 = "sha256-MfEBbYT99tEtlOMmdl3iq2d07KYsN1tu5tDRFW3676g=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-POtQWIjPObsfa3YZ1dLZgedZFUcc4HeTWjU20AucoKc=";
|
||||
|
5
pkgs/tools/misc/readme/package.nix
Normal file
5
pkgs/tools/misc/readme/package.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "readme" ''
|
||||
${pkgs.glow}/bin/glow --pager ${builtins.toString ../../../../README.md}
|
||||
''
|
11
pkgs/tools/misc/rebuild/package.nix
Normal file
11
pkgs/tools/misc/rebuild/package.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "rebuild" ''
|
||||
echo ${pkgs.system}
|
||||
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
||||
if [ "$SYSTEM" == "darwin" ]; then
|
||||
sudo darwin-rebuild switch --flake ${builtins.toString ../../../../.}
|
||||
else
|
||||
doas nixos-rebuild switch --flake ${builtins.toString ../../../../.}
|
||||
fi
|
||||
''
|
21
pkgs/tools/misc/reencrypt-secrets/package.nix
Normal file
21
pkgs/tools/misc/reencrypt-secrets/package.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
# nix run github:nmasur/dotfiles#reencrypt-secrets ./private
|
||||
|
||||
pkgs.writeShellScriptBin "reencrypt-secrets" ''
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Must provide directory to reencrypt."
|
||||
exit 1
|
||||
fi
|
||||
encrypted=$1
|
||||
find "''${1}" -type f -name "*.age" | while IFS= read -r encryptedfile; do
|
||||
tmpfile=$(mktemp)
|
||||
echo "Decrypting ''${encryptedfile}..."
|
||||
${pkgs.age}/bin/age --decrypt \
|
||||
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
||||
echo "Encrypting ''${encryptedfile}..."
|
||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${builtins.toString ../../../../misc/public-keys} $tmpfile > $encryptedfile
|
||||
rm $tmpfile
|
||||
done
|
||||
echo "Finished."
|
||||
''
|
13
pkgs/tools/text/ren-find/package.nix
Normal file
13
pkgs/tools/text/ren-find/package.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "ren-find";
|
||||
version = "0.0.7";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "robenkleene";
|
||||
repo = "ren-find";
|
||||
rev = "50c40172e354caffee48932266edd7c7a76a20fd";
|
||||
sha256 = "sha256-zVIt6Xp+Mvym6gySvHIZJt1QgzKVP/wbTGTubWk6kzI=";
|
||||
};
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-lSeO/GaJPZ8zosOIJRXVIEuPXaBg1GBvKBIuXtu1xZg=";
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "ren-find";
|
||||
version = "0.0.7";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "robenkleene";
|
||||
repo = "ren-find";
|
||||
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
|
||||
sha256 = pkgs.lib.fakeHash;
|
||||
};
|
||||
cargoHash = "sha256-3bI3j2xvNHp4kyLEq/DZvRJBF2rn6pE4n8oXh67edDI=";
|
||||
}
|
13
pkgs/tools/text/rep-grep/package.nix
Normal file
13
pkgs/tools/text/rep-grep/package.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "rep-grep";
|
||||
version = "0.0.7";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "robenkleene";
|
||||
repo = "rep-grep";
|
||||
rev = "2a24f95170aa14b5182b2287125664a62f8688ef";
|
||||
sha256 = "sha256-gBxrbGCy6JEHnmgJmcm8sgtEvCAqra8/gPGsfCEfLqg=";
|
||||
};
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-t4tfQaFq4EV4ZWeU+IestSFiSAIeVQslTZhLbpKVoO4=";
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "rep-grep";
|
||||
version = "0.0.7";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "robenkleene";
|
||||
repo = "rep-grep";
|
||||
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
|
||||
sha256 = pkgs.lib.fakeHash;
|
||||
};
|
||||
cargoHash = "sha256-GEr3VvQ0VTKHUbW/GFEgwLpQWP2ZhS/4KYjDvfFLgxo=";
|
||||
}
|
30
platforms/generators/aws/default.nix
Normal file
30
platforms/generators/aws/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.aws;
|
||||
in
|
||||
{
|
||||
|
||||
options.aws.enable = lib.mkEnableOption "AWS EC2";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
nmasur.presets.services.openssh-aws.enable = lib.mkDefault true;
|
||||
|
||||
# Make sure disk size is large enough
|
||||
# https://github.com/nix-community/nixos-generators/issues/150
|
||||
virtualisation.diskSize = lib.mkDefault (16 * 1024); # In MB
|
||||
|
||||
boot.kernelPackages = lib.mkDefault pkgs.linuxKernel.packages.linux_6_6;
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
services.amazon-ssm-agent.enable = lib.mkDefault true;
|
||||
users.users.ssm-user.extraGroups = [ "wheel" ];
|
||||
|
||||
};
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = lib.pipe (lib.filesystem.listFilesRecursive ./.) [
|
||||
# Get only files ending in .nix
|
||||
(builtins.filter (name: lib.hasSuffix ".nix" name))
|
||||
];
|
||||
}
|
@ -16,13 +16,13 @@
|
||||
|
||||
config = {
|
||||
|
||||
# Allow specified unfree packages (identified elsewhere)
|
||||
# Retrieves package object based on string name
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg: builtins.elem (lib.getName pkg) config.allowUnfreePackages;
|
||||
|
||||
# Allow specified insecure packages (identified elsewhere)
|
||||
nixpkgs.config.permittedInsecurePackages = config.allowInsecurePackages;
|
||||
# # Allow specified unfree packages (identified elsewhere)
|
||||
# # Retrieves package object based on string name
|
||||
# nixpkgs.config.allowUnfreePredicate =
|
||||
# pkg: builtins.elem (lib.getName pkg) config.allowUnfreePackages;
|
||||
#
|
||||
# # Allow specified insecure packages (identified elsewhere)
|
||||
# nixpkgs.config.permittedInsecurePackages = config.allowInsecurePackages;
|
||||
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
home.packages = [
|
||||
pkgs.victor-mono # Used for Vim and Terminal
|
||||
pkgs.nerd-fonts.victor-mono # Used for Vim and Terminal
|
||||
pkgs.nerd-fonts.hack # For Polybar, Rofi
|
||||
];
|
||||
fonts.fontconfig = {
|
||||
@ -33,6 +33,7 @@ in
|
||||
programs.alacritty.settings.font.normal.family = "VictorMono";
|
||||
programs.kitty.font.name = "VictorMono Nerd Font Mono";
|
||||
nmasur.presets.programs.wezterm.font = "VictorMono Nerd Font Mono";
|
||||
programs.ghostty.settings.font-family = "VictorMono Nerd Font Mono";
|
||||
services.dunst.settings.global.font = "Hack Nerd Font 14";
|
||||
};
|
||||
}
|
||||
|
@ -25,8 +25,9 @@ in
|
||||
] ++ (if pkgs.stdenv.isLinux then [ pkgs._1password-gui ] else [ ]);
|
||||
|
||||
# Firefox extension
|
||||
programs.firefox.profiles.default.extensions =
|
||||
pkgs.nur.repos.rycee.firefox-addons.onepassword-password-manager;
|
||||
programs.firefox.profiles.default.extensions.packages = [
|
||||
pkgs.nur.repos.rycee.firefox-addons.onepassword-password-manager
|
||||
];
|
||||
};
|
||||
|
||||
# # https://1password.community/discussion/135462/firefox-extension-does-not-connect-to-linux-app
|
||||
|
@ -196,7 +196,7 @@ in
|
||||
|
||||
xdg.desktopEntries.aerc = lib.mkIf (pkgs.stdenv.isLinux) {
|
||||
name = "aerc";
|
||||
exec = "${config.terminalLaunchCommand} aerc %u";
|
||||
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} aerc %u";
|
||||
};
|
||||
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
||||
"${config.xsession.windowManager.i3.config.modifier}+Shift+e" = "exec ${
|
||||
@ -205,7 +205,7 @@ in
|
||||
pkgs.writeShellScript "focus-mail.sh" ''
|
||||
count=$(ps aux | grep -c aerc)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
i3-msg "exec --no-startup-id ${config.terminal} start --class aerc -- aerc"
|
||||
i3-msg "exec --no-startup-id ${lib.getExe config.nmasur.presets.services.i3.terminal} start --class aerc -- aerc"
|
||||
sleep 0.25
|
||||
fi
|
||||
i3-msg "[class=aerc] focus"
|
||||
|
@ -16,7 +16,7 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
allowUnfreePackages = [ "discord" ];
|
||||
home.packages = [ pkgs.discord ];
|
||||
xdg.configFile."discord/settings.json".text = pkgs.formats.json {
|
||||
xdg.configFile."discord/settings.json".text = builtins.toJSON {
|
||||
BACKGROUND_COLOR = "#202225";
|
||||
IS_MAXIMIZED = false;
|
||||
IS_MINIMIZED = false;
|
||||
|
@ -15,12 +15,12 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Alias sudo to doas for convenience
|
||||
fish.shellAliases = {
|
||||
programs.fish.shellAliases = {
|
||||
sudo = "doas";
|
||||
};
|
||||
|
||||
# Disable overriding our sudo alias with a TERMINFO alias
|
||||
kitty.settings.shell_integration = "no-sudo";
|
||||
programs.kitty.settings.shell_integration = "no-sudo";
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ in
|
||||
|
||||
# Allows me to make sure I can work on my dotfiles locally
|
||||
|
||||
options.nmasur.preset.programs.dotfiles = {
|
||||
options.nmasur.presets.programs.dotfiles = {
|
||||
enable = lib.mkEnableOption "Clone dotfiles repository";
|
||||
repo = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
@ -36,9 +36,11 @@ in
|
||||
|
||||
# Always clone dotfiles repository if it doesn't exist
|
||||
cloneDotfiles = config.lib.dag.entryAfter [ "writeBoundary" "loadkey" ] ''
|
||||
if [ ! -d "${cfg.path}" ]; then
|
||||
run mkdir --parents $VERBOSE_ARG $(dirname "${cfg.path}")
|
||||
run ${lib.getExe pkgs.git} clone ${cfg.repo} "${cfg.path}"
|
||||
if [ -f ~/.ssh/id_ed25519 ]; then
|
||||
if [ ! -d "${cfg.path}" ]; then
|
||||
run mkdir --parents $VERBOSE_ARG $(dirname "${cfg.path}")
|
||||
run ${lib.getExe pkgs.git} clone ${cfg.repo} "${cfg.path}"
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
@ -23,14 +23,14 @@ in
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
|
||||
package = if pkgs.stdenv.isDarwin then pkgs.firefox-unwrapped else pkgs.firefox;
|
||||
profiles.default = {
|
||||
id = 0;
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
# https://nur.nix-community.org/repos/rycee/
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
bypass-paywalls-clean
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
pkgs.nmasur.bypass-paywalls-clean
|
||||
darkreader
|
||||
don-t-fuck-with-paste
|
||||
export-cookies-txt
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
@ -21,11 +22,14 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
cfg.fish_user_key_bindings = # fish
|
||||
nmasur.presets.programs.fish.fish_user_key_bindings = # fish
|
||||
''
|
||||
# Shift-Enter (defined by terminal)
|
||||
bind -M insert \x1F accept-autosuggestion
|
||||
bind -M default \x1F accept-autosuggestion
|
||||
for mode in insert default visual
|
||||
# Shift-Enter (defined by terminal)
|
||||
bind -M $mode \x1F accept-autosuggestion
|
||||
# Ctrl-f to accept auto-suggestions
|
||||
bind -M $mode \cf forward-char
|
||||
end
|
||||
'';
|
||||
|
||||
programs.fish = {
|
||||
@ -40,10 +44,10 @@ in
|
||||
body = ''set -gx (cat $argv | tr "=" " " | string split ' ')'';
|
||||
};
|
||||
fish_user_key_bindings = {
|
||||
body = builtins.readFile ./functions/fish_user_key_bindings.fish;
|
||||
body = cfg.fish_user_key_bindings;
|
||||
};
|
||||
ip = {
|
||||
body = builtins.readFile ./functions/ip.fish;
|
||||
body = lib.getExe pkgs.nmasur.ip-check;
|
||||
};
|
||||
json = {
|
||||
description = "Tidy up JSON using jq";
|
||||
|
@ -25,7 +25,13 @@ in
|
||||
functions = {
|
||||
edit = {
|
||||
description = "Open a file in Vim";
|
||||
body = builtins.readFile ./fish/edit.fish;
|
||||
body = # fish
|
||||
''
|
||||
set vimfile (fzf)
|
||||
and set vimfile (echo $vimfile | tr -d '\r')
|
||||
and commandline -r "${builtins.baseNameOf config.home.sessionVariables.EDITOR} \"$vimfile\""
|
||||
and commandline -f execute
|
||||
'';
|
||||
};
|
||||
fcd = {
|
||||
description = "Jump to directory";
|
||||
@ -51,11 +57,40 @@ in
|
||||
};
|
||||
recent = {
|
||||
description = "Open a recent file in Vim";
|
||||
body = builtins.readFile ./edit/recent.fish;
|
||||
body = # fish
|
||||
''
|
||||
set vimfile (fd -t f --exec /usr/bin/stat -f "%m%t%N" | sort -nr | cut -f2 | fzf)
|
||||
and set vimfile (echo $vimfile | tr -d '\r')
|
||||
and commandline -r "${builtins.baseNameOf config.home.sessionVariables.EDITOR} $vimfile"
|
||||
and commandline -f execute
|
||||
'';
|
||||
};
|
||||
search-and-edit = {
|
||||
description = "Search and open the relevant file in Vim";
|
||||
body = builtins.readFile ./edit/search-and-edit.fish;
|
||||
body = # fish
|
||||
''
|
||||
set vimfile ( \
|
||||
rg \
|
||||
--color=always \
|
||||
--line-number \
|
||||
--no-heading \
|
||||
--smart-case \
|
||||
--iglob "!/Library/**" \
|
||||
--iglob "!/System/**" \
|
||||
--iglob "!Users/$HOME/Library/*" \
|
||||
".*" \
|
||||
| fzf --ansi \
|
||||
--height "80%" \
|
||||
--color "hl:-1:underline,hl+:-1:underline:reverse" \
|
||||
--delimiter : \
|
||||
--preview 'bat --color=always {1} --highlight-line {2}' \
|
||||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
|
||||
)
|
||||
and set line_number (echo $vimfile | tr -d '\r' | cut -d':' -f2)
|
||||
and set vimfile (echo $vimfile | tr -d '\r' | cut -d':' -f1)
|
||||
and commandline -r "${builtins.baseNameOf config.home.sessionVariables.EDITOR} +$line_number \"$vimfile\""
|
||||
and commandline -f execute
|
||||
'';
|
||||
};
|
||||
};
|
||||
shellAbbrs = {
|
||||
@ -77,9 +112,6 @@ in
|
||||
# Ctrl-e
|
||||
bind -M insert \ce recent
|
||||
bind -M default \ce recent
|
||||
# Ctrl-f
|
||||
bind -M insert \cf fcd
|
||||
bind -M default \cf fcd
|
||||
# Ctrl-p
|
||||
bind -M insert \cp projects
|
||||
bind -M default \cp projects
|
||||
|
@ -1,4 +0,0 @@
|
||||
set vimfile (fzf)
|
||||
and set vimfile (echo $vimfile | tr -d '\r')
|
||||
and commandline -r "vim \"$vimfile\""
|
||||
and commandline -f execute
|
@ -1,4 +0,0 @@
|
||||
set vimfile (fd -t f --exec /usr/bin/stat -f "%m%t%N" | sort -nr | cut -f2 | fzf)
|
||||
and set vimfile (echo $vimfile | tr -d '\r')
|
||||
and commandline -r "vim $vimfile"
|
||||
and commandline -f execute
|
@ -1,21 +0,0 @@
|
||||
set vimfile ( \
|
||||
rg \
|
||||
--color=always \
|
||||
--line-number \
|
||||
--no-heading \
|
||||
--smart-case \
|
||||
--iglob "!/Library/**" \
|
||||
--iglob "!/System/**" \
|
||||
--iglob "!Users/$HOME/Library/*" \
|
||||
".*" \
|
||||
| fzf --ansi \
|
||||
--height "80%" \
|
||||
--color "hl:-1:underline,hl+:-1:underline:reverse" \
|
||||
--delimiter : \
|
||||
--preview 'bat --color=always {1} --highlight-line {2}' \
|
||||
--preview-window 'up,60%,border-bottom,+{2}+3/3,~3'
|
||||
)
|
||||
and set line_number (echo $vimfile | tr -d '\r' | cut -d':' -f2)
|
||||
and set vimfile (echo $vimfile | tr -d '\r' | cut -d':' -f1)
|
||||
and commandline -r "vim +$line_number \"$vimfile\""
|
||||
and commandline -f execute
|
@ -0,0 +1,76 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.presets.programs.ghostty;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.presets.programs.ghostty.enable = lib.mkEnableOption "Ghostty terminal";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
|
||||
package = if pkgs.stdenv.isDarwin then pkgs.nur.repos.DimitarNestorov.ghostty else pkgs.ghostty;
|
||||
|
||||
enableFishIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
installBatSyntax = false; # The file doesn't seem to exist in the pkg
|
||||
settings = {
|
||||
theme = config.theme.name;
|
||||
font-size = 16;
|
||||
macos-titlebar-style = "hidden";
|
||||
window-decoration = false;
|
||||
macos-non-native-fullscreen = true;
|
||||
fullscreen = true;
|
||||
keybind = [
|
||||
"super+t=unbind" # Pass super-t to underlying tool (e.g. zellij tabs)
|
||||
"super+shift+]=unbind"
|
||||
"super+shift+[=unbind"
|
||||
"ctrl+tab=unbind"
|
||||
"ctrl+shift+tab=unbind"
|
||||
];
|
||||
};
|
||||
themes."gruvbox" = {
|
||||
background = config.theme.colors.base00;
|
||||
cursor-color = config.theme.colors.base04;
|
||||
foreground = config.theme.colors.base05;
|
||||
palette = [
|
||||
"0=${config.theme.colors.base00}"
|
||||
"1=${config.theme.colors.base08}"
|
||||
"2=${config.theme.colors.base0B}"
|
||||
"3=${config.theme.colors.base0A}"
|
||||
"4=${config.theme.colors.base0D}"
|
||||
"5=${config.theme.colors.base0E}"
|
||||
"6=${config.theme.colors.base0C}"
|
||||
"7=${config.theme.colors.base05}"
|
||||
"8=${config.theme.colors.base03}"
|
||||
"9=${config.theme.colors.base08}"
|
||||
"10=${config.theme.colors.base0B}"
|
||||
"11=${config.theme.colors.base0A}"
|
||||
"12=${config.theme.colors.base0C}"
|
||||
"13=${config.theme.colors.base0E}"
|
||||
"14=${config.theme.colors.base0C}"
|
||||
"15=${config.theme.colors.base07}"
|
||||
"16=${config.theme.colors.base09}"
|
||||
"17=${config.theme.colors.base0F}"
|
||||
"18=${config.theme.colors.base01}"
|
||||
"19=${config.theme.colors.base02}"
|
||||
"20=${config.theme.colors.base04}"
|
||||
"21=${config.theme.colors.base06}"
|
||||
];
|
||||
selection-background = config.theme.colors.base02;
|
||||
selection-foreground = config.theme.colors.base00;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
@ -27,10 +27,12 @@ in
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Name to use for personal git commits";
|
||||
default = config.nmasur.presets.programs.git.name;
|
||||
};
|
||||
email = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Email to use for personal git commits";
|
||||
default = config.nmasur.presets.programs.git.email;
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -42,7 +44,7 @@ in
|
||||
userEmail = lib.mkForce cfg.work.email;
|
||||
includes = [
|
||||
{
|
||||
path = "${config.xdg.configHome}/${config.xdg.configFile."git/personal".target}";
|
||||
path = "${config.home.homeDirectory}/${config.xdg.configFile."git/personal".target}";
|
||||
condition = "gitdir:~/dev/personal/";
|
||||
}
|
||||
];
|
||||
@ -50,7 +52,7 @@ in
|
||||
};
|
||||
|
||||
# Personal git config
|
||||
xdg.configFile."git/personal".text = pkgs.formats.gitIni {
|
||||
xdg.configFile."git/personal".text = lib.generators.toGitINI {
|
||||
user = {
|
||||
name = cfg.personal.name;
|
||||
email = cfg.personal.email;
|
||||
|
@ -16,10 +16,12 @@ in
|
||||
name = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Name to use for git commits";
|
||||
default = config.nmasur.settings.fullName;
|
||||
};
|
||||
email = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Email to use for git commits";
|
||||
default = "7386960+nmasur@users.noreply.github.com";
|
||||
};
|
||||
};
|
||||
|
||||
@ -30,7 +32,7 @@ in
|
||||
userName = cfg.name;
|
||||
userEmail = cfg.email;
|
||||
extraConfig = {
|
||||
core.pager = "${pkgs.git}/share/git/contrib/diff-highlight/diff-highlight | less -F";
|
||||
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";
|
||||
pager = {
|
||||
branch = "false";
|
||||
|
@ -20,7 +20,7 @@ in
|
||||
gitCredentialHelper.enable = true;
|
||||
settings.git_protocol = "https";
|
||||
extensions = [
|
||||
pkgs.gh-collaborators
|
||||
pkgs.nmasur.gh-collaborators
|
||||
pkgs.gh-dash
|
||||
pkgs.gh-copilot
|
||||
];
|
||||
|
382
platforms/home-manager/modules/nmasur/presets/programs/helix.nix
Normal file
382
platforms/home-manager/modules/nmasur/presets/programs/helix.nix
Normal file
@ -0,0 +1,382 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.presets.programs.helix;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.presets.programs.helix.enable = lib.mkEnableOption "Helix text editor";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Use Neovim as the editor for git commit messages
|
||||
programs.git.extraConfig.core.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
|
||||
home.sessionVariables = {
|
||||
EDITOR = lib.mkForce "${lib.getExe pkgs.helix}";
|
||||
};
|
||||
|
||||
# Create quick aliases for launching Helix
|
||||
programs.fish = {
|
||||
shellAbbrs = {
|
||||
h = lib.mkForce "hx";
|
||||
};
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
|
||||
enable = true;
|
||||
|
||||
package = pkgs.helix; # pkgs.evil-helix
|
||||
|
||||
languages = {
|
||||
|
||||
language-server.nixd = {
|
||||
command = "${pkgs.nixd}/bin/nixd";
|
||||
};
|
||||
|
||||
language-server.fish-lsp = {
|
||||
command = "${pkgs.fish-lsp}/bin/fish-lsp";
|
||||
};
|
||||
|
||||
language-server.yaml-language-server = {
|
||||
command = lib.getExe pkgs.yaml-language-server;
|
||||
};
|
||||
|
||||
language-server.marksman = {
|
||||
command = lib.getExe pkgs.marksman;
|
||||
};
|
||||
|
||||
language-server.terraform-ls = {
|
||||
command = "${lib.getExe pkgs.terraform-ls} serve";
|
||||
};
|
||||
|
||||
language-server.bash-language-server = {
|
||||
command = lib.getExe (
|
||||
pkgs.bash-language-server.overrideAttrs {
|
||||
buildInputs = [
|
||||
pkgs.shellcheck
|
||||
pkgs.shfmt
|
||||
];
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
language = [
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
language-servers = [ "nixd" ];
|
||||
}
|
||||
{
|
||||
name = "markdown";
|
||||
auto-format = true;
|
||||
language-servers = [ "marksman" ];
|
||||
formatter = {
|
||||
command = lib.getExe pkgs.mdformat;
|
||||
args = [ "-" ];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "tfvars";
|
||||
auto-format = true;
|
||||
language-servers = [ "terraform-ls" ];
|
||||
formatter = {
|
||||
command = lib.getExe pkgs.terraform;
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "hcl";
|
||||
auto-format = true;
|
||||
language-servers = [ "terraform-ls" ];
|
||||
formatter = {
|
||||
command = lib.getExe pkgs.terraform;
|
||||
args = [
|
||||
"fmt"
|
||||
"-"
|
||||
];
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "bash";
|
||||
auto-format = true;
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
settings = {
|
||||
theme = "base16";
|
||||
|
||||
keys.normal = {
|
||||
# Enable and disable inlay hints
|
||||
space.H = ":toggle lsp.display-inlay-hints";
|
||||
|
||||
# Extend selection above
|
||||
X = "select_line_above";
|
||||
|
||||
# Move lines up or down
|
||||
A-j = [
|
||||
"extend_to_line_bounds"
|
||||
"delete_selection"
|
||||
"paste_after"
|
||||
];
|
||||
A-k = [
|
||||
"extend_to_line_bounds"
|
||||
"delete_selection"
|
||||
"move_line_up"
|
||||
"paste_before"
|
||||
];
|
||||
|
||||
# Copy lines up or down
|
||||
A-J = [
|
||||
"extend_to_line_bounds"
|
||||
"yank"
|
||||
"paste_after"
|
||||
];
|
||||
|
||||
A-K = [
|
||||
"extend_to_line_bounds"
|
||||
"yank"
|
||||
"paste_before"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
editor = {
|
||||
|
||||
# Change cursors depending on the mode
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
|
||||
# Text width
|
||||
soft-wrap = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# View line numbers relative to the current cursors
|
||||
line-number = "relative";
|
||||
|
||||
# Show hidden files
|
||||
file-picker = {
|
||||
hidden = false;
|
||||
git-ignore = true;
|
||||
git-global = true;
|
||||
git-exclude = true;
|
||||
};
|
||||
|
||||
# Show whitespace visible to the user
|
||||
# Waiting for trailing whitespace option ideally
|
||||
whitespace = {
|
||||
render = {
|
||||
# space = "all";
|
||||
tab = "all";
|
||||
};
|
||||
characters = {
|
||||
# space = "·";
|
||||
tab = "→";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
themes."${config.programs.helix.settings.theme}" = {
|
||||
"attributes" = config.theme.colors.base09;
|
||||
"comment" = {
|
||||
fg = config.theme.colors.base03;
|
||||
modifiers = [ "italic" ];
|
||||
};
|
||||
"constant" = config.theme.colors.base09;
|
||||
"constant.character.escape" = config.theme.colors.base0C;
|
||||
"constant.numeric" = config.theme.colors.base09;
|
||||
"constructor" = config.theme.colors.base0D;
|
||||
"debug" = config.theme.colors.base03;
|
||||
"diagnostic" = {
|
||||
modifiers = [ "underlined" ];
|
||||
};
|
||||
"diff.delta" = config.theme.colors.base09;
|
||||
"diff.minus" = config.theme.colors.base08;
|
||||
"diff.plus" = config.theme.colors.base0B;
|
||||
"error" = config.theme.colors.base08;
|
||||
"function" = config.theme.colors.base0D;
|
||||
"hint" = config.theme.colors.base03;
|
||||
"info" = config.theme.colors.base0D;
|
||||
"keyword" = config.theme.colors.base0E;
|
||||
"label" = config.theme.colors.base0E;
|
||||
"namespace" = config.theme.colors.base0E;
|
||||
"operator" = config.theme.colors.base05;
|
||||
"special" = config.theme.colors.base0D;
|
||||
"string" = config.theme.colors.base0B;
|
||||
"type" = config.theme.colors.base0A;
|
||||
"variable" = config.theme.colors.base08;
|
||||
"variable.other.member" = config.theme.colors.base05;
|
||||
"warning" = config.theme.colors.base09;
|
||||
"markup.bold" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"markup.heading" = config.theme.colors.base0D;
|
||||
"markup.italic" = {
|
||||
fg = config.theme.colors.base0E;
|
||||
modifiers = [ "italic" ];
|
||||
};
|
||||
"markup.link.text" = config.theme.colors.base08;
|
||||
"markup.link.url" = {
|
||||
fg = config.theme.colors.base09;
|
||||
modifiers = [ "underlined" ];
|
||||
};
|
||||
"markup.list" = config.theme.colors.base08;
|
||||
"markup.quote" = config.theme.colors.base0C;
|
||||
"markup.raw" = config.theme.colors.base0B;
|
||||
"markup.strikethrough" = {
|
||||
modifiers = [ "crossed_out" ];
|
||||
};
|
||||
"diagnostic.hint" = {
|
||||
underline = {
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.info" = {
|
||||
underline = {
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.warning" = {
|
||||
underline = {
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"diagnostic.error" = {
|
||||
underline = {
|
||||
style = "curl";
|
||||
};
|
||||
};
|
||||
"ui.background" = {
|
||||
bg = config.theme.colors.base00;
|
||||
};
|
||||
"ui.bufferline.active" = {
|
||||
fg = config.theme.colors.base00;
|
||||
bg = config.theme.colors.base03;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.bufferline" = {
|
||||
fg = config.theme.colors.base04;
|
||||
bg = config.theme.colors.base00;
|
||||
};
|
||||
"ui.cursor" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.cursor.insert" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.cursorline.primary" = {
|
||||
fg = config.theme.colors.base05;
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.cursor.match" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.cursor.select" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.gutter" = {
|
||||
bg = config.theme.colors.base00;
|
||||
};
|
||||
"ui.help" = {
|
||||
fg = config.theme.colors.base06;
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.linenr" = {
|
||||
fg = config.theme.colors.base03;
|
||||
bg = config.theme.colors.base00;
|
||||
};
|
||||
"ui.linenr.selected" = {
|
||||
fg = config.theme.colors.base04;
|
||||
bg = config.theme.colors.base01;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.menu" = {
|
||||
fg = config.theme.colors.base05;
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.menu.scroll" = {
|
||||
fg = config.theme.colors.base03;
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.menu.selected" = {
|
||||
fg = config.theme.colors.base01;
|
||||
bg = config.theme.colors.base04;
|
||||
};
|
||||
"ui.popup" = {
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.selection" = {
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.selection.primary" = {
|
||||
bg = config.theme.colors.base02;
|
||||
};
|
||||
"ui.statusline" = {
|
||||
fg = config.theme.colors.base04;
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.statusline.inactive" = {
|
||||
bg = config.theme.colors.base01;
|
||||
fg = config.theme.colors.base03;
|
||||
};
|
||||
"ui.statusline.insert" = {
|
||||
fg = config.theme.colors.base00;
|
||||
bg = config.theme.colors.base0B;
|
||||
};
|
||||
"ui.statusline.normal" = {
|
||||
fg = config.theme.colors.base00;
|
||||
bg = config.theme.colors.base03;
|
||||
};
|
||||
"ui.statusline.select" = {
|
||||
fg = config.theme.colors.base00;
|
||||
bg = config.theme.colors.base0F;
|
||||
};
|
||||
"ui.text" = config.theme.colors.base05;
|
||||
"ui.text.focus" = config.theme.colors.base05;
|
||||
"ui.virtual.indent-guide" = {
|
||||
fg = config.theme.colors.base03;
|
||||
};
|
||||
"ui.virtual.inlay-hint" = {
|
||||
fg = config.theme.colors.base03;
|
||||
};
|
||||
"ui.virtual.ruler" = {
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
"ui.virtual.jump-label" = {
|
||||
fg = config.theme.colors.base0A;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.window" = {
|
||||
bg = config.theme.colors.base01;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -13,13 +13,15 @@ in
|
||||
options.nmasur.presets.programs.jujutsu.enable = lib.mkEnableOption "Jujutsu version control";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
|
||||
# https://github.com/martinvonz/jj/blob/main/docs/config.md
|
||||
settings = {
|
||||
user = {
|
||||
name = config.programs.git.userName;
|
||||
email = config.programs.git.userEmail;
|
||||
# https://github.com/martinvonz/jj/blob/main/docs/config.md
|
||||
settings = {
|
||||
user = {
|
||||
name = config.programs.git.userName;
|
||||
email = config.programs.git.userEmail;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -6,12 +6,12 @@
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.presets.programs.alacritty;
|
||||
cfg = config.nmasur.presets.programs.mpv;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.presets.programs.alacritty.enable = lib.mkEnableOption "Alacritty terminal";
|
||||
options.nmasur.presets.programs.mpv.enable = lib.mkEnableOption "mpv video player";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Video player
|
||||
|
@ -28,12 +28,14 @@ in
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
cfg.package = lib.mkDefault pkgs.nmasur-neovim.override {
|
||||
colors = cfg.colors;
|
||||
github = cfg.github.enable;
|
||||
terraform = cfg.terraform.enable;
|
||||
kubernetes = cfg.kubernetes.enable;
|
||||
};
|
||||
nmasur.presets.programs.neovim.package = lib.mkDefault (
|
||||
pkgs.nmasur.neovim.override {
|
||||
colors = cfg.colors;
|
||||
github = cfg.github.enable;
|
||||
terraform = cfg.terraform.enable;
|
||||
kubernetes = cfg.kubernetes.enable;
|
||||
}
|
||||
);
|
||||
|
||||
# Use Neovim as the editor for git commit messages
|
||||
programs.git.extraConfig.core.editor = "${lib.getExe cfg.package}";
|
||||
@ -60,14 +62,16 @@ in
|
||||
|
||||
# Create a desktop option for launching Neovim from a file manager
|
||||
# (Requires launching the terminal and then executing Neovim)
|
||||
xdg.desktopEntries.nvim = lib.mkIf (pkgs.stdenv.isLinux) {
|
||||
name = "Neovim wrapper";
|
||||
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} nvim %F"; # TODO: change to generic
|
||||
mimeType = [
|
||||
"text/plain"
|
||||
"text/markdown"
|
||||
];
|
||||
};
|
||||
xdg.desktopEntries.nvim =
|
||||
lib.mkIf (pkgs.stdenv.isLinux && config.nmasur.presets.services.i3.enable)
|
||||
{
|
||||
name = "Neovim wrapper";
|
||||
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} nvim %F"; # TODO: change to generic
|
||||
mimeType = [
|
||||
"text/plain"
|
||||
"text/markdown"
|
||||
];
|
||||
};
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"text/plain" = [ "nvim.desktop" ];
|
||||
"text/markdown" = [ "nvim.desktop" ];
|
||||
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.nmasur.presets.programs.nix-index;
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
options.nmasur.presets.programs.nix-index.enable =
|
||||
lib.mkEnableOption "nix-index caching for command line";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Provides "command-not-found" options
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
# Create nix-index if doesn't exist
|
||||
home.activation.createNixIndex =
|
||||
let
|
||||
cacheDir = "${config.xdg.cacheHome}/nix-index";
|
||||
in
|
||||
lib.mkIf config.programs.nix-index.enable (
|
||||
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||
if [ ! -d ${cacheDir} ]; then
|
||||
run ${pkgs.nix-index}/bin/nix-index -f ${pkgs.path}
|
||||
fi
|
||||
''
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -6,7 +6,6 @@
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (config.nmasur.settings) username;
|
||||
cfg = config.nmasur.presets.programs.nixpkgs;
|
||||
in
|
||||
|
||||
@ -61,21 +60,21 @@ in
|
||||
body = # fish
|
||||
''
|
||||
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||
echo "doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}#${config.networking.hostName}"
|
||||
echo "doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path}"
|
||||
'';
|
||||
};
|
||||
rebuild-nixos-offline = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||
body = # fish
|
||||
''
|
||||
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||
echo "doas nixos-rebuild switch --option substitute false --flake ${config.nmasur.presets.programs.dotfiles.path}#${config.networking.hostName}"
|
||||
echo "doas nixos-rebuild switch --option substitute false --flake ${config.nmasur.presets.programs.dotfiles.path}"
|
||||
'';
|
||||
};
|
||||
rebuild-home = lib.mkIf config.nmasur.presets.programs.dotfiles.enable {
|
||||
body = # fish
|
||||
''
|
||||
git -C ${config.nmasur.presets.programs.dotfiles.path} add --intent-to-add --all
|
||||
echo "${lib.getExe pkgs.home-manager} switch --flake ${config.nmasur.presets.programs.dotfiles.path}#${config.networking.hostName}";
|
||||
echo "${lib.getExe pkgs.home-manager} switch --flake ${config.nmasur.presets.programs.dotfiles.path}";
|
||||
'';
|
||||
};
|
||||
};
|
||||
@ -91,70 +90,6 @@ in
|
||||
bind -M default \x11F nix-fzf
|
||||
'';
|
||||
|
||||
# Provides "command-not-found" options
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
|
||||
# Create nix-index if doesn't exist
|
||||
home.activation.createNixIndex =
|
||||
let
|
||||
cacheDir = "${config.xdg.cacheHome}/nix-index";
|
||||
in
|
||||
lib.mkIf config.programs.nix-index.enable (
|
||||
config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||
if [ ! -d ${cacheDir} ]; then
|
||||
$DRY_RUN_CMD ${pkgs.nix-index}/bin/nix-index -f ${pkgs.path}
|
||||
fi
|
||||
''
|
||||
);
|
||||
|
||||
# Set automatic generation cleanup for home-manager
|
||||
nix.gc = {
|
||||
automatic = config.nix.gc.automatic;
|
||||
options = config.nix.gc.options;
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
|
||||
# Set channel to flake packages, used for nix-shell commands
|
||||
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
||||
|
||||
# For security, only allow specific users
|
||||
settings.allowed-users = [
|
||||
"@wheel" # Anyone in the wheel group
|
||||
config.home.username # The current user
|
||||
];
|
||||
|
||||
# Enable features in Nix commands
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
warn-dirty = false
|
||||
'';
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
options = "--delete-older-than 10d";
|
||||
};
|
||||
|
||||
settings = {
|
||||
|
||||
# Add community Cachix to binary cache
|
||||
# Don't use at work because blocked by corporate firewall
|
||||
builders-use-substitutes = true;
|
||||
substituters = lib.mkIf (!config.nmasur.profiles.work.enable) [
|
||||
"https://nix-community.cachix.org"
|
||||
];
|
||||
trusted-public-keys = lib.mkIf (!config.nmasur.profiles.work.enable) [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
|
||||
# Scans and hard links identical files in the store
|
||||
# Not working with macOS: https://github.com/NixOS/nix/issues/7273
|
||||
auto-optimise-store = lib.mkIf (!pkgs.stdenv.isDarwin) true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ let
|
||||
in
|
||||
{
|
||||
|
||||
options.nmasur.preset.programs.notes = {
|
||||
options.nmasur.presets.programs.notes = {
|
||||
enable = lib.mkEnableOption "Manage notes repository";
|
||||
repo = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
|
@ -17,7 +17,7 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
unfreePackages = [ "obsidian" ];
|
||||
allowUnfreePackages = [ "obsidian" ];
|
||||
home.packages = with pkgs; [ obsidian ];
|
||||
|
||||
# Broken on 2023-12-11
|
||||
|
@ -13,14 +13,19 @@ in
|
||||
|
||||
options.nmasur.presets.programs.ripgrep = {
|
||||
enable = lib.mkEnableOption "Ripgrep search tool";
|
||||
ignorePatterns = ''
|
||||
!.env*
|
||||
!.github/
|
||||
!.gitignore
|
||||
!*.tfvars
|
||||
.terraform/
|
||||
.target/
|
||||
/Library/'';
|
||||
ignorePatterns = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
description = "Patterns to ignore with ripgrep";
|
||||
default = ''
|
||||
!.env*
|
||||
!.github/
|
||||
!.gitignore
|
||||
!*.tfvars
|
||||
.terraform/
|
||||
.target/
|
||||
/Library/
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -13,43 +13,48 @@ in
|
||||
# Adapted from:
|
||||
# A rofi powered menu to execute brightness choices.
|
||||
|
||||
config.brightnessCommand = lib.mkIf config.nmasur.presets.programs.rofi.enable builtins.toString (
|
||||
pkgs.writeShellScript "brightness" ''
|
||||
config.nmasur.presets.services.i3.commands.brightness =
|
||||
lib.mkIf config.nmasur.presets.programs.rofi.enable
|
||||
(
|
||||
builtins.toString (
|
||||
pkgs.writeShellScript "brightness" # bash
|
||||
''
|
||||
|
||||
dimmer=""
|
||||
medium=""
|
||||
brighter=""
|
||||
dimmer=""
|
||||
medium=""
|
||||
brighter=""
|
||||
|
||||
chosen=$(printf '%s;%s;%s\n' \
|
||||
"$dimmer" \
|
||||
"$medium" \
|
||||
"$brighter" \
|
||||
| ${lib.getExe rofi} \
|
||||
-theme-str '@import "brightness.rasi"' \
|
||||
-hover-select \
|
||||
-me-select-entry ''' \
|
||||
-me-accept-entry MousePrimary \
|
||||
-dmenu \
|
||||
-sep ';' \
|
||||
-selected-row 1)
|
||||
chosen=$(printf '%s;%s;%s\n' \
|
||||
"$dimmer" \
|
||||
"$medium" \
|
||||
"$brighter" \
|
||||
| ${lib.getExe rofi} \
|
||||
-theme-str '@import "brightness.rasi"' \
|
||||
-hover-select \
|
||||
-me-select-entry ''' \
|
||||
-me-accept-entry MousePrimary \
|
||||
-dmenu \
|
||||
-sep ';' \
|
||||
-selected-row 1)
|
||||
|
||||
|
||||
case "$chosen" in
|
||||
"$dimmer")
|
||||
${lib.getExe pkgs.ddcutil} --display 1 setvcp 10 25; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 25
|
||||
;;
|
||||
case "$chosen" in
|
||||
"$dimmer")
|
||||
${lib.getExe pkgs.ddcutil} --display 1 setvcp 10 25; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 25
|
||||
;;
|
||||
|
||||
"$medium")
|
||||
${lib.getExe pkgs.ddcutil} --display 1 setvcp 10 75; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 75
|
||||
;;
|
||||
"$medium")
|
||||
${lib.getExe pkgs.ddcutil} --display 1 setvcp 10 75; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 75
|
||||
;;
|
||||
|
||||
"$brighter")
|
||||
${lib.getExe pkgs.ddcutil} --display 1 setvcp 10 100; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 100
|
||||
;;
|
||||
"$brighter")
|
||||
${lib.getExe pkgs.ddcutil} --display 1 setvcp 10 100; ${pkgs.ddcutil}/bin/ddcutil --disable-dynamic-sleep --display 2 setvcp 10 100
|
||||
;;
|
||||
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
||||
''
|
||||
);
|
||||
''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user