mirror of
https://github.com/nmasur/dotfiles
synced 2026-11-13 22:55:02 +00:00
Compare commits
65
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
450118d234 | ||
|
|
cc84f1d37a | ||
|
|
ded498f4c9 | ||
|
|
0d0ee1fc5a | ||
|
|
251dce68bb | ||
|
|
448c97665b | ||
|
|
86aa02aae4 | ||
|
|
6cd22bc7ce | ||
|
|
048de4772c | ||
|
|
700e59e6c8 | ||
|
|
07e0afa1e9 | ||
|
|
6577b9e49b | ||
|
|
58a0e6166d | ||
|
|
e8c5a10df7 | ||
|
|
37fa835c66 | ||
|
|
fa69557ced | ||
|
|
a9a06fb5fc | ||
|
|
ceaad9d186 | ||
|
|
521937e366 | ||
|
|
8915f17ea3 | ||
|
|
17799909b2 | ||
|
|
7a4c3b930d | ||
|
|
e7bbee5da0 | ||
|
|
2dda6a31bd | ||
|
|
e4d76189e6 | ||
|
|
0bc8a233d8 | ||
|
|
524a5aa347 | ||
|
|
b4ddb149cc | ||
|
|
d021baa1bb | ||
|
|
7063bd5f7a | ||
|
|
d040077d3a | ||
|
|
bf1d2f1e9e | ||
|
|
fd7c523ebd | ||
|
|
1b32457956 | ||
|
|
50acdd0c58 | ||
|
|
a0c99a8449 | ||
|
|
d1b144f441 | ||
|
|
adb7956213 | ||
|
|
e011a1c6f1 | ||
|
|
1d8638777c | ||
|
|
2620b43925 | ||
|
|
7d53a80d49 | ||
|
|
9b12369e43 | ||
|
|
427bd1a421 | ||
|
|
74e346fa63 | ||
|
|
4a803427fb | ||
|
|
d127ccacb0 | ||
|
|
54e89d3acd | ||
|
|
b258a40181 | ||
|
|
dfacb580ae | ||
|
|
650d1e91a2 | ||
|
|
397b08fab4 | ||
|
|
33e8a6bc9b | ||
|
|
7a39acef1a | ||
|
|
3438446347 | ||
|
|
dee7c7302a | ||
|
|
0d052a6463 | ||
|
|
8b98b8f29d | ||
|
|
96c64c4da1 | ||
|
|
47a1823af4 | ||
|
|
d86534727e | ||
|
|
13e5b9ddc5 | ||
|
|
bb200016cb | ||
|
|
dc00ef26b5 | ||
|
|
cf62184744 |
No files matched your search
@@ -1,3 +1,5 @@
|
|||||||
|
# System Configurations
|
||||||
|
|
||||||
This repository contains configuration files for my NixOS, macOS, and WSL
|
This repository contains configuration files for my NixOS, macOS, and WSL
|
||||||
hosts.
|
hosts.
|
||||||
|
|
||||||
@@ -6,15 +8,31 @@ configuration may be difficult to translate to a non-Nix system.
|
|||||||
|
|
||||||
However, some of the configurations are easier to lift directly:
|
However, some of the configurations are easier to lift directly:
|
||||||
|
|
||||||
- [Neovim](https://github.com/nmasur/dotfiles/tree/master/modules/neovim/lua)
|
- [Neovim](https://github.com/nmasur/dotfiles/tree/master/modules/common/neovim/config)
|
||||||
- [Fish functions](https://github.com/nmasur/dotfiles/tree/master/modules/shell/fish/functions)
|
- [Fish functions](https://github.com/nmasur/dotfiles/tree/master/modules/common/shell/fish/functions)
|
||||||
- [More fish aliases](https://github.com/nmasur/dotfiles/blob/master/modules/shell/fish/default.nix)
|
- [More fish aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/fish/default.nix)
|
||||||
- [Git aliases](https://github.com/nmasur/dotfiles/blob/master/modules/shell/git.nix)
|
- [Git aliases](https://github.com/nmasur/dotfiles/blob/master/modules/common/shell/git.nix)
|
||||||
- [Hammerspoon](https://github.com/nmasur/dotfiles/tree/master/modules/darwin/hammerspoon)
|
- [Hammerspoon](https://github.com/nmasur/dotfiles/tree/master/modules/darwin/hammerspoon)
|
||||||
|
|
||||||
|
Try out my Neovim config (requires [nix](https://nixos.org/download.html)):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix run github:nmasur/dotfiles#neovim
|
||||||
|
```
|
||||||
|
|
||||||
|
Or build it as a package (requires [nix](https://nixos.org/download.html)):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix build github:nmasur/dotfiles#neovim
|
||||||
|
```
|
||||||
|
|
||||||
|
If you already have a Neovim configuration, you may need to move it out of
|
||||||
|
`~/.config/nvim` or set `XDG_CONFIG_HOME` to another value; otherwise both
|
||||||
|
configs might conflict with each other.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Installation
|
# Full Installation
|
||||||
|
|
||||||
## NixOS - From Live Disk
|
## NixOS - From Live Disk
|
||||||
|
|
||||||
@@ -26,7 +44,7 @@ installer disk:
|
|||||||
```bash
|
```bash
|
||||||
lsblk # Choose the disk you want to wipe
|
lsblk # Choose the disk you want to wipe
|
||||||
nix-shell -p nixVersions.stable
|
nix-shell -p nixVersions.stable
|
||||||
nix run github:nmasur/dotfiles#installer -- nvme0n1 desktop
|
nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest
|
||||||
```
|
```
|
||||||
|
|
||||||
## NixOS - From Existing System
|
## NixOS - From Existing System
|
||||||
@@ -36,7 +54,7 @@ following command:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix-shell -p nixVersions.stable
|
nix-shell -p nixVersions.stable
|
||||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#desktop
|
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#tempest
|
||||||
```
|
```
|
||||||
|
|
||||||
## Windows - From NixOS WSL
|
## Windows - From NixOS WSL
|
||||||
@@ -47,7 +65,7 @@ the WSL configuration:
|
|||||||
|
|
||||||
```
|
```
|
||||||
nix-shell -p nixVersions.stable
|
nix-shell -p nixVersions.stable
|
||||||
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#wsl
|
sudo nixos-rebuild switch --flake github:nmasur/dotfiles#hydra
|
||||||
```
|
```
|
||||||
|
|
||||||
You should also download the
|
You should also download the
|
||||||
@@ -74,25 +92,9 @@ nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
|
|||||||
Then switch to the macOS configuration:
|
Then switch to the macOS configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
darwin-rebuild switch --flake github:nmasur/dotfiles#macbook
|
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
|
||||||
```
|
```
|
||||||
|
|
||||||
### Dealing with corporate MITM SSL certificates:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Get the certificates
|
|
||||||
openssl s_client -showcerts -verify 5 -connect cache.nixos.org:443 < /dev/null
|
|
||||||
|
|
||||||
# Paste them in here
|
|
||||||
sudo nvim $NIX_SSL_CERT_FILE
|
|
||||||
```
|
|
||||||
|
|
||||||
### Dealing with Neovim issues:
|
|
||||||
|
|
||||||
Update Neovim Packer plugins: `:PackerSync`
|
|
||||||
|
|
||||||
Update TreeSitter languages: `:TSUpdateSync`
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Flake Templates
|
# Flake Templates
|
||||||
|
|||||||
+48
-1
@@ -1,6 +1,25 @@
|
|||||||
{ pkgs, ... }: rec {
|
{ pkgs, ... }: rec {
|
||||||
|
|
||||||
default = readme;
|
default = {
|
||||||
|
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." }}' \
|
||||||
|
' • {{ Color "15" "57" " netdata " }} {{ Italic "Connect a machine to Netdata cloud." }}'
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
'');
|
||||||
|
};
|
||||||
|
|
||||||
# Format and install from nothing
|
# Format and install from nothing
|
||||||
installer = import ./installer.nix { inherit pkgs; };
|
installer = import ./installer.nix { inherit pkgs; };
|
||||||
@@ -8,6 +27,20 @@
|
|||||||
# Display the readme for this repository
|
# Display the readme for this repository
|
||||||
readme = import ./readme.nix { inherit pkgs; };
|
readme = import ./readme.nix { inherit pkgs; };
|
||||||
|
|
||||||
|
# Rebuild
|
||||||
|
rebuild = {
|
||||||
|
type = "app";
|
||||||
|
program = builtins.toString (pkgs.writeShellScript "rebuild" ''
|
||||||
|
echo ${pkgs.system}
|
||||||
|
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
||||||
|
if [ "$SYSTEM" == "darwin" ]; then
|
||||||
|
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
|
||||||
|
else
|
||||||
|
nixos-rebuild switch --flake github:nmasur/dotfiles
|
||||||
|
fi
|
||||||
|
'');
|
||||||
|
};
|
||||||
|
|
||||||
# Load the SSH key for this machine
|
# Load the SSH key for this machine
|
||||||
loadkey = import ./loadkey.nix { inherit pkgs; };
|
loadkey = import ./loadkey.nix { inherit pkgs; };
|
||||||
|
|
||||||
@@ -20,4 +53,18 @@
|
|||||||
# Connect machine metrics to Netdata Cloud
|
# Connect machine metrics to Netdata Cloud
|
||||||
netdata = import ./netdata-cloud.nix { inherit pkgs; };
|
netdata = import ./netdata-cloud.nix { inherit pkgs; };
|
||||||
|
|
||||||
|
# Run neovim as an app
|
||||||
|
neovim = {
|
||||||
|
type = "app";
|
||||||
|
program = "${
|
||||||
|
(import ../modules/common/neovim/package {
|
||||||
|
inherit pkgs;
|
||||||
|
colors =
|
||||||
|
import ../colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; };
|
||||||
|
})
|
||||||
|
}/bin/nvim";
|
||||||
|
};
|
||||||
|
|
||||||
|
nvim = neovim;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
echo "''${secret}" > ''${tmpfile}
|
echo "''${secret}" > ''${tmpfile}
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||||
builtins.toString ../hosts/public-keys
|
builtins.toString ../public-keys
|
||||||
} $tmpfile
|
} $tmpfile
|
||||||
rm $tmpfile
|
rm $tmpfile
|
||||||
'');
|
'');
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
type = "app";
|
type = "app";
|
||||||
|
|
||||||
program = builtins.toString (pkgs.writeShellScript "readme" ''
|
program = builtins.toString (pkgs.writeShellScript "readme" ''
|
||||||
${pkgs.glow}/bin/glow ${builtins.toString ../README.md}
|
${pkgs.glow}/bin/glow --pager ${builtins.toString ../README.md}
|
||||||
'');
|
'');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
||||||
echo "Encrypting ''${encryptedfile}..."
|
echo "Encrypting ''${encryptedfile}..."
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||||
builtins.toString ../hosts/public-keys
|
builtins.toString ../public-keys
|
||||||
} $tmpfile > $encryptedfile
|
} $tmpfile > $encryptedfile
|
||||||
rm $tmpfile
|
rm $tmpfile
|
||||||
done
|
done
|
||||||
|
|||||||
File renamed without changes.
@@ -19,7 +19,7 @@
|
|||||||
base0D = "#83a598"; # blue
|
base0D = "#83a598"; # blue
|
||||||
base0E = "#d3869b"; # purple
|
base0E = "#d3869b"; # purple
|
||||||
base0F = "#d65d0e"; # brown
|
base0F = "#d65d0e"; # brown
|
||||||
neovimConfig = ./neovim.lua;
|
neovimConfig = ./neovim-gruvbox.nix;
|
||||||
batTheme = "gruvbox-dark";
|
batTheme = "gruvbox-dark";
|
||||||
};
|
};
|
||||||
light = {
|
light = {
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
base0D = "#076678"; # blue
|
base0D = "#076678"; # blue
|
||||||
base0E = "#8f3f71"; # purple
|
base0E = "#8f3f71"; # purple
|
||||||
base0F = "#d65d0e"; # brown
|
base0F = "#d65d0e"; # brown
|
||||||
neovimConfig = ./neovim.lua;
|
neovimConfig = ./neovim-gruvbox.nix;
|
||||||
batTheme = "gruvbox-light";
|
batTheme = "gruvbox-light";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
plugins = [ pkgs.vimPlugins.vim-gruvbox8 ];
|
||||||
|
|
||||||
|
vim.g.gruvbox_italicize_strings = 0;
|
||||||
|
vim.o.background = "dark";
|
||||||
|
vimscript = ''
|
||||||
|
let g:gruvbox_italicize_strings = 0
|
||||||
|
colorscheme gruvbox8
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
||||||
File renamed without changes.
File renamed without changes.
Generated
+322
-37
@@ -1,5 +1,53 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"Comment-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1674040818,
|
||||||
|
"narHash": "sha256-7UtZAE9tPlnpeHS2LLol/LGVOxptDXNKWXHNHvFBNk4=",
|
||||||
|
"owner": "numToStr",
|
||||||
|
"repo": "Comment.nvim",
|
||||||
|
"rev": "eab2c83a0207369900e92783f56990808082eac2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numToStr",
|
||||||
|
"repo": "Comment.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bufferline-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676130961,
|
||||||
|
"narHash": "sha256-3LT45i0eSMfUV9EBrtdtzHxFKRATIhRy/faDd3lI3mA=",
|
||||||
|
"owner": "akinsho",
|
||||||
|
"repo": "bufferline.nvim",
|
||||||
|
"rev": "84b0822b2af478d0b4f7b0f9249ca218855331db",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "akinsho",
|
||||||
|
"repo": "bufferline.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cmp-nvim-lsp-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1675708067,
|
||||||
|
"narHash": "sha256-DxpcPTBlvVP88PDoTheLV2fC76EXDqS2UpM5mAfj/D4=",
|
||||||
|
"owner": "hrsh7th",
|
||||||
|
"repo": "cmp-nvim-lsp",
|
||||||
|
"rev": "0e6b2ed705ddcff9738ec4ea838141654f12eeef",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hrsh7th",
|
||||||
|
"repo": "cmp-nvim-lsp",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"darwin": {
|
"darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -7,11 +55,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666776005,
|
"lastModified": 1673295039,
|
||||||
"narHash": "sha256-HwSMF19PpczfqNHKcFsA6cF4PVbG00uUSdbq6q3jB5o=",
|
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "f6648ca0698d1611d7eadfa72b122252b833f86c",
|
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -26,11 +74,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1668992358,
|
"lastModified": 1675471726,
|
||||||
"narHash": "sha256-24iH+wIbE1bKCFmqslwOpfrDypJ40mk1uGIqRUxDXxY=",
|
"narHash": "sha256-526iHwidfdtZZ7aAU9od1/zbyfSFBEailBTet+Gvfqg=",
|
||||||
"owner": "bandithedoge",
|
"owner": "bandithedoge",
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
"repo": "nixpkgs-firefox-darwin",
|
||||||
"rev": "066d4fd658acd075b45405eda9e3bca6a71a47b1",
|
"rev": "813d55a3e3b3c0423eb5d1fcb4bf82197c9f7796",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -42,11 +90,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650374568,
|
"lastModified": 1673956053,
|
||||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -56,6 +104,21 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1667395993,
|
||||||
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1659877975,
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
@@ -70,6 +133,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1667395993,
|
||||||
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -78,11 +156,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666903647,
|
"lastModified": 1675935446,
|
||||||
"narHash": "sha256-sFI1Gh9DTGzHnBINondupUGYbe+T0wZcpcZjkW0qffM=",
|
"narHash": "sha256-WajulTn7QdwC7QuXRBavrANuIXE5z+08EdxdRw1qsNs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "213a06295dff96668a1d673b9fd1c03ce1de6745",
|
"rev": "2dce7f1a55e785a22d61668516df62899278c9e4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -92,6 +170,47 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nil": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676110678,
|
||||||
|
"narHash": "sha256-hemg8rMKS2me2Wua9ZG/0aQ8fEOfytjyKB+WYcXfEKE=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "nil",
|
||||||
|
"rev": "ce2e0b5d60fe497134050796f7d12ffb6b50eb28",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "nil",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix2vim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_2",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1673891598,
|
||||||
|
"narHash": "sha256-EevceKxQtA+I0XVA8tBGKmYV1V1KbWc3gsswysMzeDk=",
|
||||||
|
"owner": "gytis-ivaskevicius",
|
||||||
|
"repo": "nix2vim",
|
||||||
|
"rev": "5b31eb81e2c6c74f9e8a4911660f3bf585d55158",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "gytis-ivaskevicius",
|
||||||
|
"repo": "nix2vim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixlib": {
|
"nixlib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1636849918,
|
"lastModified": 1636849918,
|
||||||
@@ -115,11 +234,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666812839,
|
"lastModified": 1674666581,
|
||||||
"narHash": "sha256-0nBDgjPU+iDsvz89W+cDEyhnFGSwCJmwDl/gMGqYiU0=",
|
"narHash": "sha256-KNI2s/xrL7WOYaPJAWKBtb7cCH3335rLfsL+B+ssuGY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "41f3518bc194389df22a3d198215eae75e6b5ab9",
|
"rev": "6a5dc1d3d557ea7b5c19b15ff91955124d0400fa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -146,11 +265,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666959691,
|
"lastModified": 1675309347,
|
||||||
"narHash": "sha256-TRpWA3t8ata79HOGtFd5dDCl1kJQmIE16PDF53/Hcxo=",
|
"narHash": "sha256-D3CQ6HRDT2m3XJlrzb5jKq4vNFR5xFTEFKC7iSjlFpM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "448a599c49978c2794401bfc3a2e1fba1a8663be",
|
"rev": "006c3bd4dd2f5d1d2094047f307cbf9e2b73d9c5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676110339,
|
||||||
|
"narHash": "sha256-kOS/L8OOL2odpCOM11IevfHxcUeE0vnZUQ74EOiwXcs=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e5530aba13caff5a4f41713f1265b754dc2abfd8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -160,28 +295,45 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660318005,
|
"lastModified": 1674868155,
|
||||||
"narHash": "sha256-g9WCa9lVUmOV6dYRbEPjv/TLOR5hamjeCcKExVGS3OQ=",
|
"narHash": "sha256-eFNm2h6fNbgD7ZpO4MHikCB5pSnCJ7DTmwPisjetmwc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5c211b47aeadcc178c5320afd4e74c7eed5c389f",
|
"rev": "ce20e9ebe1903ea2ba1ab006ec63093020c761cb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-22.05",
|
"ref": "nixos-22.11",
|
||||||
"type": "indirect"
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"null-ls-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676246878,
|
||||||
|
"narHash": "sha256-hAUEa2zNsYXQ+TsHYHBzcW67lCxhiD7x+uPbdOZwY8o=",
|
||||||
|
"owner": "jose-elias-alvarez",
|
||||||
|
"repo": "null-ls.nvim",
|
||||||
|
"rev": "d4594231a06cecce73a78a256b0d7c7ab51f7dd5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "jose-elias-alvarez",
|
||||||
|
"repo": "null-ls.nvim",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667025500,
|
"lastModified": 1676251563,
|
||||||
"narHash": "sha256-88akaieCIrqta3Uyha7Zv3FJWzKJebb2BrOdZba1zdI=",
|
"narHash": "sha256-itLKR2Haeh5wQ6dxkuZ8L5gwp3+CAggpN+w2e7cLQPg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "21dd192519af12a01f1348bbfa86cde47f7aa392",
|
"rev": "9a8b28a9d6611f6af9f7abb3e690fc755d6906fe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -190,25 +342,158 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nvim-lspconfig-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676175675,
|
||||||
|
"narHash": "sha256-Wg3NatT4DRBMF6hCxK4C2DC+geFMpfFUFogPbqeMt6E=",
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "nvim-lspconfig",
|
||||||
|
"rev": "1712672e4da3003a0dd9f771d30389600b360f42",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "nvim-lspconfig",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nvim-tree-lua-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676244722,
|
||||||
|
"narHash": "sha256-xoSekdZhWr59qTOM0/ihYiuKiwHiKYb42Ep5JHn65UM=",
|
||||||
|
"owner": "kyazdani42",
|
||||||
|
"repo": "nvim-tree.lua",
|
||||||
|
"rev": "ba1778e061f25814bc5940be886a7f41d7d7736e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "kyazdani42",
|
||||||
|
"repo": "nvim-tree.lua",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nvim-treesitter-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1676240774,
|
||||||
|
"narHash": "sha256-eRSU/9ysSvTyYxBrp9Whg0eXgAOsCdmIHMlYZK7bjRg=",
|
||||||
|
"owner": "nvim-treesitter",
|
||||||
|
"repo": "nvim-treesitter",
|
||||||
|
"rev": "7eb5f1a2e3949496f26c4084b521b30f2d08137a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nvim-treesitter",
|
||||||
|
"repo": "nvim-treesitter",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"Comment-nvim-src": "Comment-nvim-src",
|
||||||
|
"bufferline-nvim-src": "bufferline-nvim-src",
|
||||||
|
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"firefox-darwin": "firefox-darwin",
|
"firefox-darwin": "firefox-darwin",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nil": "nil",
|
||||||
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"null-ls-nvim-src": "null-ls-nvim-src",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
|
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||||
|
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
||||||
|
"nvim-treesitter-src": "nvim-treesitter-src",
|
||||||
|
"telescope-nvim-src": "telescope-nvim-src",
|
||||||
|
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||||
|
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||||
"wallpapers": "wallpapers",
|
"wallpapers": "wallpapers",
|
||||||
"wsl": "wsl"
|
"wsl": "wsl"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nil",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nil",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1675391458,
|
||||||
|
"narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"telescope-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1675149856,
|
||||||
|
"narHash": "sha256-L4Kw94CUy6N7zcyy9INuR/O0fxQ7sp0IvGd/u7fHxMA=",
|
||||||
|
"owner": "nvim-telescope",
|
||||||
|
"repo": "telescope.nvim",
|
||||||
|
"rev": "203bf5609137600d73e8ed82703d6b0e320a5f36",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nvim-telescope",
|
||||||
|
"repo": "telescope.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"telescope-project-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1671805267,
|
||||||
|
"narHash": "sha256-S4SOHzQ17ux5pcwwYFpVVLzjLeC4/EJ0IFPbrfzUJC8=",
|
||||||
|
"owner": "nvim-telescope",
|
||||||
|
"repo": "telescope-project.nvim",
|
||||||
|
"rev": "8e8ee37b7210761502cdf2c3a82b5ba8fb5b2972",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nvim-telescope",
|
||||||
|
"repo": "telescope-project.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"toggleterm-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1675358836,
|
||||||
|
"narHash": "sha256-9O7p/7tRStg51OFhMc88M5ewYquiYC9x9CV4s5veVP8=",
|
||||||
|
"owner": "akinsho",
|
||||||
|
"repo": "toggleterm.nvim",
|
||||||
|
"rev": "19aad0f41f47affbba1274f05e3c067e6d718e1e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "akinsho",
|
||||||
|
"repo": "toggleterm.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1667395993,
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -236,15 +521,15 @@
|
|||||||
"wsl": {
|
"wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1666720338,
|
"lastModified": 1676126384,
|
||||||
"narHash": "sha256-7V91ZtTz7zDXb6hivktQ9RlBglP+WEkYFSciPJHwMJw=",
|
"narHash": "sha256-3aAnN891Cb1pizewAgaHIo3W1WbAjXtoWuX8n3j8YoI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "7bfb8f5aa91fee30a189eae32cda8ddc465076df",
|
"rev": "a1c7e8bebac32cfac7aa8498bdfc60cbff13eb50",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -41,9 +41,60 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Convert Nix to Neovim config
|
||||||
|
nix2vim = {
|
||||||
|
url = "github:gytis-ivaskevicius/nix2vim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nix language server
|
||||||
|
nil.url = "github:oxalica/nil";
|
||||||
|
|
||||||
|
# Neovim plugins
|
||||||
|
nvim-lspconfig-src = {
|
||||||
|
url = "github:neovim/nvim-lspconfig";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
cmp-nvim-lsp-src = {
|
||||||
|
url = "github:hrsh7th/cmp-nvim-lsp";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
null-ls-nvim-src = {
|
||||||
|
url = "github:jose-elias-alvarez/null-ls.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
Comment-nvim-src = {
|
||||||
|
url = "github:numToStr/Comment.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nvim-treesitter-src = {
|
||||||
|
url = "github:nvim-treesitter/nvim-treesitter";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
telescope-nvim-src = {
|
||||||
|
url = "github:nvim-telescope/telescope.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
telescope-project-nvim-src = {
|
||||||
|
url = "github:nvim-telescope/telescope-project.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
toggleterm-nvim-src = {
|
||||||
|
url = "github:akinsho/toggleterm.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
bufferline-nvim-src = {
|
||||||
|
url = "github:akinsho/bufferline.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nvim-tree-lua-src = {
|
||||||
|
url = "github:kyazdani42/nvim-tree.lua";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs:
|
outputs = { nixpkgs, ... }@inputs:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@@ -53,10 +104,18 @@
|
|||||||
fullName = "Noah Masur";
|
fullName = "Noah Masur";
|
||||||
gitName = fullName;
|
gitName = fullName;
|
||||||
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
gitEmail = "7386960+nmasur@users.noreply.github.com";
|
||||||
mailServer = "noahmasur.com";
|
mail.server = "noahmasur.com";
|
||||||
dotfilesRepo = "git@github.com:nmasur/dotfiles";
|
dotfilesRepo = "git@github.com:nmasur/dotfiles";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Common overlays to always use
|
||||||
|
overlays = [
|
||||||
|
inputs.nur.overlay
|
||||||
|
inputs.nix2vim.overlay
|
||||||
|
(import ./overlays/neovim-plugins.nix inputs)
|
||||||
|
(import ./overlays/calibre-web.nix)
|
||||||
|
];
|
||||||
|
|
||||||
# System types to support.
|
# System types to support.
|
||||||
supportedSystems =
|
supportedSystems =
|
||||||
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||||
@@ -67,36 +126,55 @@
|
|||||||
in rec {
|
in rec {
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
desktop = import ./hosts/desktop { inherit inputs globals; };
|
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
||||||
wsl = import ./hosts/wsl { inherit inputs globals; };
|
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
||||||
oracle = import ./hosts/oracle { inherit inputs globals; };
|
flame = import ./hosts/flame { inherit inputs globals overlays; };
|
||||||
|
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
||||||
};
|
};
|
||||||
|
|
||||||
darwinConfigurations = {
|
darwinConfigurations = {
|
||||||
macbook = import ./hosts/macbook { inherit inputs globals; };
|
lookingglass =
|
||||||
|
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# For quickly applying local settings with:
|
# For quickly applying local settings with:
|
||||||
# home-manager switch --flake .#desktop
|
# home-manager switch --flake .#tempest
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
desktop =
|
tempest =
|
||||||
nixosConfigurations.desktop.config.home-manager.users.${globals.user}.home;
|
nixosConfigurations.tempest.config.home-manager.users.${globals.user}.home;
|
||||||
macbook =
|
lookingglass =
|
||||||
darwinConfigurations.macbook.config.home-manager.users."Noah.Masur".home;
|
darwinConfigurations.lookingglass.config.home-manager.users."Noah.Masur".home;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Package servers into images with a generator
|
# Package servers into images with a generator
|
||||||
packages.aws = nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ]
|
packages = forAllSystems (system: {
|
||||||
(system: {
|
|
||||||
"${system}" = import ./hosts/aws { inherit inputs globals system; };
|
aws = {
|
||||||
});
|
"${system}" =
|
||||||
|
import ./generators/aws { inherit inputs globals system overlays; };
|
||||||
|
};
|
||||||
|
|
||||||
|
staff = {
|
||||||
|
"${system}" = import ./generators/staff {
|
||||||
|
inherit inputs globals system overlays;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
neovim = let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
|
in import ./modules/common/neovim/package {
|
||||||
|
inherit pkgs;
|
||||||
|
colors =
|
||||||
|
import ./colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; };
|
||||||
|
};
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
apps = forAllSystems (system:
|
apps = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { inherit system; };
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
in import ./apps { inherit pkgs; });
|
in import ./apps { inherit pkgs; });
|
||||||
|
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system:
|
||||||
let pkgs = import nixpkgs { inherit system; };
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
in {
|
in {
|
||||||
|
|
||||||
# Used to run commands and edit files in this repo
|
# Used to run commands and edit files in this repo
|
||||||
|
|||||||
@@ -15,16 +15,16 @@ nixos-generators.nixosGenerate {
|
|||||||
gitEmail = globals.gitEmail;
|
gitEmail = globals.gitEmail;
|
||||||
networking.hostName = "sheep";
|
networking.hostName = "sheep";
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
colorscheme = (import ../modules/colorscheme/gruvbox);
|
colorscheme = (import ../colorscheme/gruvbox);
|
||||||
passwordHash = null;
|
passwordHash = null;
|
||||||
publicKey =
|
publicKey =
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
# AWS settings require this
|
# AWS settings require this
|
||||||
permitRootLogin = "prohibit-password";
|
permitRootLogin = "prohibit-password";
|
||||||
}
|
}
|
||||||
../../hosts/common.nix
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
../../modules/services/sshd.nix
|
../../modules/common/services/sshd.nix
|
||||||
] ++ [
|
] ++ [
|
||||||
# Required to fix diskSize errors during build
|
# Required to fix diskSize errors during build
|
||||||
({ ... }: { amazonImage.sizeMB = 16 * 1024; })
|
({ ... }: { amazonImage.sizeMB = 16 * 1024; })
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,17 @@
|
|||||||
|
# The Staff
|
||||||
|
# ISO configuration for my USB drive
|
||||||
|
|
||||||
|
{ inputs, system, ... }:
|
||||||
|
|
||||||
|
with inputs;
|
||||||
|
|
||||||
|
nixos-generators.nixosGenerate {
|
||||||
|
inherit system;
|
||||||
|
format = "install-iso";
|
||||||
|
modules = [{
|
||||||
|
networking.hostName = "staff";
|
||||||
|
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
}
|
||||||
@@ -1,48 +0,0 @@
|
|||||||
{ inputs, globals, ... }:
|
|
||||||
|
|
||||||
with inputs;
|
|
||||||
|
|
||||||
# System configuration for my desktop
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = { };
|
|
||||||
modules = [
|
|
||||||
globals
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
networking.hostName = "desktop";
|
|
||||||
nixpkgs.overlays = [ nur.overlay ];
|
|
||||||
# Set registry to flake packages, used for nix X commands
|
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
|
||||||
gui.enable = true;
|
|
||||||
theme = {
|
|
||||||
colors = (import ../../modules/colorscheme/gruvbox).dark;
|
|
||||||
dark = true;
|
|
||||||
};
|
|
||||||
wallpaper = "${wallpapers}/gruvbox/road.jpg";
|
|
||||||
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
|
|
||||||
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
|
|
||||||
}
|
|
||||||
|
|
||||||
./hardware-configuration.nix
|
|
||||||
../common.nix
|
|
||||||
../../modules/hardware
|
|
||||||
../../modules/nixos
|
|
||||||
../../modules/graphical
|
|
||||||
../../modules/applications/media.nix
|
|
||||||
../../modules/applications/firefox.nix
|
|
||||||
../../modules/applications/kitty.nix
|
|
||||||
../../modules/applications/1password.nix
|
|
||||||
../../modules/applications/discord.nix
|
|
||||||
../../modules/applications/nautilus.nix
|
|
||||||
../../modules/applications/obsidian.nix
|
|
||||||
../../modules/mail
|
|
||||||
../../modules/gaming/steam.nix
|
|
||||||
../../modules/gaming/legendary.nix
|
|
||||||
../../modules/repositories/notes.nix
|
|
||||||
../../modules/services/keybase.nix
|
|
||||||
../../modules/services/mullvad.nix
|
|
||||||
../../modules/programming/nix.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
|
||||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/nixos";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-label/boot";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
||||||
hardware.cpu.intel.updateMicrocode =
|
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
@@ -1,24 +1,33 @@
|
|||||||
{ inputs, globals, ... }:
|
# The Flame
|
||||||
|
|
||||||
with inputs;
|
|
||||||
|
|
||||||
# System configuration for an Oracle free server
|
# System configuration for an Oracle free server
|
||||||
|
|
||||||
# How to install:
|
# How to install:
|
||||||
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
||||||
|
|
||||||
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
|
with inputs;
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
(removeAttrs globals [ "mailServer" ])
|
./hardware-configuration.nix
|
||||||
|
../../modules/common
|
||||||
|
../../modules/nixos
|
||||||
|
(removeAttrs globals [ "mail.server" ])
|
||||||
|
wsl.nixosModules.wsl
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
|
server = true;
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
colorscheme = (import ../../modules/colorscheme/gruvbox);
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
|
nixpkgs.overlays = overlays;
|
||||||
|
wsl.enable = false;
|
||||||
|
caddy.enable = true;
|
||||||
|
|
||||||
# FQDNs for various services
|
# FQDNs for various services
|
||||||
networking.hostName = "oracle";
|
networking.hostName = "flame";
|
||||||
bookServer = "books.masu.rs";
|
bookServer = "books.masu.rs";
|
||||||
streamServer = "stream.masu.rs";
|
streamServer = "stream.masu.rs";
|
||||||
nextcloudServer = "cloud.masu.rs";
|
nextcloudServer = "cloud.masu.rs";
|
||||||
@@ -32,7 +41,7 @@ nixpkgs.lib.nixosSystem {
|
|||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
|
|
||||||
# Nextcloud backup config
|
# Nextcloud backup config
|
||||||
backupS3 = {
|
backup.s3 = {
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||||
bucket = "noahmasur-backup";
|
bucket = "noahmasur-backup";
|
||||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||||
@@ -42,6 +51,7 @@ nixpkgs.lib.nixosSystem {
|
|||||||
users.users.nextcloud.extraGroups = [ "jellyfin" ];
|
users.users.nextcloud.extraGroups = [ "jellyfin" ];
|
||||||
|
|
||||||
# Wireguard config for Transmission
|
# Wireguard config for Transmission
|
||||||
|
wireguard.enable = true;
|
||||||
networking.wireguard.interfaces.wg0 = {
|
networking.wireguard.interfaces.wg0 = {
|
||||||
|
|
||||||
# The local IPs for this machine within the Wireguard network
|
# The local IPs for this machine within the Wireguard network
|
||||||
@@ -71,20 +81,18 @@ nixpkgs.lib.nixosSystem {
|
|||||||
|
|
||||||
# Grant access to Transmission directories from Jellyfin
|
# Grant access to Transmission directories from Jellyfin
|
||||||
users.users.jellyfin.extraGroups = [ "transmission" ];
|
users.users.jellyfin.extraGroups = [ "transmission" ];
|
||||||
|
|
||||||
|
# Proxy traffic with Cloudflare
|
||||||
|
cloudflare.enable = true;
|
||||||
|
|
||||||
|
# Setup Minecraft server
|
||||||
|
gaming.minecraft-server.enable = true;
|
||||||
|
|
||||||
|
# Clone dotfiles
|
||||||
|
dotfiles.enable = true;
|
||||||
|
|
||||||
|
neovim.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
./hardware-configuration.nix
|
|
||||||
../common.nix
|
|
||||||
../../modules/nixos
|
|
||||||
../../modules/hardware/server.nix
|
|
||||||
../../modules/services/sshd.nix
|
|
||||||
../../modules/services/calibre.nix
|
|
||||||
../../modules/services/jellyfin.nix
|
|
||||||
../../modules/services/nextcloud.nix
|
|
||||||
../../modules/services/cloudflare.nix
|
|
||||||
../../modules/services/transmission.nix
|
|
||||||
../../modules/services/prometheus.nix
|
|
||||||
../../modules/services/vaultwarden.nix
|
|
||||||
../../modules/services/gitea.nix
|
|
||||||
../../modules/gaming/minecraft-server.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ lib, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||||
@@ -1,42 +1,49 @@
|
|||||||
{ inputs, globals, ... }:
|
# The Hydra
|
||||||
|
# System configuration for WSL
|
||||||
|
|
||||||
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
with inputs;
|
with inputs;
|
||||||
|
|
||||||
# System configuration for WSL
|
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
|
../../modules/common
|
||||||
|
../../modules/nixos
|
||||||
globals
|
globals
|
||||||
wsl.nixosModules.wsl
|
wsl.nixosModules.wsl
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
networking.hostName = "wsl";
|
networking.hostName = "hydra";
|
||||||
|
nixpkgs.overlays = overlays;
|
||||||
# Set registry to flake packages, used for nix X commands
|
# Set registry to flake packages, used for nix X commands
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
nix.registry.nixpkgs.flake = nixpkgs;
|
||||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../modules/colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
|
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
|
||||||
wsl = {
|
wsl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
automountPath = "/mnt";
|
wslConf.automount.root = "/mnt";
|
||||||
defaultUser = globals.user;
|
defaultUser = globals.user;
|
||||||
startMenuLaunchers = true;
|
startMenuLaunchers = true;
|
||||||
|
nativeSystemd = true;
|
||||||
wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN
|
wslConf.network.generateResolvConf = true; # Turn off if it breaks VPN
|
||||||
interop.includePath =
|
interop.includePath =
|
||||||
false; # Including Windows PATH will slow down Neovim command mode
|
false; # Including Windows PATH will slow down Neovim command mode
|
||||||
};
|
};
|
||||||
|
|
||||||
|
neovim.enable = true;
|
||||||
|
mail.enable = true;
|
||||||
|
mail.aerc.enable = true;
|
||||||
|
mail.himalaya.enable = true;
|
||||||
|
dotfiles.enable = true;
|
||||||
|
nixlang.enable = true;
|
||||||
|
lua.enable = true;
|
||||||
}
|
}
|
||||||
../common.nix
|
|
||||||
../../modules/wsl
|
|
||||||
../../modules/nixos
|
|
||||||
../../modules/mail
|
|
||||||
../../modules/repositories/notes.nix
|
|
||||||
../../modules/programming/nix.nix
|
|
||||||
../../modules/programming/lua.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# The Looking Glass
|
||||||
|
# System configuration for my work Macbook
|
||||||
|
|
||||||
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
|
with inputs;
|
||||||
|
|
||||||
|
darwin.lib.darwinSystem {
|
||||||
|
system = "x86_64-darwin";
|
||||||
|
specialArgs = { };
|
||||||
|
modules = [
|
||||||
|
../../modules/common
|
||||||
|
../../modules/darwin
|
||||||
|
(globals // {
|
||||||
|
user = "Noah.Masur";
|
||||||
|
gitName = "Noah-Masur_1701";
|
||||||
|
gitEmail = "Noah.Masur@take2games.com";
|
||||||
|
})
|
||||||
|
home-manager.darwinModules.home-manager
|
||||||
|
{
|
||||||
|
networking.hostName = "noah-masur-mac";
|
||||||
|
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
||||||
|
gui.enable = true;
|
||||||
|
theme = {
|
||||||
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
|
dark = true;
|
||||||
|
};
|
||||||
|
mail.user = globals.user;
|
||||||
|
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays;
|
||||||
|
# Set registry to flake packages, used for nix X commands
|
||||||
|
nix.registry.nixpkgs.flake = nixpkgs;
|
||||||
|
neovim.enable = true;
|
||||||
|
mail.enable = true;
|
||||||
|
mail.aerc.enable = true;
|
||||||
|
mail.himalaya.enable = true;
|
||||||
|
kitty.enable = true;
|
||||||
|
discord.enable = true;
|
||||||
|
firefox.enable = true;
|
||||||
|
dotfiles.enable = true;
|
||||||
|
nixlang.enable = true;
|
||||||
|
terraform.enable = true;
|
||||||
|
python.enable = true;
|
||||||
|
lua.enable = true;
|
||||||
|
kubernetes.enable = true;
|
||||||
|
"1password".enable = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
{ inputs, globals, ... }:
|
|
||||||
|
|
||||||
with inputs;
|
|
||||||
|
|
||||||
# System configuration for my work MacBook
|
|
||||||
darwin.lib.darwinSystem {
|
|
||||||
system = "x86_64-darwin";
|
|
||||||
specialArgs = { };
|
|
||||||
modules = [
|
|
||||||
(globals // {
|
|
||||||
user = "Noah.Masur";
|
|
||||||
gitName = "Noah-Masur_1701";
|
|
||||||
gitEmail = "Noah.Masur@take2games.com";
|
|
||||||
})
|
|
||||||
home-manager.darwinModules.home-manager
|
|
||||||
{
|
|
||||||
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
|
||||||
gui.enable = true;
|
|
||||||
theme = {
|
|
||||||
colors = (import ../../modules/colorscheme/gruvbox).dark;
|
|
||||||
dark = true;
|
|
||||||
};
|
|
||||||
mailUser = globals.user;
|
|
||||||
networking.hostName = "noah-masur-mac";
|
|
||||||
nixpkgs.overlays = [ nur.overlay firefox-darwin.overlay ];
|
|
||||||
# Set registry to flake packages, used for nix X commands
|
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
}
|
|
||||||
../common.nix
|
|
||||||
../../modules/darwin
|
|
||||||
../../modules/mail
|
|
||||||
../../modules/applications/alacritty.nix
|
|
||||||
../../modules/applications/kitty.nix
|
|
||||||
../../modules/applications/discord.nix
|
|
||||||
../../modules/applications/firefox.nix
|
|
||||||
../../modules/repositories/notes.nix
|
|
||||||
../../modules/programming/nix.nix
|
|
||||||
../../modules/programming/terraform.nix
|
|
||||||
../../modules/programming/python.nix
|
|
||||||
../../modules/programming/lua.nix
|
|
||||||
../../modules/programming/kubernetes.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
# The Swan
|
||||||
|
# System configuration for my home NAS server
|
||||||
|
|
||||||
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
|
with inputs;
|
||||||
|
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { };
|
||||||
|
modules = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../modules/common
|
||||||
|
../../modules/nixos
|
||||||
|
(removeAttrs globals [ "mail.server" ])
|
||||||
|
wsl.nixosModules.wsl
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
server = true;
|
||||||
|
gui.enable = false;
|
||||||
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
|
nixpkgs.overlays = overlays;
|
||||||
|
wsl.enable = false;
|
||||||
|
caddy.enable = true;
|
||||||
|
|
||||||
|
networking.hostName = "swan";
|
||||||
|
|
||||||
|
# Disable passwords, only use SSH key
|
||||||
|
publicKey =
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
|
|
||||||
|
# Clone dotfiles
|
||||||
|
dotfiles.enable = true;
|
||||||
|
|
||||||
|
neovim.enable = true;
|
||||||
|
|
||||||
|
boot.zfs.enabled = true;
|
||||||
|
boot.kernelPackages =
|
||||||
|
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
|
boot.zfs.extraPools = [ "mypool" ];
|
||||||
|
services.zfs.autoScrub.enable = true;
|
||||||
|
services.zfs.autoScrub.interval = "daily";
|
||||||
|
|
||||||
|
services.nfs.server.enable = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# The Tempest
|
||||||
|
# System configuration for my desktop
|
||||||
|
|
||||||
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
|
with inputs;
|
||||||
|
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { };
|
||||||
|
modules = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../../modules/common
|
||||||
|
../../modules/nixos
|
||||||
|
globals
|
||||||
|
wsl.nixosModules.wsl
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
physical = true;
|
||||||
|
networking.hostName = "tempest";
|
||||||
|
nixpkgs.overlays = [ nur.overlay ] ++ overlays;
|
||||||
|
# Set registry to flake packages, used for nix X commands
|
||||||
|
nix.registry.nixpkgs.flake = nixpkgs;
|
||||||
|
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||||
|
gui.enable = true;
|
||||||
|
theme = {
|
||||||
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
|
dark = true;
|
||||||
|
};
|
||||||
|
wallpaper = "${wallpapers}/gruvbox/road.jpg";
|
||||||
|
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||||
|
passwordHash = nixpkgs.lib.fileContents ../../private/password.sha512;
|
||||||
|
wsl.enable = false;
|
||||||
|
publicKey = null;
|
||||||
|
|
||||||
|
neovim.enable = true;
|
||||||
|
media.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 = true;
|
||||||
|
nixlang.enable = true;
|
||||||
|
dotfiles.enable = true;
|
||||||
|
|
||||||
|
gaming = {
|
||||||
|
enable = true;
|
||||||
|
steam.enable = true;
|
||||||
|
legendary.enable = true;
|
||||||
|
lutris.enable = true;
|
||||||
|
leagueoflegends.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules =
|
||||||
|
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/boot";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||||
|
hardware.cpu.amd.updateMicrocode =
|
||||||
|
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
|
||||||
unfreePackages = [ "1password" "_1password-gui" ];
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = with pkgs; [ _1password-gui ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
|
||||||
home-manager.users.${config.user}.home.packages = with pkgs; [
|
|
||||||
mpv # Video viewer
|
|
||||||
sxiv # Image viewer
|
|
||||||
mupdf # PDF viewer
|
|
||||||
zathura # PDF viewer
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
|
||||||
unfreePackages = [ "obsidian" ];
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
home.packages = with pkgs; [ obsidian ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [ qbittorrent ];
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
use({
|
|
||||||
"lifepillar/vim-gruvbox8",
|
|
||||||
config = function()
|
|
||||||
vim.g.gruvbox_italicize_strings = 0
|
|
||||||
vim.cmd("colorscheme gruvbox8")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
_1password = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable 1Password.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf
|
||||||
|
(config.gui.enable && config._1password.enable && pkgs.stdenv.isLinux) {
|
||||||
|
unfreePackages = [ "1password" "_1password-gui" ];
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
home.packages = with pkgs; [ _1password-gui ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
options = {
|
||||||
|
alacritty = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable Alacritty.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.gui.enable && config.alacritty.enable) {
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
xsession.windowManager.i3.config.terminal = "alacritty";
|
xsession.windowManager.i3.config.terminal = "alacritty";
|
||||||
programs.rofi.terminal = "${pkgs.alacritty}/bin/alacritty";
|
programs.rofi.terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||||
@@ -3,7 +3,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./1password.nix
|
./1password.nix
|
||||||
./alacritty.nix
|
./alacritty.nix
|
||||||
./calibre.nix
|
|
||||||
./discord.nix
|
./discord.nix
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
options = {
|
||||||
|
discord = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable Discord.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.gui.enable && config.discord.enable) {
|
||||||
unfreePackages = [ "discord" ];
|
unfreePackages = [ "discord" ];
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [ discord ];
|
home.packages = with pkgs; [ discord ];
|
||||||
@@ -1,45 +1,67 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.gui.enable {
|
|
||||||
|
|
||||||
unfreePackages = [ "onepassword-password-manager" "okta-browser-plugin" ];
|
options = {
|
||||||
|
firefox = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable Firefox.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.gui.enable && config.firefox.enable) {
|
||||||
|
|
||||||
|
unfreePackages = [
|
||||||
|
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
||||||
|
"okta-browser-plugin"
|
||||||
|
];
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = lib.mkIf pkgs.stdenv.isDarwin pkgs.firefox-bin;
|
package =
|
||||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
if pkgs.stdenv.isDarwin then pkgs.firefox-bin else pkgs.firefox;
|
||||||
ublock-origin
|
profiles.default = {
|
||||||
vimium
|
|
||||||
multi-account-containers
|
|
||||||
facebook-container
|
|
||||||
temporary-containers
|
|
||||||
onepassword-password-manager
|
|
||||||
okta-browser-plugin
|
|
||||||
sponsorblock
|
|
||||||
reddit-enhancement-suite
|
|
||||||
bypass-paywalls-clean
|
|
||||||
markdownload
|
|
||||||
darkreader
|
|
||||||
snowflake
|
|
||||||
don-t-fuck-with-paste
|
|
||||||
i-dont-care-about-cookies
|
|
||||||
];
|
|
||||||
profiles.Profile0 = {
|
|
||||||
id = 0;
|
id = 0;
|
||||||
name = "default";
|
name = "default";
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
|
ublock-origin
|
||||||
|
vimium
|
||||||
|
multi-account-containers
|
||||||
|
facebook-container
|
||||||
|
temporary-containers
|
||||||
|
(lib.mkIf config._1password.enable onepassword-password-manager)
|
||||||
|
okta-browser-plugin
|
||||||
|
sponsorblock
|
||||||
|
reddit-enhancement-suite
|
||||||
|
return-youtube-dislikes
|
||||||
|
markdownload
|
||||||
|
darkreader
|
||||||
|
snowflake
|
||||||
|
don-t-fuck-with-paste
|
||||||
|
i-dont-care-about-cookies
|
||||||
|
wappalyzer
|
||||||
|
];
|
||||||
settings = {
|
settings = {
|
||||||
|
"app.update.auto" = false;
|
||||||
"browser.aboutConfig.showWarning" = false;
|
"browser.aboutConfig.showWarning" = false;
|
||||||
"browser.warnOnQuit" = false;
|
"browser.warnOnQuit" = false;
|
||||||
"browser.quitShortcut.disabled" = true;
|
"browser.quitShortcut.disabled" =
|
||||||
|
if pkgs.stdenv.isLinux then true else false;
|
||||||
"browser.theme.dark-private-windows" = true;
|
"browser.theme.dark-private-windows" = true;
|
||||||
"browser.toolbars.bookmarks.visibility" = "newtab";
|
"browser.toolbars.bookmarks.visibility" = false;
|
||||||
"browser.startup.page" = 3; # Restore previous session
|
"browser.startup.page" = 3; # Restore previous session
|
||||||
"browser.newtabpage.enabled" = false; # Make new tabs blank
|
"browser.newtabpage.enabled" = false; # Make new tabs blank
|
||||||
|
"trailhead.firstrun.didSeeAboutWelcome" =
|
||||||
|
true; # Disable welcome splash
|
||||||
"dom.forms.autocomplete.formautofill" = false; # Disable autofill
|
"dom.forms.autocomplete.formautofill" = false; # Disable autofill
|
||||||
|
"extensions.formautofill.creditCards.enabled" =
|
||||||
|
false; # Disable credit cards
|
||||||
|
"dom.payments.defaults.saveAddress" = false; # Disable address save
|
||||||
"general.autoScroll" = true; # Drag middle-mouse to scroll
|
"general.autoScroll" = true; # Drag middle-mouse to scroll
|
||||||
"services.sync.prefs.sync.general.autoScroll" =
|
"services.sync.prefs.sync.general.autoScroll" =
|
||||||
false; # Prevent disabling autoscroll
|
false; # Prevent disabling autoscroll
|
||||||
@@ -60,6 +82,22 @@
|
|||||||
.toolbar-items {
|
.toolbar-items {
|
||||||
background-color: ${config.theme.colors.base00} !important;
|
background-color: ${config.theme.colors.base00} !important;
|
||||||
}
|
}
|
||||||
|
/* Extra tab bar sides on macOS */
|
||||||
|
.titlebar-spacer {
|
||||||
|
background-color: ${config.theme.colors.base00} !important;
|
||||||
|
}
|
||||||
|
.titlebar-buttonbox-container {
|
||||||
|
background-color: ${config.theme.colors.base00} !important;
|
||||||
|
}
|
||||||
|
#tabbrowser-tabs {
|
||||||
|
border-inline-start: 0 !important;
|
||||||
|
}
|
||||||
|
/* Private Browsing indicator on macOS */
|
||||||
|
#private-browsing-indicator-with-label {
|
||||||
|
background-color: ${config.theme.colors.base00} !important;
|
||||||
|
margin-inline: 0 !important;
|
||||||
|
padding-inline: 7px;
|
||||||
|
}
|
||||||
/* Tabs themselves */
|
/* Tabs themselves */
|
||||||
.tabbrowser-tab .tab-stack {
|
.tabbrowser-tab .tab-stack {
|
||||||
border-radius: 5px 5px 0 0;
|
border-radius: 5px 5px 0 0;
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.gui.enable {
|
options = {
|
||||||
|
kitty = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable Kitty.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.gui.enable && config.kitty.enable) {
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
# xsession.windowManager.i3.config.terminal = "kitty";
|
# xsession.windowManager.i3.config.terminal = "kitty";
|
||||||
# programs.rofi.terminal = "${pkgs.kitty}/bin/kitty";
|
# programs.rofi.terminal = "${pkgs.kitty}/bin/kitty";
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
media = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable media programs.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.gui.enable && config.media.enable) {
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
mpv # Video viewer
|
||||||
|
sxiv # Image viewer
|
||||||
|
mupdf # PDF viewer
|
||||||
|
zathura # PDF viewer
|
||||||
|
];
|
||||||
|
|
||||||
|
# Set default for opening PDFs
|
||||||
|
xdg.mimeApps.defaultApplications."application/pdf" =
|
||||||
|
[ "zathura.desktop" ];
|
||||||
|
xdg.mimeApps.defaultApplications."image/*" = [ "sxiv.desktop" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,13 +1,26 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
nautilus = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable Nautilus file manager.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Install Nautilus file manager
|
# Install Nautilus file manager
|
||||||
config = lib.mkIf config.gui.enable {
|
config = lib.mkIf (config.gui.enable && config.nautilus.enable) {
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
gnome.nautilus
|
gnome.nautilus
|
||||||
gnome.sushi # Quick preview with spacebar
|
gnome.sushi # Quick preview with spacebar
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Set default for opening directories
|
||||||
|
xdg.mimeApps.defaultApplications."inode/directory" =
|
||||||
|
[ "nautilus.desktop" ];
|
||||||
|
|
||||||
programs.fish.functions = {
|
programs.fish.functions = {
|
||||||
qr = {
|
qr = {
|
||||||
body =
|
body =
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
obsidian = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable Obsidian.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.gui.enable && config.obsidian.enable) {
|
||||||
|
unfreePackages = [ "obsidian" ];
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
home.packages = with pkgs; [ obsidian ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
qbittorrent = {
|
||||||
|
enable = lib.mkEnableOption {
|
||||||
|
description = "Enable qBittorrent.";
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf (config.gui.enable && config.qbittorrent.enable) {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [ qbittorrent ];
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
imports =
|
imports =
|
||||||
[ ../modules/shell ../modules/neovim ../modules/repositories/dotfiles.nix ];
|
[ ./applications ./mail ./neovim ./programming ./repositories ./shell ];
|
||||||
|
|
||||||
options = rec {
|
options = {
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Primary user of the system";
|
description = "Primary user of the system";
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
colors = lib.mkOption {
|
colors = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
description = "Base16 color scheme.";
|
description = "Base16 color scheme.";
|
||||||
default = (import ../modules/colorscheme/gruvbox).dark;
|
default = (import ../colorscheme/gruvbox).dark;
|
||||||
};
|
};
|
||||||
dark = lib.mkOption {
|
dark = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let stateVersion = "22.11";
|
config = let stateVersion = "23.05";
|
||||||
in {
|
in {
|
||||||
|
|
||||||
# Enable features in Nix commands
|
# Enable features in Nix commands
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = {
|
options.mail.aerc.enable = lib.mkEnableOption "Aerc email.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.mail.aerc.enable {
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
@@ -3,18 +3,19 @@
|
|||||||
imports = [ ./himalaya.nix ./aerc.nix ];
|
imports = [ ./himalaya.nix ./aerc.nix ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
mailUser = lib.mkOption {
|
mail.enable = lib.mkEnableOption "Mail service.";
|
||||||
|
mail.user = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "User name for the email address.";
|
description = "User name for the email address.";
|
||||||
default = config.user;
|
default = config.user;
|
||||||
};
|
};
|
||||||
mailServer = lib.mkOption {
|
mail.server = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Server name for the email address.";
|
description = "Server name for the email address.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = lib.mkIf config.mail.enable {
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
programs.mbsync = { enable = true; };
|
programs.mbsync = { enable = true; };
|
||||||
@@ -25,13 +26,13 @@
|
|||||||
accounts.email = {
|
accounts.email = {
|
||||||
maildirBasePath = "${config.homePath}/mail";
|
maildirBasePath = "${config.homePath}/mail";
|
||||||
accounts = {
|
accounts = {
|
||||||
home = let address = "${config.mailUser}@${config.mailServer}";
|
home = let address = "${config.mail.user}@${config.mail.server}";
|
||||||
in {
|
in {
|
||||||
userName = address;
|
userName = address;
|
||||||
realName = config.fullName;
|
realName = config.fullName;
|
||||||
primary = true;
|
primary = true;
|
||||||
inherit address;
|
inherit address;
|
||||||
aliases = map (mailUser: "${mailUser}@${config.mailServer}") [
|
aliases = map (user: "${user}@${config.mail.server}") [
|
||||||
"me"
|
"me"
|
||||||
"hey"
|
"hey"
|
||||||
"admin"
|
"admin"
|
||||||
@@ -1,15 +1,17 @@
|
|||||||
{ config, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
config = {
|
options.mail.himalaya.enable = lib.mkEnableOption "Himalaya email.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.mail.himalaya.enable {
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
programs.himalaya = { enable = true; };
|
programs.himalaya = { enable = true; };
|
||||||
accounts.email.accounts.home.himalaya = {
|
accounts.email.accounts.home.himalaya = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
backend = "imap";
|
||||||
|
sender = "smtp";
|
||||||
settings = {
|
settings = {
|
||||||
backend = "imap";
|
|
||||||
sender = "smtp";
|
|
||||||
downloads-dir = config.userDirs.download;
|
downloads-dir = config.userDirs.download;
|
||||||
smtp-insecure = true;
|
smtp-insecure = true;
|
||||||
};
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
plugins = [
|
||||||
|
pkgs.vimPlugins.bufferline-nvim
|
||||||
|
pkgs.vimPlugins.vim-bbye # Better closing of buffers
|
||||||
|
];
|
||||||
|
setup.bufferline = {
|
||||||
|
options = {
|
||||||
|
diagnostics = "nvim_lsp";
|
||||||
|
always_show_bufferline = false;
|
||||||
|
separator_style = "slant";
|
||||||
|
offsets = [{ filetype = "NvimTree"; }];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lua = ''
|
||||||
|
-- Move buffers
|
||||||
|
vim.keymap.set("n", "L", ":BufferLineCycleNext<CR>", { silent = true })
|
||||||
|
vim.keymap.set("n", "H", ":BufferLineCyclePrev<CR>", { silent = true })
|
||||||
|
|
||||||
|
-- Kill buffer
|
||||||
|
vim.keymap.set("n", "<Leader>x", " :Bdelete<CR>", { silent = true })
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
plugins = [
|
||||||
|
pkgs.vimPlugins.cmp-nvim-lsp
|
||||||
|
pkgs.vimPlugins.cmp-buffer
|
||||||
|
pkgs.vimPlugins.cmp-path
|
||||||
|
pkgs.vimPlugins.cmp-cmdline
|
||||||
|
pkgs.vimPlugins.cmp-nvim-lua
|
||||||
|
pkgs.vimPlugins.luasnip
|
||||||
|
pkgs.vimPlugins.cmp_luasnip
|
||||||
|
pkgs.vimPlugins.cmp-rg
|
||||||
|
pkgs.vimPlugins.friendly-snippets
|
||||||
|
];
|
||||||
|
|
||||||
|
use.cmp.setup = dsl.callWith {
|
||||||
|
|
||||||
|
# Disable in telescope buffers
|
||||||
|
enabled = dsl.rawLua ''
|
||||||
|
function()
|
||||||
|
if vim.bo.buftype == "prompt" then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
|
||||||
|
snippet.expand = dsl.rawLua ''
|
||||||
|
function(args)
|
||||||
|
require("luasnip").lsp_expand(args.body)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
|
||||||
|
mapping = {
|
||||||
|
"['<C-n>']" = dsl.rawLua
|
||||||
|
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
||||||
|
"['<C-p>']" = dsl.rawLua
|
||||||
|
"require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
||||||
|
"['<Down>']" = dsl.rawLua
|
||||||
|
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Select })";
|
||||||
|
"['<Up>']" = dsl.rawLua
|
||||||
|
"require('cmp').mapping.select_prev_item({ behavior = require('cmp').SelectBehavior.Select })";
|
||||||
|
"['<C-d>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(-4)";
|
||||||
|
"['<C-f>']" = dsl.rawLua "require('cmp').mapping.scroll_docs(4)";
|
||||||
|
"['<C-e>']" = dsl.rawLua "require('cmp').mapping.abort()";
|
||||||
|
"['<CR>']" = dsl.rawLua
|
||||||
|
"require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
|
||||||
|
"['<C-r>']" = dsl.rawLua
|
||||||
|
"require('cmp').mapping.confirm({ behavior = require('cmp').ConfirmBehavior.Replace, select = true, })";
|
||||||
|
"['<Esc>']" = dsl.rawLua ''
|
||||||
|
function(_)
|
||||||
|
cmp.mapping({
|
||||||
|
i = cmp.mapping.abort(),
|
||||||
|
c = cmp.mapping.close(),
|
||||||
|
})
|
||||||
|
vim.cmd("stopinsert") --- Abort and leave insert mode
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
"['<C-l>']" = dsl.rawLua ''
|
||||||
|
cmp.mapping(function(_)
|
||||||
|
if require("luasnip").expand_or_jumpable() then
|
||||||
|
require("luasnip").expand_or_jump()
|
||||||
|
end
|
||||||
|
end, { "i", "s" })
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
{ name = "nvim_lua"; }
|
||||||
|
{ name = "nvim_lsp"; }
|
||||||
|
{ name = "luasnip"; }
|
||||||
|
{ name = "path"; }
|
||||||
|
{
|
||||||
|
name = "buffer";
|
||||||
|
keyword_length = 3;
|
||||||
|
max_item_count = 10;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "rg";
|
||||||
|
keyword_length = 6;
|
||||||
|
max_item_count = 10;
|
||||||
|
option = { additional_arguments = "--ignore-case"; };
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
fields = [ "kind" "abbr" "menu" ];
|
||||||
|
format = dsl.rawLua ''
|
||||||
|
function(entry, vim_item)
|
||||||
|
local kind_icons = {
|
||||||
|
Text = "",
|
||||||
|
Method = "m",
|
||||||
|
Function = "",
|
||||||
|
Constructor = "",
|
||||||
|
Field = "",
|
||||||
|
Variable = "",
|
||||||
|
Class = "",
|
||||||
|
Interface = "",
|
||||||
|
Module = "",
|
||||||
|
Property = "",
|
||||||
|
Unit = "",
|
||||||
|
Value = "",
|
||||||
|
Enum = "",
|
||||||
|
Keyword = "",
|
||||||
|
Snippet = "",
|
||||||
|
Color = "",
|
||||||
|
File = "",
|
||||||
|
Reference = "",
|
||||||
|
Folder = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Constant = "",
|
||||||
|
Struct = "",
|
||||||
|
Event = "",
|
||||||
|
Operator = "",
|
||||||
|
TypeParameter = "",
|
||||||
|
}
|
||||||
|
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||||
|
vim_item.menu = ({
|
||||||
|
luasnip = "[Snippet]",
|
||||||
|
buffer = "[Buffer]",
|
||||||
|
path = "[Path]",
|
||||||
|
rg = "[Grep]",
|
||||||
|
nvim_lsp = "[LSP]",
|
||||||
|
nvim_lua = "[Lua]",
|
||||||
|
})[entry.source.name]
|
||||||
|
return vim_item
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
experimental = {
|
||||||
|
native_menu = false; # Use cmp menu instead of Vim menu
|
||||||
|
ghost_text = true; # Show preview auto-completion
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
lua = ''
|
||||||
|
-- Use buffer source for `/`
|
||||||
|
require('cmp').setup.cmdline("/", {
|
||||||
|
sources = {
|
||||||
|
{ name = "buffer", keyword_length = 5 },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Use cmdline & path source for ':'
|
||||||
|
require('cmp').setup.cmdline(":", {
|
||||||
|
sources = require('cmp').config.sources({
|
||||||
|
{ name = "path" },
|
||||||
|
}, {
|
||||||
|
{ name = "cmdline" },
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
vim.keymap.set("", "<Space>", "<Nop>", { silent = true })
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
local gitsigns = require("gitsigns")
|
||||||
|
vim.keymap.set("n", "<Leader>gB", gitsigns.blame_line)
|
||||||
|
vim.keymap.set("n", "<Leader>gp", gitsigns.preview_hunk)
|
||||||
|
vim.keymap.set("v", "<Leader>gp", gitsigns.preview_hunk)
|
||||||
|
vim.keymap.set("n", "<Leader>gd", gitsigns.diffthis)
|
||||||
|
vim.keymap.set("v", "<Leader>gd", gitsigns.diffthis)
|
||||||
|
vim.keymap.set("n", "<Leader>rgf", gitsigns.reset_buffer)
|
||||||
|
vim.keymap.set("v", "<Leader>hs", gitsigns.stage_hunk)
|
||||||
|
vim.keymap.set("n", "<Leader>hr", gitsigns.reset_hunk)
|
||||||
|
vim.keymap.set("v", "<Leader>hr", gitsigns.reset_hunk)
|
||||||
|
|
||||||
|
-- Navigation
|
||||||
|
vim.keymap.set("n", "]g", function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
return "]g"
|
||||||
|
end
|
||||||
|
vim.schedule(function()
|
||||||
|
gitsigns.next_hunk()
|
||||||
|
end)
|
||||||
|
return "<Ignore>"
|
||||||
|
end, { expr = true })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "[g", function()
|
||||||
|
if vim.wo.diff then
|
||||||
|
return "[g"
|
||||||
|
end
|
||||||
|
vim.schedule(function()
|
||||||
|
gitsigns.prev_hunk()
|
||||||
|
end)
|
||||||
|
return "<Ignore>"
|
||||||
|
end, { expr = true })
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
plugins = [ pkgs.vimPlugins.gitsigns-nvim ];
|
||||||
|
setup.gitsigns = { };
|
||||||
|
lua = builtins.readFile ./gitsigns.lua;
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition)
|
||||||
|
vim.keymap.set("n", "gT", vim.lsp.buf.type_definition)
|
||||||
|
vim.keymap.set("n", "gi", vim.lsp.buf.implementation)
|
||||||
|
vim.keymap.set("n", "gh", vim.lsp.buf.hover)
|
||||||
|
-- vim.keymap.set("n", "gr", telescope.lsp_references)
|
||||||
|
vim.keymap.set("n", "<Leader>R", vim.lsp.buf.rename)
|
||||||
|
vim.keymap.set("n", "]e", vim.diagnostic.goto_next)
|
||||||
|
vim.keymap.set("n", "[e", vim.diagnostic.goto_prev)
|
||||||
|
vim.keymap.set("n", "<Leader>de", vim.diagnostic.open_float)
|
||||||
|
vim.keymap.set("n", "<Leader>E", vim.lsp.buf.code_action)
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
plugins = [
|
||||||
|
pkgs.vimPlugins.nvim-lspconfig
|
||||||
|
pkgs.vimPlugins.lsp-colors-nvim
|
||||||
|
pkgs.vimPlugins.null-ls-nvim
|
||||||
|
];
|
||||||
|
|
||||||
|
use.lspconfig.sumneko_lua.setup = dsl.callWith {
|
||||||
|
settings = { Lua = { diagnostics = { globals = [ "vim" "hs" ]; }; }; };
|
||||||
|
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||||
|
cmd = [ "${pkgs.sumneko-lua-language-server}/bin/lua-language-server" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
use.lspconfig.nil_ls.setup = dsl.callWith {
|
||||||
|
cmd = [ "${pkgs.nil}/bin/nil" ];
|
||||||
|
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||||
|
};
|
||||||
|
|
||||||
|
use.lspconfig.pyright.setup = dsl.callWith {
|
||||||
|
cmd = [ "${pkgs.pyright}/bin/pyright-langserver" "--stdio" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
use.lspconfig.terraformls.setup =
|
||||||
|
dsl.callWith { cmd = [ "${pkgs.terraform-ls}/bin/terraform-ls" "serve" ]; };
|
||||||
|
|
||||||
|
vim.api.nvim_create_augroup = dsl.callWith [ "LspFormatting" { } ];
|
||||||
|
|
||||||
|
lua = ''
|
||||||
|
${builtins.readFile ./lsp.lua}
|
||||||
|
|
||||||
|
require("null-ls").setup({
|
||||||
|
sources = {
|
||||||
|
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
||||||
|
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
|
||||||
|
require("null-ls").builtins.diagnostics.flake8.with({ command = "${pkgs.python310Packages.flake8}/bin/flake8" }),
|
||||||
|
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
|
||||||
|
require("null-ls").builtins.formatting.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
|
||||||
|
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
||||||
|
require("null-ls").builtins.diagnostics.shellcheck.with({ command = "${pkgs.shellcheck}/bin/shellcheck" }),
|
||||||
|
require("null-ls").builtins.formatting.shfmt.with({
|
||||||
|
command = "${pkgs.shfmt}/bin/shfmt",
|
||||||
|
extra_args = { "-i", "4", "-ci" },
|
||||||
|
}),
|
||||||
|
require("null-ls").builtins.formatting.terraform_fmt.with({
|
||||||
|
command = "${pkgs.terraform}/bin/terraform",
|
||||||
|
extra_filetypes = { "hcl" },
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
|
||||||
|
on_attach = function(client, bufnr)
|
||||||
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
group = augroup,
|
||||||
|
buffer = bufnr,
|
||||||
|
callback = function()
|
||||||
|
vim.lsp.buf.format({ bufnr = bufnr })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
{ pkgs, dsl, lib, ... }: {
|
||||||
|
plugins = [
|
||||||
|
pkgs.vimPlugins.vim-surround # Keybinds for surround characters
|
||||||
|
pkgs.vimPlugins.vim-eunuch # File manipulation commands
|
||||||
|
pkgs.vimPlugins.vim-fugitive # Git commands
|
||||||
|
pkgs.vimPlugins.vim-repeat # Better repeat using .
|
||||||
|
pkgs.vimPlugins.comment-nvim # Smart comment commands
|
||||||
|
pkgs.vimPlugins.impatient-nvim # Faster load times
|
||||||
|
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
||||||
|
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
||||||
|
];
|
||||||
|
|
||||||
|
setup.Comment = { };
|
||||||
|
setup.colorizer = { };
|
||||||
|
|
||||||
|
vim.o = {
|
||||||
|
termguicolors = true; # Set to truecolor
|
||||||
|
hidden = true; # Don't unload buffers when leaving them
|
||||||
|
list = true; # Reveal whitespace with dashes
|
||||||
|
expandtab = true; # Tabs into spaces
|
||||||
|
shiftwidth = 4; # Amount to shift with > key
|
||||||
|
softtabstop = 4; # Amount to shift with <TAB> key
|
||||||
|
ignorecase = true; # Ignore case when searching
|
||||||
|
smartcase = true; # Check case when using capitals in search
|
||||||
|
infercase = true; # Don't match cases when completing suggestions
|
||||||
|
incsearch = true; # Search while typing
|
||||||
|
visualbell = true; # No sounds
|
||||||
|
scrolljump = 1; # Number of lines to scroll
|
||||||
|
scrolloff = 3; # Margin of lines to see while scrolling
|
||||||
|
splitright = true; # Vertical splits on the right side
|
||||||
|
splitbelow = true; # Horizontal splits on the bottom side
|
||||||
|
pastetoggle = "<F3>"; # Use F3 to enter raw paste mode
|
||||||
|
clipboard = "unnamedplus"; # Uses system clipboard for yanking
|
||||||
|
updatetime = 300; # Faster diagnostics
|
||||||
|
mouse = "nv"; # Mouse interaction / scrolling
|
||||||
|
inccommand = "split"; # Live preview search and replace
|
||||||
|
};
|
||||||
|
|
||||||
|
vim.wo = {
|
||||||
|
number = true; # Show line numbers
|
||||||
|
relativenumber = true; # Relative numbers instead of absolute
|
||||||
|
};
|
||||||
|
|
||||||
|
# Better backup, swap and undo storage
|
||||||
|
vim.o.backup = true; # Easier to recover and more secure
|
||||||
|
vim.bo.swapfile = false; # Instead of swaps, create backups
|
||||||
|
vim.bo.undofile = true; # Keeps undos after quit
|
||||||
|
vim.o.backupdir = dsl.rawLua ''vim.fn.stdpath("cache") .. "/backup"'';
|
||||||
|
|
||||||
|
# Required for nvim-cmp completion
|
||||||
|
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
||||||
|
|
||||||
|
lua = lib.mkBefore ''
|
||||||
|
require("impatient")
|
||||||
|
${builtins.readFile ../lua/keybinds.lua};
|
||||||
|
${builtins.readFile ../lua/settings.lua};
|
||||||
|
'';
|
||||||
|
|
||||||
|
vimscript = ''
|
||||||
|
" Remember last position when reopening file
|
||||||
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
||||||
|
|
||||||
|
" LaTeX options
|
||||||
|
au FileType tex inoremap ;bf \textbf{}<Esc>i
|
||||||
|
au BufWritePost *.tex silent! execute "!pdflatex -output-directory=%:p:h % >/dev/null 2>&1" | redraw!
|
||||||
|
|
||||||
|
" Flash highlight when yanking
|
||||||
|
au TextYankPost * silent! lua vim.highlight.on_yank { timeout = 250 }
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
plugins = [ pkgs.vimPlugins.lualine-nvim ];
|
||||||
|
setup.lualine = {
|
||||||
|
options = {
|
||||||
|
theme = "gruvbox";
|
||||||
|
icons_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
plugins = [
|
||||||
|
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
|
||||||
|
with pkgs.tree-sitter-grammars; [
|
||||||
|
tree-sitter-hcl
|
||||||
|
tree-sitter-python
|
||||||
|
tree-sitter-lua
|
||||||
|
tree-sitter-nix
|
||||||
|
tree-sitter-fish
|
||||||
|
tree-sitter-toml
|
||||||
|
tree-sitter-yaml
|
||||||
|
tree-sitter-json
|
||||||
|
]))
|
||||||
|
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
||||||
|
pkgs.vimPlugins.nginx-vim
|
||||||
|
pkgs.vimPlugins.vim-helm
|
||||||
|
pkgs.vimPlugins.vim-puppet
|
||||||
|
];
|
||||||
|
|
||||||
|
setup."nvim-treesitter.configs" = {
|
||||||
|
highlight = { enable = true; };
|
||||||
|
indent = { enable = true; };
|
||||||
|
|
||||||
|
textobjects = {
|
||||||
|
select = {
|
||||||
|
enable = true;
|
||||||
|
lookahead = true; # Jump forward automatically
|
||||||
|
|
||||||
|
keymaps = {
|
||||||
|
"['af']" = "@function.outer";
|
||||||
|
"['if']" = "@function.inner";
|
||||||
|
"['ac']" = "@class.outer";
|
||||||
|
"['ic']" = "@class.inner";
|
||||||
|
"['al']" = "@loop.outer";
|
||||||
|
"['il']" = "@loop.inner";
|
||||||
|
"['aa']" = "@call.outer";
|
||||||
|
"['ia']" = "@call.inner";
|
||||||
|
"['ar']" = "@parameter.outer";
|
||||||
|
"['ir']" = "@parameter.inner";
|
||||||
|
"['aC']" = "@comment.outer";
|
||||||
|
"['iC']" = "@comment.outer";
|
||||||
|
"['a/']" = "@comment.outer";
|
||||||
|
"['i/']" = "@comment.outer";
|
||||||
|
"['a;']" = "@statement.outer";
|
||||||
|
"['i;']" = "@statement.outer";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
local telescope = require("telescope.builtin")
|
||||||
|
vim.keymap.set("n", "<Leader>k", telescope.keymaps)
|
||||||
|
vim.keymap.set("n", "<Leader>/", telescope.live_grep)
|
||||||
|
vim.keymap.set("n", "<Leader>ff", telescope.find_files)
|
||||||
|
vim.keymap.set("n", "<Leader>fp", telescope.git_files)
|
||||||
|
vim.keymap.set("n", "<Leader>fw", telescope.grep_string)
|
||||||
|
vim.keymap.set("n", "<Leader>b", telescope.buffers)
|
||||||
|
vim.keymap.set("n", "<Leader>hh", telescope.help_tags)
|
||||||
|
vim.keymap.set("n", "<Leader>fr", telescope.oldfiles)
|
||||||
|
vim.keymap.set("n", "<Leader>cc", telescope.commands)
|
||||||
|
vim.keymap.set("n", "<Leader>gc", telescope.git_commits)
|
||||||
|
vim.keymap.set("n", "<Leader>gf", telescope.git_bcommits)
|
||||||
|
vim.keymap.set("n", "<Leader>gb", telescope.git_branches)
|
||||||
|
vim.keymap.set("n", "<Leader>gs", telescope.git_status)
|
||||||
|
vim.keymap.set("n", "<Leader>s", telescope.current_buffer_fuzzy_find)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<Leader>N", function()
|
||||||
|
local opts = {
|
||||||
|
prompt_title = "Search Notes",
|
||||||
|
cwd = "$NOTES_PATH",
|
||||||
|
}
|
||||||
|
telescope.live_grep(opts)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<Leader>fN", function()
|
||||||
|
local opts = {
|
||||||
|
prompt_title = "Find Notes",
|
||||||
|
cwd = "$NOTES_PATH",
|
||||||
|
}
|
||||||
|
telescope.find_files(opts)
|
||||||
|
end)
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<Leader>cr", function()
|
||||||
|
local opts = require("telescope.themes").get_ivy({
|
||||||
|
layout_config = {
|
||||||
|
bottom_pane = {
|
||||||
|
height = 15,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
telescope.command_history(opts)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Zoxide
|
||||||
|
vim.keymap.set("n", "<Leader>fz", require("telescope").extensions.zoxide.list)
|
||||||
|
|
||||||
|
-- Project
|
||||||
|
require("telescope").load_extension("project")
|
||||||
|
vim.keymap.set("n", "<C-p>", function()
|
||||||
|
local opts = require("telescope.themes").get_ivy({
|
||||||
|
layout_config = {
|
||||||
|
bottom_pane = {
|
||||||
|
height = 10,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
require("telescope").extensions.project.project(opts)
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- File browser
|
||||||
|
require("telescope").load_extension("file_browser")
|
||||||
|
vim.keymap.set("n", "<Leader>fa", require("telescope").extensions.file_browser.file_browser)
|
||||||
|
vim.keymap.set("n", "<Leader>fD", function()
|
||||||
|
local opts = {
|
||||||
|
prompt_title = "Find Downloads",
|
||||||
|
cwd = "~/downloads",
|
||||||
|
}
|
||||||
|
require("telescope").extensions.file_browser.file_browser(opts)
|
||||||
|
end)
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
plugins = [
|
||||||
|
pkgs.vimPlugins.telescope-nvim
|
||||||
|
pkgs.vimPlugins.telescope-project-nvim
|
||||||
|
pkgs.vimPlugins.telescope-fzy-native-nvim
|
||||||
|
pkgs.vimPlugins.telescope-file-browser-nvim
|
||||||
|
pkgs.vimPlugins.telescope-zoxide
|
||||||
|
];
|
||||||
|
|
||||||
|
setup.telescope = {
|
||||||
|
defaults = {
|
||||||
|
mappings = {
|
||||||
|
i = {
|
||||||
|
"['<esc>']" = dsl.rawLua "require('telescope.actions').close";
|
||||||
|
"['<C-h>']" = "which_key";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
pickers = {
|
||||||
|
find_files = { theme = "ivy"; };
|
||||||
|
oldfiles = { theme = "ivy"; };
|
||||||
|
buffers = { theme = "dropdown"; };
|
||||||
|
};
|
||||||
|
extensions = {
|
||||||
|
fzy_native = { };
|
||||||
|
zoxide = { };
|
||||||
|
project = { base_dirs = [ "~/dev" ]; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
lua = builtins.readFile ./telescope.lua;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
vim.keymap.set("t", "<A-CR>", "<C-\\><C-n>") --- Exit terminal mode
|
||||||
|
|
||||||
|
-- Only set these keymaps for toggleterm
|
||||||
|
vim.api.nvim_create_autocmd("TermOpen", {
|
||||||
|
pattern = "term://*toggleterm#*",
|
||||||
|
callback = function()
|
||||||
|
-- vim.keymap.set("t", "<Esc>", "<C-\\><C-n>") --- Exit terminal mode
|
||||||
|
vim.keymap.set("t", "<C-h>", "<C-\\><C-n><C-w>h")
|
||||||
|
vim.keymap.set("t", "<C-j>", "<C-\\><C-n><C-w>j")
|
||||||
|
vim.keymap.set("t", "<C-k>", "<C-\\><C-n><C-w>k")
|
||||||
|
vim.keymap.set("t", "<C-l>", "<C-\\><C-n><C-w>l")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
local terminal = require("toggleterm.terminal").Terminal
|
||||||
|
|
||||||
|
local basicterminal = terminal:new()
|
||||||
|
function TERM_TOGGLE()
|
||||||
|
basicterminal:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
local nixpkgs = terminal:new({ cmd = "nix repl '<nixpkgs>'" })
|
||||||
|
function NIXPKGS_TOGGLE()
|
||||||
|
nixpkgs:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
local gitwatch = terminal:new({ cmd = "fish --interactive --init-command 'gh run watch'" })
|
||||||
|
function GITWATCH_TOGGLE()
|
||||||
|
gitwatch:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
local k9s = terminal:new({ cmd = "k9s" })
|
||||||
|
function K9S_TOGGLE()
|
||||||
|
k9s:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<Leader>t", TERM_TOGGLE)
|
||||||
|
vim.keymap.set("n", "<Leader>P", NIXPKGS_TOGGLE)
|
||||||
|
vim.keymap.set("n", "<Leader>gw", GITWATCH_TOGGLE)
|
||||||
|
vim.keymap.set("n", "<Leader>9", K9S_TOGGLE)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
plugins = [ pkgs.vimPlugins.toggleterm-nvim ];
|
||||||
|
|
||||||
|
use.toggleterm.setup = dsl.callWith {
|
||||||
|
open_mapping = dsl.rawLua "[[<c-\\>]]";
|
||||||
|
hide_numbers = true;
|
||||||
|
direction = "float";
|
||||||
|
};
|
||||||
|
|
||||||
|
lua = builtins.readFile ./toggleterm.lua;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
plugins = [ pkgs.vimPlugins.nvim-tree-lua pkgs.vimPlugins.nvim-web-devicons ];
|
||||||
|
|
||||||
|
# Disable netrw eagerly
|
||||||
|
# https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129
|
||||||
|
vim.g = {
|
||||||
|
loaded = 1;
|
||||||
|
loaded_netrwPlugin = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
setup.nvim-tree = {
|
||||||
|
disable_netrw = true;
|
||||||
|
hijack_netrw = true;
|
||||||
|
update_focused_file = {
|
||||||
|
enable = true;
|
||||||
|
update_cwd = true;
|
||||||
|
ignore_list = { };
|
||||||
|
};
|
||||||
|
diagnostics = {
|
||||||
|
enable = true;
|
||||||
|
icons = {
|
||||||
|
hint = "";
|
||||||
|
info = "";
|
||||||
|
warning = "";
|
||||||
|
error = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
renderer = {
|
||||||
|
icons = {
|
||||||
|
glyphs = {
|
||||||
|
git = {
|
||||||
|
unstaged = "~";
|
||||||
|
staged = "+";
|
||||||
|
unmerged = "";
|
||||||
|
renamed = "➜";
|
||||||
|
deleted = "";
|
||||||
|
untracked = "?";
|
||||||
|
ignored = "◌";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
view = {
|
||||||
|
width = 30;
|
||||||
|
hide_root_folder = false;
|
||||||
|
side = "left";
|
||||||
|
mappings = {
|
||||||
|
custom_only = false;
|
||||||
|
list = [
|
||||||
|
{
|
||||||
|
key = [ "l" "<CR>" "o" ];
|
||||||
|
cb = dsl.rawLua
|
||||||
|
"require('nvim-tree.config').nvim_tree_callback('edit')";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "h";
|
||||||
|
cb = dsl.rawLua
|
||||||
|
"require('nvim-tree.config').nvim_tree_callback('close_node')";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "v";
|
||||||
|
cb = dsl.rawLua
|
||||||
|
"require('nvim-tree.config').nvim_tree_callback('vsplit')";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
number = false;
|
||||||
|
relativenumber = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
lua = ''
|
||||||
|
vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
|
||||||
|
'';
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
neovim = import ./package {
|
||||||
|
inherit pkgs;
|
||||||
|
colors = import config.theme.colors.neovimConfig { inherit pkgs; };
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
options.neovim.enable = lib.mkEnableOption "Neovim.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.neovim.enable {
|
||||||
|
home-manager.users.${config.user} =
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
home.packages = [ neovim ];
|
||||||
|
|
||||||
|
programs.git.extraConfig.core.editor = "nvim";
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
MANPAGER = "nvim +Man!";
|
||||||
|
};
|
||||||
|
programs.fish = {
|
||||||
|
shellAliases = { vim = "nvim"; };
|
||||||
|
shellAbbrs = {
|
||||||
|
v = lib.mkForce "nvim";
|
||||||
|
vl = lib.mkForce "nvim -c 'normal! `0' -c 'bdelete 1'";
|
||||||
|
vll = "nvim -c 'Telescope oldfiles'";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.kitty.settings.scrollback_pager = lib.mkForce ''
|
||||||
|
${neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# # Used for icons in Vim
|
||||||
|
# fonts.fonts = with pkgs; [ nerdfonts ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -64,7 +64,6 @@ M.packer = function(use)
|
|||||||
})
|
})
|
||||||
|
|
||||||
-- Additional syntax sources
|
-- Additional syntax sources
|
||||||
use("bfontaine/Brewfile.vim") --- Brewfile syntax
|
|
||||||
use("chr4/nginx.vim") --- Nginx syntax
|
use("chr4/nginx.vim") --- Nginx syntax
|
||||||
use("towolf/vim-helm") --- Helm syntax
|
use("towolf/vim-helm") --- Helm syntax
|
||||||
use("rodjek/vim-puppet") --- Puppet syntax
|
use("rodjek/vim-puppet") --- Puppet syntax
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,17 @@
|
|||||||
|
-- ===========================================================================
|
||||||
|
-- Settings
|
||||||
|
-- ===========================================================================
|
||||||
|
|
||||||
|
vim.filetype.add({
|
||||||
|
pattern = {
|
||||||
|
[".*%.tfvars"] = "hcl",
|
||||||
|
[".*%.tf"] = "hcl",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
|
pattern = "*.eml",
|
||||||
|
callback = function()
|
||||||
|
vim.o.wrapmargin = 79 -- Wrap text automatically
|
||||||
|
end,
|
||||||
|
})
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# { inputs, globals, extraConfig ? [ ], ... }:
|
||||||
|
#
|
||||||
|
# let
|
||||||
|
#
|
||||||
|
# pkgs = import inputs.nixpkgs {
|
||||||
|
# system = inputs.system;
|
||||||
|
# overlays = [
|
||||||
|
# (import ./modules/neovim/plugins-overlay.nix inputs)
|
||||||
|
# inputs.nix2vim.overlay
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
# in pkgs.neovimBuilder {
|
||||||
|
# package = pkgs.neovim-unwrapped;
|
||||||
|
# imports = [
|
||||||
|
# ./modules/common/neovim/plugins/bufferline.nix
|
||||||
|
# ./modules/common/neovim/plugins/completion.nix
|
||||||
|
# ./modules/common/neovim/plugins/gitsigns.nix
|
||||||
|
# ./modules/common/neovim/plugins/lsp.nix
|
||||||
|
# ./modules/common/neovim/plugins/misc.nix
|
||||||
|
# ./modules/common/neovim/plugins/statusline.nix
|
||||||
|
# ./modules/common/neovim/plugins/syntax.nix
|
||||||
|
# ./modules/common/neovim/plugins/telescope.nix
|
||||||
|
# ./modules/common/neovim/plugins/toggleterm.nix
|
||||||
|
# ./modules/common/neovim/plugins/tree.nix
|
||||||
|
# ] ++ extraConfig;
|
||||||
|
# }
|
||||||
|
|
||||||
|
{ pkgs, colors ? { }, ... }:
|
||||||
|
|
||||||
|
pkgs.neovimBuilder {
|
||||||
|
package = pkgs.neovim-unwrapped;
|
||||||
|
imports = [
|
||||||
|
../config/bufferline.nix
|
||||||
|
../config/completion.nix
|
||||||
|
../config/gitsigns.nix
|
||||||
|
../config/lsp.nix
|
||||||
|
../config/misc.nix
|
||||||
|
../config/statusline.nix
|
||||||
|
../config/syntax.nix
|
||||||
|
../config/telescope.nix
|
||||||
|
../config/toggleterm.nix
|
||||||
|
../config/tree.nix
|
||||||
|
colors
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./haskell.nix
|
||||||
|
./kubernetes.nix
|
||||||
|
./lua.nix
|
||||||
|
./nix.nix
|
||||||
|
./python.nix
|
||||||
|
./terraform.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
|
options.haskell.enable = lib.mkEnableOption "Haskell programming language.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.haskell.enable {
|
||||||
|
|
||||||
|
# Binary Cache for Haskell.nix
|
||||||
|
nix.settings.trusted-public-keys =
|
||||||
|
[ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
|
||||||
|
nix.settings.substituters = [ "https://cache.iog.io" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.kubernetes.enable = lib.mkEnableOption "Kubernetes tools.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.kubernetes.enable {
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
kubectl # Basic Kubernetes queries
|
||||||
|
kubernetes-helm # Helm CLI
|
||||||
|
fluxcd # Bootstrap clusters with Flux
|
||||||
|
kustomize # Kustomize CLI (for Flux)
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.fish.shellAbbrs = {
|
||||||
|
k = "kubectl";
|
||||||
|
pods = "kubectl get pods -A";
|
||||||
|
nodes = "kubectl get nodes";
|
||||||
|
deploys = "kubectl get deployments -A";
|
||||||
|
dash = "kube-dashboard";
|
||||||
|
ks = "k9s";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Terminal Kubernetes UI
|
||||||
|
programs.k9s = {
|
||||||
|
enable = true;
|
||||||
|
# settings = { k9s = { headless = true; }; };
|
||||||
|
skin = {
|
||||||
|
k9s = {
|
||||||
|
body = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
logoColor = config.theme.colors.base02; # *blue ?
|
||||||
|
};
|
||||||
|
# Search bar
|
||||||
|
prompt = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
suggestColor = config.theme.colors.base03;
|
||||||
|
};
|
||||||
|
# Header left side
|
||||||
|
info = {
|
||||||
|
fgColor = config.theme.colors.base04;
|
||||||
|
sectionColor = config.theme.colors.base05;
|
||||||
|
};
|
||||||
|
dialog = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
buttonFgColor = config.theme.colors.base06;
|
||||||
|
buttonBgColor = config.theme.colors.base0E;
|
||||||
|
buttonFocusFgColor = config.theme.colors.base07;
|
||||||
|
buttonFocusBgColor = config.theme.colors.base02; # *cyan
|
||||||
|
labelFgColor = config.theme.colors.base09;
|
||||||
|
fieldFgColor = config.theme.colors.base06;
|
||||||
|
};
|
||||||
|
frame = {
|
||||||
|
border = {
|
||||||
|
fgColor = config.theme.colors.base01;
|
||||||
|
focusColor = config.theme.colors.base06;
|
||||||
|
};
|
||||||
|
menu = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
keyColor = config.theme.colors.base0E; # *magenta
|
||||||
|
numKeyColor = config.theme.colors.base0E; # *magenta
|
||||||
|
};
|
||||||
|
crumbs = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base01;
|
||||||
|
activeColor = config.theme.colors.base03;
|
||||||
|
};
|
||||||
|
status = {
|
||||||
|
newColor = config.theme.colors.base04; # *cyan
|
||||||
|
modifyColor = config.theme.colors.base0D; # *blue
|
||||||
|
addColor = config.theme.colors.base0B; # *green
|
||||||
|
errorColor = config.theme.colors.base08; # *red
|
||||||
|
highlightColor = config.theme.colors.base09; # *orange
|
||||||
|
killColor = config.theme.colors.base03; # *comment
|
||||||
|
completedColor = config.theme.colors.base03; # *comment
|
||||||
|
};
|
||||||
|
title = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
highlightColor = config.theme.colors.base09; # *orange
|
||||||
|
counterColor = config.theme.colors.base0D; # *blue
|
||||||
|
filterColor = config.theme.colors.base0E; # *magenta
|
||||||
|
};
|
||||||
|
};
|
||||||
|
views = {
|
||||||
|
charts = {
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
defaultDialColors =
|
||||||
|
[ config.theme.colors.base0D config.theme.colors.base08 ];
|
||||||
|
# - *blue
|
||||||
|
# - *red
|
||||||
|
defaultChartColors =
|
||||||
|
[ config.theme.colors.base0D config.theme.colors.base08 ];
|
||||||
|
# - *blue
|
||||||
|
# - *red
|
||||||
|
};
|
||||||
|
table = {
|
||||||
|
# List of resources
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
|
||||||
|
# Row selection
|
||||||
|
cursorFgColor = config.theme.colors.base07;
|
||||||
|
cursorBgColor = config.theme.colors.base01;
|
||||||
|
|
||||||
|
# Header row
|
||||||
|
header = {
|
||||||
|
fgColor = config.theme.colors.base0D;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
sorterColor = config.theme.colors.base0A; # *selection
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xray = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
cursorColor = config.theme.colors.base06;
|
||||||
|
graphicColor = config.theme.colors.base0D;
|
||||||
|
showIcons = false;
|
||||||
|
};
|
||||||
|
yaml = {
|
||||||
|
keyColor = config.theme.colors.base0D;
|
||||||
|
colonColor = config.theme.colors.base04;
|
||||||
|
fgColor = config.theme.colors.base03;
|
||||||
|
};
|
||||||
|
logs = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
indicator = {
|
||||||
|
fgColor = config.theme.colors.base06;
|
||||||
|
bgColor = config.theme.colors.base00;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.lua.enable = lib.mkEnableOption "Lua programming language.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.lua.enable {
|
||||||
|
home-manager.users.${config.user}.home.packages = with pkgs; [
|
||||||
|
stylua # Lua formatter
|
||||||
|
sumneko-lua-language-server # Lua LSP
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.nixlang.enable = lib.mkEnableOption "Nix programming language.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.nixlang.enable {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
nixfmt # Nix file formatter
|
||||||
|
nil # Nix language server
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.python.enable = lib.mkEnableOption "Python programming language.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.python.enable {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# python310 # Standard Python interpreter
|
||||||
|
nodePackages.pyright # Python language server
|
||||||
|
black # Python formatter
|
||||||
|
python310Packages.flake8 # Python linter
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.fish.shellAbbrs = { py = "python3"; };
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.terraform.enable = lib.mkEnableOption "Terraform tools.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.terraform.enable {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
programs.fish.shellAbbrs = {
|
||||||
|
# Terraform
|
||||||
|
te = "terraform";
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
terraform # Terraform executable
|
||||||
|
terraform-ls # Language server
|
||||||
|
tflint # Linter
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{ ... }: {
|
||||||
|
|
||||||
|
imports = [ ./dotfiles.nix ./notes.nix ];
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.dotfiles.enable = lib.mkEnableOption "Clone dotfiles.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.dotfiles.enable {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
home.activation = {
|
||||||
|
|
||||||
|
# Always clone dotfiles repository if it doesn't exist
|
||||||
|
cloneDotfiles =
|
||||||
|
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||||
|
[ "writeBoundary" ] ''
|
||||||
|
if [ ! -d "${config.dotfilesPath}" ]; then
|
||||||
|
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
||||||
|
$DRY_RUN_CMD ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set a variable for dotfiles repo, not necessary but convenient
|
||||||
|
home.sessionVariables.DOTS = config.dotfilesPath;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.charm.enable = lib.mkEnableOption "Charm utilities.";
|
||||||
|
|
||||||
|
config.home-manager.users.${config.user} = lib.mkIf config.charm.enable {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
glow # Markdown previews
|
||||||
|
skate # Key-value store
|
||||||
|
charm # Manage account and filesystem
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
users.users.${config.user}.shell = pkgs.fish;
|
users.users.${config.user}.shell = pkgs.fish;
|
||||||
programs.fish.enable =
|
programs.fish.enable =
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 218 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user