mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-08 10:40:13 +00:00
Compare commits
66 Commits
8d8dd8ad62
...
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 | |||
6815af21dc | |||
3269d5e247 | |||
d337ffff51 | |||
df5fba19f8 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,7 +3,6 @@
|
||||
*.db
|
||||
**/.direnv/**
|
||||
result
|
||||
.luarc.json
|
||||
private/**
|
||||
templates/**/flake.lock
|
||||
!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) |
|
||||
| Shell | [Fish](https://fishshell.com/) | [Link](./modules/common/shell/fish) |
|
||||
| Shell Prompt | [Starship](https://starship.rs/) | [Link](./modules/common/shell/starhip.nix) |
|
||||
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox) |
|
||||
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix)
|
||||
| Colorscheme | [Gruvbox](https://github.com/morhetz/gruvbox) | [Link](./colorscheme/gruvbox/default.nix) |
|
||||
| Wallpaper | [Road](https://gitlab.com/exorcist365/wallpapers/-/blob/master/gruvbox/road.jpg) | [Link](./hosts/tempest/default.nix) |
|
||||
| Text Editor | [Neovim](https://neovim.io/) | [Link](./modules/common/neovim/config) |
|
||||
| Browser | [Firefox](https://www.mozilla.org/en-US/firefox/new/) | [Link](./modules/common/applications/firefox.nix) |
|
||||
| E-Mail | [Aerc](https://aerc-mail.org/) | [Link](./modules/common/mail/aerc.nix) |
|
||||
|
@ -5,7 +5,7 @@
|
||||
program = "${
|
||||
(import ../modules/common/neovim/package {
|
||||
inherit pkgs;
|
||||
colors = (import ../colorscheme/gruvbox).dark;
|
||||
colors = (import ../colorscheme/nord).dark;
|
||||
})
|
||||
}/bin/nvim";
|
||||
|
||||
|
@ -1,20 +1,24 @@
|
||||
{
|
||||
name = "everforest"; # dark, hard
|
||||
author = "Sainnhe Park";
|
||||
base00 = "#2b3339"; # Default Background
|
||||
base01 = "#323c41"; # Lighter Background
|
||||
base02 = "#503946"; # Selection Background
|
||||
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
||||
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
||||
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
||||
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
||||
base07 = "#fff9e8"; # Light Background (Not often used)
|
||||
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
||||
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
||||
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
||||
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
||||
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
||||
base0E = "#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||
base0F = "#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
||||
dark = {
|
||||
base00 = "#2b3339"; # Default Background
|
||||
base01 = "#323c41"; # Lighter Background
|
||||
base02 = "#503946"; # Selection Background
|
||||
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
||||
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
||||
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
||||
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
||||
base07 = "#fff9e8"; # Light Background (Not often used)
|
||||
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
||||
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
||||
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
||||
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
||||
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
||||
base0E =
|
||||
"#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||
base0F =
|
||||
"#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
name = "nord";
|
||||
author = "arcticicestudio";
|
||||
dark = {
|
||||
name = "nord";
|
||||
author = "arcticicestudio";
|
||||
base00 = "#2E3440";
|
||||
base01 = "#3B4252";
|
||||
base02 = "#434C5E";
|
||||
|
@ -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
|
202
flake.lock
generated
202
flake.lock
generated
@ -3,15 +3,16 @@
|
||||
"Comment-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1683091103,
|
||||
"narHash": "sha256-CMHkf+0T5FRMcqD6zGFo5IHrgT0xbZXe1UgOs+b1148=",
|
||||
"lastModified": 1681214440,
|
||||
"narHash": "sha256-48hy+hiaDJLlgWqC7IeZI3dT+VwWkRo4atQbyPxu/ys=",
|
||||
"owner": "numToStr",
|
||||
"repo": "Comment.nvim",
|
||||
"rev": "e1fe53117aab24c378d5e6deaad786789c360123",
|
||||
"rev": "e51f2b142d88bb666dcaa77d93a07f4b419aca70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numToStr",
|
||||
"ref": "v0.8.0",
|
||||
"repo": "Comment.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
@ -19,15 +20,16 @@
|
||||
"bufferline-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1684703438,
|
||||
"narHash": "sha256-WM8/dHqiEykuw0qEQtenM5Rcv/Jr3Jxj5vulC/IKfAE=",
|
||||
"lastModified": 1687763763,
|
||||
"narHash": "sha256-wbOeylzjjScQXkrDbBU2HtrOZrp2YUK+wQ2aOkgxmRQ=",
|
||||
"owner": "akinsho",
|
||||
"repo": "bufferline.nvim",
|
||||
"rev": "32d74d5d044f7cc89892d4781a83d55ee4ed552a",
|
||||
"rev": "bf2f6b7edd0abf6b0732f5e5c0a8f30e51611c75",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"ref": "v4.2.0",
|
||||
"repo": "bufferline.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
@ -35,11 +37,11 @@
|
||||
"cmp-nvim-lsp-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1675708067,
|
||||
"narHash": "sha256-DxpcPTBlvVP88PDoTheLV2fC76EXDqS2UpM5mAfj/D4=",
|
||||
"lastModified": 1687494203,
|
||||
"narHash": "sha256-mU0soCz79erJXMMqD/FyrJZ0mu2n6fE0deymPzQlxts=",
|
||||
"owner": "hrsh7th",
|
||||
"repo": "cmp-nvim-lsp",
|
||||
"rev": "0e6b2ed705ddcff9738ec4ea838141654f12eeef",
|
||||
"rev": "44b16d11215dce86f253ce0c30949813c0a90765",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -55,11 +57,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1684774948,
|
||||
"narHash": "sha256-hJTaw4dYzcB+lsasKejnafq0CxPsVetn9RLXrcL+4jE=",
|
||||
"lastModified": 1687517837,
|
||||
"narHash": "sha256-Ea+JTy6NSf+wWIFrgC8gnOnyt01xwmtDEn2KecvaBkg=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "b8c286c82c6b47826a6c0377e7017052ad91353c",
|
||||
"rev": "6460468e7a3e1290f132fee4170ebeaa127f6f32",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -76,11 +78,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1684783210,
|
||||
"narHash": "sha256-hxRbwwBTu1G1u1EdI9nEo/n4HIsQIfNi+2BQ1nEoj/o=",
|
||||
"lastModified": 1687598357,
|
||||
"narHash": "sha256-70ciIe8415oQnQypawaqocEaLJcI1XtkqRNmle8vsrg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "f0b9f374bb42fdcd57baa7d4448ac5d4788226bd",
|
||||
"rev": "1e7098ee0448dc5d33df394d040f454cd42a809c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -91,14 +93,16 @@
|
||||
},
|
||||
"firefox-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1684975649,
|
||||
"narHash": "sha256-s1ZI9g1+1SYo1qqEGa/2z+d3YUm53BukJwSrle87ZfI=",
|
||||
"lastModified": 1688605308,
|
||||
"narHash": "sha256-B9suu7dcdX4a18loO5ul237gqIJ5/+TRuheLj8fJjwM=",
|
||||
"owner": "bandithedoge",
|
||||
"repo": "nixpkgs-firefox-darwin",
|
||||
"rev": "84cac43d8b836c9a8c834c22e14f86602414729f",
|
||||
"rev": "78d28acf685e19d353b2ecb6c38eeb3fc624fc68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -143,11 +147,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -161,11 +165,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -181,11 +185,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1684824189,
|
||||
"narHash": "sha256-k3nCkn5Qy67rCguuw6YkGuL6hOUNRKxQoKOjnapk5sU=",
|
||||
"lastModified": 1687627695,
|
||||
"narHash": "sha256-6Pu7nWb52PRtUmihwuDNShDmsZiXgtXR0OARtH4DSik=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "58eb968c21d309a6c2b020ea8d64e25c38ceebba",
|
||||
"rev": "172d46d4b2677b32277d903bdf4cff77c2cc6477",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -198,7 +202,9 @@
|
||||
"nil": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
@ -224,11 +230,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682346855,
|
||||
"narHash": "sha256-Q1+02NaOyIywqKg/hhdB80yfEBZW8CWA9IDBDyLhEf0=",
|
||||
"lastModified": 1685980282,
|
||||
"narHash": "sha256-uQyVaoqkiocA8bXKMfrgizuKmz0hUzHye5owFoUd2AQ=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "nix2vim",
|
||||
"rev": "4b8dfdc3434e8fd1ecf08eed9228ab02560eff4c",
|
||||
"rev": "3836a348503ae27340c7f83f0bc7bcb907f3781d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -239,11 +245,11 @@
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1681001314,
|
||||
"narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=",
|
||||
"lastModified": 1687049841,
|
||||
"narHash": "sha256-FBNZQfWtA7bb/rwk92mfiWc85x4hXta2OAouDqO5W8w=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4",
|
||||
"rev": "908af6d1fa3643c5818ea45aa92b21d6385fbbe5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -260,11 +266,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685000237,
|
||||
"narHash": "sha256-pm+2xP9g9sh6wapk1ulg7/1DdENkTNDB7Kx+6lwGs/k=",
|
||||
"lastModified": 1687398392,
|
||||
"narHash": "sha256-T6kc3NMTpGJk1/dve8PGupeVcxboEb78xtTKhe3LL/A=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixos-generators",
|
||||
"rev": "05bef004794f352ea12475a89f3f55b4102c0728",
|
||||
"rev": "649171f56a45af13ba693c156207eafbbbf7edfe",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -275,43 +281,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1639237670,
|
||||
"narHash": "sha256-RTdL4rEQcgaZGpvtDgkp3oK/V+1LM3I53n0ACPSroAQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "edfb969386ebe6c3cf8f878775a7975cd88f926d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "master",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1680487167,
|
||||
"narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=",
|
||||
"lastModified": 1687502512,
|
||||
"narHash": "sha256-dBL/01TayOSZYxtY4cMXuNCBk8UMLoqRZA+94xiFpJA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "53dad94e874c9586e71decf82d972dfb640ef044",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1684935479,
|
||||
"narHash": "sha256-6QMMsXMr2nhmOPHdti2j3KRHt+bai2zw+LJfdCl97Mk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f91ee3065de91a3531329a674a45ddcb3467a650",
|
||||
"rev": "3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -321,13 +295,13 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1682669017,
|
||||
"narHash": "sha256-Vi+p4y3wnl0/4gcwTdmCO398kKlDaUrNROtf3GOD2NY=",
|
||||
"lastModified": 1686929285,
|
||||
"narHash": "sha256-WGtVzn+vGMPTXDO0DMNKVFtf+zUSqeW+KKk4Y/Ae99I=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7449971a3ecf857b4a554cf79b1d9dcc1a4647d8",
|
||||
"rev": "93fddcf640ceca0be331210ba3101cee9d91c13d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -340,11 +314,11 @@
|
||||
"null-ls-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1684332768,
|
||||
"narHash": "sha256-WHGIYU65YlbtdQFQVGzdcjrBQmu6aK0jgXEMTyKzdsA=",
|
||||
"lastModified": 1686871437,
|
||||
"narHash": "sha256-MxIZqyRW8jStiDNXt7Bsw8peDLKpqxKEaUuIJsXkGMI=",
|
||||
"owner": "jose-elias-alvarez",
|
||||
"repo": "null-ls.nvim",
|
||||
"rev": "77e53bc3bac34cc273be8ed9eb9ab78bcf67fa48",
|
||||
"rev": "bbaf5a96913aa92281f154b08732be2f57021c45",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -355,11 +329,11 @@
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1684959207,
|
||||
"narHash": "sha256-lROs3YxWZDGeEPrcv0AYEfyps+gSW01E/VoTkmHU768=",
|
||||
"lastModified": 1687625402,
|
||||
"narHash": "sha256-V+vSWypmm/tGbwNXGhqzmiV7vTjV2gNCEh9N7OhNnyA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "c4e46e935ba827acf70979c5e02a8431cf14cc5a",
|
||||
"rev": "aeaf37c7538965e45700d39e6b5dc9c9a0e0749c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -371,15 +345,16 @@
|
||||
"nvim-lspconfig-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1684889161,
|
||||
"narHash": "sha256-7EIml2rUd+sXExN3wAlQsguDIVzLiJ42+3vI6W2bkmc=",
|
||||
"lastModified": 1675639052,
|
||||
"narHash": "sha256-B8IgpypxzCACZ5VcqM6KiWyClaN+KrmemtkwMznmj5Y=",
|
||||
"owner": "neovim",
|
||||
"repo": "nvim-lspconfig",
|
||||
"rev": "570aae82f8c6bc15fb6e559ed7d5a3fd85374329",
|
||||
"rev": "255e07ce2a05627d482d2de77308bba51b90470c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "neovim",
|
||||
"ref": "v0.1.6",
|
||||
"repo": "nvim-lspconfig",
|
||||
"type": "github"
|
||||
}
|
||||
@ -387,11 +362,11 @@
|
||||
"nvim-tree-lua-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1684894163,
|
||||
"narHash": "sha256-VvcTDNNzj6gFiBDUDh5NoZv0n4y8Aw8Ix7Vv2U+O+NY=",
|
||||
"lastModified": 1687132855,
|
||||
"narHash": "sha256-ZRUoCDBv8rO8ZUBUMLgo33EBbqD9+ZOSET9rkFsA++E=",
|
||||
"owner": "kyazdani42",
|
||||
"repo": "nvim-tree.lua",
|
||||
"rev": "9ef6c3cd8805d868d20106be09ce07f004e8232f",
|
||||
"rev": "c3c6544ee00333b0f1d6a13735d0dd302dba4f70",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -403,16 +378,16 @@
|
||||
"nvim-treesitter-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1677248832,
|
||||
"narHash": "sha256-4TmtrufxjVpnSNfFpn6GQStEhq3KQb3JfmfMEJnSI8k=",
|
||||
"lastModified": 1681121236,
|
||||
"narHash": "sha256-iPsPDLhVKJ14iP1/2cCgcY9SCKK/DQz9Y0mQB1DqNiM=",
|
||||
"owner": "nvim-treesitter",
|
||||
"repo": "nvim-treesitter",
|
||||
"rev": "b401b7423d18c78371c5ff1a5f8d3c14292b2047",
|
||||
"rev": "cc360a9beb1b30d172438f640e2c3450358c4086",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-treesitter",
|
||||
"ref": "v0.8.5.2",
|
||||
"ref": "v0.9.0",
|
||||
"repo": "nvim-treesitter",
|
||||
"type": "github"
|
||||
}
|
||||
@ -429,7 +404,7 @@
|
||||
"nil": "nil",
|
||||
"nix2vim": "nix2vim",
|
||||
"nixos-generators": "nixos-generators",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"null-ls-nvim-src": "null-ls-nvim-src",
|
||||
"nur": "nur",
|
||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||
@ -438,6 +413,7 @@
|
||||
"telescope-nvim-src": "telescope-nvim-src",
|
||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||
"vscode-terraform-snippets": "vscode-terraform-snippets",
|
||||
"wallpapers": "wallpapers",
|
||||
"wsl": "wsl"
|
||||
}
|
||||
@ -500,15 +476,16 @@
|
||||
"telescope-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1684993479,
|
||||
"narHash": "sha256-FIAN3NQrD7PhrtCKnlrr//bZ259qcvGogL45nC8tLpw=",
|
||||
"lastModified": 1686302912,
|
||||
"narHash": "sha256-fV3LLRwAPykVGc4ImOnUSP+WTrPp9Ad9OTfBJ6wqTMk=",
|
||||
"owner": "nvim-telescope",
|
||||
"repo": "telescope.nvim",
|
||||
"rev": "6d3fbffe426794296a77bb0b37b6ae0f4f14f807",
|
||||
"rev": "776b509f80dd49d8205b9b0d94485568236d1192",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nvim-telescope",
|
||||
"ref": "0.1.2",
|
||||
"repo": "telescope.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
@ -532,19 +509,36 @@
|
||||
"toggleterm-nvim-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1684743261,
|
||||
"narHash": "sha256-mDxd6gxVuUVpbo6iIEzAyfyLNItn4dTbprRAG5PlECI=",
|
||||
"lastModified": 1685434104,
|
||||
"narHash": "sha256-oiCnBrvft6XxiQtQH8E4F842xhh348SaTpHzaeb+iDY=",
|
||||
"owner": "akinsho",
|
||||
"repo": "toggleterm.nvim",
|
||||
"rev": "a44313fb28ed9bc9837c2b99dec1c6eed3a4f47f",
|
||||
"rev": "95204ece0f2a54c89c4395295432f9aeedca7b5f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "akinsho",
|
||||
"ref": "v2.7.0",
|
||||
"repo": "toggleterm.nvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vscode-terraform-snippets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1614849738,
|
||||
"narHash": "sha256-v392tyzXV+zyBNt5OCB2NBCK7JcByrTa5Ne/nFtSCJI=",
|
||||
"owner": "run-at-scale",
|
||||
"repo": "vscode-terraform-doc-snippets",
|
||||
"rev": "6ab3e44b566e660f38922cf908e6e547eaa5d4b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "run-at-scale",
|
||||
"repo": "vscode-terraform-doc-snippets",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wallpapers": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -565,14 +559,14 @@
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682982995,
|
||||
"narHash": "sha256-PK0pSY48JkcLDFphafjpLqeTDs0XUqGMHjsiNuEq5s0=",
|
||||
"lastModified": 1687279045,
|
||||
"narHash": "sha256-LR0dsXd/A07M61jclyBUW0wRojEQteWReKM35zoJXp0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "c5d7db84c422be515dac8fc26420900c349374e8",
|
||||
"rev": "a8486b5d191f11d571f15d80b6e265d1712d01cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
116
flake.nix
116
flake.nix
@ -20,14 +20,17 @@
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/master";
|
||||
inputs.nixpkgs.follows =
|
||||
"nixpkgs"; # Use system packages list where available
|
||||
"nixpkgs"; # Use system packages list for their inputs
|
||||
};
|
||||
|
||||
# Community packages; used for Firefox extensions
|
||||
nur.url = "github:nix-community/nur";
|
||||
|
||||
# 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
|
||||
disko = {
|
||||
@ -54,11 +57,14 @@
|
||||
};
|
||||
|
||||
# Nix language server
|
||||
nil.url = "github:oxalica/nil/2023-04-03";
|
||||
nil = {
|
||||
url = "github:oxalica/nil/2023-04-03";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Neovim plugins
|
||||
nvim-lspconfig-src = {
|
||||
url = "github:neovim/nvim-lspconfig";
|
||||
url = "github:neovim/nvim-lspconfig/v0.1.6";
|
||||
flake = false;
|
||||
};
|
||||
cmp-nvim-lsp-src = {
|
||||
@ -70,15 +76,15 @@
|
||||
flake = false;
|
||||
};
|
||||
Comment-nvim-src = {
|
||||
url = "github:numToStr/Comment.nvim";
|
||||
url = "github:numToStr/Comment.nvim/v0.8.0";
|
||||
flake = false;
|
||||
};
|
||||
nvim-treesitter-src = {
|
||||
url = "github:nvim-treesitter/nvim-treesitter/v0.8.5.2";
|
||||
url = "github:nvim-treesitter/nvim-treesitter/v0.9.0";
|
||||
flake = false;
|
||||
};
|
||||
telescope-nvim-src = {
|
||||
url = "github:nvim-telescope/telescope.nvim";
|
||||
url = "github:nvim-telescope/telescope.nvim/0.1.2";
|
||||
flake = false;
|
||||
};
|
||||
telescope-project-nvim-src = {
|
||||
@ -86,26 +92,41 @@
|
||||
flake = false;
|
||||
};
|
||||
toggleterm-nvim-src = {
|
||||
url = "github:akinsho/toggleterm.nvim";
|
||||
url = "github:akinsho/toggleterm.nvim/v2.7.0";
|
||||
flake = false;
|
||||
};
|
||||
bufferline-nvim-src = {
|
||||
url = "github:akinsho/bufferline.nvim";
|
||||
url = "github:akinsho/bufferline.nvim/v4.2.0";
|
||||
flake = false;
|
||||
};
|
||||
nvim-tree-lua-src = {
|
||||
url = "github:kyazdani42/nvim-tree.lua";
|
||||
flake = false;
|
||||
};
|
||||
vscode-terraform-snippets = {
|
||||
url = "github:run-at-scale/vscode-terraform-doc-snippets";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, ... }@inputs:
|
||||
outputs = { self, nixpkgs, ... }@inputs:
|
||||
|
||||
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
|
||||
globals = rec {
|
||||
globals = let baseName = "masu.rs";
|
||||
in rec {
|
||||
user = "noah";
|
||||
fullName = "Noah Masur";
|
||||
gitName = fullName;
|
||||
@ -114,17 +135,19 @@
|
||||
mail.imapHost = "imap.purelymail.com";
|
||||
mail.smtpHost = "smtp.purelymail.com";
|
||||
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.
|
||||
supportedSystems =
|
||||
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
||||
@ -134,23 +157,29 @@
|
||||
|
||||
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
|
||||
# nixos-rebuild switch --flake .#tempest
|
||||
nixosConfigurations = {
|
||||
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
|
||||
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
|
||||
flame = import ./hosts/flame { inherit inputs globals overlays; };
|
||||
swan = import ./hosts/swan { inherit inputs globals overlays; };
|
||||
tempest = import ./hosts/tempest { inherit self; };
|
||||
hydra = import ./hosts/hydra { inherit self; };
|
||||
flame = import ./hosts/flame { inherit self; };
|
||||
swan = import ./hosts/swan { inherit self; };
|
||||
};
|
||||
|
||||
# Contains my full Mac system builds, including home-manager
|
||||
# darwin-rebuild switch --flake .#lookingglass
|
||||
darwinConfigurations = {
|
||||
lookingglass =
|
||||
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
||||
lookingglass = import ./hosts/lookingglass { inherit self; };
|
||||
};
|
||||
|
||||
# For quickly applying local settings with:
|
||||
# For quickly applying home-manager settings with:
|
||||
# home-manager switch --flake .#tempest
|
||||
homeConfigurations = {
|
||||
tempest =
|
||||
@ -163,10 +192,8 @@
|
||||
diskoConfigurations = { root = import ./disks/root.nix; };
|
||||
|
||||
packages = let
|
||||
aws = system:
|
||||
import ./generators/aws { inherit inputs globals overlays system; };
|
||||
staff = system:
|
||||
import ./generators/staff { inherit inputs globals overlays system; };
|
||||
aws = system: import ./hosts/aws { inherit self system; };
|
||||
staff = system: import ./hosts/staff { inherit self system; };
|
||||
neovim = system:
|
||||
let pkgs = import nixpkgs { inherit system overlays; };
|
||||
in import ./modules/common/neovim/package {
|
||||
@ -186,15 +213,7 @@
|
||||
|
||||
# Programs that can be run by calling this flake
|
||||
apps = forAllSystems (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = overlays ++ [
|
||||
(final: prev: {
|
||||
disko-packaged = inputs.disko.packages.${system}.disko;
|
||||
})
|
||||
];
|
||||
};
|
||||
let pkgs = import nixpkgs { inherit system overlays; };
|
||||
in import ./apps { inherit pkgs; });
|
||||
|
||||
# Development environments
|
||||
@ -207,23 +226,6 @@
|
||||
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
|
||||
};
|
||||
|
||||
# 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
|
||||
|
@ -1,45 +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;
|
||||
})
|
||||
];
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
warn-dirty = false
|
||||
'';
|
||||
}];
|
||||
}
|
@ -2,6 +2,8 @@
|
||||
|
||||
| Host | Purpose |
|
||||
| --- | --- |
|
||||
| [aws](./aws/default.nix) | AWS AMI |
|
||||
| [staff](./staff/default.nix) | Live USB stick |
|
||||
| [flame](./flame/default.nix) | Oracle cloud server |
|
||||
| [hydra](./hydra/default.nix) | WSL config |
|
||||
| [lookingglass](./lookingglass/default.nix) | Work MacBook |
|
||||
|
@ -1,19 +1,14 @@
|
||||
{ inputs, system, globals, overlays, ... }:
|
||||
{ self, system, ... }:
|
||||
|
||||
with inputs;
|
||||
|
||||
nixos-generators.nixosGenerate {
|
||||
self.inputs.nixos-generators.nixosGenerate {
|
||||
inherit system;
|
||||
format = "amazon";
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
self.inputs.home-manager.nixosModules.home-manager
|
||||
self.nixosModules.globals
|
||||
self.nixosModules.common
|
||||
self.nixosModules.nixos
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
user = globals.user;
|
||||
fullName = globals.fullName;
|
||||
dotfilesRepo = globals.dotfilesRepo;
|
||||
gitName = globals.gitName;
|
||||
gitEmail = globals.gitEmail;
|
||||
networking.hostName = "sheep";
|
||||
gui.enable = false;
|
||||
theme.colors = (import ../../colorscheme/gruvbox).dark;
|
||||
@ -23,9 +18,6 @@ nixos-generators.nixosGenerate {
|
||||
# AWS settings require this
|
||||
permitRootLogin = "prohibit-password";
|
||||
}
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
../../modules/nixos/services/sshd.nix
|
||||
] ++ [
|
||||
# Required to fix diskSize errors during build
|
||||
({ ... }: { amazonImage.sizeMB = 16 * 1024; })
|
@ -1,7 +1,6 @@
|
||||
name: 'Terraform'
|
||||
env:
|
||||
|
||||
|
||||
AWS_ACCOUNT_NUMBER: ''
|
||||
AWS_PLAN_ROLE_NAME: github_actions_plan
|
||||
AWS_APPLY_ROLE_NAME: github_actions_admin
|
||||
@ -82,15 +81,14 @@ jobs:
|
||||
|
||||
# Downloads the current repo code to the runner.
|
||||
- name: Checkout Repo Code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Install Nix
|
||||
- name: Install Nix
|
||||
uses: cachix/install-nix-action@v17
|
||||
|
||||
# Build the image
|
||||
- name: Build Image
|
||||
run: nix build .#aws
|
||||
# Enable access to KVM, required to build an image
|
||||
- name: Enable KVM group perms
|
||||
run: |
|
||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
|
||||
# Login to AWS
|
||||
- name: AWS Assume Role
|
||||
@ -99,6 +97,28 @@ jobs:
|
||||
role-to-assume: ${{ env.AWS_ROLE_ARN }}
|
||||
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
|
||||
# "TF_VAR_", which exposes them to Terraform. The name of each GitHub
|
||||
# Secret must match its Terraform variable name exactly.
|
@ -4,26 +4,23 @@
|
||||
# How to install:
|
||||
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
||||
|
||||
{ inputs, globals, overlays, ... }:
|
||||
{ self, ... }:
|
||||
|
||||
with inputs;
|
||||
|
||||
nixpkgs.lib.nixosSystem {
|
||||
self.inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
specialArgs = { };
|
||||
modules = [
|
||||
(removeAttrs globals [ "mail.server" ])
|
||||
home-manager.nixosModules.home-manager
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
self.inputs.home-manager.nixosModules.home-manager
|
||||
self.nixosModules.globals
|
||||
self.nixosModules.common
|
||||
self.nixosModules.nixos
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
|
||||
# Hardware
|
||||
server = true;
|
||||
networking.hostName = "flame";
|
||||
|
||||
imports = [ (nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
||||
imports =
|
||||
[ (self.inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
||||
|
||||
fileSystems."/" = {
|
||||
@ -45,14 +42,26 @@ nixpkgs.lib.nixosSystem {
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||
|
||||
# Programs and services
|
||||
caddy.enable = true;
|
||||
cloudflare.enable = true; # Proxy traffic with Cloudflare
|
||||
dotfiles.enable = true; # Clone dotfiles
|
||||
gaming.minecraft-server.enable = true; # Setup Minecraft server
|
||||
giteaServer = "git.masu.rs";
|
||||
metricsServer = "metrics.masu.rs";
|
||||
neovim.enable = true;
|
||||
vaultwardenServer = "vault.masu.rs";
|
||||
|
||||
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
|
||||
backup.s3 = {
|
||||
@ -61,9 +70,6 @@ nixpkgs.lib.nixosSystem {
|
||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||
};
|
||||
|
||||
# # Grant access to Jellyfin directories from Nextcloud
|
||||
# users.users.nextcloud.extraGroups = [ "jellyfin" ];
|
||||
|
||||
# # Wireguard config for Transmission
|
||||
# wireguard.enable = true;
|
||||
# networking.wireguard.interfaces.wg0 = {
|
||||
|
@ -1,32 +1,27 @@
|
||||
# The Hydra
|
||||
# System configuration for WSL
|
||||
|
||||
{ inputs, globals, overlays, ... }:
|
||||
{ self, ... }:
|
||||
|
||||
with inputs;
|
||||
|
||||
nixpkgs.lib.nixosSystem {
|
||||
self.inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { };
|
||||
modules = [
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
../../modules/wsl
|
||||
globals
|
||||
wsl.nixosModules.wsl
|
||||
home-manager.nixosModules.home-manager
|
||||
self.inputs.wsl.nixosModules.wsl
|
||||
self.inputs.home-manager.nixosModules.home-manager
|
||||
self.nixosModules.globals
|
||||
self.nixosModules.common
|
||||
self.nixosModules.nixos
|
||||
self.nixosModules.wsl
|
||||
{
|
||||
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";
|
||||
gui.enable = false;
|
||||
theme = {
|
||||
colors = (import ../../colorscheme/gruvbox).dark;
|
||||
dark = true;
|
||||
};
|
||||
passwordHash = nixpkgs.lib.fileContents ../../password.sha512;
|
||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../password.sha512;
|
||||
wsl = {
|
||||
enable = true;
|
||||
wslConf.automount.root = "/mnt";
|
||||
|
@ -1,48 +1,46 @@
|
||||
# The Looking Glass
|
||||
# System configuration for my work Macbook
|
||||
|
||||
{ inputs, globals, overlays, ... }:
|
||||
{ self, ... }:
|
||||
|
||||
with inputs;
|
||||
|
||||
darwin.lib.darwinSystem {
|
||||
self.inputs.darwin.lib.darwinSystem {
|
||||
system = "x86_64-darwin";
|
||||
specialArgs = { };
|
||||
modules = [
|
||||
../../modules/common
|
||||
../../modules/darwin
|
||||
(globals // rec {
|
||||
user = "Noah.Masur";
|
||||
gitName = "Noah-Masur_1701";
|
||||
gitEmail = "${user}@take2games.com";
|
||||
})
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
nixpkgs.overlays = [ firefox-darwin.overlay ] ++ overlays;
|
||||
networking.hostName = "lookingglass";
|
||||
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
||||
gui.enable = true;
|
||||
theme = {
|
||||
colors = (import ../../colorscheme/gruvbox).dark;
|
||||
dark = true;
|
||||
self.inputs.home-manager.darwinModules.home-manager
|
||||
self.nixosModules.common
|
||||
self.nixosModules.darwin
|
||||
({ config, lib, ... }: {
|
||||
config = rec {
|
||||
user = lib.mkForce "Noah.Masur";
|
||||
gitName = lib.mkForce "Noah-Masur_1701";
|
||||
gitEmail = lib.mkForce "${user}@take2games.com";
|
||||
nixpkgs.overlays = [ self.inputs.firefox-darwin.overlay ];
|
||||
networking.hostName = "lookingglass";
|
||||
identityFile = "/Users/${user}/.ssh/id_ed25519";
|
||||
gui.enable = true;
|
||||
theme = {
|
||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||
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;
|
||||
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,52 +1,70 @@
|
||||
# The Swan
|
||||
# System configuration for my home NAS server
|
||||
|
||||
{ inputs, globals, overlays, ... }:
|
||||
{ self, ... }:
|
||||
|
||||
with inputs;
|
||||
|
||||
nixpkgs.lib.nixosSystem {
|
||||
self.inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { };
|
||||
modules = [
|
||||
./hardware-configuration.nix
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
globals
|
||||
wsl.nixosModules.wsl
|
||||
home-manager.nixosModules.home-manager
|
||||
disko.nixosModules.disko
|
||||
self.inputs.home-manager.nixosModules.home-manager
|
||||
self.inputs.disko.nixosModules.disko
|
||||
self.nixosModules.globals
|
||||
self.nixosModules.common
|
||||
self.nixosModules.nixos
|
||||
{
|
||||
# Hardware
|
||||
server = true;
|
||||
networking.hostName = "swan";
|
||||
|
||||
# head -c 8 /etc/machine-id
|
||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||
|
||||
# Required for transcoding
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelParams = [
|
||||
"radeon.si_support=0"
|
||||
"amdgpu.si_support=1"
|
||||
"radeon.cik_support=0"
|
||||
"amdgpu.cik_support=1"
|
||||
"amdgpu.dc=1"
|
||||
];
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
powerManagement.cpuFreqGovernor = "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = true;
|
||||
|
||||
# ZFS
|
||||
zfs.enable = true;
|
||||
# Generated with: head -c 8 /etc/machine-id
|
||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||
disko = {
|
||||
enableConfig = true;
|
||||
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" ];
|
||||
|
||||
gui.enable = false;
|
||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||
nixpkgs.overlays = overlays;
|
||||
neovim.enable = true;
|
||||
caddy.enable = true;
|
||||
cloudflare.enable = true;
|
||||
cloudflareTunnel.enable = true;
|
||||
streamServer = "stream.masu.rs";
|
||||
nextcloudServer = "cloud.masu.rs";
|
||||
bookServer = "books.masu.rs";
|
||||
arrServer = "download.masu.rs";
|
||||
transmissionServer = "download.masu.rs";
|
||||
samba.enable = true;
|
||||
dotfiles.enable = true;
|
||||
arrs.enable = true;
|
||||
|
||||
services.caddy.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 = {
|
||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||
@ -57,12 +75,6 @@ nixpkgs.lib.nixosSystem {
|
||||
# Disable passwords, only use SSH key
|
||||
publicKey =
|
||||
"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,20 +1,16 @@
|
||||
# The Tempest
|
||||
# System configuration for my desktop
|
||||
|
||||
{ inputs, globals, overlays, ... }:
|
||||
{ self, ... }:
|
||||
|
||||
with inputs;
|
||||
|
||||
nixpkgs.lib.nixosSystem {
|
||||
self.inputs.nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
globals
|
||||
home-manager.nixosModules.home-manager
|
||||
../../modules/common
|
||||
../../modules/nixos
|
||||
self.inputs.home-manager.nixosModules.home-manager
|
||||
self.nixosModules.globals
|
||||
self.nixosModules.common
|
||||
self.nixosModules.nixos
|
||||
{
|
||||
nixpkgs.overlays = [ nur.overlay ] ++ overlays;
|
||||
|
||||
# Hardware
|
||||
physical = true;
|
||||
networking.hostName = "tempest";
|
||||
@ -55,7 +51,7 @@ nixpkgs.lib.nixosSystem {
|
||||
|
||||
# Must be prepared ahead
|
||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
||||
passwordHash = nixpkgs.lib.fileContents ../../password.sha512;
|
||||
passwordHash = self.inputs.nixpkgs.lib.fileContents ../../password.sha512;
|
||||
|
||||
# Theming
|
||||
gui.enable = true;
|
||||
@ -63,8 +59,8 @@ nixpkgs.lib.nixosSystem {
|
||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||
dark = true;
|
||||
};
|
||||
wallpaper = "${wallpapers}/gruvbox/road.jpg";
|
||||
gtk.theme.name = nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||
wallpaper = "${self.inputs.wallpapers}/gruvbox/road.jpg";
|
||||
gtk.theme.name = self.inputs.nixpkgs.lib.mkDefault "Adwaita-dark";
|
||||
|
||||
# Programs and services
|
||||
charm.enable = true;
|
||||
@ -94,6 +90,14 @@ nixpkgs.lib.nixosSystem {
|
||||
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";
|
||||
};
|
||||
|
||||
}
|
||||
];
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
./firefox.nix
|
||||
./kitty.nix
|
||||
./media.nix
|
||||
./nautilus.nix
|
||||
./obsidian.nix
|
||||
./qbittorrent.nix
|
||||
./slack.nix
|
||||
|
@ -33,7 +33,6 @@
|
||||
vimium
|
||||
multi-account-containers
|
||||
facebook-container
|
||||
temporary-containers
|
||||
(lib.mkIf config._1password.enable onepassword-password-manager)
|
||||
okta-browser-plugin
|
||||
sponsorblock
|
||||
@ -71,6 +70,9 @@
|
||||
"layout.css.color-mix.enabled" = true;
|
||||
"ui.systemUsesDarkTheme" =
|
||||
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 = ''
|
||||
:root {
|
||||
|
@ -85,8 +85,7 @@
|
||||
# Scrollback
|
||||
scrolling_lines = 10000;
|
||||
scrollback_pager_history_size = 10; # MB
|
||||
scrollback_pager = ''
|
||||
${pkgs.neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
|
||||
scrollback_pager = "${pkgs.neovim}/bin/nvim -c 'normal G'";
|
||||
|
||||
# Window
|
||||
window_padding_width = 6;
|
||||
|
@ -21,7 +21,10 @@
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
bindings = { };
|
||||
config = { image-display-duration = 2; };
|
||||
config = {
|
||||
image-display-duration = 2;
|
||||
hwdec = "auto-safe";
|
||||
};
|
||||
scripts = [
|
||||
|
||||
# Automatically load playlist entries before and after current file
|
||||
|
@ -66,6 +66,40 @@
|
||||
description = "List of unfree packages to allow.";
|
||||
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";
|
||||
@ -87,6 +121,7 @@
|
||||
settings = {
|
||||
|
||||
# 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)
|
||||
[ "https://nix-community.cachix.org" ];
|
||||
|
@ -77,7 +77,8 @@
|
||||
notmuch.enable = true;
|
||||
passwordCommand =
|
||||
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
||||
builtins.toString ../../../private/mailpass.age
|
||||
pkgs.writeText "mailpass.age"
|
||||
(builtins.readFile ../../../private/mailpass.age)
|
||||
}";
|
||||
smtp = {
|
||||
host = config.mail.smtpHost;
|
||||
|
@ -135,6 +135,13 @@
|
||||
};
|
||||
|
||||
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 `/`
|
||||
require('cmp').setup.cmdline("/", {
|
||||
sources = {
|
||||
|
@ -29,6 +29,9 @@
|
||||
lua = ''
|
||||
${builtins.readFile ./lsp.lua}
|
||||
|
||||
-- Prevent infinite log size (change this when debugging)
|
||||
vim.lsp.set_log_level("off")
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
||||
@ -50,6 +53,7 @@
|
||||
|
||||
on_attach = function(client, bufnr)
|
||||
if client.supports_method("textDocument/formatting") then
|
||||
-- Auto-format on save
|
||||
vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
@ -58,6 +62,12 @@
|
||||
vim.lsp.buf.format({ bufnr = bufnr })
|
||||
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,
|
||||
})
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
setup.Comment = { };
|
||||
setup.colorizer = { };
|
||||
setup.glow = { };
|
||||
|
||||
vim.o = {
|
||||
termguicolors = true; # Set to truecolor
|
||||
|
@ -2,7 +2,7 @@
|
||||
plugins = [ pkgs.vimPlugins.lualine-nvim ];
|
||||
setup.lualine = {
|
||||
options = {
|
||||
theme = "gruvbox";
|
||||
theme = "base16";
|
||||
icons_enabled = true;
|
||||
};
|
||||
};
|
||||
|
@ -1,16 +1,38 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, lib, ... }: {
|
||||
|
||||
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.playground # Tree-sitter experimenting
|
||||
pkgs.vimPlugins.nginx-vim
|
||||
pkgs.vimPlugins.vim-helm
|
||||
pkgs.vimPlugins.vim-puppet
|
||||
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||
pname = "nmasur";
|
||||
version = "0.1";
|
||||
src = ../plugin;
|
||||
})
|
||||
];
|
||||
|
||||
setup."nvim-treesitter.configs" = {
|
||||
highlight = { enable = true; };
|
||||
indent = { enable = true; };
|
||||
matchup = { enable = true; }; # Uses vim-matchup
|
||||
|
||||
textobjects = {
|
||||
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>gs", telescope.git_status)
|
||||
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()
|
||||
local opts = {
|
||||
|
@ -48,11 +48,6 @@ key("n", "<Leader>wv", ":vsplit<CR>")
|
||||
key("n", "<Leader>wh", ":split<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
|
||||
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 })
|
||||
|
||||
-- Other
|
||||
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
||||
key("n", "Y", "y$") --- Copy to end of line
|
||||
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
||||
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", "D", "y'>gp") --- Duplicate selected
|
||||
key("x", "<Leader>p", '"_dP') --- Paste but keep register
|
||||
key("v", "D", "y'>gp") --- Duplicate selected
|
||||
key("x", "<Leader>p", '"_dP') --- Paste but keep register
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
[".*%.tfvars"] = "hcl",
|
||||
-- [".*%.tf"] = "hcl",
|
||||
[".*%.rasi"] = "css",
|
||||
[".*%.tfvars"] = "terraform",
|
||||
[".*%.tf"] = "terraform",
|
||||
[".*%.rasi"] = "rasi",
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
{ pkgs, colors, ... }:
|
||||
|
||||
# Comes from nix2vim overlay:
|
||||
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
|
||||
pkgs.neovimBuilder {
|
||||
package = pkgs.neovim-unwrapped;
|
||||
inherit colors;
|
||||
|
@ -0,0 +1,8 @@
|
||||
expression: (apply_expression
|
||||
function: (apply_expression
|
||||
function: (select_expression
|
||||
attrpath: (attrpath) @writeshell (#match? @writeshell "^writeShell.*$")
|
||||
)
|
||||
)
|
||||
(indented_string_expression) @bash
|
||||
)
|
@ -14,7 +14,7 @@ bind -M insert \cp projects
|
||||
bind -M default \cp projects
|
||||
bind -M insert \x1F accept-autosuggestion
|
||||
bind -M default \x1F accept-autosuggestion
|
||||
bind -M insert \cn 'commandline -r "nix run nixpkgs#"'
|
||||
bind -M default \cn 'commandline -r "nix run nixpkgs#"'
|
||||
bind -M insert \cn 'commandline -r "nix shell nixpkgs#"'
|
||||
bind -M default \cn 'commandline -r "nix shell nixpkgs#"'
|
||||
bind -M insert \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
|
@ -51,7 +51,6 @@ in {
|
||||
gcae = "git commit --amend";
|
||||
gu = "git pull";
|
||||
gp = "git push";
|
||||
gpp = "git-push-upstream";
|
||||
gl = "git log --graph --decorate --oneline -20";
|
||||
gll = "git log --graph --decorate --oneline";
|
||||
gco = "git checkout";
|
||||
@ -114,10 +113,6 @@ in {
|
||||
git-history = {
|
||||
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 = {
|
||||
description = "Find uncommitted git repos";
|
||||
body = builtins.readFile ./fish/functions/uncommitted.fish;
|
||||
|
@ -46,7 +46,10 @@ in {
|
||||
|
||||
programs.bat = {
|
||||
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 = {
|
||||
|
@ -19,10 +19,10 @@
|
||||
consul
|
||||
noti # Create notifications programmatically
|
||||
ipcalc # Make IP network calculations
|
||||
(pkgs.extraLib.mkScript {
|
||||
(writeShellApplication {
|
||||
name = "ocr";
|
||||
file = ../../modules/common/shell/bash/scripts/ocr.sh;
|
||||
env = [ tesseract ];
|
||||
runtimeInputs = [ 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
|
||||
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.packages = with pkgs; [
|
||||
gnome.nautilus
|
||||
gnome.sushi # Quick preview with spacebar
|
||||
];
|
||||
|
||||
xsession.windowManager.i3.config.keybindings = {
|
||||
"${
|
@ -9,15 +9,11 @@ let
|
||||
|
||||
in {
|
||||
|
||||
options.gaming.minecraft-server.enable =
|
||||
lib.mkEnableOption "Minecraft Server.";
|
||||
|
||||
config = lib.mkIf config.gaming.minecraft-server.enable {
|
||||
config = lib.mkIf config.services.minecraft-server.enable {
|
||||
|
||||
unfreePackages = [ "minecraft-server" ];
|
||||
|
||||
services.minecraft-server = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
declarative = true;
|
||||
whitelist = { };
|
||||
|
@ -17,6 +17,9 @@
|
||||
steamPackages.steamcmd
|
||||
steam-tui
|
||||
|
||||
# Allow downloading of GE-Proton and other versions
|
||||
protonup-qt
|
||||
|
||||
];
|
||||
|
||||
};
|
||||
|
@ -167,10 +167,10 @@ in {
|
||||
altTabCommand = "${rofi}/bin/rofi -show window -modi window";
|
||||
calculatorCommand = "${rofi}/bin/rofi -modes calc -show calc";
|
||||
audioSwitchCommand = "${
|
||||
(pkgs.extraLib.mkScript {
|
||||
(pkgs.writeShellApplication {
|
||||
name = "switch-audio";
|
||||
file = ./rofi/pulse-sink.sh;
|
||||
env = [ pkgs.ponymix rofi ];
|
||||
runtimeInputs = [ pkgs.ponymix rofi ];
|
||||
text = builtins.readFile ./rofi/pulse-sink.sh;
|
||||
})
|
||||
}/bin/switch-audio";
|
||||
};
|
||||
|
@ -10,9 +10,12 @@
|
||||
autoRepeatDelay = 250;
|
||||
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
|
||||
|
@ -1,24 +1,36 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options = {
|
||||
arrServer = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname for arr services";
|
||||
default = null;
|
||||
options = { arrs.enable = lib.mkEnableOption "Arr services"; };
|
||||
|
||||
config = lib.mkIf config.arrs.enable {
|
||||
|
||||
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;
|
||||
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" ];
|
||||
unfreePackages = [ "unrar" ]; # Required for sabnzbd
|
||||
|
||||
# Requires updating the base_url config value in each service
|
||||
# If you try to rewrite the URL, the service won't redirect properly
|
||||
@ -26,7 +38,7 @@
|
||||
{
|
||||
group = "download";
|
||||
match = [{
|
||||
host = [ config.arrServer ];
|
||||
host = [ config.hostnames.download ];
|
||||
path = [ "/sonarr*" ];
|
||||
}];
|
||||
handle = [{
|
||||
@ -37,7 +49,7 @@
|
||||
{
|
||||
group = "download";
|
||||
match = [{
|
||||
host = [ config.arrServer ];
|
||||
host = [ config.hostnames.download ];
|
||||
path = [ "/radarr*" ];
|
||||
}];
|
||||
handle = [{
|
||||
@ -48,7 +60,7 @@
|
||||
{
|
||||
group = "download";
|
||||
match = [{
|
||||
host = [ config.arrServer ];
|
||||
host = [ config.hostnames.download ];
|
||||
path = [ "/prowlarr*" ];
|
||||
}];
|
||||
handle = [{
|
||||
@ -59,7 +71,7 @@
|
||||
{
|
||||
group = "download";
|
||||
match = [{
|
||||
host = [ config.arrServer ];
|
||||
host = [ config.hostnames.download ];
|
||||
path = [ "/bazarr*" ];
|
||||
}];
|
||||
handle = [{
|
||||
@ -67,6 +79,25 @@
|
||||
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, ... }: {
|
||||
|
||||
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 {
|
||||
type = lib.types.listOf lib.types.attrs;
|
||||
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 = {
|
||||
enable = true;
|
||||
adapter = "''"; # Required to enable JSON
|
||||
configFile = pkgs.writeText "Caddyfile" (builtins.toJSON {
|
||||
apps.http.servers.main = {
|
||||
listen = [ ":443" ];
|
||||
routes = config.caddy.routes;
|
||||
errors.routes = config.caddy.blocks;
|
||||
# logs = { }; # Uncomment to collect access logs
|
||||
};
|
||||
logging.logs.main = {
|
||||
encoder = { format = "console"; };
|
||||
writer = {
|
||||
output = "file";
|
||||
filename = "${config.services.caddy.logDir}/caddy.log";
|
||||
roll = true;
|
||||
services.caddy = {
|
||||
adapter = "''"; # Required to enable JSON
|
||||
configFile = pkgs.writeText "Caddyfile" (builtins.toJSON {
|
||||
apps.http.servers.main = {
|
||||
listen = [ ":443" ];
|
||||
routes = config.caddy.routes;
|
||||
errors.routes = config.caddy.blocks;
|
||||
# logs = { }; # Uncomment to collect access logs
|
||||
};
|
||||
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 {
|
||||
|
||||
options = {
|
||||
bookServer = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname for Calibre library";
|
||||
default = null;
|
||||
};
|
||||
backups.calibre = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
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 = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
options = {
|
||||
reverseProxyAuth.enable = false;
|
||||
@ -33,7 +27,7 @@ in {
|
||||
};
|
||||
|
||||
caddy.routes = [{
|
||||
match = [{ host = [ config.bookServer ]; }];
|
||||
match = [{ host = [ config.hostnames.books ]; }];
|
||||
handle = [{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [{ dial = "localhost:8083"; }];
|
||||
|
@ -4,24 +4,41 @@
|
||||
|
||||
# nix-shell -p cloudflared
|
||||
# cloudflared tunnel login
|
||||
# cloudflared tunnel create <mytunnel>
|
||||
# nix run github:nmasur/dotfiles#encrypt-secret > private/cloudflared.age
|
||||
# cloudflared tunnel create <host>
|
||||
# nix run github:nmasur/dotfiles#encrypt-secret > private/cloudflared-<host>.age
|
||||
# Paste ~/.cloudflared/<id>.json
|
||||
# Set tunnelId = "<id>"
|
||||
# Set tunnel.id = "<id>"
|
||||
# Remove ~/.cloudflared/
|
||||
|
||||
let tunnelId = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
||||
# For SSH access:
|
||||
# Cloudflare Zero Trust -> Access -> Applications -> Create Application
|
||||
# Service Auth -> SSH -> Select Application -> Generate Certificate
|
||||
# Set ca = "<public key>"
|
||||
|
||||
in {
|
||||
{
|
||||
|
||||
options.cloudflareTunnel.enable = lib.mkEnableOption "Use Cloudflare Tunnel";
|
||||
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 = {
|
||||
"${tunnelId}" = {
|
||||
"${config.cloudflareTunnel.id}" = {
|
||||
credentialsFile = config.secrets.cloudflared.dest;
|
||||
default = "http_status:404";
|
||||
ingress = { "*.masu.rs" = "ssh://localhost:22"; };
|
||||
@ -31,7 +48,7 @@ in {
|
||||
|
||||
environment.etc = {
|
||||
"ssh/ca.pub".text = ''
|
||||
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org
|
||||
${config.cloudflareTunnel.ca}
|
||||
'';
|
||||
|
||||
# Must match the username of the email address in Cloudflare Access
|
||||
@ -48,18 +65,21 @@ in {
|
||||
# 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 = ../../../private/cloudflared.age;
|
||||
source = config.cloudflareTunnel.credentialsFile;
|
||||
dest = "${config.secretsDirectory}/cloudflared";
|
||||
owner = "cloudflared";
|
||||
group = "cloudflared";
|
||||
permissions = "0440";
|
||||
};
|
||||
systemd.services.cloudflared-secret = {
|
||||
requiredBy = [ "cloudflared-tunnel-${tunnelId}.service" ];
|
||||
before = [ "cloudflared-tunnel-${tunnelId}.service" ];
|
||||
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.
|
||||
|
||||
{ config, lib, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
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
|
||||
services.nextcloud.config.trustedProxies = cloudflareIpRanges;
|
||||
|
||||
|
@ -7,8 +7,10 @@
|
||||
./calibre.nix
|
||||
./cloudflare-tunnel.nix
|
||||
./cloudflare.nix
|
||||
./gitea-runner.nix
|
||||
./gitea.nix
|
||||
./gnupg.nix
|
||||
./grafana.nix
|
||||
./honeypot.nix
|
||||
./jellyfin.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,28 +1,18 @@
|
||||
{ config, lib, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let giteaPath = "/var/lib/gitea"; # Default service directory
|
||||
|
||||
in {
|
||||
|
||||
options = {
|
||||
|
||||
giteaServer = lib.mkOption {
|
||||
description = "Hostname for Gitea.";
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.giteaServer != null) {
|
||||
config = lib.mkIf config.services.gitea.enable {
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
database.type = "sqlite3";
|
||||
settings = {
|
||||
actions.ENABLED = true;
|
||||
repository = {
|
||||
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
||||
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_ORG = true;
|
||||
DEFAULT_BRANCH = "main";
|
||||
@ -30,7 +20,7 @@ in {
|
||||
server = {
|
||||
HTTP_PORT = 3001;
|
||||
HTTP_ADDRESS = "127.0.0.1";
|
||||
ROOT_URL = "https://${config.giteaServer}/";
|
||||
ROOT_URL = "https://${config.hostnames.git}/";
|
||||
SSH_PORT = 22;
|
||||
START_SSH_SERVER = false; # Use sshd instead
|
||||
DISABLE_SSH = false;
|
||||
@ -45,9 +35,10 @@ in {
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 122 ];
|
||||
users.users.${config.user}.extraGroups = [ "gitea" ];
|
||||
|
||||
caddy.routes = [{
|
||||
match = [{ host = [ config.giteaServer ]; }];
|
||||
match = [{ host = [ config.hostnames.git ]; }];
|
||||
handle = [{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [{ dial = "localhost:3001"; }];
|
||||
@ -85,6 +76,34 @@ in {
|
||||
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,38 +1,40 @@
|
||||
{ config, lib, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
options = {
|
||||
streamServer = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname for Jellyfin library";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.services.jellyfin.enable {
|
||||
|
||||
config = lib.mkIf (config.streamServer != null) {
|
||||
|
||||
services.jellyfin.enable = true;
|
||||
users.users.jellyfin = {
|
||||
isSystemUser = true;
|
||||
group = "jellyfin";
|
||||
};
|
||||
services.jellyfin.group = "media";
|
||||
users.users.jellyfin = { isSystemUser = true; };
|
||||
|
||||
caddy.routes = [{
|
||||
match = [{ host = [ config.streamServer ]; }];
|
||||
match = [{ host = [ config.hostnames.stream ]; }];
|
||||
handle = [{
|
||||
handler = "reverse_proxy";
|
||||
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
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/jellyfin 0775 jellyfin jellyfin"
|
||||
"d /var/lib/jellyfin/library 0775 jellyfin jellyfin"
|
||||
"d /var/lib/jellyfin 0775 jellyfin media"
|
||||
"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
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -1,19 +1,8 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
options = {
|
||||
|
||||
nextcloudServer = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname for Nextcloud";
|
||||
default = null;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.nextcloudServer != null) {
|
||||
config = lib.mkIf config.services.nextcloud.enable {
|
||||
|
||||
services.nextcloud = {
|
||||
enable = true;
|
||||
package = pkgs.nextcloud26; # Required to specify
|
||||
datadir = "/data/nextcloud";
|
||||
https = true;
|
||||
@ -21,7 +10,7 @@
|
||||
maxUploadSize = "50G";
|
||||
config = {
|
||||
adminpassFile = config.secrets.nextcloud.dest;
|
||||
extraTrustedDomains = [ config.nextcloudServer ];
|
||||
extraTrustedDomains = [ config.hostnames.content ];
|
||||
};
|
||||
};
|
||||
|
||||
@ -33,7 +22,7 @@
|
||||
|
||||
# Point Caddy to Nginx
|
||||
caddy.routes = [{
|
||||
match = [{ host = [ config.nextcloudServer ]; }];
|
||||
match = [{ host = [ config.hostnames.content ]; }];
|
||||
handle = [{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [{ dial = "localhost:8080"; }];
|
||||
|
@ -1,32 +1,60 @@
|
||||
{ config, lib, ... }: {
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
options.metricsServer = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname of the Grafana server.";
|
||||
default = null;
|
||||
};
|
||||
config = let
|
||||
|
||||
config = lib.mkIf (config.metricsServer != null) {
|
||||
# If hosting Grafana, host local Prometheus and listen for inbound jobs. If
|
||||
# not hosting Grafana, send remote Prometheus writes to primary host.
|
||||
isServer = config.services.grafana.enable;
|
||||
|
||||
services.grafana.enable = true;
|
||||
|
||||
# Required to fix error in latest nixpkgs
|
||||
services.grafana.settings = { };
|
||||
in lib.mkIf config.services.prometheus.enable {
|
||||
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
exporters.node.enable = true;
|
||||
scrapeConfigs = [{
|
||||
job_name = "local";
|
||||
static_configs = [{ targets = [ "127.0.0.1:9100" ]; }];
|
||||
}];
|
||||
webExternalUrl =
|
||||
lib.mkIf isServer "https://${config.hostnames.prometheus}";
|
||||
# Web config file: https://prometheus.io/docs/prometheus/latest/configuration/https/
|
||||
webConfigFile = lib.mkIf isServer
|
||||
((pkgs.formats.yaml { }).generate "webconfig.yml" {
|
||||
basic_auth_users = {
|
||||
# Generate password: htpasswd -nBC 10 "" | tr -d ':\n'
|
||||
# Encrypt and place in private/prometheus.age
|
||||
"prometheus" =
|
||||
"$2y$10$r7FWHLHTGPAY312PdhkPEuvb05aGn9Nk1IO7qtUUUjmaDl35l6sLa";
|
||||
};
|
||||
});
|
||||
remoteWrite = lib.mkIf (!isServer) [{
|
||||
name = config.networking.hostName;
|
||||
url = "https://${config.hostnames.prometheus}";
|
||||
basic_auth = {
|
||||
# Uses password hashed with bcrypt above
|
||||
username = "prometheus";
|
||||
password_file = config.secrets.prometheus.dest;
|
||||
};
|
||||
}];
|
||||
};
|
||||
|
||||
caddy.routes = [{
|
||||
match = [{ host = [ config.metricsServer ]; }];
|
||||
# Create credentials file for remote Prometheus push
|
||||
secrets.prometheus = lib.mkIf (!isServer) {
|
||||
source = ../../../private/prometheus.age;
|
||||
dest = "${config.secretsDirectory}/prometheus";
|
||||
owner = "prometheus";
|
||||
group = "prometheus";
|
||||
permissions = "0440";
|
||||
};
|
||||
systemd.services.prometheus-secret = lib.mkIf (!isServer) {
|
||||
requiredBy = [ "prometheus.service" ];
|
||||
before = [ "prometheus.service" ];
|
||||
};
|
||||
|
||||
caddy.routes = lib.mkIf isServer [{
|
||||
match = [{ host = [ config.hostnames.prometheus ]; }];
|
||||
handle = [{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [{ dial = "localhost:3000"; }];
|
||||
upstreams = [{ dial = "localhost:9090"; }];
|
||||
}];
|
||||
}];
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
{ config, lib, ... }: {
|
||||
|
||||
options = { samba.enable = lib.mkEnableOption "Enable Samba sharing."; };
|
||||
|
||||
config = {
|
||||
|
||||
services.samba = lib.mkIf (config.samba.enable) {
|
||||
enable = true;
|
||||
services.samba = lib.mkIf config.services.samba.enable {
|
||||
openFirewall = true;
|
||||
shares.data = {
|
||||
path = "/data";
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
options = {
|
||||
transmissionServer = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "Hostname for Transmission";
|
||||
default = null;
|
||||
};
|
||||
@ -12,7 +12,7 @@
|
||||
namespace = config.networking.wireguard.interfaces.wg0.interfaceNamespace;
|
||||
vpnIp = lib.strings.removeSuffix "/32"
|
||||
(builtins.head config.networking.wireguard.interfaces.wg0.ips);
|
||||
in lib.mkIf (config.wireguard.enable && config.transmissionServer != null) {
|
||||
in lib.mkIf (config.transmissionServer != null) {
|
||||
|
||||
# Setup transmission
|
||||
services.transmission = {
|
||||
@ -26,13 +26,13 @@
|
||||
rpc-host-whitelist = config.transmissionServer;
|
||||
rpc-host-whitelist-enabled = true;
|
||||
rpc-whitelist = "127.0.0.1,${vpnIp}";
|
||||
rpc-whitelist-enabled = true;
|
||||
rpc-whitelist-enabled = config.wireguard.enable;
|
||||
};
|
||||
credentialsFile = config.secrets.transmission.dest;
|
||||
};
|
||||
|
||||
# Bind transmission to wireguard namespace
|
||||
systemd.services.transmission = {
|
||||
systemd.services.transmission = lib.mkIf config.wireguard.enable {
|
||||
bindsTo = [ "netns@${namespace}.service" ];
|
||||
requires = [ "network-online.target" "transmission-secret.service" ];
|
||||
after = [ "wireguard-wg0.service" "transmission-secret.service" ];
|
||||
@ -42,9 +42,14 @@
|
||||
|
||||
# Create reverse proxy for web UI
|
||||
caddy.routes = lib.mkAfter [{
|
||||
group =
|
||||
lib.mkIf (config.arrServer == config.transmissionServer) "download";
|
||||
match = [{ host = [ config.transmissionServer ]; }];
|
||||
group = if (config.hostnames.download == config.transmissionServer) then
|
||||
"download"
|
||||
else
|
||||
"transmission";
|
||||
match = [{
|
||||
host = [ config.transmissionServer ];
|
||||
path = [ "/transmission*" ];
|
||||
}];
|
||||
handle = [{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [{ dial = "localhost:9091"; }];
|
||||
@ -56,7 +61,7 @@
|
||||
boot.kernel.sysctl."net.core.rmem_max" = 4194304;
|
||||
|
||||
# Allow inbound connections to reach namespace
|
||||
systemd.services.transmission-web-netns = {
|
||||
systemd.services.transmission-web-netns = lib.mkIf config.wireguard.enable {
|
||||
description = "Forward to transmission in wireguard namespace";
|
||||
requires = [ "transmission.service" ];
|
||||
after = [ "transmission.service" ];
|
||||
@ -73,7 +78,7 @@
|
||||
|
||||
# Create credentials file for transmission
|
||||
secrets.transmission = {
|
||||
source = ../../private/transmission.json.age;
|
||||
source = ../../../private/transmission.json.age;
|
||||
dest = "${config.secretsDirectory}/transmission.json";
|
||||
owner = "transmission";
|
||||
group = "transmission";
|
||||
|
@ -4,21 +4,10 @@ let vaultwardenPath = "/var/lib/bitwarden_rs"; # Default service directory
|
||||
|
||||
in {
|
||||
|
||||
options = {
|
||||
|
||||
vaultwardenServer = lib.mkOption {
|
||||
description = "Hostname for Vaultwarden.";
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.vaultwardenServer != null) {
|
||||
config = lib.mkIf config.services.vaultwarden.enable {
|
||||
services.vaultwarden = {
|
||||
enable = true;
|
||||
config = {
|
||||
DOMAIN = "https://${config.vaultwardenServer}";
|
||||
DOMAIN = "https://${config.hostnames.secrets}";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
SIGNUPS_VERIFY = true;
|
||||
INVITATIONS_ALLOWED = true;
|
||||
@ -47,7 +36,7 @@ in {
|
||||
networking.firewall.allowedTCPPorts = [ 3012 ];
|
||||
|
||||
caddy.routes = [{
|
||||
match = [{ host = [ config.vaultwardenServer ]; }];
|
||||
match = [{ host = [ config.hostnames.secrets ]; }];
|
||||
handle = [{
|
||||
handler = "reverse_proxy";
|
||||
upstreams = [{ dial = "localhost:8222"; }];
|
||||
|
@ -2,13 +2,16 @@
|
||||
|
||||
options.wireguard.enable = lib.mkEnableOption "Wireguard VPN setup.";
|
||||
|
||||
config = lib.mkIf (pkgs.stdenv.isLinux && config.wireguard.enable) {
|
||||
config = lib.mkIf (pkgs.stdenv.isLinux) {
|
||||
|
||||
networking.wireguard = {
|
||||
enable = true;
|
||||
enable = config.wireguard.enable;
|
||||
interfaces = {
|
||||
wg0 = {
|
||||
|
||||
# Something to use as a default value
|
||||
ips = lib.mkDefault [ "127.0.0.1/32" ];
|
||||
|
||||
# Establishes identity of this machine
|
||||
generatePrivateKeyFile = false;
|
||||
privateKeyFile = config.secrets.wireguard.dest;
|
||||
@ -23,6 +26,7 @@
|
||||
# Create namespace for Wireguard
|
||||
# This allows us to isolate specific programs to Wireguard
|
||||
systemd.services."netns@" = {
|
||||
enable = config.wireguard.enable;
|
||||
description = "%I network namespace";
|
||||
before = [ "network.target" ];
|
||||
serviceConfig = {
|
||||
@ -35,7 +39,7 @@
|
||||
|
||||
# Create private key file for wireguard
|
||||
secrets.wireguard = {
|
||||
source = ../../private/wireguard.age;
|
||||
source = ../../../private/wireguard.age;
|
||||
dest = "${config.secretsDirectory}/wireguard";
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
|
||||
imports = [ ./user.nix ./timezone.nix ./doas.nix ];
|
||||
imports = [ ./doas.nix ./journald.nix ./user.nix ./timezone.nix ];
|
||||
|
||||
config = lib.mkIf pkgs.stdenv.isLinux {
|
||||
|
||||
|
10
modules/nixos/system/journald.nix
Normal file
10
modules/nixos/system/journald.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ ... }: {
|
||||
|
||||
# How long to keep journalctl entries
|
||||
services.journald.extraConfig = ''
|
||||
SystemMaxUse=100M
|
||||
MaxFileSec=1month
|
||||
MaxRetentionSec=2month
|
||||
'';
|
||||
|
||||
}
|
56
overlays/caddy.nix
Normal file
56
overlays/caddy.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{ lib, buildGo118Module, fetchFromGitHub, plugins ? [ ] }:
|
||||
let
|
||||
goImports = lib.flip lib.concatMapStrings plugins (pkg: " _ \"${pkg}\"\n");
|
||||
goGets = lib.flip lib.concatMapStrings plugins (pkg: "go get ${pkg}\n ");
|
||||
main = ''
|
||||
package main
|
||||
import (
|
||||
caddycmd "github.com/caddyserver/caddy/v2/cmd"
|
||||
_ "github.com/caddyserver/caddy/v2/modules/standard"
|
||||
${goImports}
|
||||
)
|
||||
func main() {
|
||||
caddycmd.Main()
|
||||
}
|
||||
'';
|
||||
in buildGo118Module rec {
|
||||
pname = "caddy";
|
||||
version = "2.6.4";
|
||||
runVend = true;
|
||||
|
||||
subPackages = [ "cmd/caddy" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "caddyserver";
|
||||
repo = "caddy";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256:3a3+nFHmGONvL/TyQRqgJtrSDIn0zdGy9YwhZP17mU0=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256:CrHqJcJ0knX+txQ5qvzW4JrU8vfi3FO3M/xtislIC1M=";
|
||||
|
||||
overrideModAttrs = (_: {
|
||||
preBuild = ''
|
||||
echo '${main}' > cmd/caddy/main.go
|
||||
${goGets}
|
||||
'';
|
||||
postInstall = "cp go.sum go.mod $out/ && ls $out/";
|
||||
});
|
||||
|
||||
postPatch = ''
|
||||
echo '${main}' > cmd/caddy/main.go
|
||||
cat cmd/caddy/main.go
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
cp vendor/go.sum ./
|
||||
cp vendor/go.mod ./
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://caddyserver.com";
|
||||
description = "Fast, cross-platform HTTP/2 web server with automatic HTTPS";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ Br1ght0ne techknowlogick ];
|
||||
};
|
||||
}
|
@ -1,25 +1,25 @@
|
||||
diff --git a/cps/__init__.py b/cps/__init__.py
|
||||
index 1ba1f778..da0bc718 100644
|
||||
index 269e4aca..e2b828a9 100644
|
||||
--- a/cps/__init__.py
|
||||
+++ b/cps/__init__.py
|
||||
@@ -100,7 +100,6 @@ updater_thread = Updater()
|
||||
def create_app():
|
||||
@@ -150,7 +150,6 @@ def create_app():
|
||||
|
||||
lm.login_view = 'web.login'
|
||||
lm.anonymous_user = ub.Anonymous
|
||||
- lm.session_protection = 'strong'
|
||||
- lm.session_protection = 'strong' if config.config_session == 1 else "basic"
|
||||
|
||||
if csrf:
|
||||
csrf.init_app(app)
|
||||
db.CalibreDB.update_config(config)
|
||||
db.CalibreDB.setup_db(config.config_calibre_dir, cli_param.settings_path)
|
||||
diff --git a/cps/admin.py b/cps/admin.py
|
||||
index 09a553b4..5c646e46 100644
|
||||
index 20c58aac..99d2ad19 100644
|
||||
--- a/cps/admin.py
|
||||
+++ b/cps/admin.py
|
||||
@@ -104,8 +104,6 @@ def before_request():
|
||||
# make remember me function work
|
||||
if current_user.is_authenticated:
|
||||
confirm_login()
|
||||
@@ -101,8 +101,6 @@ def admin_required(f):
|
||||
|
||||
@admi.before_app_request
|
||||
def before_request():
|
||||
- if not ub.check_user_session(current_user.id, flask_session.get('_id')) and 'opds' not in request.path:
|
||||
- logout_user()
|
||||
g.constants = constants
|
||||
g.user = current_user
|
||||
g.google_site_verification = os.getenv('GOOGLE_SITE_VERIFICATION','')
|
||||
g.allow_registration = config.config_public_reg
|
||||
|
5
overlays/disko.nix
Normal file
5
overlays/disko.nix
Normal file
@ -0,0 +1,5 @@
|
||||
# Add disko to nixpkgs from its input flake
|
||||
|
||||
inputs: _final: prev: {
|
||||
disko = inputs.disko.packages.${prev.system}.disko;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
_final: prev: {
|
||||
extraLib = prev.lib // {
|
||||
|
||||
# Quickly package shell scripts with their dependencies
|
||||
# From https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6
|
||||
mkScript = { name, file, env ? [ ] }:
|
||||
prev.pkgs.writeScriptBin name ''
|
||||
for i in ${prev.lib.concatStringsSep " " env}; do
|
||||
export PATH="$i/bin:$PATH"
|
||||
done
|
||||
|
||||
exec ${prev.pkgs.bash}/bin/bash ${file} $@
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
@ -17,6 +17,7 @@ let
|
||||
in {
|
||||
|
||||
nil = inputs.nil.packages.${prev.system}.nil;
|
||||
vscode-terraform-snippets = inputs.vscode-terraform-snippets;
|
||||
|
||||
nvim-lspconfig =
|
||||
(withSrc prev.vimPlugins.nvim-lspconfig inputs.nvim-lspconfig);
|
||||
|
47
overlays/tree-sitter.nix
Normal file
47
overlays/tree-sitter.nix
Normal file
@ -0,0 +1,47 @@
|
||||
# Fix: bash highlighting doesn't work as of this commit:
|
||||
# https://github.com/NixOS/nixpkgs/commit/49cce41b7c5f6b88570a482355d9655ca19c1029
|
||||
|
||||
inputs: _final: prev: {
|
||||
tree-sitter-grammars = prev.tree-sitter-grammars // {
|
||||
tree-sitter-bash = prev.tree-sitter-grammars.tree-sitter-bash.overrideAttrs
|
||||
(old: {
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-bash";
|
||||
rev = "493646764e7ad61ce63ce3b8c59ebeb37f71b841";
|
||||
sha256 = "sha256-gl5F3IeZa2VqyH/qFj8ey2pRbGq4X8DL5wiyvRrH56U=";
|
||||
};
|
||||
});
|
||||
tree-sitter-ini = prev.tree-sitter.buildGrammar {
|
||||
language = "ini";
|
||||
version = "1.0.0";
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "justinmk";
|
||||
repo = "tree-sitter-ini";
|
||||
rev = "1a0ce072ebf3afac7d5603d9a95bb7c9a6709b44";
|
||||
sha256 = "sha256-pPtKokpTgjoNzPW4dRkOnyzBBJFeJj3+CW3LbHSKsmU=";
|
||||
};
|
||||
};
|
||||
tree-sitter-puppet = prev.tree-sitter.buildGrammar {
|
||||
language = "puppet";
|
||||
version = "1.0.0";
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "amaanq";
|
||||
repo = "tree-sitter-puppet";
|
||||
rev = "v1.0.0";
|
||||
sha256 = "sha256-vk5VJZ9zW2bBuc+DM+fwFyhM1htZGeLlmkjMAH66jBA=";
|
||||
};
|
||||
};
|
||||
tree-sitter-rasi = prev.tree-sitter.buildGrammar {
|
||||
language = "rasi";
|
||||
version = "0.1.1";
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "Fymyte";
|
||||
repo = "tree-sitter-rasi";
|
||||
rev = "371dac6bcce0df5566c1cfebde69d90ecbeefd2d";
|
||||
sha256 = "sha256-2nYZoLcrxxxiOJEySwHUm93lzMg8mU+V7LIP63ntFdA=";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
13
private/cloudflare-api.age
Normal file
13
private/cloudflare-api.age
Normal file
@ -0,0 +1,13 @@
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyByWGJS
|
||||
SmJlSVhZcUx5Y3JhVXYxUVhUbmp2QjNXeUxYL1EwNThJelRoTVNvCjFsU0gyaWNJ
|
||||
SEJpNVpYWm1TL24yeHNLaWNIdU9FdWw2d3p6UVVMSEYwT28KLT4gc3NoLWVkMjU1
|
||||
MTkgWXlTVU1RIEV4NU1sOENFK1NvUWlZL1NmUCtUM2RRQmd1c2pnb3p6V3Bsc3pC
|
||||
UVdYV3cKYmFkR0EwNVpRbzJBb2Z4RmpXSGVyK3BkLzd6TTMvQWRRK3BtRXZDUjVZ
|
||||
UQotPiBzc2gtZWQyNTUxOSBuanZYNUEgMG9rU0lzTU1iV1grOTNzZS85cldQZGE5
|
||||
Ym9nVkRvNC9OMUFBbStNT1BBOApucnl1Z0w1Y1RRU3grS0Z0TjNNRXcwVnVqeDFF
|
||||
VGc3Mm93UFc0YXoweVBBCi0tLSBvTnpCc3hBVU81dkpBRzV2L3NWTlZaV2QxUVNZ
|
||||
KzJwcUI2QUl2NEY0R1p3CmDvQwsKrtmTJliCxHv+LSoIV8jYpQJ7I2LJSH9uP89N
|
||||
+7wbAwGjv/Uxk7gnMn5EqQuFKZeOl8LLhKEprmVqVZqlkgbpaaaWud/4xNKu9v5h
|
||||
lWuY1sYd
|
||||
-----END AGE ENCRYPTED FILE-----
|
15
private/cloudflared-flame.age
Normal file
15
private/cloudflared-flame.age
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBQVzVy
|
||||
ZmRldHhVenI3RVdOQXkyQ3pQUWM3N2l0bFBqT3ozakp3Nk5nS1dVCmoxb1lzVWd1
|
||||
YWZ0UWd4TExELzJ1cElsQ0o2L1g4TVBpZW16TmxvT05GaFEKLT4gc3NoLWVkMjU1
|
||||
MTkgWXlTVU1RIDR2TjdhbG1MelVVTXF3WUhFRWZKRGVoYUNwdy9hc05uajg2enlY
|
||||
S0x5eWcKSlM2YjFCRi9yN3ozVkhScXM5S0dNRnhpeisvNlE1Q09CNVFvN0YwL2JR
|
||||
NAotPiBzc2gtZWQyNTUxOSBuanZYNUEgMEJtR2JpVk5PZnRpOUVuZHZJTDI3Z0Fa
|
||||
UUdwWXFLT1gxZ0c3WFBlU2dDawpreE0yYUxoUktveGF5NXE4VHRva1hNdjdpYmZn
|
||||
R08wQ0l6cXpvYmhRMXRvCi0tLSB0UmFTdVBlR3NTSkVzdGtzOTdmSFVERC85dU1z
|
||||
cHdMVFdYSTFWUGRDTm1nCrengYn1phCUDmVH29uRjKMLNDIucrpi1s4t8ciQ3ILG
|
||||
sz605ztO3UUlm4SQTJnXmktRDBlLu/xICzEo5okkNl9HwK7s2Ok2DAoz8K/KeFbS
|
||||
65K3a3RcZEdWryZyu/N12HAqu5FDw0wIbvLJP4X+EcpUJXYHr8FluLUSEQg+sORW
|
||||
FnL5tr1vK32ZQY4GIHZXh4hQbNoZo1v2ezkcK21siDkeA3e3PT6Bi0I90nuXS9Pc
|
||||
0rZFZeYlNtI1Y4aeg6NEWytt
|
||||
-----END AGE ENCRYPTED FILE-----
|
15
private/cloudflared-tempest.age
Normal file
15
private/cloudflared-tempest.age
Normal file
@ -0,0 +1,15 @@
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyB1VnBt
|
||||
RTV5eWc3RDNUR2lOWFRaMlgzREQyMlcvUFNxV0N2Vm9lVVZKOUZ3ClJjaWtYZjR5
|
||||
ZTB4L2M4MFB0UThaMzlRT3JkUEE1N3RrSUlpZnRFbmFDdWcKLT4gc3NoLWVkMjU1
|
||||
MTkgWXlTVU1RIE5iTUs1ak9VZjRIRGpLMWtDcVB0RjVFRW8vOENQZlkzeGhsYmFB
|
||||
QzJ6Z00KZmcvZ0hYMjN1bGZwY3NvMjlCbnpHUWVjdVU4cnBGcDQxTU8wZ0EyQXdU
|
||||
MAotPiBzc2gtZWQyNTUxOSBuanZYNUEgazRzK2ZnSUZNWURoKzZMZmM4VTlDbVBh
|
||||
WGc4MlE5TGFiN1MzV01FT1oyQQppRUhUNjdlQURNQm8rR0JOOUJFNm9vaXhPTXFW
|
||||
U2lJU09jWVA0TDRrVHY4Ci0tLSBudWJTclRTek1RWHYzYzA4aTduODB0NUNWbVVP
|
||||
cUIyVzJncWhDS053d25nCneJhp1QT1v+dAguW9wAKDgWST59KNBgbY01jkf1IqXc
|
||||
FbmkctPIMggim3uCBqjzBboYvf+dtt0Fcu9aiB+4YmGUeQNb+9mdPweXoHmVrego
|
||||
XygVsbuSP4xKWtIJhBJ/3/jEK9LqBtv+owdUIxbw5Ci6A0JvSu+tnUj5oAgMyT2z
|
||||
YrGRK9plQZteeUkMcd6+anSEUpP45lzfz/T7loD9ViCbPHRuUFgwkwUcRGjQStm3
|
||||
pnx9bi8N4ac599f4KqInm5gd
|
||||
-----END AGE ENCRYPTED FILE-----
|
12
private/prometheus.age
Normal file
12
private/prometheus.age
Normal file
@ -0,0 +1,12 @@
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IE1nSGFPdyBDRWNi
|
||||
YlJubmg1Ly94cHgxbHV3dStaRkZDRXdNZzVjRCt0R2RNMFkxUEZNCnJxZnc1UHFB
|
||||
MURselZuL1U5OHFQb0tPLytWelRzYXlvNngya3RQOXREUEkKLT4gc3NoLWVkMjU1
|
||||
MTkgWXlTVU1RIDRiR2ZEMUZsYTlGbXFoR0NyZXVXMEZmS3BONDNFQUo4VU1XNkZ0
|
||||
ZWFzMHcKM1crbDVsR2VmVTFNckxaa21MTW9UVWE3Z01qMi9VT0kwMm80V0tMSWM1
|
||||
bwotPiBzc2gtZWQyNTUxOSBuanZYNUEgd0tIampOVU5ZeWtxNWZpaGdFQTBlWlha
|
||||
Z0lBQWp0dzhMRHU5UnVzWVlUSQpnUHlCZ0w5Z1hMYm1Dc1UxQ1lLRHlnaUhJQllW
|
||||
RGMvTEhhc29VL2JXZnhNCi0tLSB6TThQbmV0eFJ0d2pZd1h0c2RuTGFzUHhyYWJp
|
||||
b2RhVTNkSXczRGJpN1UwCt7I+OsqQdQbFXhYPV5/kqDAr/jVoJ9H5PSfdLkeVIrr
|
||||
AqScUaOrdctUZEBIF8/FouJkSbIiU8muBNrBKx9CylI=
|
||||
-----END AGE ENCRYPTED FILE-----
|
@ -1 +0,0 @@
|
||||
use flake
|
27
templates/basic/flake.lock
generated
27
templates/basic/flake.lock
generated
@ -1,27 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1659803779,
|
||||
"narHash": "sha256-+5zkHlbcbFyN5f3buO1RAZ9pH1wXLxCesUJ0vFmLr9Y=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f44884060cb94240efbe55620f38a8ec8d9af601",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
@ -1 +0,0 @@
|
||||
use flake
|
419
templates/haskell/flake.lock
generated
419
templates/haskell/flake.lock
generated
@ -1,419 +0,0 @@
|
||||
{
|
||||
"nodes": {
|
||||
"HTTP": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1451647621,
|
||||
"narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=",
|
||||
"owner": "phadej",
|
||||
"repo": "HTTP",
|
||||
"rev": "9bc0996d412fef1787449d841277ef663ad9a915",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "phadej",
|
||||
"repo": "HTTP",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cabal-32": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1603716527,
|
||||
"narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=",
|
||||
"owner": "haskell",
|
||||
"repo": "cabal",
|
||||
"rev": "48bf10787e27364730dd37a42b603cee8d6af7ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "haskell",
|
||||
"ref": "3.2",
|
||||
"repo": "cabal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cabal-34": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1640353650,
|
||||
"narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=",
|
||||
"owner": "haskell",
|
||||
"repo": "cabal",
|
||||
"rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "haskell",
|
||||
"ref": "3.4",
|
||||
"repo": "cabal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cabal-36": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641652457,
|
||||
"narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=",
|
||||
"owner": "haskell",
|
||||
"repo": "cabal",
|
||||
"rev": "f27667f8ec360c475027dcaee0138c937477b070",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "haskell",
|
||||
"ref": "3.6",
|
||||
"repo": "cabal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cardano-shell": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1608537748,
|
||||
"narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=",
|
||||
"owner": "input-output-hk",
|
||||
"repo": "cardano-shell",
|
||||
"rev": "9392c75087cb9a3d453998f4230930dea3a95725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "input-output-hk",
|
||||
"repo": "cardano-shell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1656065134,
|
||||
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ghc-8.6.5-iohk": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1600920045,
|
||||
"narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=",
|
||||
"owner": "input-output-hk",
|
||||
"repo": "ghc",
|
||||
"rev": "95713a6ecce4551240da7c96b6176f980af75cae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "input-output-hk",
|
||||
"ref": "release/8.6.5-iohk",
|
||||
"repo": "ghc",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hackage": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1656724378,
|
||||
"narHash": "sha256-JdtnbKzKiP1GMWuVt3aQYELxFb8A2OhH/TJBfPn3QMg=",
|
||||
"owner": "input-output-hk",
|
||||
"repo": "hackage.nix",
|
||||
"rev": "6e2d054b0876d3f9709da1df9dfe27325886927e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "input-output-hk",
|
||||
"repo": "hackage.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"haskellNix": {
|
||||
"inputs": {
|
||||
"HTTP": "HTTP",
|
||||
"cabal-32": "cabal-32",
|
||||
"cabal-34": "cabal-34",
|
||||
"cabal-36": "cabal-36",
|
||||
"cardano-shell": "cardano-shell",
|
||||
"flake-utils": "flake-utils_2",
|
||||
"ghc-8.6.5-iohk": "ghc-8.6.5-iohk",
|
||||
"hackage": "hackage",
|
||||
"hpc-coveralls": "hpc-coveralls",
|
||||
"hydra": "hydra",
|
||||
"nix-tools": "nix-tools",
|
||||
"nixpkgs": [
|
||||
"haskellNix",
|
||||
"nixpkgs-unstable"
|
||||
],
|
||||
"nixpkgs-2003": "nixpkgs-2003",
|
||||
"nixpkgs-2105": "nixpkgs-2105",
|
||||
"nixpkgs-2111": "nixpkgs-2111",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"old-ghc-nix": "old-ghc-nix",
|
||||
"stackage": "stackage"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1656752829,
|
||||
"narHash": "sha256-Xz7aGLynjihmgp5a9dTX5Ax5GsL3Fcd2GQUEJ2BEYAU=",
|
||||
"owner": "input-output-hk",
|
||||
"repo": "haskell.nix",
|
||||
"rev": "4e100b2ad96c221a78580701aa0a5a4f48f49130",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "input-output-hk",
|
||||
"repo": "haskell.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hpc-coveralls": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1607498076,
|
||||
"narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=",
|
||||
"owner": "sevanspowell",
|
||||
"repo": "hpc-coveralls",
|
||||
"rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sevanspowell",
|
||||
"repo": "hpc-coveralls",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hydra": {
|
||||
"inputs": {
|
||||
"nix": "nix",
|
||||
"nixpkgs": [
|
||||
"haskellNix",
|
||||
"hydra",
|
||||
"nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1646878427,
|
||||
"narHash": "sha256-KtbrofMtN8GlM7D+n90kixr7QpSlVmdN+vK5CA/aRzc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "hydra",
|
||||
"rev": "28b682b85b7efc5cf7974065792a1f22203a5927",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "hydra",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"lowdown-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1633514407,
|
||||
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
|
||||
"owner": "kristapsdz",
|
||||
"repo": "lowdown",
|
||||
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kristapsdz",
|
||||
"repo": "lowdown",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix": {
|
||||
"inputs": {
|
||||
"lowdown-src": "lowdown-src",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-regression": "nixpkgs-regression"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1643066034,
|
||||
"narHash": "sha256-xEPeMcNJVOeZtoN+d+aRwolpW8mFSEQx76HTRdlhPhg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nix",
|
||||
"rev": "a1cd7e58606a41fcf62bf8637804cf8306f17f62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "2.6.0",
|
||||
"repo": "nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-tools": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1649424170,
|
||||
"narHash": "sha256-XgKXWispvv5RCvZzPb+p7e6Hy3LMuRjafKMl7kXzxGw=",
|
||||
"owner": "input-output-hk",
|
||||
"repo": "nix-tools",
|
||||
"rev": "e109c94016e3b6e0db7ed413c793e2d4bdb24aa7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "input-output-hk",
|
||||
"repo": "nix-tools",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1632864508,
|
||||
"narHash": "sha256-d127FIvGR41XbVRDPVvozUPQ/uRHbHwvfyKHwEt5xFM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "82891b5e2c2359d7e58d08849e4c89511ab94234",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixos-21.05-small",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-2003": {
|
||||
"locked": {
|
||||
"lastModified": 1620055814,
|
||||
"narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-20.03-darwin",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-2105": {
|
||||
"locked": {
|
||||
"lastModified": 1645296114,
|
||||
"narHash": "sha256-y53N7TyIkXsjMpOG7RhvqJFGDacLs9HlyHeSTBioqYU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "530a53dcbc9437363471167a5e4762c5fcfa34a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-21.05-darwin",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-2111": {
|
||||
"locked": {
|
||||
"lastModified": 1648744337,
|
||||
"narHash": "sha256-bYe1dFJAXovjqiaPKrmAbSBEK5KUkgwVaZcTbSoJ7hg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0a58eebd8ec65ffdef2ce9562784123a73922052",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-21.11-darwin",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-regression": {
|
||||
"locked": {
|
||||
"lastModified": 1643052045,
|
||||
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1648219316,
|
||||
"narHash": "sha256-Ctij+dOi0ZZIfX5eMhgwugfvB+WZSrvVNAyAuANOsnQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "30d3d79b7d3607d56546dd2a6b49e156ba0ec634",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"old-ghc-nix": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1631092763,
|
||||
"narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=",
|
||||
"owner": "angerman",
|
||||
"repo": "old-ghc-nix",
|
||||
"rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "angerman",
|
||||
"ref": "master",
|
||||
"repo": "old-ghc-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"haskellNix": "haskellNix",
|
||||
"nixpkgs": [
|
||||
"haskellNix",
|
||||
"nixpkgs-unstable"
|
||||
]
|
||||
}
|
||||
},
|
||||
"stackage": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1656638371,
|
||||
"narHash": "sha256-waxiLSFvKxpaG4zl8YpLtuhLf5OrFi6CgAIZAOXpnQ8=",
|
||||
"owner": "input-output-hk",
|
||||
"repo": "stackage.nix",
|
||||
"rev": "4f1ad0f4b0f01010df8dab254fc8b453934823e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "input-output-hk",
|
||||
"repo": "stackage.nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
@ -1 +0,0 @@
|
||||
use flake . --no-use-registries
|
@ -1 +0,0 @@
|
||||
use flake
|
Reference in New Issue
Block a user