mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-08 17:40:15 +00:00
Compare commits
111 Commits
4df1132eb7
...
nixosmodul
Author | SHA1 | Date | |
---|---|---|---|
b0b9827a2e | |||
9b3d2e39c9 | |||
5a1a843ecd | |||
2ddd980436 | |||
febf1071af | |||
05adc8a221 | |||
a463212023 | |||
2457ade6eb | |||
88d52614a9 | |||
2c663347ee | |||
02fc29c482 | |||
21cbe29bd8 | |||
c0da8391ef | |||
d4e203a04c | |||
38480e0c0c | |||
ee58f7a4ee | |||
4c4e250fa1 | |||
ffe867e6a8 | |||
b599162090 | |||
4b0d68089a | |||
b304e529b4 | |||
2b0f03ba1f | |||
2c4f215b6e | |||
066ea8e440 | |||
cd0c93c6d9 | |||
78e9c817d0 | |||
53a8cc83ea | |||
1cf5f46adf | |||
5348cbdf61 | |||
140b410ea0 | |||
b282e76be4 | |||
a26f5dc2b5 | |||
b0fcee6707 | |||
46e633c8b9 | |||
7a74f0a504 | |||
bacf1ab1fa | |||
ddf48998db | |||
23f72c3c2e | |||
77d81742a9 | |||
13c7859a78 | |||
0f4914db95 | |||
25e56b7421 | |||
a6ec04db7e | |||
2a56c04e17 | |||
894a22cb2d | |||
eefed57929 | |||
494cf355e9 | |||
c88718b649 | |||
790cb4a9d0 | |||
e3d4b36613 | |||
18154b6579 | |||
fb44473d22 | |||
c1e89fb20e | |||
04e8b8834e | |||
472a2b965c | |||
79eba7f333 | |||
28418c4e37 | |||
fa797c81f8 | |||
d243d68c72 | |||
f4f5f19183 | |||
3a40bb7485 | |||
e8456e131b | |||
8d8dd8ad62 | |||
bad49cb2c3 | |||
c052813f6d | |||
ed19eaafd1 | |||
09de243bd3 | |||
82a1954c26 | |||
6815af21dc | |||
3269d5e247 | |||
d337ffff51 | |||
df5fba19f8 | |||
8cc158221d | |||
f391433584 | |||
241b2deb49 | |||
605824c1a4 | |||
e8f4ee52c3 | |||
6518db291f | |||
a6551ce043 | |||
b089ec4668 | |||
5970555572 | |||
1083ee4ff8 | |||
a2bbcf7f55 | |||
f388aee56c | |||
958ab8a96b | |||
3059241c1c | |||
fe938ec713 | |||
05f705d794 | |||
f67a44fa87 | |||
713b835f70 | |||
480d515302 | |||
2337db0bda | |||
1510c8c31f | |||
8f8012e435 | |||
8d389013ad | |||
d013f980a7 | |||
3c51dd0db6 | |||
7f0600580f | |||
05d5fcb8f9 | |||
ca7a4ed408 | |||
cf73ce8136 | |||
82344372dd | |||
34cf2a4483 | |||
efb3933f5a | |||
cd067cce69 | |||
0d9df06bce | |||
b4e5852f48 | |||
1a60c5e9db | |||
2d8a84c286 | |||
319106364a | |||
fd5d6ab141 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,7 +3,6 @@
|
|||||||
*.db
|
*.db
|
||||||
**/.direnv/**
|
**/.direnv/**
|
||||||
result
|
result
|
||||||
.luarc.json
|
|
||||||
private/**
|
private/**
|
||||||
|
templates/**/flake.lock
|
||||||
!private/**.age
|
!private/**.age
|
||||||
!private/**.sha512
|
|
||||||
|
@ -26,8 +26,8 @@ configuration may be difficult to translate to a non-Nix system.
|
|||||||
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
|
| Terminal | [Kitty](https://sw.kovidgoyal.net/kitty/) | [Link](./modules/common/applications/kitty.nix) |
|
||||||
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
||||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starhip.nix) |
|
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starhip.nix) |
|
||||||
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox) |
|
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
|
||||||
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix)
|
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) |
|
||||||
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
||||||
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./modules/common/applications/firefox.nix) |
|
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./modules/common/applications/firefox.nix) |
|
||||||
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./modules/common/mail/aerc.nix) |
|
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./modules/common/mail/aerc.nix) |
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
program = "${
|
program = "${
|
||||||
(import ../modules/common/neovim/package {
|
(import ../modules/common/neovim/package {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
colors =
|
colors = (import ../colorscheme/nord).dark;
|
||||||
import ../colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; };
|
|
||||||
})
|
})
|
||||||
}/bin/nvim";
|
}/bin/nvim";
|
||||||
|
|
||||||
|
@ -1,20 +1,24 @@
|
|||||||
{
|
{
|
||||||
name = "everforest"; # dark, hard
|
name = "everforest"; # dark, hard
|
||||||
author = "Sainnhe Park";
|
author = "Sainnhe Park";
|
||||||
base00 = "#2b3339"; # Default Background
|
dark = {
|
||||||
base01 = "#323c41"; # Lighter Background
|
base00 = "#2b3339"; # Default Background
|
||||||
base02 = "#503946"; # Selection Background
|
base01 = "#323c41"; # Lighter Background
|
||||||
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
base02 = "#503946"; # Selection Background
|
||||||
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
||||||
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
||||||
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
||||||
base07 = "#fff9e8"; # Light Background (Not often used)
|
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
||||||
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
base07 = "#fff9e8"; # Light Background (Not often used)
|
||||||
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
||||||
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
||||||
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
||||||
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||||
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
||||||
base0E = "#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
||||||
base0F = "#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
base0E =
|
||||||
|
"#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||||
|
base0F =
|
||||||
|
"#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
45
colorscheme/gruvbox-dark/default.nix
Normal file
45
colorscheme/gruvbox-dark/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# Gruvbox with a darker background for greater contrast
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "gruvbox-dark"; # Dark, Medium
|
||||||
|
author =
|
||||||
|
"Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox), ElRastaOk (https://www.reddit.com/user/ElRastaOk)";
|
||||||
|
dark = {
|
||||||
|
base00 = "#1D2122"; # ---- This is the change from normal gruvbox
|
||||||
|
base01 = "#3c3836"; # ---
|
||||||
|
base02 = "#504945"; # --
|
||||||
|
base03 = "#665c54"; # -
|
||||||
|
base04 = "#bdae93"; # +
|
||||||
|
base05 = "#d5c4a1"; # ++
|
||||||
|
base06 = "#ebdbb2"; # +++
|
||||||
|
base07 = "#fbf1c7"; # ++++
|
||||||
|
base08 = "#fb4934"; # red
|
||||||
|
base09 = "#fe8019"; # orange
|
||||||
|
base0A = "#fabd2f"; # yellow
|
||||||
|
base0B = "#b8bb26"; # green
|
||||||
|
base0C = "#8ec07c"; # aqua/cyan
|
||||||
|
base0D = "#83a598"; # blue
|
||||||
|
base0E = "#d3869b"; # purple
|
||||||
|
base0F = "#d65d0e"; # brown
|
||||||
|
batTheme = "gruvbox-dark";
|
||||||
|
};
|
||||||
|
light = {
|
||||||
|
base00 = "#fbf1c7"; # ----
|
||||||
|
base01 = "#ebdbb2"; # ---
|
||||||
|
base02 = "#d5c4a1"; # --
|
||||||
|
base03 = "#bdae93"; # -
|
||||||
|
base04 = "#665c54"; # +
|
||||||
|
base05 = "#504945"; # ++
|
||||||
|
base06 = "#3c3836"; # +++
|
||||||
|
base07 = "#1D2122"; # ++++ Adjusted darker here
|
||||||
|
base08 = "#9d0006"; # red
|
||||||
|
base09 = "#af3a03"; # orange
|
||||||
|
base0A = "#b57614"; # yellow
|
||||||
|
base0B = "#79740e"; # green
|
||||||
|
base0C = "#427b58"; # aqua/cyan
|
||||||
|
base0D = "#076678"; # blue
|
||||||
|
base0E = "#8f3f71"; # purple
|
||||||
|
base0F = "#d65d0e"; # brown
|
||||||
|
batTheme = "gruvbox-light";
|
||||||
|
};
|
||||||
|
}
|
@ -19,7 +19,6 @@
|
|||||||
base0D = "#83a598"; # blue
|
base0D = "#83a598"; # blue
|
||||||
base0E = "#d3869b"; # purple
|
base0E = "#d3869b"; # purple
|
||||||
base0F = "#d65d0e"; # brown
|
base0F = "#d65d0e"; # brown
|
||||||
neovimConfig = ./neovim-gruvbox.nix;
|
|
||||||
batTheme = "gruvbox-dark";
|
batTheme = "gruvbox-dark";
|
||||||
};
|
};
|
||||||
light = {
|
light = {
|
||||||
@ -39,7 +38,6 @@
|
|||||||
base0D = "#076678"; # blue
|
base0D = "#076678"; # blue
|
||||||
base0E = "#8f3f71"; # purple
|
base0E = "#8f3f71"; # purple
|
||||||
base0F = "#d65d0e"; # brown
|
base0F = "#d65d0e"; # brown
|
||||||
neovimConfig = ./neovim-gruvbox.nix;
|
|
||||||
batTheme = "gruvbox-light";
|
batTheme = "gruvbox-light";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
{ 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
|
|
||||||
'';
|
|
||||||
|
|
||||||
}
|
|
@ -1,21 +1,23 @@
|
|||||||
{
|
{
|
||||||
name = "nord";
|
name = "nord";
|
||||||
author = "arcticicestudio";
|
author = "arcticicestudio";
|
||||||
base00 = "#2E3440";
|
dark = {
|
||||||
base01 = "#3B4252";
|
base00 = "#2E3440";
|
||||||
base02 = "#434C5E";
|
base01 = "#3B4252";
|
||||||
base03 = "#4C566A";
|
base02 = "#434C5E";
|
||||||
base04 = "#D8DEE9";
|
base03 = "#4C566A";
|
||||||
base05 = "#E5E9F0";
|
base04 = "#D8DEE9";
|
||||||
base06 = "#ECEFF4";
|
base05 = "#E5E9F0";
|
||||||
base07 = "#8FBCBB";
|
base06 = "#ECEFF4";
|
||||||
base08 = "#88C0D0";
|
base07 = "#8FBCBB";
|
||||||
base09 = "#81A1C1";
|
base08 = "#88C0D0";
|
||||||
base0A = "#5E81AC";
|
base09 = "#81A1C1";
|
||||||
base0B = "#BF616A";
|
base0A = "#5E81AC";
|
||||||
base0C = "#D08770";
|
base0B = "#BF616A";
|
||||||
base0D = "#EBCB8B";
|
base0C = "#D08770";
|
||||||
base0E = "#A3BE8C";
|
base0D = "#EBCB8B";
|
||||||
base0F = "#B48EAD";
|
base0E = "#A3BE8C";
|
||||||
neovimConfig = ./neovim.lua;
|
base0F = "#B48EAD";
|
||||||
|
batTheme = "nord";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
use({
|
|
||||||
"shaunsingh/nord.nvim",
|
|
||||||
config = function()
|
|
||||||
vim.g.nord_italic = true
|
|
||||||
vim.cmd("colorscheme nord")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -9,7 +9,6 @@
|
|||||||
partitions = [
|
partitions = [
|
||||||
# Boot partition
|
# Boot partition
|
||||||
{
|
{
|
||||||
type = "partition";
|
|
||||||
name = "ESP";
|
name = "ESP";
|
||||||
start = "0";
|
start = "0";
|
||||||
end = "512MiB";
|
end = "512MiB";
|
||||||
@ -24,7 +23,6 @@
|
|||||||
}
|
}
|
||||||
# Root partition ext4
|
# Root partition ext4
|
||||||
{
|
{
|
||||||
type = "partition";
|
|
||||||
name = "root";
|
name = "root";
|
||||||
start = "512MiB";
|
start = "512MiB";
|
||||||
end = "100%";
|
end = "100%";
|
||||||
|
267
flake.lock
generated
267
flake.lock
generated
@ -3,15 +3,16 @@
|
|||||||
"Comment-nvim-src": {
|
"Comment-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678452935,
|
"lastModified": 1681214440,
|
||||||
"narHash": "sha256-mVJJJ9fUJYgVyGZnW8e6P5QWB0K8nuhTwSWzlBvxv2M=",
|
"narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=",
|
||||||
"owner": "numToStr",
|
"owner": "numToStr",
|
||||||
"repo": "Comment.nvim",
|
"repo": "Comment.nvim",
|
||||||
"rev": "8d3aa5c22c2d45e788c7a5fe13ad77368b783c20",
|
"rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numToStr",
|
"owner": "numToStr",
|
||||||
|
"ref": "v0.8.0",
|
||||||
"repo": "Comment.nvim",
|
"repo": "Comment.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -19,15 +20,16 @@
|
|||||||
"bufferline-nvim-src": {
|
"bufferline-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677796018,
|
"lastModified": 1687763763,
|
||||||
"narHash": "sha256-tuGitJQ2eXB9/SIHAyPrEVgy2n++GOlBOPLvFv3Ds4E=",
|
"narHash": "sha256-wbOeylzjjScQXkrDbBU2HtrOZrp2YUK+wQ2aOkgxmRQ=",
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
"repo": "bufferline.nvim",
|
"repo": "bufferline.nvim",
|
||||||
"rev": "3677aceb9a72630b0613e56516c8f7151b86f95c",
|
"rev": "bf2f6b7edd0abf6b0732f5e5c0a8f30e51611c75",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
|
"ref": "v4.2.0",
|
||||||
"repo": "bufferline.nvim",
|
"repo": "bufferline.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -35,11 +37,11 @@
|
|||||||
"cmp-nvim-lsp-src": {
|
"cmp-nvim-lsp-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675708067,
|
"lastModified": 1687494203,
|
||||||
"narHash": "sha256-DxpcPTBlvVP88PDoTheLV2fC76EXDqS2UpM5mAfj/D4=",
|
"narHash": "sha256-mU0soCz79erJXMMqD/FyrJZ0mu2n6fE0deymPzQlxts=",
|
||||||
"owner": "hrsh7th",
|
"owner": "hrsh7th",
|
||||||
"repo": "cmp-nvim-lsp",
|
"repo": "cmp-nvim-lsp",
|
||||||
"rev": "0e6b2ed705ddcff9738ec4ea838141654f12eeef",
|
"rev": "44b16d11215dce86f253ce0c30949813c0a90765",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -55,11 +57,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673295039,
|
"lastModified": 1687517837,
|
||||||
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
"narHash": "sha256-Ea+JTy6NSf+wWIFrgC8gnOnyt01xwmtDEn2KecvaBkg=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
"rev": "6460468e7a3e1290f132fee4170ebeaa127f6f32",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -76,11 +78,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678912468,
|
"lastModified": 1687598357,
|
||||||
"narHash": "sha256-oUo6ZrsuqymuMLLvGfgnQ464OMKnUONv+ryea07iGrE=",
|
"narHash": "sha256-70ciIe8415oQnQypawaqocEaLJcI1XtkqRNmle8vsrg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "e8650fc36bf9d2acb411ba0047f863b8e481e3bb",
|
"rev": "1e7098ee0448dc5d33df394d040f454cd42a809c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -91,14 +93,16 @@
|
|||||||
},
|
},
|
||||||
"firefox-darwin": {
|
"firefox-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679446046,
|
"lastModified": 1688605308,
|
||||||
"narHash": "sha256-CBjVE3Sj7Ls1pffxGavqPXRkaLYy1+O88NzBwNdgNcY=",
|
"narHash": "sha256-B9suu7dcdX4a18loO5ul237gqIJ5/+TRuheLj8fJjwM=",
|
||||||
"owner": "bandithedoge",
|
"owner": "bandithedoge",
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
"repo": "nixpkgs-firefox-darwin",
|
||||||
"rev": "1531f1477881e76c67b123a55f3d44ed7f83a4ba",
|
"rev": "78d28acf685e19d353b2ecb6c38eeb3fc624fc68",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -125,11 +129,11 @@
|
|||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676283394,
|
"lastModified": 1678901627,
|
||||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -139,12 +143,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659877975,
|
"lastModified": 1685518550,
|
||||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -154,12 +161,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_3": {
|
"flake-utils_3": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676283394,
|
"lastModified": 1685518550,
|
||||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -172,15 +182,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
]
|
||||||
"utils": "utils"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679067095,
|
"lastModified": 1687627695,
|
||||||
"narHash": "sha256-G2dJQURL/CCi+8RP6jNJG8VqgtzEMCA+6mNodd3VR6E=",
|
"narHash": "sha256-6Pu7nWb52PRtUmihwuDNShDmsZiXgtXR0OARtH4DSik=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "3239e0b40f242f47bf6c0c37b2fd35ab3e76e370",
|
"rev": "172d46d4b2677b32277d903bdf4cff77c2cc6477",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -193,19 +202,22 @@
|
|||||||
"nil": {
|
"nil": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678728829,
|
"lastModified": 1680544266,
|
||||||
"narHash": "sha256-KbA8uakGfjfvRH+Td/VegiLdHrnqIZHkMTQ5XBjL2dE=",
|
"narHash": "sha256-d/TusDXmIo8IT5DNRA21lN+nOVSER8atIx9TJteR6LQ=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "nil",
|
"repo": "nil",
|
||||||
"rev": "e7045f1779fd202a3316f84b864c304f339cccea",
|
"rev": "56a1fa87b98a9508920f4b0ab8fe36d5b54b2362",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
|
"ref": "2023-04-03",
|
||||||
"repo": "nil",
|
"repo": "nil",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -218,11 +230,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1673891598,
|
"lastModified": 1685980282,
|
||||||
"narHash": "sha256-EevceKxQtA+I0XVA8tBGKmYV1V1KbWc3gsswysMzeDk=",
|
"narHash": "sha256-uQyVaoqkiocA8bXKMfrgizuKmz0hUzHye5owFoUd2AQ=",
|
||||||
"owner": "gytis-ivaskevicius",
|
"owner": "gytis-ivaskevicius",
|
||||||
"repo": "nix2vim",
|
"repo": "nix2vim",
|
||||||
"rev": "5b31eb81e2c6c74f9e8a4911660f3bf585d55158",
|
"rev": "3836a348503ae27340c7f83f0bc7bcb907f3781d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -233,11 +245,11 @@
|
|||||||
},
|
},
|
||||||
"nixlib": {
|
"nixlib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677373009,
|
"lastModified": 1687049841,
|
||||||
"narHash": "sha256-kxhz4QUP8tXa/yVSpEzDDZSEp9FvhzRqZzb+SeUaekw=",
|
"narHash": "sha256-FBNZQfWtA7bb/rwk92mfiWc85x4hXta2OAouDqO5W8w=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "c9d4f2476046c6a7a2ce3c2118c48455bf0272ea",
|
"rev": "908af6d1fa3643c5818ea45aa92b21d6385fbbe5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -254,11 +266,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678351966,
|
"lastModified": 1687398392,
|
||||||
"narHash": "sha256-tRFEU0lu3imZb3dtELBY+UbEhWXbb0xlBrsIlpICb+A=",
|
"narHash": "sha256-T6kc3NMTpGJk1/dve8PGupeVcxboEb78xtTKhe3LL/A=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "0c043999b16caba6fb571af2d228775729829943",
|
"rev": "649171f56a45af13ba693c156207eafbbbf7edfe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -269,43 +281,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1639237670,
|
"lastModified": 1687502512,
|
||||||
"narHash": "sha256-RTdL4rEQcgaZGpvtDgkp3oK/V+1LM3I53n0ACPSroAQ=",
|
"narHash": "sha256-dBL/01TayOSZYxtY4cMXuNCBk8UMLoqRZA+94xiFpJA=",
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "edfb969386ebe6c3cf8f878775a7975cd88f926d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1678298120,
|
|
||||||
"narHash": "sha256-iaV5xqgn29xy765Js3EoZePQyZIlLZA3pTYtTnKkejg=",
|
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1e383aada51b416c6c27d4884d2e258df201bc11",
|
"rev": "3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1679262748,
|
|
||||||
"narHash": "sha256-DQCrrAFrkxijC6haUzOC5ZoFqpcv/tg2WxnyW3np1Cc=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "60c1d71f2ba4c80178ec84523c2ca0801522e0a6",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -315,13 +295,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677779205,
|
"lastModified": 1686929285,
|
||||||
"narHash": "sha256-6DBjL9wjq86p2GczmwnHtFRnWPBPItc67gapWENBgX8=",
|
"narHash": "sha256-WGtVzn+vGMPTXDO0DMNKVFtf+zUSqeW+KKk4Y/Ae99I=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "96e18717904dfedcd884541e5a92bf9ff632cf39",
|
"rev": "93fddcf640ceca0be331210ba3101cee9d91c13d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -334,11 +314,11 @@
|
|||||||
"null-ls-nvim-src": {
|
"null-ls-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679325581,
|
"lastModified": 1686871437,
|
||||||
"narHash": "sha256-ixhy8qgP2GEPqrMdI+GsHzeHxESwhRw6cjf5hcpwP1w=",
|
"narHash": "sha256-MxIZqyRW8jStiDNXt7Bsw8peDLKpqxKEaUuIJsXkGMI=",
|
||||||
"owner": "jose-elias-alvarez",
|
"owner": "jose-elias-alvarez",
|
||||||
"repo": "null-ls.nvim",
|
"repo": "null-ls.nvim",
|
||||||
"rev": "13dd1fc13063681ca7e039436c88f6eca7e3e937",
|
"rev": "bbaf5a96913aa92281f154b08732be2f57021c45",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -349,11 +329,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679482366,
|
"lastModified": 1687625402,
|
||||||
"narHash": "sha256-88K2ABCsdsVwq6Go/uEn/fds1fUeeeoixOALjrrUI0Q=",
|
"narHash": "sha256-V+vSWypmm/tGbwNXGhqzmiV7vTjV2gNCEh9N7OhNnyA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "e9088dc6f9f289fbff984744ad04dccbd5c1f8ac",
|
"rev": "aeaf37c7538965e45700d39e6b5dc9c9a0e0749c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -365,15 +345,16 @@
|
|||||||
"nvim-lspconfig-src": {
|
"nvim-lspconfig-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679319980,
|
"lastModified": 1675639052,
|
||||||
"narHash": "sha256-UQ/Zng1/9rXRnQeAjemA21qfCltmZRq9QekQ0vGYlX8=",
|
"narHash": "sha256-B8IgpypxzCACZ5VcqM6KiWyClaN+KrmemtkwMznmj5Y=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "nvim-lspconfig",
|
"repo": "nvim-lspconfig",
|
||||||
"rev": "0f94c5fded29c0024254259f3d8a0284bfb507ea",
|
"rev": "255e07ce2a05627d482d2de77308bba51b90470c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
|
"ref": "v0.1.6",
|
||||||
"repo": "nvim-lspconfig",
|
"repo": "nvim-lspconfig",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -381,11 +362,11 @@
|
|||||||
"nvim-tree-lua-src": {
|
"nvim-tree-lua-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678748807,
|
"lastModified": 1687132855,
|
||||||
"narHash": "sha256-u9ZLBL4FY/bkvl4+ofKifyEHM9+KhqeYovhr9VQYG7c=",
|
"narHash": "sha256-ZRUoCDBv8rO8ZUBUMLgo33EBbqD9+ZOSET9rkFsA++E=",
|
||||||
"owner": "kyazdani42",
|
"owner": "kyazdani42",
|
||||||
"repo": "nvim-tree.lua",
|
"repo": "nvim-tree.lua",
|
||||||
"rev": "1d79a64a88af47ddbb55f4805ab537d11d5b908e",
|
"rev": "c3c6544ee00333b0f1d6a13735d0dd302dba4f70",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -397,16 +378,16 @@
|
|||||||
"nvim-treesitter-src": {
|
"nvim-treesitter-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677248832,
|
"lastModified": 1681121236,
|
||||||
"narHash": "sha256-4TmtrufxjVpnSNfFpn6GQStEhq3KQb3JfmfMEJnSI8k=",
|
"narHash": "sha256-iPsPDLhVKJ14iP1/2cCgcY9SCKK/DQz9Y0mQB1DqNiM=",
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"rev": "b401b7423d18c78371c5ff1a5f8d3c14292b2047",
|
"rev": "cc360a9beb1b30d172438f640e2c3450358c4086",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"ref": "v0.8.5.2",
|
"ref": "v0.9.0",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -423,7 +404,7 @@
|
|||||||
"nil": "nil",
|
"nil": "nil",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs",
|
||||||
"null-ls-nvim-src": "null-ls-nvim-src",
|
"null-ls-nvim-src": "null-ls-nvim-src",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||||
@ -432,6 +413,7 @@
|
|||||||
"telescope-nvim-src": "telescope-nvim-src",
|
"telescope-nvim-src": "telescope-nvim-src",
|
||||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||||
|
"vscode-terraform-snippets": "vscode-terraform-snippets",
|
||||||
"wallpapers": "wallpapers",
|
"wallpapers": "wallpapers",
|
||||||
"wsl": "wsl"
|
"wsl": "wsl"
|
||||||
}
|
}
|
||||||
@ -448,11 +430,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678415622,
|
"lastModified": 1680488274,
|
||||||
"narHash": "sha256-tems1jHETCYEen8QrW61yVVX0F4zOGy4ImB43iDc7bY=",
|
"narHash": "sha256-0vYMrZDdokVmPQQXtFpnqA2wEgCCUXf5a3dDuDVshn0=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "9f687941160108f89dd8bd2c650d32c15a35c7c7",
|
"rev": "7ec2ff598a172c6e8584457167575b3a1a5d80d8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -461,18 +443,49 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"telescope-nvim-src": {
|
"telescope-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677414372,
|
"lastModified": 1686302912,
|
||||||
"narHash": "sha256-QmyVJ/LZFtb/qqD5Q5fHsqAGgqaOT9XkVoLyOcqM14w=",
|
"narHash": "sha256-fV3LLRwAPykVGc4ImOnUSP+WTrPp9Ad9OTfBJ6wqTMk=",
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
"repo": "telescope.nvim",
|
"repo": "telescope.nvim",
|
||||||
"rev": "a3f17d3baf70df58b9d3544ea30abe52a7a832c2",
|
"rev": "776b509f80dd49d8205b9b0d94485568236d1192",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
|
"ref": "0.1.2",
|
||||||
"repo": "telescope.nvim",
|
"repo": "telescope.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -480,11 +493,11 @@
|
|||||||
"telescope-project-nvim-src": {
|
"telescope-project-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1671805267,
|
"lastModified": 1682606566,
|
||||||
"narHash": "sha256-S4SOHzQ17ux5pcwwYFpVVLzjLeC4/EJ0IFPbrfzUJC8=",
|
"narHash": "sha256-H6lrPjpOUVleKHB0ziI+6dthg9ymitHhEWtcgYJTrKo=",
|
||||||
"owner": "nvim-telescope",
|
"owner": "nvim-telescope",
|
||||||
"repo": "telescope-project.nvim",
|
"repo": "telescope-project.nvim",
|
||||||
"rev": "8e8ee37b7210761502cdf2c3a82b5ba8fb5b2972",
|
"rev": "7c64b181dd4e72deddcf6f319e3bf1e95b2a2f30",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -496,31 +509,33 @@
|
|||||||
"toggleterm-nvim-src": {
|
"toggleterm-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678645191,
|
"lastModified": 1685434104,
|
||||||
"narHash": "sha256-nK9eUHeFjZtUPC4cOCILg7J54rDHGI52AIXX5j7E4rE=",
|
"narHash": "sha256-oiCnBrvft6XxiQtQH8E4F842xhh348SaTpHzaeb+iDY=",
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
"repo": "toggleterm.nvim",
|
"repo": "toggleterm.nvim",
|
||||||
"rev": "c8e982ad2739eeb0b13d0fecb14820c9bf5e3da0",
|
"rev": "95204ece0f2a54c89c4395295432f9aeedca7b5f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "akinsho",
|
"owner": "akinsho",
|
||||||
|
"ref": "v2.7.0",
|
||||||
"repo": "toggleterm.nvim",
|
"repo": "toggleterm.nvim",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils": {
|
"vscode-terraform-snippets": {
|
||||||
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676283394,
|
"lastModified": 1614849738,
|
||||||
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
|
"narHash": "sha256-v392tyzXV+zyBNt5OCB2NBCK7JcByrTa5Ne/nFtSCJI=",
|
||||||
"owner": "numtide",
|
"owner": "run-at-scale",
|
||||||
"repo": "flake-utils",
|
"repo": "vscode-terraform-doc-snippets",
|
||||||
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
|
"rev": "6ab3e44b566e660f38922cf908e6e547eaa5d4b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "numtide",
|
"owner": "run-at-scale",
|
||||||
"repo": "flake-utils",
|
"repo": "vscode-terraform-doc-snippets",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -544,14 +559,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678648312,
|
"lastModified": 1687279045,
|
||||||
"narHash": "sha256-aY3CBNyenTUkStQhwigm30+BjXQyA8rCChGD+Z98qqE=",
|
"narHash": "sha256-LR0dsXd/A07M61jclyBUW0wRojEQteWReKM35zoJXp0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "c6f663e8583912059605b55c07583b6e96b5e690",
|
"rev": "a8486b5d191f11d571f15d80b6e265d1712d01cf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
148
flake.nix
148
flake.nix
@ -20,14 +20,17 @@
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows =
|
inputs.nixpkgs.follows =
|
||||||
"nixpkgs"; # Use system packages list where available
|
"nixpkgs"; # Use system packages list for their inputs
|
||||||
};
|
};
|
||||||
|
|
||||||
# Community packages; used for Firefox extensions
|
# Community packages; used for Firefox extensions
|
||||||
nur.url = "github:nix-community/nur";
|
nur.url = "github:nix-community/nur";
|
||||||
|
|
||||||
# Use official Firefox binary for macOS
|
# Use official Firefox binary for macOS
|
||||||
firefox-darwin.url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
firefox-darwin = {
|
||||||
|
url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# Manage disk format and partitioning
|
# Manage disk format and partitioning
|
||||||
disko = {
|
disko = {
|
||||||
@ -54,11 +57,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Nix language server
|
# Nix language server
|
||||||
nil.url = "github:oxalica/nil";
|
nil = {
|
||||||
|
url = "github:oxalica/nil/2023-04-03";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# Neovim plugins
|
# Neovim plugins
|
||||||
nvim-lspconfig-src = {
|
nvim-lspconfig-src = {
|
||||||
url = "github:neovim/nvim-lspconfig";
|
url = "github:neovim/nvim-lspconfig/v0.1.6";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
cmp-nvim-lsp-src = {
|
cmp-nvim-lsp-src = {
|
||||||
@ -70,15 +76,15 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
Comment-nvim-src = {
|
Comment-nvim-src = {
|
||||||
url = "github:numToStr/Comment.nvim";
|
url = "github:numToStr/Comment.nvim/v0.8.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nvim-treesitter-src = {
|
nvim-treesitter-src = {
|
||||||
url = "github:nvim-treesitter/nvim-treesitter/v0.8.5.2";
|
url = "github:nvim-treesitter/nvim-treesitter/v0.9.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
telescope-nvim-src = {
|
telescope-nvim-src = {
|
||||||
url = "github:nvim-telescope/telescope.nvim";
|
url = "github:nvim-telescope/telescope.nvim/0.1.2";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
telescope-project-nvim-src = {
|
telescope-project-nvim-src = {
|
||||||
@ -86,26 +92,41 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
toggleterm-nvim-src = {
|
toggleterm-nvim-src = {
|
||||||
url = "github:akinsho/toggleterm.nvim";
|
url = "github:akinsho/toggleterm.nvim/v2.7.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
bufferline-nvim-src = {
|
bufferline-nvim-src = {
|
||||||
url = "github:akinsho/bufferline.nvim";
|
url = "github:akinsho/bufferline.nvim/v4.2.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nvim-tree-lua-src = {
|
nvim-tree-lua-src = {
|
||||||
url = "github:kyazdani42/nvim-tree.lua";
|
url = "github:kyazdani42/nvim-tree.lua";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
vscode-terraform-snippets = {
|
||||||
|
url = "github:run-at-scale/vscode-terraform-doc-snippets";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, ... }@inputs:
|
outputs = { self, nixpkgs, ... }@inputs:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
# Common overlays to always use
|
||||||
|
overlays = [
|
||||||
|
inputs.nur.overlay
|
||||||
|
inputs.nix2vim.overlay
|
||||||
|
(import ./overlays/neovim-plugins.nix inputs)
|
||||||
|
(import ./overlays/calibre-web.nix)
|
||||||
|
(import ./overlays/disko.nix inputs)
|
||||||
|
(import ./overlays/tree-sitter.nix inputs)
|
||||||
|
];
|
||||||
|
|
||||||
# Global configuration for my systems
|
# Global configuration for my systems
|
||||||
globals = rec {
|
globals = let baseName = "masu.rs";
|
||||||
|
in rec {
|
||||||
user = "noah";
|
user = "noah";
|
||||||
fullName = "Noah Masur";
|
fullName = "Noah Masur";
|
||||||
gitName = fullName;
|
gitName = fullName;
|
||||||
@ -114,17 +135,19 @@
|
|||||||
mail.imapHost = "imap.purelymail.com";
|
mail.imapHost = "imap.purelymail.com";
|
||||||
mail.smtpHost = "smtp.purelymail.com";
|
mail.smtpHost = "smtp.purelymail.com";
|
||||||
dotfilesRepo = "git@github.com:nmasur/dotfiles";
|
dotfilesRepo = "git@github.com:nmasur/dotfiles";
|
||||||
|
nixpkgs.overlays = overlays;
|
||||||
|
hostnames = {
|
||||||
|
git = "git.${baseName}";
|
||||||
|
metrics = "metrics.${baseName}";
|
||||||
|
prometheus = "prom.${baseName}";
|
||||||
|
secrets = "vault.${baseName}";
|
||||||
|
stream = "stream.${baseName}";
|
||||||
|
content = "cloud.${baseName}";
|
||||||
|
books = "books.${baseName}";
|
||||||
|
download = "download.${baseName}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Common overlays to always use
|
|
||||||
overlays = [
|
|
||||||
inputs.nur.overlay
|
|
||||||
inputs.nix2vim.overlay
|
|
||||||
(import ./overlays/neovim-plugins.nix inputs)
|
|
||||||
(import ./overlays/lib.nix)
|
|
||||||
(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" ];
|
||||||
@ -134,23 +157,29 @@
|
|||||||
|
|
||||||
in rec {
|
in rec {
|
||||||
|
|
||||||
|
nixosModules = {
|
||||||
|
globals = { config }: { config = globals; };
|
||||||
|
common = import ./modules/common;
|
||||||
|
nixos = import ./modules/nixos;
|
||||||
|
darwin = import ./modules/darwin;
|
||||||
|
};
|
||||||
|
|
||||||
# Contains my full system builds, including home-manager
|
# Contains my full system builds, including home-manager
|
||||||
# nixos-rebuild switch --flake .#tempest
|
# nixos-rebuild switch --flake .#tempest
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
tempest = import ./hosts/tempest { inherit self; };
|
||||||
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
hydra = import ./hosts/hydra { inherit self; };
|
||||||
flame = import ./hosts/flame { inherit inputs globals overlays; };
|
flame = import ./hosts/flame { inherit self; };
|
||||||
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
swan = import ./hosts/swan { inherit self; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# Contains my full Mac system builds, including home-manager
|
# Contains my full Mac system builds, including home-manager
|
||||||
# darwin-rebuild switch --flake .#lookingglass
|
# darwin-rebuild switch --flake .#lookingglass
|
||||||
darwinConfigurations = {
|
darwinConfigurations = {
|
||||||
lookingglass =
|
lookingglass = import ./hosts/lookingglass { inherit self; };
|
||||||
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# For quickly applying local settings with:
|
# For quickly applying home-manager settings with:
|
||||||
# home-manager switch --flake .#tempest
|
# home-manager switch --flake .#tempest
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
tempest =
|
tempest =
|
||||||
@ -162,41 +191,29 @@
|
|||||||
# Disk formatting, only used once
|
# Disk formatting, only used once
|
||||||
diskoConfigurations = { root = import ./disks/root.nix; };
|
diskoConfigurations = { root = import ./disks/root.nix; };
|
||||||
|
|
||||||
# Other packages, such as system images or programs
|
packages = let
|
||||||
packages = forAllSystems (system: {
|
aws = system: import ./hosts/aws { inherit self system; };
|
||||||
|
staff = system: import ./hosts/staff { inherit self system; };
|
||||||
# Package servers into images with a generator
|
neovim = system:
|
||||||
aws = {
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
"${system}" =
|
in import ./modules/common/neovim/package {
|
||||||
import ./generators/aws { inherit inputs globals system overlays; };
|
inherit pkgs;
|
||||||
};
|
colors = (import ./colorscheme/gruvbox-dark).dark;
|
||||||
staff = {
|
|
||||||
"${system}" = import ./generators/staff {
|
|
||||||
inherit inputs globals system overlays;
|
|
||||||
};
|
};
|
||||||
};
|
in {
|
||||||
|
x86_64-linux.aws = aws "x86_64-linux";
|
||||||
|
x86_64-linux.staff = staff "x86_64-linux";
|
||||||
|
|
||||||
# Package Neovim config into standalone package
|
# Package Neovim config into standalone package
|
||||||
neovim = let pkgs = import nixpkgs { inherit system overlays; };
|
x86_64-linux.neovim = neovim "x86_64-linux";
|
||||||
in import ./modules/common/neovim/package {
|
x86_64-darwin.neovim = neovim "x86_64-darwin";
|
||||||
inherit pkgs;
|
aarch64-linux.neovim = neovim "aarch64-linux";
|
||||||
colors =
|
aarch64-darwin.neovim = neovim "aarch64-darwin";
|
||||||
import ./colorscheme/gruvbox/neovim-gruvbox.nix { inherit pkgs; };
|
};
|
||||||
};
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
# Programs that can be run by calling this flake
|
# Programs that can be run by calling this flake
|
||||||
apps = forAllSystems (system:
|
apps = forAllSystems (system:
|
||||||
let
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
pkgs = import nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
overlays = overlays ++ [
|
|
||||||
(final: prev: {
|
|
||||||
disko-packaged = inputs.disko.packages.${system}.disko;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in import ./apps { inherit pkgs; });
|
in import ./apps { inherit pkgs; });
|
||||||
|
|
||||||
# Development environments
|
# Development environments
|
||||||
@ -209,25 +226,6 @@
|
|||||||
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
||||||
};
|
};
|
||||||
|
|
||||||
test = pkgs.mkShell { buildInputs = with pkgs; [ age ]; };
|
|
||||||
|
|
||||||
# Used for cloud and systems development and administration
|
|
||||||
devops = pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
git
|
|
||||||
terraform
|
|
||||||
consul
|
|
||||||
vault
|
|
||||||
awscli2
|
|
||||||
google-cloud-sdk
|
|
||||||
ansible
|
|
||||||
kubectl
|
|
||||||
kubernetes-helm
|
|
||||||
kustomize
|
|
||||||
fluxcd
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
# Templates for starting other projects quickly
|
# Templates for starting other projects quickly
|
||||||
|
@ -1,47 +0,0 @@
|
|||||||
# The Staff
|
|
||||||
# ISO configuration for my USB drive
|
|
||||||
|
|
||||||
{ inputs, system, overlays, ... }:
|
|
||||||
|
|
||||||
with inputs;
|
|
||||||
|
|
||||||
nixos-generators.nixosGenerate {
|
|
||||||
inherit system;
|
|
||||||
format = "install-iso";
|
|
||||||
modules = [{
|
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
networking.hostName = "staff";
|
|
||||||
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
|
|
||||||
];
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
ports = [ 22 ];
|
|
||||||
allowSFTP = true;
|
|
||||||
settings = {
|
|
||||||
GatewayPorts = "no";
|
|
||||||
X11Forwarding = false;
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
PermitRootLogin = "yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment.systemPackages =
|
|
||||||
let pkgs = import inputs.nixpkgs { inherit system overlays; };
|
|
||||||
in with pkgs; [
|
|
||||||
git
|
|
||||||
vim
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
(import ../../modules/common/neovim/package {
|
|
||||||
inherit pkgs;
|
|
||||||
# colors = import ../../colorscheme/gruvbox.dark.neovimConfig {
|
|
||||||
# inherit pkgs;
|
|
||||||
# };
|
|
||||||
})
|
|
||||||
];
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
warn-dirty = false
|
|
||||||
'';
|
|
||||||
}];
|
|
||||||
}
|
|
@ -2,9 +2,11 @@
|
|||||||
|
|
||||||
| Host | Purpose |
|
| Host | Purpose |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
| [aws](./aws/default.nix) | AWS AMI |
|
||||||
|
| [staff](./staff/default.nix) | Live USB stick |
|
||||||
| [flame](./flame/default.nix) | Oracle cloud server |
|
| [flame](./flame/default.nix) | Oracle cloud server |
|
||||||
| [hydra](./hydra/default.nix) | WSL config |
|
| [hydra](./hydra/default.nix) | WSL config |
|
||||||
| [lookingglass](./lookingglass/default.nix) | Work macOS |
|
| [lookingglass](./lookingglass/default.nix) | Work MacBook |
|
||||||
| [swan](./swan/default.nix) | Home NAS and server |
|
| [swan](./swan/default.nix) | Home server |
|
||||||
| [tempest](./tempest/default.nix) | Desktop |
|
| [tempest](./tempest/default.nix) | Linux desktop |
|
||||||
|
|
||||||
|
@ -1,30 +1,23 @@
|
|||||||
{ inputs, globals, ... }:
|
{ self, system, ... }:
|
||||||
|
|
||||||
with inputs;
|
self.inputs.nixos-generators.nixosGenerate {
|
||||||
|
|
||||||
nixos-generators.nixosGenerate {
|
|
||||||
inherit system;
|
inherit system;
|
||||||
format = "amazon";
|
format = "amazon";
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
self.inputs.home-manager.nixosModules.home-manager
|
||||||
|
self.nixosModules.globals
|
||||||
|
self.nixosModules.common
|
||||||
|
self.nixosModules.nixos
|
||||||
{
|
{
|
||||||
user = globals.user;
|
|
||||||
fullName = globals.fullName;
|
|
||||||
dotfilesRepo = globals.dotfilesRepo;
|
|
||||||
gitName = globals.gitName;
|
|
||||||
gitEmail = globals.gitEmail;
|
|
||||||
networking.hostName = "sheep";
|
networking.hostName = "sheep";
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
colorscheme = (import ../colorscheme/gruvbox);
|
theme.colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
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";
|
||||||
}
|
}
|
||||||
../../modules/common
|
|
||||||
../../modules/nixos
|
|
||||||
../../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; })
|
@ -1,7 +1,6 @@
|
|||||||
name: 'Terraform'
|
name: 'Terraform'
|
||||||
env:
|
env:
|
||||||
|
|
||||||
|
|
||||||
AWS_ACCOUNT_NUMBER: ''
|
AWS_ACCOUNT_NUMBER: ''
|
||||||
AWS_PLAN_ROLE_NAME: github_actions_plan
|
AWS_PLAN_ROLE_NAME: github_actions_plan
|
||||||
AWS_APPLY_ROLE_NAME: github_actions_admin
|
AWS_APPLY_ROLE_NAME: github_actions_admin
|
||||||
@ -82,15 +81,14 @@ jobs:
|
|||||||
|
|
||||||
# Downloads the current repo code to the runner.
|
# Downloads the current repo code to the runner.
|
||||||
- name: Checkout Repo Code
|
- name: Checkout Repo Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Install Nix
|
# Enable access to KVM, required to build an image
|
||||||
- name: Install Nix
|
- name: Enable KVM group perms
|
||||||
uses: cachix/install-nix-action@v17
|
run: |
|
||||||
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||||
# Build the image
|
sudo udevadm control --reload-rules
|
||||||
- name: Build Image
|
sudo udevadm trigger --name-match=kvm
|
||||||
run: nix build .#aws
|
|
||||||
|
|
||||||
# Login to AWS
|
# Login to AWS
|
||||||
- name: AWS Assume Role
|
- name: AWS Assume Role
|
||||||
@ -99,6 +97,28 @@ jobs:
|
|||||||
role-to-assume: ${{ env.AWS_ROLE_ARN }}
|
role-to-assume: ${{ env.AWS_ROLE_ARN }}
|
||||||
aws-region: ${{ env.AWS_REGION }}
|
aws-region: ${{ env.AWS_REGION }}
|
||||||
|
|
||||||
|
# Install Nix
|
||||||
|
- name: Install Nix
|
||||||
|
uses: cachix/install-nix-action@v17
|
||||||
|
with:
|
||||||
|
extra_nix_config: |
|
||||||
|
substituters = s3://insert-cache-bucket https://cache.nixos.org/
|
||||||
|
trusted-public-keys = insert-cache-bucket:M6PsZjHXcLvbQyPUBLICKEYGVoNwI84g1FBQzouRU= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
|
||||||
|
|
||||||
|
# Build the image
|
||||||
|
- name: Build Image
|
||||||
|
run: nix build .#aws
|
||||||
|
|
||||||
|
# Copy the image to S3
|
||||||
|
- name: Upload Image to Cache
|
||||||
|
env:
|
||||||
|
NIX_CACHE_PRIVATE_KEY: ${{ secrets.NIX_CACHE_PRIVATE_KEY }}
|
||||||
|
run: |
|
||||||
|
echo "$NIX_CACHE_PRIVATE_KEY" > cache.key
|
||||||
|
nix store sign --key-file cache.key $(readlink result)
|
||||||
|
nix copy --to s3://t2-aws-nixos-test $(readlink result)
|
||||||
|
rm cache.key
|
||||||
|
|
||||||
# Exports all GitHub Secrets as environment variables prefixed by
|
# Exports all GitHub Secrets as environment variables prefixed by
|
||||||
# "TF_VAR_", which exposes them to Terraform. The name of each GitHub
|
# "TF_VAR_", which exposes them to Terraform. The name of each GitHub
|
||||||
# Secret must match its Terraform variable name exactly.
|
# Secret must match its Terraform variable name exactly.
|
@ -4,42 +4,65 @@
|
|||||||
# 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, ... }:
|
{ self, ... }:
|
||||||
|
|
||||||
with inputs;
|
self.inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
./hardware-configuration.nix
|
self.inputs.home-manager.nixosModules.home-manager
|
||||||
../../modules/common
|
self.nixosModules.globals
|
||||||
../../modules/nixos
|
self.nixosModules.common
|
||||||
(removeAttrs globals [ "mail.server" ])
|
self.nixosModules.nixos
|
||||||
wsl.nixosModules.wsl
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
{
|
||||||
|
# Hardware
|
||||||
server = true;
|
server = true;
|
||||||
|
networking.hostName = "flame";
|
||||||
|
|
||||||
|
imports =
|
||||||
|
[ (self.inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/D5CA-237A";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Theming
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
wsl.enable = false;
|
|
||||||
caddy.enable = true;
|
|
||||||
|
|
||||||
# FQDNs for various services
|
|
||||||
networking.hostName = "flame";
|
|
||||||
bookServer = "books.masu.rs";
|
|
||||||
# streamServer = "stream.masu.rs";
|
|
||||||
nextcloudServer = "cloud.masu.rs";
|
|
||||||
transmissionServer = "download.masu.rs";
|
|
||||||
metricsServer = "metrics.masu.rs";
|
|
||||||
vaultwardenServer = "vault.masu.rs";
|
|
||||||
giteaServer = "git.masu.rs";
|
|
||||||
|
|
||||||
# Disable passwords, only use SSH key
|
# Disable passwords, only use SSH key
|
||||||
publicKey =
|
publicKey =
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
|
|
||||||
|
# Programs and services
|
||||||
|
cloudflare.enable = true; # Proxy traffic with Cloudflare
|
||||||
|
dotfiles.enable = true; # Clone dotfiles
|
||||||
|
neovim.enable = true;
|
||||||
|
|
||||||
|
services.caddy.enable = true;
|
||||||
|
services.grafana.enable = true;
|
||||||
|
services.prometheus.enable = true;
|
||||||
|
services.gitea.enable = true;
|
||||||
|
services.vaultwarden.enable = true;
|
||||||
|
services.minecraft-server.enable = true; # Setup Minecraft server
|
||||||
|
|
||||||
|
cloudflareTunnel = {
|
||||||
|
enable = true;
|
||||||
|
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
||||||
|
credentialsFile = ../../private/cloudflared-flame.age;
|
||||||
|
ca =
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK/6oyVqjFGX3Uvrc3VS8J9sphxzAnRzKC85xgkHfYgR3TK6qBGXzHrknEj21xeZrr3G2y1UsGzphWJd9ZfIcdA= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
|
||||||
|
giteaRunner.enable = true;
|
||||||
|
|
||||||
# Nextcloud backup config
|
# Nextcloud backup config
|
||||||
backup.s3 = {
|
backup.s3 = {
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||||
@ -47,51 +70,37 @@ nixpkgs.lib.nixosSystem {
|
|||||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Grant access to Jellyfin directories from Nextcloud
|
# # Wireguard config for Transmission
|
||||||
users.users.nextcloud.extraGroups = [ "jellyfin" ];
|
# wireguard.enable = true;
|
||||||
|
# networking.wireguard.interfaces.wg0 = {
|
||||||
|
#
|
||||||
|
# # The local IPs for this machine within the Wireguard network
|
||||||
|
# # Any inbound traffic bound for these IPs should be kept on localhost
|
||||||
|
# ips = [ "10.66.13.200/32" "fc00:bbbb:bbbb:bb01::3:dc7/128" ];
|
||||||
|
#
|
||||||
|
# peers = [{
|
||||||
|
#
|
||||||
|
# # Identity of Wireguard target peer (VPN)
|
||||||
|
# publicKey = "bOOP5lIjqCdDx5t+mP/kEcSbHS4cZqE0rMlBI178lyY=";
|
||||||
|
#
|
||||||
|
# # The public internet address of the target peer
|
||||||
|
# endpoint = "86.106.143.132:51820";
|
||||||
|
#
|
||||||
|
# # Which outgoing IP ranges should be sent through Wireguard
|
||||||
|
# allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
||||||
|
#
|
||||||
|
# # Send heartbeat signal within the network
|
||||||
|
# persistentKeepalive = 25;
|
||||||
|
#
|
||||||
|
# }];
|
||||||
|
#
|
||||||
|
# };
|
||||||
|
|
||||||
# Wireguard config for Transmission
|
# # VPN port forwarding
|
||||||
wireguard.enable = true;
|
# services.transmission.settings.peer-port = 57599;
|
||||||
networking.wireguard.interfaces.wg0 = {
|
|
||||||
|
|
||||||
# The local IPs for this machine within the Wireguard network
|
# # Grant access to Transmission directories from Jellyfin
|
||||||
# Any inbound traffic bound for these IPs should be kept on localhost
|
# users.users.jellyfin.extraGroups = [ "transmission" ];
|
||||||
ips = [ "10.66.13.200/32" "fc00:bbbb:bbbb:bb01::3:dc7/128" ];
|
|
||||||
|
|
||||||
peers = [{
|
|
||||||
|
|
||||||
# Identity of Wireguard target peer (VPN)
|
|
||||||
publicKey = "bOOP5lIjqCdDx5t+mP/kEcSbHS4cZqE0rMlBI178lyY=";
|
|
||||||
|
|
||||||
# The public internet address of the target peer
|
|
||||||
endpoint = "86.106.143.132:51820";
|
|
||||||
|
|
||||||
# Which outgoing IP ranges should be sent through Wireguard
|
|
||||||
allowedIPs = [ "0.0.0.0/0" "::0/0" ];
|
|
||||||
|
|
||||||
# Send heartbeat signal within the network
|
|
||||||
persistentKeepalive = 25;
|
|
||||||
|
|
||||||
}];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# VPN port forwarding
|
|
||||||
services.transmission.settings.peer-port = 57599;
|
|
||||||
|
|
||||||
# Grant access to Transmission directories from Jellyfin
|
|
||||||
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;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -1,34 +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.
|
|
||||||
{ lib, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/D5CA-237A";
|
|
||||||
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.eth0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
|
|
||||||
}
|
|
@ -1,31 +1,27 @@
|
|||||||
# The Hydra
|
# The Hydra
|
||||||
# System configuration for WSL
|
# System configuration for WSL
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ self, ... }:
|
||||||
|
|
||||||
with inputs;
|
self.inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
../../modules/common
|
self.inputs.wsl.nixosModules.wsl
|
||||||
../../modules/nixos
|
self.inputs.home-manager.nixosModules.home-manager
|
||||||
globals
|
self.nixosModules.globals
|
||||||
wsl.nixosModules.wsl
|
self.nixosModules.common
|
||||||
home-manager.nixosModules.home-manager
|
self.nixosModules.nixos
|
||||||
|
self.nixosModules.wsl
|
||||||
{
|
{
|
||||||
networking.hostName = "hydra";
|
networking.hostName = "hydra";
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
# Set registry to flake packages, used for nix X commands
|
|
||||||
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 ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
passwordHash = nixpkgs.lib.fileContents ../../password.sha512;
|
passwordHash = inputs.nixpkgs.lib.fileContents ../../password.sha512;
|
||||||
wsl = {
|
wsl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wslConf.automount.root = "/mnt";
|
wslConf.automount.root = "/mnt";
|
||||||
|
@ -1,50 +1,46 @@
|
|||||||
# The Looking Glass
|
# The Looking Glass
|
||||||
# System configuration for my work Macbook
|
# System configuration for my work Macbook
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ self, ... }:
|
||||||
|
|
||||||
with inputs;
|
self.inputs.darwin.lib.darwinSystem {
|
||||||
|
|
||||||
darwin.lib.darwinSystem {
|
|
||||||
system = "x86_64-darwin";
|
system = "x86_64-darwin";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
../../modules/common
|
self.inputs.home-manager.darwinModules.home-manager
|
||||||
../../modules/darwin
|
self.nixosModules.common
|
||||||
(globals // rec {
|
self.nixosModules.darwin
|
||||||
user = "Noah.Masur";
|
({ config, lib, ... }: {
|
||||||
gitName = "Noah-Masur_1701";
|
config = rec {
|
||||||
gitEmail = "${user}@take2games.com";
|
user = lib.mkForce "Noah.Masur";
|
||||||
})
|
gitName = lib.mkForce "Noah-Masur_1701";
|
||||||
home-manager.darwinModules.home-manager
|
gitEmail = lib.mkForce "${user}@take2games.com";
|
||||||
{
|
nixpkgs.overlays = [ self.inputs.firefox-darwin.overlay ];
|
||||||
networking.hostName = "lookingglass";
|
networking.hostName = "lookingglass";
|
||||||
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
identityFile = "/Users/${user}/.ssh/id_ed25519";
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
|
};
|
||||||
|
mail.user = globals.user;
|
||||||
|
charm.enable = true;
|
||||||
|
neovim.enable = true;
|
||||||
|
mail.enable = true;
|
||||||
|
mail.aerc.enable = true;
|
||||||
|
mail.himalaya.enable = false;
|
||||||
|
kitty.enable = true;
|
||||||
|
discord.enable = true;
|
||||||
|
firefox.enable = true;
|
||||||
|
dotfiles.enable = true;
|
||||||
|
nixlang.enable = true;
|
||||||
|
terraform.enable = true;
|
||||||
|
python.enable = true;
|
||||||
|
lua.enable = true;
|
||||||
|
kubernetes.enable = true;
|
||||||
|
_1password.enable = true;
|
||||||
|
slack.enable = 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;
|
|
||||||
charm.enable = true;
|
|
||||||
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;
|
|
||||||
slack.enable = true;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
45
hosts/staff/default.nix
Normal file
45
hosts/staff/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# The Staff
|
||||||
|
# ISO configuration for my USB drive
|
||||||
|
|
||||||
|
{ self, system, ... }:
|
||||||
|
|
||||||
|
self.inputs.nixos-generators.nixosGenerate {
|
||||||
|
inherit system;
|
||||||
|
format = "install-iso";
|
||||||
|
modules = [
|
||||||
|
self.nixosModules.global
|
||||||
|
self.nixosModules.common
|
||||||
|
self.nixosModules.nixos
|
||||||
|
({ config, pkgs, ... }: {
|
||||||
|
networking.hostName = "staff";
|
||||||
|
users.extraUsers.root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s"
|
||||||
|
];
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 22 ];
|
||||||
|
allowSFTP = true;
|
||||||
|
settings = {
|
||||||
|
GatewayPorts = "no";
|
||||||
|
X11Forwarding = false;
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
PermitRootLogin = "yes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
vim
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
(import ../../modules/common/neovim/package {
|
||||||
|
inherit pkgs;
|
||||||
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
warn-dirty = false
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
@ -1,49 +1,70 @@
|
|||||||
# The Swan
|
# The Swan
|
||||||
# System configuration for my home NAS server
|
# System configuration for my home NAS server
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ self, ... }:
|
||||||
|
|
||||||
with inputs;
|
self.inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
specialArgs = { };
|
||||||
modules = [
|
modules = [
|
||||||
./hardware-configuration.nix
|
self.inputs.home-manager.nixosModules.home-manager
|
||||||
../../modules/common
|
self.inputs.disko.nixosModules.disko
|
||||||
../../modules/nixos
|
self.nixosModules.globals
|
||||||
globals
|
self.nixosModules.common
|
||||||
wsl.nixosModules.wsl
|
self.nixosModules.nixos
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
disko.nixosModules.disko
|
|
||||||
{
|
{
|
||||||
|
# Hardware
|
||||||
server = true;
|
server = true;
|
||||||
networking.hostName = "swan";
|
networking.hostName = "swan";
|
||||||
|
|
||||||
# head -c 8 /etc/machine-id
|
boot.initrd.availableKernelModules =
|
||||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
|
||||||
|
# Required for transcoding
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"radeon.si_support=0"
|
||||||
|
"amdgpu.si_support=1"
|
||||||
|
"radeon.cik_support=0"
|
||||||
|
"amdgpu.cik_support=1"
|
||||||
|
"amdgpu.dc=1"
|
||||||
|
];
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
|
# ZFS
|
||||||
zfs.enable = true;
|
zfs.enable = true;
|
||||||
|
# Generated with: head -c 8 /etc/machine-id
|
||||||
|
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||||
disko = {
|
disko = {
|
||||||
enableConfig = true;
|
enableConfig = true;
|
||||||
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
||||||
# // (import ../../disks/zfs.nix {
|
|
||||||
# pool = "tank";
|
|
||||||
# disks = [ "/dev/sda" "/dev/sdb" "/dev/sdc" ];
|
|
||||||
# });
|
|
||||||
};
|
};
|
||||||
boot.zfs.extraPools = [ "tank" ];
|
boot.zfs.extraPools = [ "tank" ];
|
||||||
|
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
caddy.enable = true;
|
cloudflare.enable = true;
|
||||||
streamServer = "stream.masu.rs";
|
dotfiles.enable = true;
|
||||||
nextcloudServer = "cloud.masu.rs";
|
arrs.enable = true;
|
||||||
bookServer = "books.masu.rs";
|
|
||||||
arrServer = "download.masu.rs";
|
services.caddy.enable = true;
|
||||||
samba.enable = true;
|
services.jellyfin.enable = true;
|
||||||
|
services.nextcloud.enable = true;
|
||||||
|
services.calibre-web.enable = true;
|
||||||
|
services.prometheus.enable = true;
|
||||||
|
services.samba.enable = true;
|
||||||
|
|
||||||
|
cloudflareTunnel = {
|
||||||
|
enable = true;
|
||||||
|
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
||||||
|
credentialsFile = ../../private/cloudflared-swan.age;
|
||||||
|
ca =
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
|
||||||
backup.s3 = {
|
backup.s3 = {
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||||
@ -54,12 +75,6 @@ nixpkgs.lib.nixosSystem {
|
|||||||
# Disable passwords, only use SSH key
|
# Disable passwords, only use SSH key
|
||||||
publicKey =
|
publicKey =
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
|
|
||||||
# Clone dotfiles
|
|
||||||
dotfiles.enable = true;
|
|
||||||
|
|
||||||
# services.nfs.server.enable = true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,39 +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" "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 = [ ];
|
|
||||||
|
|
||||||
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
|
||||||
hardware.cpu.intel.updateMicrocode =
|
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
@ -1,41 +1,72 @@
|
|||||||
# The Tempest
|
# The Tempest
|
||||||
# System configuration for my desktop
|
# System configuration for my desktop
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ self, ... }:
|
||||||
|
|
||||||
with inputs;
|
self.inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { };
|
|
||||||
modules = [
|
modules = [
|
||||||
./hardware-configuration.nix
|
self.inputs.home-manager.nixosModules.home-manager
|
||||||
../../modules/common
|
self.nixosModules.globals
|
||||||
../../modules/nixos
|
self.nixosModules.common
|
||||||
globals
|
self.nixosModules.nixos
|
||||||
wsl.nixosModules.wsl
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
{
|
||||||
|
# Hardware
|
||||||
physical = true;
|
physical = true;
|
||||||
networking.hostName = "tempest";
|
networking.hostName = "tempest";
|
||||||
nixpkgs.overlays = [ nur.overlay ] ++ overlays;
|
|
||||||
# Set registry to flake packages, used for nix X commands
|
boot.initrd.availableKernelModules =
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
hardware.fancontrol.enable = true;
|
||||||
|
hardware.fancontrol.config = ''
|
||||||
|
# Configuration file generated by pwmconfig, changes will be lost
|
||||||
|
INTERVAL=10
|
||||||
|
DEVPATH=hwmon0=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
||||||
|
DEVNAME=hwmon0=amdgpu
|
||||||
|
FCTEMPS=hwmon0/pwm1=hwmon0/temp1_input
|
||||||
|
FCFANS= hwmon0/pwm1=hwmon0/fan1_input
|
||||||
|
MINTEMP=hwmon0/pwm1=50
|
||||||
|
MAXTEMP=hwmon0/pwm1=70
|
||||||
|
MINSTART=hwmon0/pwm1=100
|
||||||
|
MINSTOP=hwmon0/pwm1=10
|
||||||
|
MINPWM=hwmon0/pwm1=10
|
||||||
|
MAXPWM=hwmon0/pwm1=240
|
||||||
|
'';
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/boot";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Must be prepared ahead
|
||||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||||
|
passwordHash = self.inputs.nixpkgs.lib.fileContents ../../password.sha512;
|
||||||
|
|
||||||
|
# Theming
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
wallpaper = "${wallpapers}/gruvbox/road.jpg";
|
wallpaper = "${self.inputs.wallpapers}/gruvbox/road.jpg";
|
||||||
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
|
gtk.theme.name = self.inputs.nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||||
passwordHash = nixpkgs.lib.fileContents ../../password.sha512;
|
|
||||||
wsl.enable = false;
|
|
||||||
publicKey = null;
|
|
||||||
|
|
||||||
|
# Programs and services
|
||||||
charm.enable = true;
|
charm.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
media.enable = true;
|
media.enable = true;
|
||||||
|
dotfiles.enable = true;
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
_1password.enable = true;
|
_1password.enable = true;
|
||||||
@ -46,17 +77,25 @@ nixpkgs.lib.nixosSystem {
|
|||||||
mail.aerc.enable = true;
|
mail.aerc.enable = true;
|
||||||
mail.himalaya.enable = true;
|
mail.himalaya.enable = true;
|
||||||
keybase.enable = true;
|
keybase.enable = true;
|
||||||
# mullvad.enable = true;
|
mullvad.enable = false;
|
||||||
nixlang.enable = true;
|
nixlang.enable = true;
|
||||||
dotfiles.enable = true;
|
|
||||||
yt-dlp.enable = true;
|
yt-dlp.enable = true;
|
||||||
|
|
||||||
gaming = {
|
gaming = {
|
||||||
|
dwarf-fortress.enable = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
legendary.enable = true;
|
legendary.enable = true;
|
||||||
lutris.enable = true;
|
lutris.enable = true;
|
||||||
leagueoflegends.enable = true;
|
leagueoflegends.enable = true;
|
||||||
|
ryujinx.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
cloudflareTunnel = {
|
||||||
|
enable = true;
|
||||||
|
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||||
|
credentialsFile = ../../private/cloudflared-tempest.age;
|
||||||
|
ca =
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,56 +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, 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;
|
|
||||||
|
|
||||||
hardware.fancontrol.enable = true;
|
|
||||||
hardware.fancontrol.config = ''
|
|
||||||
# Configuration file generated by pwmconfig, changes will be lost
|
|
||||||
INTERVAL=10
|
|
||||||
DEVPATH=hwmon0=devices/pci0000:00/0000:00:03.1/0000:06:00.0/0000:07:00.0/0000:08:00.0
|
|
||||||
DEVNAME=hwmon0=amdgpu
|
|
||||||
FCTEMPS=hwmon0/pwm1=hwmon0/temp1_input
|
|
||||||
FCFANS= hwmon0/pwm1=hwmon0/fan1_input
|
|
||||||
MINTEMP=hwmon0/pwm1=50
|
|
||||||
MAXTEMP=hwmon0/pwm1=70
|
|
||||||
MINSTART=hwmon0/pwm1=100
|
|
||||||
MINSTOP=hwmon0/pwm1=10
|
|
||||||
MINPWM=hwmon0/pwm1=10
|
|
||||||
MAXPWM=hwmon0/pwm1=240
|
|
||||||
'';
|
|
||||||
}
|
|
@ -7,7 +7,6 @@
|
|||||||
./firefox.nix
|
./firefox.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./media.nix
|
./media.nix
|
||||||
./nautilus.nix
|
|
||||||
./obsidian.nix
|
./obsidian.nix
|
||||||
./qbittorrent.nix
|
./qbittorrent.nix
|
||||||
./slack.nix
|
./slack.nix
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
vimium
|
vimium
|
||||||
multi-account-containers
|
multi-account-containers
|
||||||
facebook-container
|
facebook-container
|
||||||
temporary-containers
|
|
||||||
(lib.mkIf config._1password.enable onepassword-password-manager)
|
(lib.mkIf config._1password.enable onepassword-password-manager)
|
||||||
okta-browser-plugin
|
okta-browser-plugin
|
||||||
sponsorblock
|
sponsorblock
|
||||||
@ -71,6 +70,9 @@
|
|||||||
"layout.css.color-mix.enabled" = true;
|
"layout.css.color-mix.enabled" = true;
|
||||||
"ui.systemUsesDarkTheme" =
|
"ui.systemUsesDarkTheme" =
|
||||||
if config.theme.dark == true then 1 else 0;
|
if config.theme.dark == true then 1 else 0;
|
||||||
|
"media.ffmpeg.vaapi.enabled" =
|
||||||
|
true; # Enable hardware video acceleration
|
||||||
|
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
||||||
};
|
};
|
||||||
userChrome = ''
|
userChrome = ''
|
||||||
:root {
|
:root {
|
||||||
|
@ -85,8 +85,7 @@
|
|||||||
# Scrollback
|
# Scrollback
|
||||||
scrolling_lines = 10000;
|
scrolling_lines = 10000;
|
||||||
scrollback_pager_history_size = 10; # MB
|
scrollback_pager_history_size = 10; # MB
|
||||||
scrollback_pager = ''
|
scrollback_pager = "${pkgs.neovim}/bin/nvim -c 'normal G'";
|
||||||
${pkgs.neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
|
|
||||||
|
|
||||||
# Window
|
# Window
|
||||||
window_padding_width = 6;
|
window_padding_width = 6;
|
||||||
|
@ -21,7 +21,10 @@
|
|||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bindings = { };
|
bindings = { };
|
||||||
config = { image-display-duration = 2; };
|
config = {
|
||||||
|
image-display-duration = 2;
|
||||||
|
hwdec = "auto-safe";
|
||||||
|
};
|
||||||
scripts = [
|
scripts = [
|
||||||
|
|
||||||
# Automatically load playlist entries before and after current file
|
# Automatically load playlist entries before and after current file
|
||||||
|
@ -14,6 +14,10 @@
|
|||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [ obsidian ];
|
home.packages = with pkgs; [ obsidian ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Broken on 2023-04-16
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [ "electron-21.4.0" ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,40 @@
|
|||||||
description = "List of unfree packages to allow.";
|
description = "List of unfree packages to allow.";
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
hostnames = {
|
||||||
|
git = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for git server (Gitea).";
|
||||||
|
};
|
||||||
|
metrics = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for metrics server.";
|
||||||
|
};
|
||||||
|
prometheus = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for Prometheus server.";
|
||||||
|
};
|
||||||
|
secrets = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for passwords and secrets (Vaultwarden).";
|
||||||
|
};
|
||||||
|
stream = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for video/media library (Jellyfin).";
|
||||||
|
};
|
||||||
|
content = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for personal content system (Nextcloud).";
|
||||||
|
};
|
||||||
|
books = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for books library (Calibre-Web).";
|
||||||
|
};
|
||||||
|
download = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for download services.";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let stateVersion = "23.05";
|
config = let stateVersion = "23.05";
|
||||||
@ -79,9 +113,16 @@
|
|||||||
warn-dirty = false
|
warn-dirty = false
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
|
||||||
# Add community Cachix to binary cache
|
# Add community Cachix to binary cache
|
||||||
|
# Don't use with macOS because blocked by corporate firewall
|
||||||
|
builders-use-substitutes = true;
|
||||||
substituters = lib.mkIf (!pkgs.stdenv.isDarwin)
|
substituters = lib.mkIf (!pkgs.stdenv.isDarwin)
|
||||||
[ "https://nix-community.cachix.org" ];
|
[ "https://nix-community.cachix.org" ];
|
||||||
trusted-public-keys = lib.mkIf (!pkgs.stdenv.isDarwin) [
|
trusted-public-keys = lib.mkIf (!pkgs.stdenv.isDarwin) [
|
||||||
|
@ -154,20 +154,16 @@
|
|||||||
general.unsafe-accounts-conf = true;
|
general.unsafe-accounts-conf = true;
|
||||||
viewer = { pager = "${pkgs.less}/bin/less -R"; };
|
viewer = { pager = "${pkgs.less}/bin/less -R"; };
|
||||||
filters = {
|
filters = {
|
||||||
"text/plain" =
|
"text/plain" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/share/aerc/filters/colorize";
|
|
||||||
"text/calendar" =
|
"text/calendar" =
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/share/aerc/filters/calendar";
|
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/libexec/aerc/filters/calendar";
|
||||||
"text/html" =
|
"text/html" =
|
||||||
"${pkgs.aerc}/share/aerc/filters/html"; # Requires w3m, dante
|
"${pkgs.aerc}/libexec/aerc/filters/html | ${pkgs.aerc}/libexec/aerc/filters/colorize"; # Requires w3m, dante
|
||||||
# "text/html" =
|
|
||||||
# "${pkgs.aerc}/share/aerc/filters/html | ${pkgs.aerc}/share/aerc/filters/colorize";
|
|
||||||
# "text/*" =
|
# "text/*" =
|
||||||
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
|
# ''${pkgs.bat}/bin/bat -fP --file-name="$AERC_FILENAME "'';
|
||||||
"message/delivery-status" =
|
"message/delivery-status" =
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/share/aerc/filters/colorize";
|
"${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
"message/rfc822" =
|
"message/rfc822" = "${pkgs.aerc}/libexec/aerc/filters/colorize";
|
||||||
"${pkgs.gawk}/bin/awk -f ${pkgs.aerc}/share/aerc/filters/colorize";
|
|
||||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||||
"application/pdf" = "${pkgs.zathura}/bin/zathura -";
|
"application/pdf" = "${pkgs.zathura}/bin/zathura -";
|
||||||
"audio/*" = "${pkgs.mpv}/bin/mpv -";
|
"audio/*" = "${pkgs.mpv}/bin/mpv -";
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
frequency = "*:0/5";
|
frequency = "*:0/5";
|
||||||
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
||||||
};
|
};
|
||||||
services.imapnotify.enable = pkgs.stdenv.isLinux && config.physical;
|
services.imapnotify.enable = pkgs.stdenv.isLinux;
|
||||||
programs.notmuch.enable = true;
|
programs.notmuch.enable = true;
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
maildirBasePath = "${config.homePath}/mail";
|
maildirBasePath = "${config.homePath}/mail";
|
||||||
@ -50,8 +50,6 @@
|
|||||||
];
|
];
|
||||||
alot = { };
|
alot = { };
|
||||||
flavor = "plain";
|
flavor = "plain";
|
||||||
folders = { };
|
|
||||||
getmail = { };
|
|
||||||
imap = {
|
imap = {
|
||||||
host = config.mail.imapHost;
|
host = config.mail.imapHost;
|
||||||
port = 993;
|
port = 993;
|
||||||
@ -61,7 +59,8 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
boxes = [ "Inbox" ];
|
boxes = [ "Inbox" ];
|
||||||
onNotify = "${pkgs.isync}/bin/mbsync -a";
|
onNotify = "${pkgs.isync}/bin/mbsync -a";
|
||||||
onNotifyPost =
|
onNotifyPost = lib.mkIf
|
||||||
|
config.home-manager.users.${config.user}.services.dunst.enable
|
||||||
"${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
|
"${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
|
||||||
};
|
};
|
||||||
maildir = { path = "main"; };
|
maildir = { path = "main"; };
|
||||||
@ -75,11 +74,11 @@
|
|||||||
CopyArrivalDate = "yes"; # Sync time of original message
|
CopyArrivalDate = "yes"; # Sync time of original message
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mu.enable = false;
|
|
||||||
notmuch.enable = true;
|
notmuch.enable = true;
|
||||||
passwordCommand =
|
passwordCommand =
|
||||||
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
||||||
builtins.toString ../../../private/mailpass.age
|
pkgs.writeText "mailpass.age"
|
||||||
|
(builtins.readFile ../../../private/mailpass.age)
|
||||||
}";
|
}";
|
||||||
smtp = {
|
smtp = {
|
||||||
host = config.mail.smtpHost;
|
host = config.mail.smtpHost;
|
||||||
|
20
modules/common/neovim/config/colors.nix
Normal file
20
modules/common/neovim/config/colors.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
|
options.colors = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.str;
|
||||||
|
description = "Attrset of base16 colorscheme key value pairs.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
plugins = [ pkgs.vimPlugins.nvim-base16 ];
|
||||||
|
setup.base16-colorscheme = config.colors;
|
||||||
|
|
||||||
|
# Telescope isn't working, shut off for now
|
||||||
|
lua = ''
|
||||||
|
require('base16-colorscheme').with_config {
|
||||||
|
telescope = false,
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -135,6 +135,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
lua = ''
|
lua = ''
|
||||||
|
-- Load snippets
|
||||||
|
-- Check status: :lua require("luasnip").log.open()
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "${
|
||||||
|
builtins.toString pkgs.vscode-terraform-snippets
|
||||||
|
}" } })
|
||||||
|
|
||||||
-- Use buffer source for `/`
|
-- Use buffer source for `/`
|
||||||
require('cmp').setup.cmdline("/", {
|
require('cmp').setup.cmdline("/", {
|
||||||
sources = {
|
sources = {
|
||||||
|
@ -29,11 +29,14 @@
|
|||||||
lua = ''
|
lua = ''
|
||||||
${builtins.readFile ./lsp.lua}
|
${builtins.readFile ./lsp.lua}
|
||||||
|
|
||||||
|
-- Prevent infinite log size (change this when debugging)
|
||||||
|
vim.lsp.set_log_level("off")
|
||||||
|
|
||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
sources = {
|
sources = {
|
||||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
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.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.diagnostics.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
|
||||||
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
|
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.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
|
||||||
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
|
||||||
@ -50,6 +53,7 @@
|
|||||||
|
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
|
-- Auto-format on save
|
||||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
group = augroup,
|
group = augroup,
|
||||||
@ -58,6 +62,12 @@
|
|||||||
vim.lsp.buf.format({ bufnr = bufnr })
|
vim.lsp.buf.format({ bufnr = bufnr })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
-- Use internal formatting for bindings like gq.
|
||||||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
|
callback = function(args)
|
||||||
|
vim.bo[args.buf].formatexpr = nil
|
||||||
|
end,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
pkgs.vimPlugins.vim-fugitive # Git commands
|
pkgs.vimPlugins.vim-fugitive # Git commands
|
||||||
pkgs.vimPlugins.vim-repeat # Better repeat using .
|
pkgs.vimPlugins.vim-repeat # Better repeat using .
|
||||||
pkgs.vimPlugins.comment-nvim # Smart comment commands
|
pkgs.vimPlugins.comment-nvim # Smart comment commands
|
||||||
pkgs.vimPlugins.impatient-nvim # Faster load times
|
|
||||||
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
||||||
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
||||||
];
|
];
|
||||||
|
|
||||||
setup.Comment = { };
|
setup.Comment = { };
|
||||||
setup.colorizer = { };
|
setup.colorizer = { };
|
||||||
|
setup.glow = { };
|
||||||
|
|
||||||
vim.o = {
|
vim.o = {
|
||||||
termguicolors = true; # Set to truecolor
|
termguicolors = true; # Set to truecolor
|
||||||
@ -51,7 +51,7 @@
|
|||||||
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
||||||
|
|
||||||
lua = lib.mkBefore ''
|
lua = lib.mkBefore ''
|
||||||
require("impatient")
|
vim.loader.enable()
|
||||||
${builtins.readFile ../lua/keybinds.lua};
|
${builtins.readFile ../lua/keybinds.lua};
|
||||||
${builtins.readFile ../lua/settings.lua};
|
${builtins.readFile ../lua/settings.lua};
|
||||||
'';
|
'';
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
plugins = [ pkgs.vimPlugins.lualine-nvim ];
|
plugins = [ pkgs.vimPlugins.lualine-nvim ];
|
||||||
setup.lualine = {
|
setup.lualine = {
|
||||||
options = {
|
options = {
|
||||||
theme = "gruvbox";
|
theme = "base16";
|
||||||
icons_enabled = true;
|
icons_enabled = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,16 +1,38 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, lib, ... }: {
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.vimPlugins.nvim-treesitter.withAllGrammars
|
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
|
||||||
|
with pkgs.tree-sitter-grammars; [
|
||||||
|
tree-sitter-bash
|
||||||
|
tree-sitter-fish
|
||||||
|
tree-sitter-hcl
|
||||||
|
tree-sitter-ini
|
||||||
|
tree-sitter-json
|
||||||
|
tree-sitter-lua
|
||||||
|
tree-sitter-markdown
|
||||||
|
tree-sitter-markdown-inline
|
||||||
|
tree-sitter-nix
|
||||||
|
tree-sitter-puppet
|
||||||
|
tree-sitter-python
|
||||||
|
tree-sitter-rasi
|
||||||
|
tree-sitter-toml
|
||||||
|
tree-sitter-yaml
|
||||||
|
]))
|
||||||
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
||||||
|
pkgs.vimPlugins.playground # Tree-sitter experimenting
|
||||||
pkgs.vimPlugins.nginx-vim
|
pkgs.vimPlugins.nginx-vim
|
||||||
pkgs.vimPlugins.vim-helm
|
pkgs.vimPlugins.vim-helm
|
||||||
pkgs.vimPlugins.vim-puppet
|
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "nmasur";
|
||||||
|
version = "0.1";
|
||||||
|
src = ../plugin;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
setup."nvim-treesitter.configs" = {
|
setup."nvim-treesitter.configs" = {
|
||||||
highlight = { enable = true; };
|
highlight = { enable = true; };
|
||||||
indent = { enable = true; };
|
indent = { enable = true; };
|
||||||
|
matchup = { enable = true; }; # Uses vim-matchup
|
||||||
|
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
@ -39,4 +61,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Use mkAfter to ensure tree-sitter is already loaded
|
||||||
|
lua = lib.mkAfter ''
|
||||||
|
-- Use HCL parser with .tf files
|
||||||
|
vim.treesitter.language.register('hcl', 'terraform')
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ vim.keymap.set("n", "<Leader>gf", telescope.git_bcommits)
|
|||||||
vim.keymap.set("n", "<Leader>gb", telescope.git_branches)
|
vim.keymap.set("n", "<Leader>gb", telescope.git_branches)
|
||||||
vim.keymap.set("n", "<Leader>gs", telescope.git_status)
|
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>s", telescope.current_buffer_fuzzy_find)
|
||||||
|
vim.keymap.set("n", "<Leader>rr", telescope.resume)
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>N", function()
|
vim.keymap.set("n", "<Leader>N", function()
|
||||||
local opts = {
|
local opts = {
|
||||||
@ -45,7 +46,7 @@ end)
|
|||||||
vim.keymap.set("n", "<Leader>fz", require("telescope").extensions.zoxide.list)
|
vim.keymap.set("n", "<Leader>fz", require("telescope").extensions.zoxide.list)
|
||||||
|
|
||||||
-- Project
|
-- Project
|
||||||
require("telescope").load_extension("project")
|
require("telescope").load_extension("projects")
|
||||||
vim.keymap.set("n", "<C-p>", function()
|
vim.keymap.set("n", "<C-p>", function()
|
||||||
local opts = require("telescope.themes").get_ivy({
|
local opts = require("telescope.themes").get_ivy({
|
||||||
layout_config = {
|
layout_config = {
|
||||||
@ -54,7 +55,7 @@ vim.keymap.set("n", "<C-p>", function()
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
require("telescope").extensions.project.project(opts)
|
require("telescope").extensions.projects.projects(opts)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- File browser
|
-- File browser
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.vimPlugins.telescope-nvim
|
pkgs.vimPlugins.telescope-nvim
|
||||||
pkgs.vimPlugins.telescope-project-nvim
|
pkgs.vimPlugins.project-nvim
|
||||||
pkgs.vimPlugins.telescope-fzy-native-nvim
|
pkgs.vimPlugins.telescope-fzy-native-nvim
|
||||||
pkgs.vimPlugins.telescope-file-browser-nvim
|
pkgs.vimPlugins.telescope-file-browser-nvim
|
||||||
pkgs.vimPlugins.telescope-zoxide
|
pkgs.vimPlugins.telescope-zoxide
|
||||||
@ -25,10 +25,11 @@
|
|||||||
extensions = {
|
extensions = {
|
||||||
fzy_native = { };
|
fzy_native = { };
|
||||||
zoxide = { };
|
zoxide = { };
|
||||||
project = { base_dirs = [ "~/dev" ]; };
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
setup.project_nvim = { };
|
||||||
|
|
||||||
lua = builtins.readFile ./telescope.lua;
|
lua = builtins.readFile ./telescope.lua;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,9 +12,11 @@
|
|||||||
setup.nvim-tree = {
|
setup.nvim-tree = {
|
||||||
disable_netrw = true;
|
disable_netrw = true;
|
||||||
hijack_netrw = true;
|
hijack_netrw = true;
|
||||||
|
sync_root_with_cwd = true;
|
||||||
|
respect_buf_cwd = true;
|
||||||
update_focused_file = {
|
update_focused_file = {
|
||||||
enable = true;
|
enable = true;
|
||||||
update_cwd = true;
|
update_root = true;
|
||||||
ignore_list = { };
|
ignore_list = { };
|
||||||
};
|
};
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
@ -41,30 +43,25 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
on_attach = dsl.rawLua ''
|
||||||
|
function (bufnr)
|
||||||
|
local api = require('nvim-tree.api')
|
||||||
|
local function opts(desc)
|
||||||
|
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
|
||||||
|
end
|
||||||
|
api.config.mappings.default_on_attach(bufnr)
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'l', api.node.open.edit, opts('Open'))
|
||||||
|
vim.keymap.set('n', '<CR>', api.node.open.edit, opts('Open'))
|
||||||
|
vim.keymap.set('n', 'o', api.node.open.edit, opts('Open'))
|
||||||
|
vim.keymap.set('n', 'h', api.node.navigate.parent_close, opts('Close Directory'))
|
||||||
|
vim.keymap.set('n', 'v', api.node.open.vertical, opts('Open: Vertical Split'))
|
||||||
|
end
|
||||||
|
'';
|
||||||
view = {
|
view = {
|
||||||
width = 30;
|
width = 30;
|
||||||
hide_root_folder = false;
|
hide_root_folder = false;
|
||||||
side = "left";
|
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;
|
number = false;
|
||||||
relativenumber = false;
|
relativenumber = false;
|
||||||
};
|
};
|
||||||
|
@ -4,7 +4,7 @@ let
|
|||||||
|
|
||||||
neovim = import ./package {
|
neovim = import ./package {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
colors = import config.theme.colors.neovimConfig { inherit pkgs; };
|
colors = config.theme.colors;
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
require("packer_init")
|
|
||||||
require("settings")
|
|
||||||
require("keybinds")
|
|
||||||
require("background")
|
|
@ -48,11 +48,6 @@ key("n", "<Leader>wv", ":vsplit<CR>")
|
|||||||
key("n", "<Leader>wh", ":split<CR>")
|
key("n", "<Leader>wh", ":split<CR>")
|
||||||
key("n", "<Leader>wm", ":only<CR>")
|
key("n", "<Leader>wm", ":only<CR>")
|
||||||
|
|
||||||
-- Vimrc editing
|
|
||||||
key("n", "<Leader>rr", ":luafile $HOME/.config/nvim/init.lua<CR>")
|
|
||||||
key("n", "<Leader>rp", ":luafile $HOME/.config/nvim/init.lua<CR>:PackerInstall<CR>:")
|
|
||||||
key("n", "<Leader>rc", ":luafile $HOME/.config/nvim/init.lua<CR>:PackerCompile<CR>")
|
|
||||||
|
|
||||||
-- Keep cursor in place
|
-- Keep cursor in place
|
||||||
key("n", "n", "nzz")
|
key("n", "n", "nzz")
|
||||||
key("n", "N", "Nzz")
|
key("n", "N", "Nzz")
|
||||||
@ -71,8 +66,8 @@ key("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true })
|
|||||||
key("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
|
key("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
|
||||||
|
|
||||||
-- Other
|
-- Other
|
||||||
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
||||||
key("n", "Y", "y$") --- Copy to end of line
|
key("n", "Y", "y$") --- Copy to end of line
|
||||||
key("v", "<C-r>", "y<Esc>:%s/<C-r>+//gc<left><left><left>") --- Substitute selected
|
key("v", "<C-r>", "y<Esc>:%s/<C-r>+//gc<left><left><left>") --- Substitute selected
|
||||||
key("v", "D", "y'>gp") --- Duplicate selected
|
key("v", "D", "y'>gp") --- Duplicate selected
|
||||||
key("x", "<Leader>p", '"_dP') --- Paste but keep register
|
key("x", "<Leader>p", '"_dP') --- Paste but keep register
|
||||||
|
@ -1,164 +0,0 @@
|
|||||||
-- =======================================================================
|
|
||||||
-- Completion System
|
|
||||||
-- =======================================================================
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Completion sources
|
|
||||||
use("hrsh7th/cmp-nvim-lsp") --- Language server completion plugin
|
|
||||||
use("hrsh7th/cmp-buffer") --- Generic text completion
|
|
||||||
use("hrsh7th/cmp-path") --- Local file completion
|
|
||||||
use("hrsh7th/cmp-cmdline") --- Command line completion
|
|
||||||
use("hrsh7th/cmp-nvim-lua") --- Nvim lua api completion
|
|
||||||
use("saadparwaiz1/cmp_luasnip") --- Luasnip completion
|
|
||||||
use("lukas-reineke/cmp-rg") --- Ripgrep completion
|
|
||||||
use("rafamadriz/friendly-snippets") -- Lots of pre-generated snippets
|
|
||||||
|
|
||||||
-- Completion engine
|
|
||||||
use({
|
|
||||||
"hrsh7th/nvim-cmp",
|
|
||||||
requires = { "L3MON4D3/LuaSnip" },
|
|
||||||
config = function()
|
|
||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
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 = "",
|
|
||||||
}
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
|
|
||||||
-- Only enable on non-prompt buffers
|
|
||||||
-- So don't use in telescope
|
|
||||||
enabled = function()
|
|
||||||
if vim.bo.buftype == "prompt" then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
end,
|
|
||||||
|
|
||||||
-- Setup snippet completion
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
require("luasnip").lsp_expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Setup completion keybinds
|
|
||||||
mapping = {
|
|
||||||
["<C-n>"] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }),
|
|
||||||
["<C-p>"] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }),
|
|
||||||
["<C-d>"] = cmp.mapping(cmp.mapping.scroll_docs(-4), { "i", "c" }),
|
|
||||||
["<C-f>"] = cmp.mapping(cmp.mapping.scroll_docs(4), { "i", "c" }),
|
|
||||||
["<C-e>"] = cmp.mapping(cmp.mapping.abort(), { "i", "c" }),
|
|
||||||
["<Esc>"] = function(_)
|
|
||||||
cmp.mapping({
|
|
||||||
i = cmp.mapping.abort(),
|
|
||||||
c = cmp.mapping.close(),
|
|
||||||
})
|
|
||||||
vim.cmd("stopinsert") --- Abort and leave insert mode
|
|
||||||
end,
|
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Insert,
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
["<C-r>"] = cmp.mapping.confirm({
|
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
|
||||||
select = true,
|
|
||||||
}),
|
|
||||||
["<C-l>"] = cmp.mapping(function(_)
|
|
||||||
if require("luasnip").expand_or_jumpable() then
|
|
||||||
require("luasnip").expand_or_jump()
|
|
||||||
end
|
|
||||||
end, { "i", "s" }),
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Setup completion engines
|
|
||||||
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" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Visual presentation
|
|
||||||
formatting = {
|
|
||||||
fields = { "kind", "abbr", "menu" },
|
|
||||||
format = function(entry, vim_item)
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Docs
|
|
||||||
-- window = {
|
|
||||||
-- completion = cmp.config.window.bordered(),
|
|
||||||
-- documentation = cmp.config.window.bordered(),
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- Extra features
|
|
||||||
experimental = {
|
|
||||||
native_menu = false, --- Use cmp menu instead of Vim menu
|
|
||||||
ghost_text = true, --- Show preview auto-completion
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use buffer source for `/`
|
|
||||||
cmp.setup.cmdline("/", {
|
|
||||||
sources = {
|
|
||||||
{ name = "buffer", keyword_length = 5 },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Use cmdline & path source for ':'
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "cmdline" },
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,153 +0,0 @@
|
|||||||
-- =======================================================================
|
|
||||||
-- Language Server
|
|
||||||
-- =======================================================================
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Language server engine
|
|
||||||
use({
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
requires = { "hrsh7th/cmp-nvim-lsp" },
|
|
||||||
config = function()
|
|
||||||
local function on_path(program)
|
|
||||||
return vim.fn.executable(program) == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
|
||||||
if on_path("lua-language-server") then
|
|
||||||
require("lspconfig").sumneko_lua.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
-- Turn off errors for vim global variable
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim", "hs" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
if on_path("rust-analyzer") then
|
|
||||||
require("lspconfig").rust_analyzer.setup({ capabilities = capabilities })
|
|
||||||
end
|
|
||||||
if on_path("tflint") then
|
|
||||||
require("lspconfig").tflint.setup({ capabilities = capabilities })
|
|
||||||
end
|
|
||||||
if on_path("terraform-ls") then
|
|
||||||
require("lspconfig").terraformls.setup({ capabilities = capabilities })
|
|
||||||
end
|
|
||||||
if on_path("pyright") then
|
|
||||||
require("lspconfig").pyright.setup({
|
|
||||||
on_attach = function()
|
|
||||||
-- set keymaps (requires 0.7.0)
|
|
||||||
-- vim.keymap.set("n", "", "", {buffer=0})
|
|
||||||
end,
|
|
||||||
capabilities = capabilities,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
if on_path("nil") then
|
|
||||||
require("lspconfig").nil_ls.setup({ capabilities = capabilities })
|
|
||||||
end
|
|
||||||
|
|
||||||
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)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Pretty highlights
|
|
||||||
use("folke/lsp-colors.nvim")
|
|
||||||
|
|
||||||
-- Linting
|
|
||||||
use({
|
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
|
||||||
branch = "main",
|
|
||||||
requires = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
"neovim/nvim-lspconfig",
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local function on_path(program)
|
|
||||||
return vim.fn.executable(program) == 1
|
|
||||||
end
|
|
||||||
|
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
|
||||||
require("null-ls").setup({
|
|
||||||
sources = {
|
|
||||||
require("null-ls").builtins.formatting.stylua.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("stylua")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.black.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("black")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.diagnostics.flake8.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("flake8")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.fish_indent.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("fish_indent")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.nixfmt.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("nixfmt")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.rustfmt.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("rustfmt")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.diagnostics.shellcheck.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("shellcheck")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.shfmt.with({
|
|
||||||
extra_args = { "-i", "4", "-ci" },
|
|
||||||
condition = function()
|
|
||||||
return on_path("shfmt")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
require("null-ls").builtins.formatting.terraform_fmt.with({
|
|
||||||
condition = function()
|
|
||||||
return on_path("terraform")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
-- require("null-ls").builtins.diagnostics.luacheck,
|
|
||||||
-- require("null-ls").builtins.diagnostics.markdownlint,
|
|
||||||
-- require("null-ls").builtins.diagnostics.pylint,
|
|
||||||
},
|
|
||||||
-- Format on save
|
|
||||||
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,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,67 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Important tweaks
|
|
||||||
use("tpope/vim-surround") --- Manipulate parentheses
|
|
||||||
|
|
||||||
-- Convenience tweaks
|
|
||||||
use("tpope/vim-eunuch") --- File manipulation in Vim
|
|
||||||
use("tpope/vim-vinegar") --- Fixes netrw file explorer
|
|
||||||
use("tpope/vim-fugitive") --- Git commands and syntax
|
|
||||||
use("tpope/vim-repeat") --- Actually repeat using .
|
|
||||||
|
|
||||||
-- Use gc or gcc to add comments
|
|
||||||
use({
|
|
||||||
"numToStr/Comment.nvim",
|
|
||||||
config = function()
|
|
||||||
require("Comment").setup()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Alignment tool
|
|
||||||
use({
|
|
||||||
"godlygeek/tabular",
|
|
||||||
config = function()
|
|
||||||
vim.keymap.set("", "<Leader>ta", ":Tabularize /")
|
|
||||||
vim.keymap.set("", "<Leader>t#", ":Tabularize /#<CR>")
|
|
||||||
vim.keymap.set("", "<Leader>tl", ":Tabularize /---<CR>")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Markdown renderer / wiki notes
|
|
||||||
-- use("vimwiki/vimwiki")
|
|
||||||
use({
|
|
||||||
"jakewvincent/mkdnflow.nvim",
|
|
||||||
config = function()
|
|
||||||
require("mkdnflow").setup({
|
|
||||||
modules = {
|
|
||||||
bib = false,
|
|
||||||
conceal = true,
|
|
||||||
folds = false,
|
|
||||||
},
|
|
||||||
perspective = {
|
|
||||||
priority = "current",
|
|
||||||
fallback = "first",
|
|
||||||
nvim_wd_heel = false, -- Don't change working dir
|
|
||||||
},
|
|
||||||
links = {
|
|
||||||
style = "markdown",
|
|
||||||
conceal = true,
|
|
||||||
},
|
|
||||||
wrap = true,
|
|
||||||
to_do = {
|
|
||||||
symbols = { " ", "-", "x" },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = "markdown",
|
|
||||||
callback = function()
|
|
||||||
vim.o.autowriteall = true -- Save in new buffer
|
|
||||||
vim.o.wrapmargin = 79 -- Wrap text automatically
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,13 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Startup speed hacks
|
|
||||||
use({
|
|
||||||
"lewis6991/impatient.nvim",
|
|
||||||
config = function()
|
|
||||||
require("impatient")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,72 +0,0 @@
|
|||||||
-- =======================================================================
|
|
||||||
-- Syntax
|
|
||||||
-- =======================================================================
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Syntax engine
|
|
||||||
use({
|
|
||||||
"nvim-treesitter/nvim-treesitter",
|
|
||||||
commit = "9ada5f70f98d51e9e3e76018e783b39fd1cd28f7",
|
|
||||||
run = ":TSUpdate",
|
|
||||||
config = function()
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
ensure_installed = {
|
|
||||||
"hcl",
|
|
||||||
"python",
|
|
||||||
"lua",
|
|
||||||
"nix",
|
|
||||||
"fish",
|
|
||||||
"toml",
|
|
||||||
"yaml",
|
|
||||||
"json",
|
|
||||||
},
|
|
||||||
auto_install = true,
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Syntax-aware Textobjects
|
|
||||||
use({
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
||||||
requires = { "nvim-treesitter/nvim-treesitter" },
|
|
||||||
config = function()
|
|
||||||
require("nvim-treesitter.configs").setup({
|
|
||||||
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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Additional syntax sources
|
|
||||||
use("chr4/nginx.vim") --- Nginx syntax
|
|
||||||
use("towolf/vim-helm") --- Helm syntax
|
|
||||||
use("rodjek/vim-puppet") --- Puppet syntax
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,139 +0,0 @@
|
|||||||
-- =======================================================================
|
|
||||||
-- Fuzzy Launcher
|
|
||||||
-- =======================================================================
|
|
||||||
|
|
||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
use({
|
|
||||||
"nvim-telescope/telescope.nvim",
|
|
||||||
branch = "master",
|
|
||||||
requires = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
-- Telescope: quit instantly with escape
|
|
||||||
local actions = require("telescope.actions")
|
|
||||||
require("telescope").setup({
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
i = {
|
|
||||||
["<esc>"] = 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" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
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)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Faster sorting
|
|
||||||
use("nvim-telescope/telescope-fzy-native.nvim")
|
|
||||||
|
|
||||||
-- Jump around tmux sessions
|
|
||||||
-- use("camgraff/telescope-tmux.nvim")
|
|
||||||
|
|
||||||
-- Jump directories
|
|
||||||
use({
|
|
||||||
"jvgrootveld/telescope-zoxide",
|
|
||||||
requires = { "nvim-lua/popup.nvim", "nvim-telescope/telescope.nvim" },
|
|
||||||
config = function()
|
|
||||||
vim.keymap.set("n", "<Leader>fz", require("telescope").extensions.zoxide.list)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Jump projects
|
|
||||||
use({
|
|
||||||
"nvim-telescope/telescope-project.nvim",
|
|
||||||
requires = { "nvim-telescope/telescope.nvim" },
|
|
||||||
config = function()
|
|
||||||
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)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- File browser
|
|
||||||
use({
|
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
|
||||||
requires = { "nvim-telescope/telescope.nvim" },
|
|
||||||
config = function()
|
|
||||||
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)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,79 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
use({
|
|
||||||
"akinsho/toggleterm.nvim",
|
|
||||||
tag = "v2.1.0",
|
|
||||||
config = function()
|
|
||||||
require("toggleterm").setup({
|
|
||||||
open_mapping = [[<c-\>]],
|
|
||||||
hide_numbers = true,
|
|
||||||
direction = "float",
|
|
||||||
})
|
|
||||||
|
|
||||||
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)
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Connect to telescope
|
|
||||||
-- use({
|
|
||||||
-- "https://git.sr.ht/~havi/telescope-toggleterm.nvim",
|
|
||||||
-- event = "TermOpen",
|
|
||||||
-- requires = {
|
|
||||||
-- "akinsho/nvim-toggleterm.lua",
|
|
||||||
-- "nvim-telescope/telescope.nvim",
|
|
||||||
-- "nvim-lua/popup.nvim",
|
|
||||||
-- "nvim-lua/plenary.nvim",
|
|
||||||
-- },
|
|
||||||
-- config = function()
|
|
||||||
-- require("telescope").load_extension("toggleterm")
|
|
||||||
-- require("telescope-toggleterm").setup({
|
|
||||||
-- telescope_mappings = {
|
|
||||||
-- -- <ctrl-c> : kill the terminal buffer (default) .
|
|
||||||
-- ["<C-c>"] = require("telescope-toggleterm").actions.exit_terminal,
|
|
||||||
-- },
|
|
||||||
-- })
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,164 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
-- Git next to line numbers
|
|
||||||
use({
|
|
||||||
"lewis6991/gitsigns.nvim",
|
|
||||||
branch = "main",
|
|
||||||
requires = { "nvim-lua/plenary.nvim" },
|
|
||||||
config = function()
|
|
||||||
local gitsigns = require("gitsigns")
|
|
||||||
gitsigns.setup()
|
|
||||||
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("v", "<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 })
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Status bar
|
|
||||||
use({
|
|
||||||
"hoob3rt/lualine.nvim",
|
|
||||||
requires = { "kyazdani42/nvim-web-devicons", opt = true },
|
|
||||||
config = function()
|
|
||||||
require("lualine").setup({
|
|
||||||
options = {
|
|
||||||
theme = "gruvbox",
|
|
||||||
icons_enabled = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Buffer line ("tabs")
|
|
||||||
use({
|
|
||||||
"akinsho/bufferline.nvim",
|
|
||||||
tag = "v2.4.0",
|
|
||||||
requires = { "kyazdani42/nvim-web-devicons", "moll/vim-bbye" },
|
|
||||||
config = function()
|
|
||||||
require("bufferline").setup({
|
|
||||||
options = {
|
|
||||||
diagnostics = "nvim_lsp",
|
|
||||||
always_show_bufferline = false,
|
|
||||||
separator_style = "slant",
|
|
||||||
offsets = { { filetype = "NvimTree" } },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
-- 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 })
|
|
||||||
|
|
||||||
-- Shift buffers
|
|
||||||
-- vim.keymap.set("n", "<C-L>", ":BufferLineMoveNext<CR>")
|
|
||||||
-- vim.keymap.set("i", "<C-L>", "<Esc>:BufferLineMoveNext<CR>i")
|
|
||||||
-- vim.keymap.set("n", "<C-H>", ":BufferLineMovePrev<CR>")
|
|
||||||
-- vim.keymap.set("i", "<C-H>", "<Esc>:BufferLineMovePrev<CR>i")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- File explorer
|
|
||||||
use({
|
|
||||||
"kyazdani42/nvim-tree.lua",
|
|
||||||
requires = { "kyazdani42/nvim-web-devicons" },
|
|
||||||
config = function()
|
|
||||||
require("nvim-tree").setup({
|
|
||||||
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 = require("nvim-tree.config").nvim_tree_callback("edit"),
|
|
||||||
},
|
|
||||||
{ key = "h", cb = require("nvim-tree.config").nvim_tree_callback("close_node") },
|
|
||||||
{ key = "v", cb = require("nvim-tree.config").nvim_tree_callback("vsplit") },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
number = false,
|
|
||||||
relativenumber = false,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
|
|
||||||
|
|
||||||
-- https://github.com/kyazdani42/nvim-tree.lua/commit/fb8735e96cecf004fbefb086ce85371d003c5129
|
|
||||||
vim.g.loaded = 1
|
|
||||||
vim.g.loaded_netrwPlugin = 1
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Markdown pretty view
|
|
||||||
use("ellisonleao/glow.nvim")
|
|
||||||
|
|
||||||
-- Hex color previews
|
|
||||||
use({
|
|
||||||
"norcalli/nvim-colorizer.lua",
|
|
||||||
config = function()
|
|
||||||
require("colorizer").setup()
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
@ -1,34 +0,0 @@
|
|||||||
-- Bootstrap the Packer plugin manager
|
|
||||||
local fn = vim.fn
|
|
||||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
|
||||||
PACKER_BOOTSTRAP = fn.system({
|
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--depth",
|
|
||||||
"1",
|
|
||||||
"https://github.com/wbthomason/packer.nvim",
|
|
||||||
install_path,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
require("packer").startup(function(use)
|
|
||||||
-- Maintain plugin manager
|
|
||||||
use("wbthomason/packer.nvim")
|
|
||||||
|
|
||||||
-- Include other files initialized by packer
|
|
||||||
require("packer.speed").packer(use)
|
|
||||||
require("packer.misc").packer(use)
|
|
||||||
require("packer.colors").packer(use)
|
|
||||||
require("packer.visuals").packer(use)
|
|
||||||
require("packer.lsp").packer(use)
|
|
||||||
require("packer.completion").packer(use)
|
|
||||||
require("packer.syntax").packer(use)
|
|
||||||
require("packer.telescope").packer(use)
|
|
||||||
require("packer.toggleterm").packer(use)
|
|
||||||
|
|
||||||
-- Auto-install after bootstrapping
|
|
||||||
if PACKER_BOOTSTRAP then
|
|
||||||
require("packer").sync()
|
|
||||||
end
|
|
||||||
end)
|
|
@ -4,8 +4,9 @@
|
|||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*%.tfvars"] = "hcl",
|
[".*%.tfvars"] = "terraform",
|
||||||
[".*%.tf"] = "hcl",
|
[".*%.tf"] = "terraform",
|
||||||
|
[".*%.rasi"] = "rasi",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -26,13 +26,17 @@
|
|||||||
# ] ++ extraConfig;
|
# ] ++ extraConfig;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
{ pkgs, colors ? { }, ... }:
|
{ pkgs, colors, ... }:
|
||||||
|
|
||||||
|
# Comes from nix2vim overlay:
|
||||||
|
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
|
||||||
pkgs.neovimBuilder {
|
pkgs.neovimBuilder {
|
||||||
package = pkgs.neovim-unwrapped;
|
package = pkgs.neovim-unwrapped;
|
||||||
|
inherit colors;
|
||||||
imports = [
|
imports = [
|
||||||
../config/align.nix
|
../config/align.nix
|
||||||
../config/bufferline.nix
|
../config/bufferline.nix
|
||||||
|
../config/colors.nix
|
||||||
../config/completion.nix
|
../config/completion.nix
|
||||||
../config/gitsigns.nix
|
../config/gitsigns.nix
|
||||||
../config/lsp.nix
|
../config/lsp.nix
|
||||||
@ -42,6 +46,5 @@ pkgs.neovimBuilder {
|
|||||||
../config/telescope.nix
|
../config/telescope.nix
|
||||||
../config/toggleterm.nix
|
../config/toggleterm.nix
|
||||||
../config/tree.nix
|
../config/tree.nix
|
||||||
colors
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
expression: (apply_expression
|
||||||
|
function: (apply_expression
|
||||||
|
function: (select_expression
|
||||||
|
attrpath: (attrpath) @writeshell (#match? @writeshell "^writeShell.*$")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(indented_string_expression) @bash
|
||||||
|
)
|
@ -12,6 +12,7 @@
|
|||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
bash = "${pkgs.bashInteractive}/bin/bash";
|
||||||
ls = "exa";
|
ls = "exa";
|
||||||
trash = lib.mkIf pkgs.stdenv.isLinux "${pkgs.trash-cli}/bin/trash-put";
|
trash = lib.mkIf pkgs.stdenv.isLinux "${pkgs.trash-cli}/bin/trash-put";
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,7 @@ bind -M insert \cp projects
|
|||||||
bind -M default \cp projects
|
bind -M default \cp projects
|
||||||
bind -M insert \x1F accept-autosuggestion
|
bind -M insert \x1F accept-autosuggestion
|
||||||
bind -M default \x1F accept-autosuggestion
|
bind -M default \x1F accept-autosuggestion
|
||||||
bind -M insert \cn 'commandline -r "nix run nixpkgs#"'
|
bind -M insert \cn 'commandline -r "nix shell nixpkgs#"'
|
||||||
bind -M default \cn 'commandline -r "nix run nixpkgs#"'
|
bind -M default \cn 'commandline -r "nix shell nixpkgs#"'
|
||||||
bind -M insert \x11F nix-fzf
|
bind -M insert \x11F nix-fzf
|
||||||
bind -M default \x11F nix-fzf
|
bind -M default \x11F nix-fzf
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
set -l branch (git branch 2>/dev/null | grep '^\*' | colrm 1 2)
|
|
||||||
and set -l command "git push --set-upstream origin $branch"
|
|
||||||
and commandline -r $command
|
|
||||||
and commandline -f execute
|
|
@ -31,6 +31,7 @@ in {
|
|||||||
pager = { branch = "false"; };
|
pager = { branch = "false"; };
|
||||||
safe = { directory = config.dotfilesPath; };
|
safe = { directory = config.dotfilesPath; };
|
||||||
pull = { ff = "only"; };
|
pull = { ff = "only"; };
|
||||||
|
push = { autoSetupRemote = "true"; };
|
||||||
init = { defaultBranch = "master"; };
|
init = { defaultBranch = "master"; };
|
||||||
};
|
};
|
||||||
ignores = [ ".direnv/**" "result" ];
|
ignores = [ ".direnv/**" "result" ];
|
||||||
@ -50,7 +51,6 @@ in {
|
|||||||
gcae = "git commit --amend";
|
gcae = "git commit --amend";
|
||||||
gu = "git pull";
|
gu = "git pull";
|
||||||
gp = "git push";
|
gp = "git push";
|
||||||
gpp = "git-push-upstream";
|
|
||||||
gl = "git log --graph --decorate --oneline -20";
|
gl = "git log --graph --decorate --oneline -20";
|
||||||
gll = "git log --graph --decorate --oneline";
|
gll = "git log --graph --decorate --oneline";
|
||||||
gco = "git checkout";
|
gco = "git checkout";
|
||||||
@ -113,10 +113,6 @@ in {
|
|||||||
git-history = {
|
git-history = {
|
||||||
body = builtins.readFile ./fish/functions/git-history.fish;
|
body = builtins.readFile ./fish/functions/git-history.fish;
|
||||||
};
|
};
|
||||||
git-push-upstream = {
|
|
||||||
description = "Create upstream branch";
|
|
||||||
body = builtins.readFile ./fish/functions/git-push-upstream.fish;
|
|
||||||
};
|
|
||||||
uncommitted = {
|
uncommitted = {
|
||||||
description = "Find uncommitted git repos";
|
description = "Find uncommitted git repos";
|
||||||
body = builtins.readFile ./fish/functions/uncommitted.fish;
|
body = builtins.readFile ./fish/functions/uncommitted.fish;
|
||||||
|
@ -67,6 +67,12 @@
|
|||||||
# Set channel to flake packages, used for nix-shell commands
|
# Set channel to flake packages, used for nix-shell commands
|
||||||
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
nixPath = [ "nixpkgs=${pkgs.path}" ];
|
||||||
|
|
||||||
|
# Set registry to this flake's packages, used for nix X commands
|
||||||
|
registry.nixpkgs.to = {
|
||||||
|
type = "path";
|
||||||
|
path = builtins.toString pkgs.path;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,10 @@ in {
|
|||||||
|
|
||||||
programs.bat = {
|
programs.bat = {
|
||||||
enable = true; # cat replacement
|
enable = true; # cat replacement
|
||||||
config = { theme = config.theme.colors.batTheme; };
|
config = {
|
||||||
|
theme = config.theme.colors.batTheme;
|
||||||
|
pager = "less -R"; # Don't auto-exit if one screen
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish.shellAbbrs = {
|
programs.fish.shellAbbrs = {
|
||||||
|
@ -62,24 +62,15 @@ function obj:init()
|
|||||||
self.launcher:bind("", "C", function()
|
self.launcher:bind("", "C", function()
|
||||||
self:switch("Calendar.app")
|
self:switch("Calendar.app")
|
||||||
end)
|
end)
|
||||||
self.launcher:bind("", "D", function()
|
|
||||||
self:switch("@discord@")
|
|
||||||
end)
|
|
||||||
self.launcher:bind("", "E", function()
|
self.launcher:bind("", "E", function()
|
||||||
self:switch("Mail.app")
|
self:switch("Mail.app")
|
||||||
end)
|
end)
|
||||||
self.launcher:bind("", "U", function()
|
|
||||||
self:switch("Music.app")
|
|
||||||
end)
|
|
||||||
self.launcher:bind("", "F", function()
|
self.launcher:bind("", "F", function()
|
||||||
self:switch("@firefox@")
|
self:switch("@firefox@")
|
||||||
end)
|
end)
|
||||||
self.launcher:bind("", "H", function()
|
self.launcher:bind("", "H", function()
|
||||||
self:switch("Hammerspoon.app")
|
self:switch("Hammerspoon.app")
|
||||||
end)
|
end)
|
||||||
self.launcher:bind("", "G", function()
|
|
||||||
self:switch("Mimestream.app")
|
|
||||||
end)
|
|
||||||
self.launcher:bind("", "M", function()
|
self.launcher:bind("", "M", function()
|
||||||
self:switch("Messages.app")
|
self:switch("Messages.app")
|
||||||
end)
|
end)
|
||||||
|
@ -34,14 +34,14 @@
|
|||||||
];
|
];
|
||||||
casks = [
|
casks = [
|
||||||
"1password" # 1Password packaging on Nix is broken for macOS
|
"1password" # 1Password packaging on Nix is broken for macOS
|
||||||
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
|
||||||
"meetingbar" # Show meetings in menu bar
|
|
||||||
"gitify" # Git notifications in menu bar
|
|
||||||
"logitech-g-hub" # Mouse and keyboard management
|
|
||||||
"mimestream" # Gmail client
|
|
||||||
"obsidian" # Obsidian packaging on Nix is not available for macOS
|
|
||||||
"steam" # Not packaged for Nix
|
|
||||||
"apache-directory-studio" # Packaging on Nix is not available for macOS
|
"apache-directory-studio" # Packaging on Nix is not available for macOS
|
||||||
|
"gitify" # Git notifications in menu bar
|
||||||
|
"keybase" # GUI on Nix not available for macOS
|
||||||
|
"logitech-g-hub" # Mouse and keyboard management
|
||||||
|
"meetingbar" # Show meetings in menu bar
|
||||||
|
"obsidian" # Obsidian packaging on Nix is not available for macOS
|
||||||
|
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
||||||
|
"steam" # Not packaged for Nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -4,6 +4,13 @@
|
|||||||
|
|
||||||
services.nix-daemon.enable = true;
|
services.nix-daemon.enable = true;
|
||||||
|
|
||||||
|
# This setting only applies to Darwin, different on NixOS
|
||||||
|
nix.gc.interval = {
|
||||||
|
Hour = 12;
|
||||||
|
Minute = 15;
|
||||||
|
Day = 1;
|
||||||
|
};
|
||||||
|
|
||||||
environment.shells = [ pkgs.fish ];
|
environment.shells = [ pkgs.fish ];
|
||||||
|
|
||||||
security.pam.enableSudoTouchIdAuth = true;
|
security.pam.enableSudoTouchIdAuth = true;
|
||||||
@ -171,7 +178,6 @@
|
|||||||
"$(__dock_item ${pkgs.firefox-bin}/Applications/Firefox.app)" \
|
"$(__dock_item ${pkgs.firefox-bin}/Applications/Firefox.app)" \
|
||||||
"$(__dock_item /System/Applications/Messages.app)" \
|
"$(__dock_item /System/Applications/Messages.app)" \
|
||||||
"$(__dock_item /System/Applications/Mail.app)" \
|
"$(__dock_item /System/Applications/Mail.app)" \
|
||||||
"$(__dock_item /Applications/Mimestream.app)" \
|
|
||||||
"$(__dock_item /Applications/zoom.us.app)" \
|
"$(__dock_item /Applications/zoom.us.app)" \
|
||||||
"$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
|
"$(__dock_item ${pkgs.discord}/Applications/Discord.app)" \
|
||||||
"$(__dock_item /Applications/Obsidian.app)" \
|
"$(__dock_item /Applications/Obsidian.app)" \
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
consul
|
consul
|
||||||
noti # Create notifications programmatically
|
noti # Create notifications programmatically
|
||||||
ipcalc # Make IP network calculations
|
ipcalc # Make IP network calculations
|
||||||
(pkgs.extraLib.mkScript {
|
(writeShellApplication {
|
||||||
name = "ocr";
|
name = "ocr";
|
||||||
file = ../../modules/common/shell/bash/scripts/ocr.sh;
|
runtimeInputs = [ tesseract ];
|
||||||
env = [ tesseract ];
|
text = builtins.readFile ../../modules/common/shell/bash/scripts/ocr.sh;
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
imports = [ ./calibre.nix ];
|
imports = [ ./calibre.nix ./nautilus.nix ];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,11 +11,12 @@
|
|||||||
|
|
||||||
# Install Nautilus file manager
|
# Install Nautilus file manager
|
||||||
config = lib.mkIf (config.gui.enable && config.nautilus.enable) {
|
config = lib.mkIf (config.gui.enable && config.nautilus.enable) {
|
||||||
|
|
||||||
|
# Quick preview with spacebar
|
||||||
|
services.gnome.sushi.enable = true;
|
||||||
|
environment.systemPackages = [ pkgs.gnome.nautilus ];
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
home.packages = with pkgs; [
|
|
||||||
gnome.nautilus
|
|
||||||
gnome.sushi # Quick preview with spacebar
|
|
||||||
];
|
|
||||||
|
|
||||||
xsession.windowManager.i3.config.keybindings = {
|
xsession.windowManager.i3.config.keybindings = {
|
||||||
"${
|
"${
|
@ -1,13 +1,6 @@
|
|||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
|
||||||
imports = [
|
imports =
|
||||||
./applications
|
[ ./applications ./gaming ./graphical ./hardware ./services ./system ];
|
||||||
./gaming
|
|
||||||
./graphical
|
|
||||||
./hardware
|
|
||||||
./services
|
|
||||||
./system
|
|
||||||
./wsl
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
10
modules/nixos/gaming/chiaki.nix
Normal file
10
modules/nixos/gaming/chiaki.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.gaming.chiaki.enable =
|
||||||
|
lib.mkEnableOption "Chiaki PlayStation remote play client.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.gaming.chiaki.enable {
|
||||||
|
environment.systemPackages = with pkgs; [ chiaki ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,10 +1,13 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
./chiaki.nix
|
||||||
|
./dwarf-fortress.nix
|
||||||
./leagueoflegends.nix
|
./leagueoflegends.nix
|
||||||
./legendary.nix
|
./legendary.nix
|
||||||
./lutris.nix
|
./lutris.nix
|
||||||
./minecraft-server.nix
|
./minecraft-server.nix
|
||||||
|
./ryujinx.nix
|
||||||
./steam.nix
|
./steam.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
29
modules/nixos/gaming/dwarf-fortress.nix
Normal file
29
modules/nixos/gaming/dwarf-fortress.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.gaming.dwarf-fortress.enable =
|
||||||
|
lib.mkEnableOption "Dwarf Fortress free edition.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.gaming.dwarf-fortress.enable {
|
||||||
|
unfreePackages = [ "dwarf-fortress" ];
|
||||||
|
environment.systemPackages = let
|
||||||
|
dfDesktopItem = pkgs.makeDesktopItem {
|
||||||
|
name = "dwarf-fortress";
|
||||||
|
desktopName = "Dwarf Fortress";
|
||||||
|
exec = "${pkgs.dwarf-fortress-packages.dwarf-fortress-full}/bin/dfhack";
|
||||||
|
terminal = false;
|
||||||
|
};
|
||||||
|
dtDesktopItem = pkgs.makeDesktopItem {
|
||||||
|
name = "dwarftherapist";
|
||||||
|
desktopName = "Dwarf Therapist";
|
||||||
|
exec =
|
||||||
|
"${pkgs.dwarf-fortress-packages.dwarf-fortress-full}/bin/dwarftherapist";
|
||||||
|
terminal = false;
|
||||||
|
};
|
||||||
|
in [
|
||||||
|
pkgs.dwarf-fortress-packages.dwarf-fortress-full
|
||||||
|
dfDesktopItem
|
||||||
|
dtDesktopItem
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -9,15 +9,11 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
options.gaming.minecraft-server.enable =
|
config = lib.mkIf config.services.minecraft-server.enable {
|
||||||
lib.mkEnableOption "Minecraft Server.";
|
|
||||||
|
|
||||||
config = lib.mkIf config.gaming.minecraft-server.enable {
|
|
||||||
|
|
||||||
unfreePackages = [ "minecraft-server" ];
|
unfreePackages = [ "minecraft-server" ];
|
||||||
|
|
||||||
services.minecraft-server = {
|
services.minecraft-server = {
|
||||||
enable = true;
|
|
||||||
eula = true;
|
eula = true;
|
||||||
declarative = true;
|
declarative = true;
|
||||||
whitelist = { };
|
whitelist = { };
|
||||||
|
17
modules/nixos/gaming/ryujinx.nix
Normal file
17
modules/nixos/gaming/ryujinx.nix
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options.gaming.ryujinx.enable =
|
||||||
|
lib.mkEnableOption "Ryujinx Nintendo Switch application.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.gaming.ryujinx.enable {
|
||||||
|
environment.systemPackages = with pkgs; [ ryujinx ];
|
||||||
|
|
||||||
|
home-manager.users.${config.user}.xdg.desktopEntries.ryujinx =
|
||||||
|
lib.mkIf pkgs.stdenv.isLinux {
|
||||||
|
name = "Ryujinx";
|
||||||
|
exec =
|
||||||
|
"env DOTNET_EnableAlternateStackCheck=1 Ryujinx -r /home/${config.user}/media/games/ryujinx/ %f";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -17,6 +17,9 @@
|
|||||||
steamPackages.steamcmd
|
steamPackages.steamcmd
|
||||||
steam-tui
|
steam-tui
|
||||||
|
|
||||||
|
# Allow downloading of GE-Proton and other versions
|
||||||
|
protonup-qt
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -32,6 +32,10 @@
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Command to use for adjusting brightness";
|
description = "Command to use for adjusting brightness";
|
||||||
};
|
};
|
||||||
|
calculatorCommand = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Command to use for quick calculations";
|
||||||
|
};
|
||||||
toggleBarCommand = lib.mkOption {
|
toggleBarCommand = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Command to hide and show the status bar.";
|
description = "Command to hide and show the status bar.";
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
config = {
|
config = {
|
||||||
|
|
||||||
home-manager.users.${config.user}.services.dunst = {
|
home-manager.users.${config.user}.services.dunst = {
|
||||||
enable = true;
|
enable = false;
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
width = 300;
|
width = 300;
|
||||||
|
@ -123,15 +123,17 @@ in {
|
|||||||
"exec --no-startup-id ${config.powerCommand}";
|
"exec --no-startup-id ${config.powerCommand}";
|
||||||
"${modifier}+Shift+m" =
|
"${modifier}+Shift+m" =
|
||||||
"exec --no-startup-id ${config.brightnessCommand}";
|
"exec --no-startup-id ${config.brightnessCommand}";
|
||||||
|
"${modifier}+c" =
|
||||||
|
"exec --no-startup-id ${config.calculatorCommand}";
|
||||||
"${modifier}+Shift+c" = "reload";
|
"${modifier}+Shift+c" = "reload";
|
||||||
"${modifier}+Shift+r" = "restart";
|
"${modifier}+Shift+r" = "restart";
|
||||||
"${modifier}+Shift+q" = ''
|
"${modifier}+Shift+q" = ''
|
||||||
exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
||||||
"${modifier}+Shift+x" = "exec ${lockCmd}";
|
"${modifier}+Shift+x" = "exec ${lockCmd}";
|
||||||
"${modifier}+Mod1+h" =
|
"${modifier}+Mod1+h" =
|
||||||
"exec --no-startup-id kitty sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} && ${pkgs.libnotify}/bin/notify-send --transient --expire-time 3000 \"Rebuilt home.\" || read'";
|
"exec --no-startup-id kitty sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
||||||
"${modifier}+Mod1+r" =
|
"${modifier}+Mod1+r" =
|
||||||
"exec --no-startup-id kitty sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} && ${pkgs.libnotify}/bin/notify-send --transient --expire-time 3000 \"Rebuilt NixOS.\" || read'";
|
"exec --no-startup-id kitty sh -c 'doas nixos-rebuild switch --flake ${config.dotfilesPath}#${config.networking.hostName} || read'";
|
||||||
|
|
||||||
# Window options
|
# Window options
|
||||||
"${modifier}+q" = "kill";
|
"${modifier}+q" = "kill";
|
||||||
|
@ -107,9 +107,9 @@
|
|||||||
format = "<label>";
|
format = "<label>";
|
||||||
exec = builtins.toString (pkgs.writeShellScript "mailcount.sh" ''
|
exec = builtins.toString (pkgs.writeShellScript "mailcount.sh" ''
|
||||||
${pkgs.notmuch}/bin/notmuch new > /dev/null
|
${pkgs.notmuch}/bin/notmuch new > /dev/null
|
||||||
UNREAD=$(${pkgs.notmuch}/bin/notmuch count is:inbox and is:unread)
|
UNREAD=$(${pkgs.notmuch}/bin/notmuch count is:inbox and is:unread and folder:main/Inbox)
|
||||||
if [ $UNREAD = "0" ]; then
|
if [ $UNREAD = "0" ]; then
|
||||||
echo "%{T3}%{T-} "
|
echo ""
|
||||||
else
|
else
|
||||||
echo "%{T2}%{T-} $UNREAD "
|
echo "%{T2}%{T-} $UNREAD "
|
||||||
fi
|
fi
|
||||||
|
@ -165,11 +165,12 @@ in {
|
|||||||
${rofi}/bin/rofi -modes drun -show drun -theme-str '@import "launcher.rasi"' '';
|
${rofi}/bin/rofi -modes drun -show drun -theme-str '@import "launcher.rasi"' '';
|
||||||
systemdSearch = "${pkgs.rofi-systemd}/bin/rofi-systemd";
|
systemdSearch = "${pkgs.rofi-systemd}/bin/rofi-systemd";
|
||||||
altTabCommand = "${rofi}/bin/rofi -show window -modi window";
|
altTabCommand = "${rofi}/bin/rofi -show window -modi window";
|
||||||
|
calculatorCommand = "${rofi}/bin/rofi -modes calc -show calc";
|
||||||
audioSwitchCommand = "${
|
audioSwitchCommand = "${
|
||||||
(pkgs.extraLib.mkScript {
|
(pkgs.writeShellApplication {
|
||||||
name = "switch-audio";
|
name = "switch-audio";
|
||||||
file = ./rofi/pulse-sink.sh;
|
runtimeInputs = [ pkgs.ponymix rofi ];
|
||||||
env = [ pkgs.ponymix rofi ];
|
text = builtins.readFile ./rofi/pulse-sink.sh;
|
||||||
})
|
})
|
||||||
}/bin/switch-audio";
|
}/bin/switch-audio";
|
||||||
};
|
};
|
||||||
|
@ -11,9 +11,9 @@ in {
|
|||||||
config.brightnessCommand = builtins.toString
|
config.brightnessCommand = builtins.toString
|
||||||
(pkgs.writeShellScript "brightness" ''
|
(pkgs.writeShellScript "brightness" ''
|
||||||
|
|
||||||
dimmer=""
|
dimmer=""
|
||||||
medium=""
|
medium=""
|
||||||
brighter=""
|
brighter=""
|
||||||
|
|
||||||
chosen=$(printf '%s;%s;%s\n' \
|
chosen=$(printf '%s;%s;%s\n' \
|
||||||
"$dimmer" \
|
"$dimmer" \
|
||||||
|
@ -13,7 +13,7 @@ in {
|
|||||||
power_off=''
|
power_off=''
|
||||||
reboot=''
|
reboot=''
|
||||||
lock=''
|
lock=''
|
||||||
suspend='鈴'
|
suspend=''
|
||||||
log_out=''
|
log_out=''
|
||||||
|
|
||||||
chosen=$(printf '%s;%s;%s;%s;%s\n' \
|
chosen=$(printf '%s;%s;%s;%s;%s\n' \
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
boot.loader = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
boot.loader = lib.mkIf config.physical {
|
||||||
grub = {
|
grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
@ -40,8 +40,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Allow reading from Windows drives
|
# Allow reading from Windows drives
|
||||||
boot.supportedFilesystems =
|
boot.supportedFilesystems = lib.mkIf config.physical [ "ntfs" ];
|
||||||
lib.mkIf (config.physical && pkgs.stdenv.isLinux) [ "ntfs" ];
|
|
||||||
|
|
||||||
# Use latest released Linux kernel by default
|
# Use latest released Linux kernel by default
|
||||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
|
@ -10,9 +10,12 @@
|
|||||||
autoRepeatDelay = 250;
|
autoRepeatDelay = 250;
|
||||||
autoRepeatInterval = 40;
|
autoRepeatInterval = 40;
|
||||||
|
|
||||||
# Swap escape key with caps lock key
|
};
|
||||||
xkbOptions = "eurosign:e,caps:swapescape";
|
|
||||||
|
|
||||||
|
# Use capslock as escape and/or control
|
||||||
|
services.keyd = {
|
||||||
|
enable = true;
|
||||||
|
settings = { main = { capslock = "overload(control, esc)"; }; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable num lock on login
|
# Enable num lock on login
|
||||||
|
@ -1,51 +1,50 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config =
|
config = lib.mkIf config.gui.enable {
|
||||||
lib.mkIf (config.gui.enable && config.physical && pkgs.stdenv.isLinux) {
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs;
|
environment.systemPackages = with pkgs;
|
||||||
[
|
[
|
||||||
ddcutil # Monitor brightness control
|
ddcutil # Monitor brightness control
|
||||||
];
|
];
|
||||||
|
|
||||||
# Reduce blue light at night
|
# Reduce blue light at night
|
||||||
services.redshift = {
|
services.redshift = {
|
||||||
enable = true;
|
enable = true;
|
||||||
brightness = {
|
brightness = {
|
||||||
day = "1.0";
|
day = "1.0";
|
||||||
night = "1.0";
|
night = "1.0";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Detect monitors (brightness) for ddcutil
|
|
||||||
hardware.i2c.enable = true;
|
|
||||||
|
|
||||||
# Grant main user access to external monitors
|
|
||||||
users.users.${config.user}.extraGroups = [ "i2c" ];
|
|
||||||
|
|
||||||
services.xserver.displayManager = {
|
|
||||||
|
|
||||||
# Put the login screen on the left monitor
|
|
||||||
lightdm.greeters.gtk.extraConfig = ''
|
|
||||||
active-monitor=0
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Set up screen position and rotation
|
|
||||||
setupCommands = ''
|
|
||||||
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \
|
|
||||||
--mode 1920x1200 \
|
|
||||||
--pos 1920x0 \
|
|
||||||
--rotate left \
|
|
||||||
--output HDMI-A-0 \
|
|
||||||
--primary \
|
|
||||||
--mode 1920x1080 \
|
|
||||||
--pos 0x560 \
|
|
||||||
--rotate normal \
|
|
||||||
--output DVI-0 --off \
|
|
||||||
--output DVI-1 --off \
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Detect monitors (brightness) for ddcutil
|
||||||
|
hardware.i2c.enable = true;
|
||||||
|
|
||||||
|
# Grant main user access to external monitors
|
||||||
|
users.users.${config.user}.extraGroups = [ "i2c" ];
|
||||||
|
|
||||||
|
services.xserver.displayManager = {
|
||||||
|
|
||||||
|
# Put the login screen on the left monitor
|
||||||
|
lightdm.greeters.gtk.extraConfig = ''
|
||||||
|
active-monitor=0
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Set up screen position and rotation
|
||||||
|
setupCommands = ''
|
||||||
|
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 \
|
||||||
|
--mode 1920x1200 \
|
||||||
|
--pos 1920x0 \
|
||||||
|
--rotate left \
|
||||||
|
--output HDMI-A-0 \
|
||||||
|
--primary \
|
||||||
|
--mode 1920x1080 \
|
||||||
|
--pos 0x560 \
|
||||||
|
--rotate normal \
|
||||||
|
--output DVI-0 --off \
|
||||||
|
--output DVI-1 --off \
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,22 +1,21 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config =
|
config = lib.mkIf config.gui.enable {
|
||||||
lib.mkIf (config.gui.enable && config.physical && pkgs.stdenv.isLinux) {
|
|
||||||
|
|
||||||
# Mouse customization
|
# Mouse customization
|
||||||
services.ratbagd.enable = true;
|
services.ratbagd.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
libratbag # Mouse adjustments
|
libratbag # Mouse adjustments
|
||||||
piper # Mouse adjustments GUI
|
piper # Mouse adjustments GUI
|
||||||
];
|
];
|
||||||
|
|
||||||
services.xserver.libinput.mouse = {
|
|
||||||
# Disable mouse acceleration
|
|
||||||
accelProfile = "flat";
|
|
||||||
accelSpeed = "1.15";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
services.xserver.libinput.mouse = {
|
||||||
|
# Disable mouse acceleration
|
||||||
|
accelProfile = "flat";
|
||||||
|
accelSpeed = "1.15";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf config.physical {
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||||
@ -10,11 +10,22 @@
|
|||||||
networking.interfaces.wlp4s0.useDHCP = true;
|
networking.interfaces.wlp4s0.useDHCP = true;
|
||||||
|
|
||||||
networking.firewall.allowPing = lib.mkIf config.server true;
|
networking.firewall.allowPing = lib.mkIf config.server true;
|
||||||
networking.hosts = {
|
|
||||||
"192.168.0.120" = [ "tempest" ];
|
# DNS service discovery
|
||||||
"192.168.0.218" = [ "swan" ];
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
domainName = "local";
|
||||||
|
publish = {
|
||||||
|
enable = true;
|
||||||
|
addresses = true;
|
||||||
|
domain = true;
|
||||||
|
workstation = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Resolve local hostnames using Avahi DNS
|
||||||
|
services.avahi.nssmdns = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf config.physical {
|
||||||
|
|
||||||
# Prevent wake from keyboard
|
# Prevent wake from keyboard
|
||||||
powerManagement.powerDownCommands = ''
|
powerManagement.powerDownCommands = ''
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
for power in /sys/bus/i2c/devices/i2c-*/device/power; do echo disabled > ''${power}/wakeup || true; done
|
|
||||||
for power in /sys/bus/usb/devices/1-*/power; do echo disabled > ''${power}/wakeup || true; done
|
|
||||||
|
|
||||||
# Fix for Gigabyte motherboard
|
# Fix for Gigabyte motherboard
|
||||||
# /r/archlinux/comments/y7b97e/my_computer_wakes_up_immediately_after_i_suspend/isu99sr/
|
# /r/archlinux/comments/y7b97e/my_computer_wakes_up_immediately_after_i_suspend/isu99sr/
|
||||||
echo GPP0 > /proc/acpi/wakeup
|
# Disable if enabled
|
||||||
|
if (grep "GPP0.*enabled" /proc/acpi/wakeup >/dev/null); then
|
||||||
|
echo GPP0 | ${pkgs.doas}/bin/doas tee /proc/acpi/wakeup
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 2
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
'';
|
'';
|
||||||
|
@ -1,24 +1,36 @@
|
|||||||
{ config, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = { arrs.enable = lib.mkEnableOption "Arr services"; };
|
||||||
arrServer = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
config = lib.mkIf config.arrs.enable {
|
||||||
description = "Hostname for arr services";
|
|
||||||
default = null;
|
services = {
|
||||||
|
bazarr = {
|
||||||
|
enable = true;
|
||||||
|
group = "media";
|
||||||
|
};
|
||||||
|
jellyseerr.enable = true;
|
||||||
|
prowlarr.enable = true;
|
||||||
|
sabnzbd = {
|
||||||
|
enable = true;
|
||||||
|
group = "media";
|
||||||
|
configFile = "/data/downloads/sabnzbd/sabnzbd.ini";
|
||||||
|
};
|
||||||
|
sonarr = {
|
||||||
|
enable = true;
|
||||||
|
group = "media";
|
||||||
|
};
|
||||||
|
radarr = {
|
||||||
|
enable = true;
|
||||||
|
group = "media";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.arrServer != null) {
|
users.groups.media = { };
|
||||||
|
users.users.${config.user}.extraGroups = [ "media" ];
|
||||||
|
users.users.sabnzbd.homeMode = "0770";
|
||||||
|
|
||||||
services.sonarr.enable = true;
|
unfreePackages = [ "unrar" ]; # Required for sabnzbd
|
||||||
services.radarr.enable = true;
|
|
||||||
services.bazarr.enable = true;
|
|
||||||
services.prowlarr.enable = true;
|
|
||||||
|
|
||||||
# Grant users access to destination directories
|
|
||||||
users.users.sonarr.extraGroups = [ "jellyfin" ];
|
|
||||||
users.users.radarr.extraGroups = [ "jellyfin" ];
|
|
||||||
users.users.bazarr.extraGroups = [ "jellyfin" ];
|
|
||||||
|
|
||||||
# Requires updating the base_url config value in each service
|
# Requires updating the base_url config value in each service
|
||||||
# If you try to rewrite the URL, the service won't redirect properly
|
# If you try to rewrite the URL, the service won't redirect properly
|
||||||
@ -26,7 +38,7 @@
|
|||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/sonarr*" ];
|
path = [ "/sonarr*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
@ -37,7 +49,7 @@
|
|||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/radarr*" ];
|
path = [ "/radarr*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
@ -48,7 +60,7 @@
|
|||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/prowlarr*" ];
|
path = [ "/prowlarr*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
@ -59,7 +71,7 @@
|
|||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/bazarr*" ];
|
path = [ "/bazarr*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
@ -67,6 +79,25 @@
|
|||||||
upstreams = [{ dial = "localhost:6767"; }];
|
upstreams = [{ dial = "localhost:6767"; }];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
group = "download";
|
||||||
|
match = [{
|
||||||
|
host = [ config.hostnames.download ];
|
||||||
|
path = [ "/sabnzbd*" ];
|
||||||
|
}];
|
||||||
|
handle = [{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [{ dial = "localhost:8085"; }];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
group = "download";
|
||||||
|
match = [{ host = [ config.hostnames.download ]; }];
|
||||||
|
handle = [{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [{ dial = "localhost:5055"; }];
|
||||||
|
}];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
caddy.enable = lib.mkEnableOption "Caddy reverse proxy.";
|
caddy.tlsPolicies = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.attrs;
|
||||||
|
description = "Caddy JSON TLS policies";
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
caddy.routes = lib.mkOption {
|
caddy.routes = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.attrs;
|
type = lib.types.listOf lib.types.attrs;
|
||||||
description = "Caddy JSON routes for http servers";
|
description = "Caddy JSON routes for http servers";
|
||||||
@ -14,34 +18,35 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (config.caddy.enable && config.caddy.routes != [ ]) {
|
config =
|
||||||
|
lib.mkIf (config.services.caddy.enable && config.caddy.routes != [ ]) {
|
||||||
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
adapter = "''"; # Required to enable JSON
|
||||||
adapter = "''"; # Required to enable JSON
|
configFile = pkgs.writeText "Caddyfile" (builtins.toJSON {
|
||||||
configFile = pkgs.writeText "Caddyfile" (builtins.toJSON {
|
apps.http.servers.main = {
|
||||||
apps.http.servers.main = {
|
listen = [ ":443" ];
|
||||||
listen = [ ":443" ];
|
routes = config.caddy.routes;
|
||||||
routes = config.caddy.routes;
|
errors.routes = config.caddy.blocks;
|
||||||
errors.routes = config.caddy.blocks;
|
# logs = { }; # Uncomment to collect access logs
|
||||||
# logs = { }; # Uncomment to collect access logs
|
|
||||||
};
|
|
||||||
logging.logs.main = {
|
|
||||||
encoder = { format = "console"; };
|
|
||||||
writer = {
|
|
||||||
output = "file";
|
|
||||||
filename = "${config.services.caddy.logDir}/caddy.log";
|
|
||||||
roll = true;
|
|
||||||
};
|
};
|
||||||
level = "INFO";
|
apps.tls.automation.policies = config.caddy.tlsPolicies;
|
||||||
};
|
logging.logs.main = {
|
||||||
});
|
encoder = { format = "console"; };
|
||||||
|
writer = {
|
||||||
|
output = "file";
|
||||||
|
filename = "${config.services.caddy.logDir}/caddy.log";
|
||||||
|
roll = true;
|
||||||
|
};
|
||||||
|
level = "INFO";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,6 @@ let
|
|||||||
in {
|
in {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
bookServer = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
description = "Hostname for Calibre library";
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
backups.calibre = lib.mkOption {
|
backups.calibre = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
description = "Whether to backup Calibre library";
|
description = "Whether to backup Calibre library";
|
||||||
@ -19,10 +14,9 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf (config.bookServer != null) {
|
config = lib.mkIf config.services.calibre-web.enable {
|
||||||
|
|
||||||
services.calibre-web = {
|
services.calibre-web = {
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
options = {
|
options = {
|
||||||
reverseProxyAuth.enable = false;
|
reverseProxyAuth.enable = false;
|
||||||
@ -33,7 +27,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
caddy.routes = [{
|
caddy.routes = [{
|
||||||
match = [{ host = [ config.bookServer ]; }];
|
match = [{ host = [ config.hostnames.books ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:8083"; }];
|
upstreams = [{ dial = "localhost:8083"; }];
|
||||||
|
87
modules/nixos/services/cloudflare-tunnel.nix
Normal file
87
modules/nixos/services/cloudflare-tunnel.nix
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
# First time setup:
|
||||||
|
|
||||||
|
# nix-shell -p cloudflared
|
||||||
|
# cloudflared tunnel login
|
||||||
|
# cloudflared tunnel create <host>
|
||||||
|
# nix run github:nmasur/dotfiles#encrypt-secret > private/cloudflared-<host>.age
|
||||||
|
# Paste ~/.cloudflared/<id>.json
|
||||||
|
# Set tunnel.id = "<id>"
|
||||||
|
# Remove ~/.cloudflared/
|
||||||
|
|
||||||
|
# For SSH access:
|
||||||
|
# Cloudflare Zero Trust -> Access -> Applications -> Create Application
|
||||||
|
# Service Auth -> SSH -> Select Application -> Generate Certificate
|
||||||
|
# Set ca = "<public key>"
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
options.cloudflareTunnel = {
|
||||||
|
enable = lib.mkEnableOption "Use Cloudflare Tunnel";
|
||||||
|
id = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Cloudflare tunnel ID";
|
||||||
|
};
|
||||||
|
credentialsFile = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
description = "Cloudflare tunnel credentials file (age-encrypted)";
|
||||||
|
};
|
||||||
|
ca = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Cloudflare tunnel CA public key";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.cloudflareTunnel.enable {
|
||||||
|
|
||||||
|
services.cloudflared = {
|
||||||
|
enable = true;
|
||||||
|
tunnels = {
|
||||||
|
"${config.cloudflareTunnel.id}" = {
|
||||||
|
credentialsFile = config.secrets.cloudflared.dest;
|
||||||
|
default = "http_status:404";
|
||||||
|
ingress = { "*.masu.rs" = "ssh://localhost:22"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc = {
|
||||||
|
"ssh/ca.pub".text = ''
|
||||||
|
${config.cloudflareTunnel.ca}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Must match the username of the email address in Cloudflare Access
|
||||||
|
"ssh/authorized_principals".text = ''
|
||||||
|
${config.user}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.openssh.extraConfig = ''
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
TrustedUserCAKeys /etc/ssh/ca.pub
|
||||||
|
Match User '${config.user}'
|
||||||
|
AuthorizedPrincipalsFile /etc/ssh/authorized_principals
|
||||||
|
# if there is no existing AuthenticationMethods
|
||||||
|
AuthenticationMethods publickey
|
||||||
|
'';
|
||||||
|
services.openssh.settings.Macs =
|
||||||
|
[ "hmac-sha2-512" ]; # Fix for failure to find matching mac
|
||||||
|
|
||||||
|
# Create credentials file for Cloudflare
|
||||||
|
secrets.cloudflared = {
|
||||||
|
source = config.cloudflareTunnel.credentialsFile;
|
||||||
|
dest = "${config.secretsDirectory}/cloudflared";
|
||||||
|
owner = "cloudflared";
|
||||||
|
group = "cloudflared";
|
||||||
|
permissions = "0440";
|
||||||
|
};
|
||||||
|
systemd.services.cloudflared-secret = {
|
||||||
|
requiredBy =
|
||||||
|
[ "cloudflared-tunnel-${config.cloudflareTunnel.id}.service" ];
|
||||||
|
before = [ "cloudflared-tunnel-${config.cloudflareTunnel.id}.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
# This module is necessary for hosts that are serving through Cloudflare.
|
# This module is necessary for hosts that are serving through Cloudflare.
|
||||||
|
|
||||||
{ config, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -49,6 +49,38 @@ in {
|
|||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
|
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
||||||
|
services.caddy.package = (pkgs.callPackage ../../../overlays/caddy.nix {
|
||||||
|
plugins = [ "github.com/caddy-dns/cloudflare" ];
|
||||||
|
# vendorSha256 = "sha256-K9HPZnr+hMcK5aEd1H4gEg6PXAaNrNWFvaHYm5m62JY=";
|
||||||
|
});
|
||||||
|
caddy.tlsPolicies = [{
|
||||||
|
issuers = [{
|
||||||
|
module = "acme";
|
||||||
|
challenges = {
|
||||||
|
dns = {
|
||||||
|
provider = {
|
||||||
|
name = "cloudflare";
|
||||||
|
api_token = "{env.CF_API_TOKEN}";
|
||||||
|
};
|
||||||
|
resolvers = [ "1.1.1.1" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
systemd.services.caddy.serviceConfig.EnvironmentFile =
|
||||||
|
config.secrets.cloudflareApi.dest;
|
||||||
|
systemd.services.caddy.serviceConfig.AmbientCapabilities =
|
||||||
|
"CAP_NET_BIND_SERVICE";
|
||||||
|
|
||||||
|
# API key must have access to modify Cloudflare DNS records
|
||||||
|
secrets.cloudflareApi = {
|
||||||
|
source = ../../../private/cloudflare-api.age;
|
||||||
|
dest = "${config.secretsDirectory}/cloudflare-api";
|
||||||
|
owner = "caddy";
|
||||||
|
group = "caddy";
|
||||||
|
};
|
||||||
|
|
||||||
# Allows Nextcloud to trust Cloudflare IPs
|
# Allows Nextcloud to trust Cloudflare IPs
|
||||||
services.nextcloud.config.trustedProxies = cloudflareIpRanges;
|
services.nextcloud.config.trustedProxies = cloudflareIpRanges;
|
||||||
|
|
||||||
|
@ -5,9 +5,12 @@
|
|||||||
./backups.nix
|
./backups.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
./calibre.nix
|
./calibre.nix
|
||||||
|
./cloudflare-tunnel.nix
|
||||||
./cloudflare.nix
|
./cloudflare.nix
|
||||||
|
./gitea-runner.nix
|
||||||
./gitea.nix
|
./gitea.nix
|
||||||
./gnupg.nix
|
./gnupg.nix
|
||||||
|
./grafana.nix
|
||||||
./honeypot.nix
|
./honeypot.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./keybase.nix
|
./keybase.nix
|
||||||
|
36
modules/nixos/services/gitea-runner.nix
Normal file
36
modules/nixos/services/gitea-runner.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.giteaRunner.enable =
|
||||||
|
lib.mkEnableOption "Enable Gitea Actions runner.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.giteaRunner.enable {
|
||||||
|
|
||||||
|
services.gitea-actions-runner.instances.${config.networking.hostName} = {
|
||||||
|
enable = true;
|
||||||
|
labels = [
|
||||||
|
# Provide a Debian base with NodeJS for actions
|
||||||
|
"debian-latest:docker://node:18-bullseye"
|
||||||
|
# Fake the Ubuntu name, because Node provides no Ubuntu builds
|
||||||
|
"ubuntu-latest:docker://node:18-bullseye"
|
||||||
|
# Provide native execution on the host using below packages
|
||||||
|
"native:host"
|
||||||
|
];
|
||||||
|
hostPackages = with pkgs; [
|
||||||
|
bash
|
||||||
|
coreutils
|
||||||
|
curl
|
||||||
|
gawk
|
||||||
|
gitMinimal
|
||||||
|
gnused
|
||||||
|
nodejs
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
name = config.networking.hostName;
|
||||||
|
url = "https://${config.hostnames.git}";
|
||||||
|
tokenFile = config.secrets.giteaRunnerToken.dest;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,36 +1,26 @@
|
|||||||
{ config, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let giteaPath = "/var/lib/gitea"; # Default service directory
|
let giteaPath = "/var/lib/gitea"; # Default service directory
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
options = {
|
config = lib.mkIf config.services.gitea.enable {
|
||||||
|
|
||||||
giteaServer = lib.mkOption {
|
|
||||||
description = "Hostname for Gitea.";
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.giteaServer != null) {
|
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
|
||||||
httpPort = 3001;
|
|
||||||
httpAddress = "127.0.0.1";
|
|
||||||
rootUrl = "https://${config.giteaServer}/";
|
|
||||||
database.type = "sqlite3";
|
database.type = "sqlite3";
|
||||||
settings = {
|
settings = {
|
||||||
|
actions.ENABLED = true;
|
||||||
repository = {
|
repository = {
|
||||||
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
||||||
DISABLE_HTTP_GIT = false;
|
DISABLE_HTTP_GIT = false;
|
||||||
ACCESS_CONTROL_ALLOW_ORIGIN = config.giteaServer;
|
ACCESS_CONTROL_ALLOW_ORIGIN = config.hostnames.git;
|
||||||
ENABLE_PUSH_CREATE_USER = true;
|
ENABLE_PUSH_CREATE_USER = true;
|
||||||
ENABLE_PUSH_CREATE_ORG = true;
|
ENABLE_PUSH_CREATE_ORG = true;
|
||||||
DEFAULT_BRANCH = "main";
|
DEFAULT_BRANCH = "main";
|
||||||
};
|
};
|
||||||
server = {
|
server = {
|
||||||
|
HTTP_PORT = 3001;
|
||||||
|
HTTP_ADDRESS = "127.0.0.1";
|
||||||
|
ROOT_URL = "https://${config.hostnames.git}/";
|
||||||
SSH_PORT = 22;
|
SSH_PORT = 22;
|
||||||
START_SSH_SERVER = false; # Use sshd instead
|
START_SSH_SERVER = false; # Use sshd instead
|
||||||
DISABLE_SSH = false;
|
DISABLE_SSH = false;
|
||||||
@ -45,9 +35,10 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 122 ];
|
networking.firewall.allowedTCPPorts = [ 122 ];
|
||||||
|
users.users.${config.user}.extraGroups = [ "gitea" ];
|
||||||
|
|
||||||
caddy.routes = [{
|
caddy.routes = [{
|
||||||
match = [{ host = [ config.giteaServer ]; }];
|
match = [{ host = [ config.hostnames.git ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:3001"; }];
|
upstreams = [{ dial = "localhost:3001"; }];
|
||||||
@ -59,10 +50,8 @@ in {
|
|||||||
# Open to groups, allowing for backups
|
# Open to groups, allowing for backups
|
||||||
systemd.services.gitea.serviceConfig.StateDirectoryMode =
|
systemd.services.gitea.serviceConfig.StateDirectoryMode =
|
||||||
lib.mkForce "0770";
|
lib.mkForce "0770";
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules =
|
||||||
"d ${giteaPath}/data 0775 gitea gitea"
|
[ "f ${giteaPath}/data/gitea.db 0660 gitea gitea" ];
|
||||||
"f ${giteaPath}/data/gitea.db 0660 gitea gitea"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Allow litestream and gitea to share a sqlite database
|
# Allow litestream and gitea to share a sqlite database
|
||||||
users.users.litestream.extraGroups = [ "gitea" ];
|
users.users.litestream.extraGroups = [ "gitea" ];
|
||||||
@ -87,6 +76,34 @@ in {
|
|||||||
requires = [ "gitea.service" ];
|
requires = [ "gitea.service" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Run a repository file backup on a schedule
|
||||||
|
systemd.timers.gitea-backup = lib.mkIf (config.backup.s3.endpoint != null) {
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "*-*-* 00:00:00"; # Once per day
|
||||||
|
Unit = "gitea-backup.service";
|
||||||
|
};
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Backup Gitea repos to object storage
|
||||||
|
systemd.services.gitea-backup =
|
||||||
|
lib.mkIf (config.backup.s3.endpoint != null) {
|
||||||
|
description = "Backup Gitea data";
|
||||||
|
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "gitea";
|
||||||
|
Group = "backup";
|
||||||
|
EnvironmentFile = config.secrets.backup.dest;
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
|
||||||
|
${giteaPath}/ \
|
||||||
|
s3://${config.backup.s3.bucket}/gitea-data/ \
|
||||||
|
--endpoint-url=https://${config.backup.s3.endpoint}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
22
modules/nixos/services/grafana.nix
Normal file
22
modules/nixos/services/grafana.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
|
config = lib.mkIf config.services.grafana.enable {
|
||||||
|
|
||||||
|
services.grafana.settings.server = {
|
||||||
|
domain = config.hostnames.metrics;
|
||||||
|
http_addr = "127.0.0.1";
|
||||||
|
http_port = 3000;
|
||||||
|
protocol = "http";
|
||||||
|
};
|
||||||
|
|
||||||
|
caddy.routes = [{
|
||||||
|
match = [{ host = [ config.hostnames.metrics ]; }];
|
||||||
|
handle = [{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [{ dial = "localhost:3000"; }];
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,34 +1,40 @@
|
|||||||
{ config, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
config = lib.mkIf config.services.jellyfin.enable {
|
||||||
streamServer = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
description = "Hostname for Jellyfin library";
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf (config.streamServer != null) {
|
services.jellyfin.group = "media";
|
||||||
|
users.users.jellyfin = { isSystemUser = true; };
|
||||||
services.jellyfin.enable = true;
|
|
||||||
|
|
||||||
caddy.routes = [{
|
caddy.routes = [{
|
||||||
match = [{ host = [ config.streamServer ]; }];
|
match = [{ host = [ config.hostnames.stream ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:8096"; }];
|
upstreams = [{ dial = "localhost:8096"; }];
|
||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
# Grant user access to Jellyfin directories
|
|
||||||
users.users.${config.user}.extraGroups = [ "jellyfin" ];
|
|
||||||
|
|
||||||
# Create videos directory, allow anyone in Jellyfin group to manage it
|
# Create videos directory, allow anyone in Jellyfin group to manage it
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /var/lib/jellyfin 0775 jellyfin jellyfin"
|
"d /var/lib/jellyfin 0775 jellyfin media"
|
||||||
"d /var/lib/jellyfin/library 0775 jellyfin jellyfin"
|
"d /var/lib/jellyfin/library 0775 jellyfin media"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Enable VA-API for hardware transcoding
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
extraPackages = [ pkgs.libva ];
|
||||||
|
};
|
||||||
|
environment.systemPackages = [ pkgs.libva-utils ];
|
||||||
|
environment.variables = {
|
||||||
|
# VAAPI and VDPAU config for accelerated video.
|
||||||
|
# See https://wiki.archlinux.org/index.php/Hardware_video_acceleration
|
||||||
|
"VDPAU_DRIVER" = "radeonsi";
|
||||||
|
"LIBVA_DRIVER_NAME" = "radeonsi";
|
||||||
|
};
|
||||||
|
users.users.jellyfin.extraGroups =
|
||||||
|
[ "render" "video" ]; # Access to /dev/dri
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user