Uhhhh, lots of changes I forgot to push earlier
This commit is contained in:
parent
de5e4fe049
commit
5230faf7c4
|
@ -1,9 +1,9 @@
|
||||||
args: {
|
args: {
|
||||||
haskell = import ./haskell.nix args;
|
haskell = import ./haskell.nix args;
|
||||||
|
lua = import ./lua.nix args;
|
||||||
purescript = import ./purescript.nix args;
|
purescript = import ./purescript.nix args;
|
||||||
rwtw = import ./rwtw.nix args;
|
rwtw = import ./rwtw.nix args;
|
||||||
typst = import ./typst.nix args;
|
typst = import ./typst.nix args;
|
||||||
lua = import ./lua.nix args;
|
web = import ./web.nix args;
|
||||||
bootstrap = import ./bootstrap/shell.nix args;
|
bootstrap = import ./bootstrap/shell.nix args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
7
devshells/web.nix
Normal file
7
devshells/web.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
typescript
|
||||||
|
nodejs
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,4 +1,9 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
repaint = "commandline -f repaint";
|
repaint = "commandline -f repaint";
|
||||||
fishKeybinds = {
|
fishKeybinds = {
|
||||||
|
@ -20,8 +25,10 @@ let
|
||||||
"\\e\\[70\\;5u" = ''nvim +":lua require('mini.files').open()"'';
|
"\\e\\[70\\;5u" = ''nvim +":lua require('mini.files').open()"'';
|
||||||
};
|
};
|
||||||
|
|
||||||
mkKeybind = key: value:
|
mkKeybind =
|
||||||
let escaped = lib.escapeShellArg value;
|
key: value:
|
||||||
|
let
|
||||||
|
escaped = lib.escapeShellArg value;
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
bind -M default ${key} ${escaped}
|
bind -M default ${key} ${escaped}
|
||||||
|
@ -34,13 +41,9 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultOptions = [ "--no-scrollbar" ];
|
defaultOptions = [ "--no-scrollbar" ];
|
||||||
|
|
||||||
changeDirWidgetOptions = [
|
changeDirWidgetOptions = [ "--preview '${lib.getExe pkgs.eza} --icons --tree --color=always {}'" ];
|
||||||
"--preview '${lib.getExe pkgs.eza} --icons --tree --color=always {}'"
|
|
||||||
];
|
|
||||||
|
|
||||||
fileWidgetOptions = [
|
fileWidgetOptions = [ "--preview '${lib.getExe pkgs.bat} --number --color=always {}'" ];
|
||||||
"--preview '${lib.getExe pkgs.bat} --number --color=always {}'"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
stylix.targets.fzf.enable = true;
|
stylix.targets.fzf.enable = true;
|
||||||
|
@ -65,26 +68,20 @@ in
|
||||||
let
|
let
|
||||||
plugins = with pkgs.fishPlugins; [
|
plugins = with pkgs.fishPlugins; [
|
||||||
z # Jump to directories by typing "z <directory-name>"
|
z # Jump to directories by typing "z <directory-name>"
|
||||||
grc # Adds color to a bunch of built in commands
|
|
||||||
done # Trigger a notification when long commands finish execution
|
done # Trigger a notification when long commands finish execution
|
||||||
puffer # Text expansion (i.e. expanding .... to ../../../)
|
puffer # Text expansion (i.e. expanding .... to ../../../)
|
||||||
sponge # Remove failed commands and whatnot from history
|
sponge # Remove failed commands and whatnot from history
|
||||||
forgit # Git tui thingy? (I'm still trying this one out)
|
colored-man-pages
|
||||||
colored-man-pages # Self explainatory:)
|
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
# For some reason home-manager expects a slightly different format 🤔
|
# For some reason home-manager expects a slightly different format 🤔
|
||||||
lib.forEach plugins
|
lib.forEach plugins (plugin: {
|
||||||
(plugin: {
|
|
||||||
name = plugin.pname;
|
name = plugin.pname;
|
||||||
inherit (plugin) src;
|
inherit (plugin) src;
|
||||||
});
|
});
|
||||||
# }}}
|
# }}}
|
||||||
};
|
};
|
||||||
|
|
||||||
# I sometimes get errors about `grc` being missing, so I gave up and added it here.
|
|
||||||
home.packages = [ pkgs.grc ];
|
|
||||||
|
|
||||||
satellite.persistence.at.state.apps.fish.directories = [
|
satellite.persistence.at.state.apps.fish.directories = [
|
||||||
"${config.xdg.dataHome}/fish"
|
"${config.xdg.dataHome}/fish"
|
||||||
"${config.xdg.dataHome}/z" # The z fish plugin requires this
|
"${config.xdg.dataHome}/z" # The z fish plugin requires this
|
||||||
|
|
|
@ -49,6 +49,18 @@
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
rebase.autoStash = true;
|
rebase.autoStash = true;
|
||||||
|
|
||||||
|
push.default = "current";
|
||||||
|
push.autoSetupRemote = true;
|
||||||
|
|
||||||
|
# {{{ URL rewriting
|
||||||
|
url."git@github.com:".insteadOf = [
|
||||||
|
# Normalize GitHub URLs to SSH to avoid authentication issues with HTTPS.
|
||||||
|
"https://github.com/"
|
||||||
|
|
||||||
|
# Allows typing `git clone github:owner/repo`.
|
||||||
|
"github:"
|
||||||
|
];
|
||||||
|
# }}}
|
||||||
# {{{ Signing
|
# {{{ Signing
|
||||||
# Sign commits using ssh
|
# Sign commits using ssh
|
||||||
gpg.format = "ssh";
|
gpg.format = "ssh";
|
||||||
|
|
|
@ -2,19 +2,19 @@
|
||||||
lib.fix (self: {
|
lib.fix (self: {
|
||||||
"Catppuccin Mocha" = fetchurl {
|
"Catppuccin Mocha" = fetchurl {
|
||||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-mocha.theme.css";
|
url = "https://catppuccin.github.io/discord/dist/catppuccin-mocha.theme.css";
|
||||||
sha256 = "1gafrnm5mz8zh63zvcr3jp5fkzs9l0xnpwq3b4k7sbbzwg04nzw5";
|
sha256 = "0y9vha3gb48yid65r2zfkc6l021j1s8mlac3klkbksla9gqnd9wr";
|
||||||
};
|
};
|
||||||
"Catppuccin Frappe" = fetchurl {
|
"Catppuccin Frappe" = fetchurl {
|
||||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-frappe.theme.css";
|
url = "https://catppuccin.github.io/discord/dist/catppuccin-frappe.theme.css";
|
||||||
sha256 = "05y43fcwgy4sv9q6c49r5c92jzvq8vjrk05wy2zblp5v7zrli7sl";
|
sha256 = "19kmmydkbpig14ql6zn0vqzlfykm6qg7r317vwjzq9dg092lflam";
|
||||||
};
|
};
|
||||||
"Catppuccin Latte" = fetchurl {
|
"Catppuccin Latte" = fetchurl {
|
||||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-latte.theme.css";
|
url = "https://catppuccin.github.io/discord/dist/catppuccin-latte.theme.css";
|
||||||
sha256 = "1c7vwr8f6sip7lsyp770hm170pnld1ikvqdsh2fxlsdkkn6ay2k3";
|
sha256 = "0lm1mzflyxmzpsyfkbcd1v7d1xp5i683yc6npbsm12z4hqn2smf6";
|
||||||
};
|
};
|
||||||
"Catppuccin Macchiato" = fetchurl {
|
"Catppuccin Macchiato" = fetchurl {
|
||||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-macchiato.theme.css";
|
url = "https://catppuccin.github.io/discord/dist/catppuccin-macchiato.theme.css";
|
||||||
sha256 = "11vig9i5kwhcbblspcp928gf4mvvp3v0qsibmh82wyxyw9ddzr7d";
|
sha256 = "01zd5zf9b4a2kkwnkpzg37g1macan6201wyi7zj2crsbxy8b7j6k";
|
||||||
};
|
};
|
||||||
default.dark = self."Catppuccin Macchiato";
|
default.dark = self."Catppuccin Macchiato";
|
||||||
default.light = self."Catppuccin Latte";
|
default.light = self."Catppuccin Latte";
|
||||||
|
|
|
@ -8,3 +8,5 @@ local nix = require("nix")
|
||||||
tempest.configureMany(nix.pre)
|
tempest.configureMany(nix.pre)
|
||||||
require("my.lazy").setup()
|
require("my.lazy").setup()
|
||||||
tempest.configureMany(nix.post)
|
tempest.configureMany(nix.post)
|
||||||
|
|
||||||
|
require("my.helpers.folding").setup()
|
||||||
|
|
|
@ -45,11 +45,10 @@
|
||||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||||
"plenary": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
"plenary": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||||
"purescript": { "branch": "main", "commit": "82348352e6568fcc0385bd7c99a8ead3a479feea" },
|
"purescript": { "branch": "main", "commit": "82348352e6568fcc0385bd7c99a8ead3a479feea" },
|
||||||
"rust-tools": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
|
"rustacean": { "branch": "master", "commit": "5c0c44149e43b907dae2e0fe053284ad56226eb7" },
|
||||||
"rzip": { "branch": "master", "commit": "f65400fed27b27c7cff7ef8d428c4e5ff749bf28" },
|
"rzip": { "branch": "master", "commit": "f65400fed27b27c7cff7ef8d428c4e5ff749bf28" },
|
||||||
"scrap": { "branch": "main", "commit": "cc8453ed613932c744c3d1ec42f379b78bd8b92c" },
|
"scrap": { "branch": "main", "commit": "cc8453ed613932c744c3d1ec42f379b78bd8b92c" },
|
||||||
"telescope": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
"telescope": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
"treesitter": { "branch": "master", "commit": "7f4ac678770175cdf0d42c015f4a5b6e18b6cb33" },
|
|
||||||
"typst": { "branch": "main", "commit": "4d18ced62599ffe5b3c0e5e49566d5456121bc02" },
|
"typst": { "branch": "main", "commit": "4d18ced62599ffe5b3c0e5e49566d5456121bc02" },
|
||||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||||
"wakatime": { "branch": "master", "commit": "3cb40867cb5a3120f9bef76eff88edc7f1dc1a23" },
|
"wakatime": { "branch": "master", "commit": "3cb40867cb5a3120f9bef76eff88edc7f1dc1a23" },
|
||||||
|
|
23
home/features/neovim/config/lua/my/helpers/folding.lua
Normal file
23
home/features/neovim/config/lua/my/helpers/folding.lua
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function createFold(name)
|
||||||
|
local commentstring = vim.o.commentstring
|
||||||
|
local start_comment = string.gsub(commentstring, "%%s", " {{{ " .. name)
|
||||||
|
local end_comment = string.gsub(commentstring, "%%s", " }}}")
|
||||||
|
|
||||||
|
-- Leave visual mode
|
||||||
|
local esc = vim.api.nvim_replace_termcodes("<esc>", true, false, true)
|
||||||
|
vim.api.nvim_feedkeys(esc, "x", false)
|
||||||
|
|
||||||
|
vim.cmd(":'>put='" .. end_comment .. "'")
|
||||||
|
vim.cmd(":'<-1put='" .. start_comment .. "'")
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
vim.keymap.set("v", "<C-i>", function()
|
||||||
|
local name = vim.fn.input("Fold name: ")
|
||||||
|
createFold(name)
|
||||||
|
end, { desc = "Create fold markers around area" })
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
|
@ -26,7 +26,7 @@ function M.setup()
|
||||||
fallback = true,
|
fallback = true,
|
||||||
|
|
||||||
-- Directory where I store my local plugin projects
|
-- Directory where I store my local plugin projects
|
||||||
path = vim.g.nix_projects_path,
|
path = vim.g.nix_projects_dir,
|
||||||
patterns = { "prescientmoon" },
|
patterns = { "prescientmoon" },
|
||||||
},
|
},
|
||||||
performance = {
|
performance = {
|
||||||
|
|
|
@ -29,9 +29,9 @@ let
|
||||||
mirosSnippetCache = "${config.xdg.cacheHome}/miros";
|
mirosSnippetCache = "${config.xdg.cacheHome}/miros";
|
||||||
obsidianVault = "${config.xdg.userDirs.extraConfig.XDG_PROJECTS_DIR}/stellar-sanctum";
|
obsidianVault = "${config.xdg.userDirs.extraConfig.XDG_PROJECTS_DIR}/stellar-sanctum";
|
||||||
|
|
||||||
generated = nlib.generateConfig (
|
generated =
|
||||||
lib.fix (
|
with nlib;
|
||||||
self: with nlib; {
|
generateConfig {
|
||||||
# {{{ Pre-plugin config
|
# {{{ Pre-plugin config
|
||||||
pre = {
|
pre = {
|
||||||
# {{{ General options
|
# {{{ General options
|
||||||
|
@ -508,7 +508,7 @@ let
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
(nmap "<c-p>" "find_files" "File finder [p]alette")
|
(nmap "<c-p>" "find_files" "File finder [p]alette")
|
||||||
(nmap "<leader>d" "diagnostics" "[D]iagnostics")
|
(nmap "<leader>d" "diagnostics root_dir=true" "[D]iagnostics")
|
||||||
(nmap "<c-f>" "live_grep" "[F]ind in project")
|
(nmap "<c-f>" "live_grep" "[F]ind in project")
|
||||||
(nmap "<c-t>" "builtin" "[T]elescope pickers")
|
(nmap "<c-t>" "builtin" "[T]elescope pickers")
|
||||||
# {{{ Files by extension
|
# {{{ Files by extension
|
||||||
|
@ -1212,6 +1212,7 @@ let
|
||||||
status.virtual_text = true;
|
status.virtual_text = true;
|
||||||
output.open_on_run = true;
|
output.open_on_run = true;
|
||||||
adapters = [
|
adapters = [
|
||||||
|
(require "rustaceanvim.neotest")
|
||||||
(require "neotest-haskell" {
|
(require "neotest-haskell" {
|
||||||
build_tools = [ "stack" ];
|
build_tools = [ "stack" ];
|
||||||
frameworks = [ "hspec" ];
|
frameworks = [ "hspec" ];
|
||||||
|
@ -1266,21 +1267,24 @@ let
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ rust support
|
# {{{ rust support
|
||||||
# {{{ rust-tools
|
# {{{ rustacean
|
||||||
rust-tools = {
|
rustacean = {
|
||||||
package = "simrat39/rust-tools.nvim";
|
package = "mrcjkb/rustaceanvim";
|
||||||
dependencies.nix = lib.lists.optionals packedTargets.rust [
|
dependencies.nix = lib.lists.optionals packedTargets.rust [
|
||||||
pkgs.rust-analyzer
|
pkgs.rust-analyzer
|
||||||
pkgs.rustfmt
|
pkgs.rustfmt
|
||||||
];
|
];
|
||||||
|
|
||||||
cond = blacklist "vscode";
|
cond = blacklist "vscode";
|
||||||
ft = "rust";
|
lazy = false; # This plugin is already lazy
|
||||||
|
|
||||||
opts.server.on_attach = tempestBufnr {
|
config.autocmds = {
|
||||||
keys = {
|
group = "RustaceanSettings";
|
||||||
|
event = "FileType";
|
||||||
|
pattern = "rs";
|
||||||
|
action.keys = {
|
||||||
mapping = "<leader>lc";
|
mapping = "<leader>lc";
|
||||||
action = "<cmd>RustOpenCargo<cr>";
|
action = "<cmd>RustLsp openCargo<cr>";
|
||||||
desc = "Open [c]argo.toml";
|
desc = "Open [c]argo.toml";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1635,19 +1639,17 @@ let
|
||||||
# }}}
|
# }}}
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
}
|
};
|
||||||
)
|
|
||||||
);
|
|
||||||
# {{{ extraRuntime
|
# {{{ extraRuntime
|
||||||
# Experimental nix module generation
|
# Experimental nix module generation
|
||||||
generatedConfig = (config.satellite.lib.lua.writeFile "lua/nix" "init" generated.lua);
|
generatedConfig = config.satellite.lib.lua.writeFile "lua/nix" "init" generated.lua;
|
||||||
|
|
||||||
extraRuntime = lib.concatStringsSep "," [
|
extraRuntime = lib.concatStringsSep "," [
|
||||||
generatedConfig
|
generatedConfig
|
||||||
mirosSnippetCache
|
mirosSnippetCache
|
||||||
"${pkgs.vimPlugins.lazy-nvim}"
|
"${pkgs.vimPlugins.lazy-nvim}"
|
||||||
];
|
];
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Client wrapper
|
# {{{ Client wrapper
|
||||||
# Wraps a neovim client, providing the dependencies
|
# Wraps a neovim client, providing the dependencies
|
||||||
|
|
|
@ -55,10 +55,10 @@ block text
|
||||||
|
|
||||||
pattern ([Ll]et)
|
pattern ([Ll]et)
|
||||||
name definition
|
name definition
|
||||||
snip @1 \$$1 = $2\$
|
snip @0 \$$1 = $2\$ @0
|
||||||
|
|
||||||
block auto
|
block auto
|
||||||
string im
|
string $
|
||||||
name inline math
|
name inline math
|
||||||
snip \$$1\$$0
|
snip \$$1\$$0
|
||||||
|
|
||||||
|
@ -92,11 +92,18 @@ block math
|
||||||
$7 & $8 & $9
|
$7 & $8 & $9
|
||||||
\end{@matenv}
|
\end{@matenv}
|
||||||
|
|
||||||
for operator <- @⟨eq,neq,defas,leq,geq,lt,gt,iip,iib,iff⟩
|
for createabbr <- @⟨false,true⟩
|
||||||
for symbol <- @⟨@operator:=,\neq,\coloneq,\leq,\geq,<,>,\implies,\impliedby,\iff⟩
|
for operator <- @⟨@createabbr:
|
||||||
|
@⟨eq,lt,gt⟩,
|
||||||
|
@⟨neq,defas,leq,geq,iip,iib,iff⟩
|
||||||
|
⟩
|
||||||
|
for symbol <- @⟨@createabbr:
|
||||||
|
@⟨@operator:=,<,>⟩,
|
||||||
|
@⟨@operator:\neq,\coloneq,\leq,\geq,\implies,\impliedby,\iff⟩
|
||||||
|
⟩
|
||||||
|
|
||||||
block auto
|
block auto
|
||||||
abbr @operator @symbol
|
abbr @⟨@createabbr:op-@operator,@operator⟩ @symbol
|
||||||
|
|
||||||
string a@operator
|
string a@operator
|
||||||
name align at @operator
|
name align at @operator
|
||||||
|
@ -177,6 +184,7 @@ block math
|
||||||
|
|
||||||
abbr frl \forall
|
abbr frl \forall
|
||||||
abbr exs \exists
|
abbr exs \exists
|
||||||
|
abbr iin \in
|
||||||
abbr nin \not\in
|
abbr nin \not\in
|
||||||
abbr ccup \cup
|
abbr ccup \cup
|
||||||
abbr ccap \cap
|
abbr ccap \cap
|
||||||
|
@ -187,9 +195,8 @@ block math
|
||||||
abbr vsm \vecspace
|
abbr vsm \vecspace
|
||||||
abbr oball \ball
|
abbr oball \ball
|
||||||
|
|
||||||
for noperator <- @⟨ordop,land,lor⟩
|
for noperator <- @⟨ordop,land,lor,equiv,pmod⟩
|
||||||
string @noperator
|
abbr @noperator \\@noperator
|
||||||
snip \\@noperator
|
|
||||||
|
|
||||||
for operator <- @⟨overline,hat,bar,abs,norm,prob,diprod,sin,cos,sqrt,ln,lrb,zmod,gen,diam,prob⟩
|
for operator <- @⟨overline,hat,bar,abs,norm,prob,diprod,sin,cos,sqrt,ln,lrb,zmod,gen,diam,prob⟩
|
||||||
string @operator
|
string @operator
|
||||||
|
@ -247,10 +254,10 @@ block math
|
||||||
name limit to @limtarget
|
name limit to @limtarget
|
||||||
snip \lim_{$1 \to @limtargetsymbol} $0
|
snip \lim_{$1 \to @limtargetsymbol} $0
|
||||||
|
|
||||||
string dint
|
string intd
|
||||||
name definite integral
|
name definite integral
|
||||||
snip \int_{$|1⟨$1,-\infty$1⟩}^$|2⟨{$2},\infty$2⟩ $3 \dif $0
|
snip \int_{$|1⟨$1,-\infty$1⟩}^$|2⟨{$2},\infty$2⟩ $3 \dif $0
|
||||||
|
|
||||||
string iint
|
string inti
|
||||||
name indefinite integral
|
name indefinite integral
|
||||||
snip \int $1 \dif $0
|
snip \int $1 \dif $0
|
||||||
|
|
|
@ -113,6 +113,16 @@
|
||||||
"${config.xdg.configHome}/Signal" # Why tf does signal store it's state here 💀
|
"${config.xdg.configHome}/Signal" # Why tf does signal store it's state here 💀
|
||||||
];
|
];
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ What's app
|
||||||
|
satellite.persistence.at.state.apps.whatsapp.directories = [
|
||||||
|
"${config.xdg.configHome}/whatsapp-for-linux"
|
||||||
|
"${config.xdg.stateHome}/whatsapp-for-linux"
|
||||||
|
];
|
||||||
|
|
||||||
|
satellite.persistence.at.cache.apps.whatsapp.directories = [
|
||||||
|
"${config.xdg.cacheHome}/whatsapp-for-linux"
|
||||||
|
];
|
||||||
|
# }}}
|
||||||
# {{{ Lutris
|
# {{{ Lutris
|
||||||
# TODO: there might be more to cache in .cache/lutris
|
# TODO: there might be more to cache in .cache/lutris
|
||||||
satellite.persistence.at.state.apps.lutris.directories = [
|
satellite.persistence.at.state.apps.lutris.directories = [
|
||||||
|
|
|
@ -53,6 +53,9 @@
|
||||||
programs.kdeconnect.enable = true;
|
programs.kdeconnect.enable = true;
|
||||||
programs.firejail.enable = true;
|
programs.firejail.enable = true;
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ SSH keys
|
||||||
|
users.users.pilot.openssh.authorizedKeys.keyFiles = [ ../tethys/keys/id_ed25519.pub ];
|
||||||
|
# }}}
|
||||||
|
|
||||||
satellite.pilot.name = "moon";
|
satellite.pilot.name = "moon";
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
|
@ -62,19 +62,13 @@
|
||||||
# {{{ /persist/data
|
# {{{ /persist/data
|
||||||
"persist-data" = {
|
"persist-data" = {
|
||||||
mountpoint = "/persist/data";
|
mountpoint = "/persist/data";
|
||||||
mountOptions = [
|
mountOptions = [ "compress=zstd" ];
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ /persist/state
|
# {{{ /persist/state
|
||||||
"persist-state" = {
|
"persist-state" = {
|
||||||
mountpoint = "/persist/state";
|
mountpoint = "/persist/state";
|
||||||
mountOptions = [
|
mountOptions = [ "compress=zstd" ];
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ /local/nix
|
# {{{ /local/nix
|
||||||
|
|
|
@ -74,4 +74,9 @@ in
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.persistence."/persist/local/cache".directories = [
|
||||||
|
"/var/cache/restic-backups-data"
|
||||||
|
"/var/cache/restic-backups-state"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,9 @@
|
||||||
# Configure users through nix only
|
# Configure users through nix only
|
||||||
mutableUsers = false;
|
mutableUsers = false;
|
||||||
|
|
||||||
|
# Sync up root and `pilot` shell
|
||||||
|
users.root.shell = config.users.users.pilot.shell;
|
||||||
|
|
||||||
# {{{ Create pilot user
|
# {{{ Create pilot user
|
||||||
users.pilot = {
|
users.pilot = {
|
||||||
inherit (config.satellite.pilot) name;
|
inherit (config.satellite.pilot) name;
|
||||||
|
@ -46,27 +49,6 @@
|
||||||
|
|
||||||
hashedPasswordFile = config.sops.secrets.pilot_password.path;
|
hashedPasswordFile = config.sops.secrets.pilot_password.path;
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
|
|
||||||
# {{{ Authorize ssh keys
|
|
||||||
openssh.authorizedKeys.keyFiles =
|
|
||||||
let
|
|
||||||
# Record containing all the hosts
|
|
||||||
hosts = outputs.nixosConfigurations;
|
|
||||||
|
|
||||||
# Function from hostname to relative path to public ssh key
|
|
||||||
idKey = host: ../../${host}/keys/id_ed25519.pub;
|
|
||||||
in
|
|
||||||
lib.pipe hosts [
|
|
||||||
# attrsetof host -> attrsetof path
|
|
||||||
(builtins.mapAttrs (name: _: idKey name)) # string -> host -> path
|
|
||||||
|
|
||||||
# attrsetof path -> path[]
|
|
||||||
builtins.attrValues
|
|
||||||
|
|
||||||
# path[] -> path[]
|
|
||||||
(builtins.filter builtins.pathExists)
|
|
||||||
];
|
|
||||||
# }}}
|
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
};
|
};
|
||||||
|
|
|
@ -43,10 +43,14 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ SSH keys
|
||||||
# Tell sops-nix to use the hermes keys for decrypting secrets
|
users.users.pilot.openssh.authorizedKeys.keyFiles = [
|
||||||
sops.age.sshKeyPaths = [ "/hermes/secrets/hermes/ssh_host_ed25519_key" ];
|
../calypso/keys/id_ed25519.pub
|
||||||
|
../lapetus/keys/id_ed25519.pub
|
||||||
|
../tethys/keys/id_ed25519.pub
|
||||||
|
];
|
||||||
|
# }}}
|
||||||
|
# {{{ Install some packages
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
let
|
let
|
||||||
cloneConfig = pkgs.writeShellScriptBin "liftoff" ''
|
cloneConfig = pkgs.writeShellScriptBin "liftoff" ''
|
||||||
|
@ -60,6 +64,10 @@
|
||||||
neovim # Text editor
|
neovim # Text editor
|
||||||
cloneConfig # Clones my nixos config from github
|
cloneConfig # Clones my nixos config from github
|
||||||
];
|
];
|
||||||
|
# }}}
|
||||||
|
|
||||||
|
# Tell sops-nix to use the hermes keys for decrypting secrets
|
||||||
|
sops.age.sshKeyPaths = [ "/hermes/secrets/hermes/ssh_host_ed25519_key" ];
|
||||||
|
|
||||||
# Fast but bad compression
|
# Fast but bad compression
|
||||||
# isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
# isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
./services/grafana.nix
|
./services/grafana.nix
|
||||||
./services/guacamole
|
./services/guacamole
|
||||||
./services/homer.nix
|
./services/homer.nix
|
||||||
./services/intray.nix
|
# ./services/intray.nix
|
||||||
./services/invidious.nix
|
./services/invidious.nix
|
||||||
./services/jellyfin.nix
|
./services/jellyfin.nix
|
||||||
./services/jupyter.nix
|
./services/jupyter.nix
|
||||||
|
@ -65,6 +65,15 @@
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ SSH keys
|
||||||
|
users.users.pilot.openssh.authorizedKeys.keyFiles = [
|
||||||
|
../calypso/keys/id_ed25519.pub
|
||||||
|
../tethys/keys/id_ed25519.pub
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.root.openssh.authorizedKeys.keyFiles =
|
||||||
|
config.users.users.pilot.openssh.authorizedKeys.keyFiles;
|
||||||
|
# }}}
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,4 +59,7 @@
|
||||||
# }
|
# }
|
||||||
];
|
];
|
||||||
# }}}
|
# }}}
|
||||||
|
# {{{ SSH keys
|
||||||
|
users.users.pilot.openssh.authorizedKeys.keyFiles = [ ../calypso/keys/id_ed25519.pub ];
|
||||||
|
# }}}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue