Uhhhh, lots of changes I forgot to push earlier
This commit is contained in:
parent
de5e4fe049
commit
5230faf7c4
|
@ -1,9 +1,9 @@
|
|||
args: {
|
||||
haskell = import ./haskell.nix args;
|
||||
lua = import ./lua.nix args;
|
||||
purescript = import ./purescript.nix args;
|
||||
rwtw = import ./rwtw.nix args;
|
||||
typst = import ./typst.nix args;
|
||||
lua = import ./lua.nix args;
|
||||
web = import ./web.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
|
||||
repaint = "commandline -f repaint";
|
||||
fishKeybinds = {
|
||||
|
@ -20,8 +25,10 @@ let
|
|||
"\\e\\[70\\;5u" = ''nvim +":lua require('mini.files').open()"'';
|
||||
};
|
||||
|
||||
mkKeybind = key: value:
|
||||
let escaped = lib.escapeShellArg value;
|
||||
mkKeybind =
|
||||
key: value:
|
||||
let
|
||||
escaped = lib.escapeShellArg value;
|
||||
in
|
||||
''
|
||||
bind -M default ${key} ${escaped}
|
||||
|
@ -29,18 +36,14 @@ let
|
|||
'';
|
||||
in
|
||||
{
|
||||
# {{{ Fzf
|
||||
# {{{ Fzf
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
defaultOptions = [ "--no-scrollbar" ];
|
||||
|
||||
changeDirWidgetOptions = [
|
||||
"--preview '${lib.getExe pkgs.eza} --icons --tree --color=always {}'"
|
||||
];
|
||||
changeDirWidgetOptions = [ "--preview '${lib.getExe pkgs.eza} --icons --tree --color=always {}'" ];
|
||||
|
||||
fileWidgetOptions = [
|
||||
"--preview '${lib.getExe pkgs.bat} --number --color=always {}'"
|
||||
];
|
||||
fileWidgetOptions = [ "--preview '${lib.getExe pkgs.bat} --number --color=always {}'" ];
|
||||
};
|
||||
|
||||
stylix.targets.fzf.enable = true;
|
||||
|
@ -60,31 +63,25 @@ in
|
|||
${lib.getExe pkgs.nix-your-shell} fish | source
|
||||
'';
|
||||
|
||||
# {{{ Plugins
|
||||
# {{{ Plugins
|
||||
plugins =
|
||||
let
|
||||
plugins = with pkgs.fishPlugins; [
|
||||
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
|
||||
puffer # Text expansion (i.e. expanding .... to ../../../)
|
||||
sponge # Remove failed commands and whatnot from history
|
||||
forgit # Git tui thingy? (I'm still trying this one out)
|
||||
colored-man-pages # Self explainatory:)
|
||||
colored-man-pages
|
||||
];
|
||||
in
|
||||
# For some reason home-manager expects a slightly different format 🤔
|
||||
lib.forEach plugins
|
||||
(plugin: {
|
||||
name = plugin.pname;
|
||||
inherit (plugin) src;
|
||||
});
|
||||
lib.forEach plugins (plugin: {
|
||||
name = plugin.pname;
|
||||
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 = [
|
||||
"${config.xdg.dataHome}/fish"
|
||||
"${config.xdg.dataHome}/z" # The z fish plugin requires this
|
||||
|
|
|
@ -49,6 +49,18 @@
|
|||
init.defaultBranch = "main";
|
||||
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
|
||||
# Sign commits using ssh
|
||||
gpg.format = "ssh";
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
lib.fix (self: {
|
||||
"Catppuccin Mocha" = fetchurl {
|
||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-mocha.theme.css";
|
||||
sha256 = "1gafrnm5mz8zh63zvcr3jp5fkzs9l0xnpwq3b4k7sbbzwg04nzw5";
|
||||
sha256 = "0y9vha3gb48yid65r2zfkc6l021j1s8mlac3klkbksla9gqnd9wr";
|
||||
};
|
||||
"Catppuccin Frappe" = fetchurl {
|
||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-frappe.theme.css";
|
||||
sha256 = "05y43fcwgy4sv9q6c49r5c92jzvq8vjrk05wy2zblp5v7zrli7sl";
|
||||
sha256 = "19kmmydkbpig14ql6zn0vqzlfykm6qg7r317vwjzq9dg092lflam";
|
||||
};
|
||||
"Catppuccin Latte" = fetchurl {
|
||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-latte.theme.css";
|
||||
sha256 = "1c7vwr8f6sip7lsyp770hm170pnld1ikvqdsh2fxlsdkkn6ay2k3";
|
||||
sha256 = "0lm1mzflyxmzpsyfkbcd1v7d1xp5i683yc6npbsm12z4hqn2smf6";
|
||||
};
|
||||
"Catppuccin Macchiato" = fetchurl {
|
||||
url = "https://catppuccin.github.io/discord/dist/catppuccin-macchiato.theme.css";
|
||||
sha256 = "11vig9i5kwhcbblspcp928gf4mvvp3v0qsibmh82wyxyw9ddzr7d";
|
||||
sha256 = "01zd5zf9b4a2kkwnkpzg37g1macan6201wyi7zj2crsbxy8b7j6k";
|
||||
};
|
||||
default.dark = self."Catppuccin Macchiato";
|
||||
default.light = self."Catppuccin Latte";
|
||||
|
|
|
@ -8,3 +8,5 @@ local nix = require("nix")
|
|||
tempest.configureMany(nix.pre)
|
||||
require("my.lazy").setup()
|
||||
tempest.configureMany(nix.post)
|
||||
|
||||
require("my.helpers.folding").setup()
|
||||
|
|
|
@ -45,11 +45,10 @@
|
|||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"plenary": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"purescript": { "branch": "main", "commit": "82348352e6568fcc0385bd7c99a8ead3a479feea" },
|
||||
"rust-tools": { "branch": "master", "commit": "676187908a1ce35ffcd727c654ed68d851299d3e" },
|
||||
"rustacean": { "branch": "master", "commit": "5c0c44149e43b907dae2e0fe053284ad56226eb7" },
|
||||
"rzip": { "branch": "master", "commit": "f65400fed27b27c7cff7ef8d428c4e5ff749bf28" },
|
||||
"scrap": { "branch": "main", "commit": "cc8453ed613932c744c3d1ec42f379b78bd8b92c" },
|
||||
"telescope": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"treesitter": { "branch": "master", "commit": "7f4ac678770175cdf0d42c015f4a5b6e18b6cb33" },
|
||||
"typst": { "branch": "main", "commit": "4d18ced62599ffe5b3c0e5e49566d5456121bc02" },
|
||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||
"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,
|
||||
|
||||
-- Directory where I store my local plugin projects
|
||||
path = vim.g.nix_projects_path,
|
||||
path = vim.g.nix_projects_dir,
|
||||
patterns = { "prescientmoon" },
|
||||
},
|
||||
performance = {
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -55,10 +55,10 @@ block text
|
|||
|
||||
pattern ([Ll]et)
|
||||
name definition
|
||||
snip @1 \$$1 = $2\$
|
||||
snip @0 \$$1 = $2\$ @0
|
||||
|
||||
block auto
|
||||
string im
|
||||
string $
|
||||
name inline math
|
||||
snip \$$1\$$0
|
||||
|
||||
|
@ -92,11 +92,18 @@ block math
|
|||
$7 & $8 & $9
|
||||
\end{@matenv}
|
||||
|
||||
for operator <- @⟨eq,neq,defas,leq,geq,lt,gt,iip,iib,iff⟩
|
||||
for symbol <- @⟨@operator:=,\neq,\coloneq,\leq,\geq,<,>,\implies,\impliedby,\iff⟩
|
||||
for createabbr <- @⟨false,true⟩
|
||||
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
|
||||
abbr @operator @symbol
|
||||
abbr @⟨@createabbr:op-@operator,@operator⟩ @symbol
|
||||
|
||||
string a@operator
|
||||
name align at @operator
|
||||
|
@ -177,6 +184,7 @@ block math
|
|||
|
||||
abbr frl \forall
|
||||
abbr exs \exists
|
||||
abbr iin \in
|
||||
abbr nin \not\in
|
||||
abbr ccup \cup
|
||||
abbr ccap \cap
|
||||
|
@ -187,9 +195,8 @@ block math
|
|||
abbr vsm \vecspace
|
||||
abbr oball \ball
|
||||
|
||||
for noperator <- @⟨ordop,land,lor⟩
|
||||
string @noperator
|
||||
snip \\@noperator
|
||||
for noperator <- @⟨ordop,land,lor,equiv,pmod⟩
|
||||
abbr @noperator \\@noperator
|
||||
|
||||
for operator <- @⟨overline,hat,bar,abs,norm,prob,diprod,sin,cos,sqrt,ln,lrb,zmod,gen,diam,prob⟩
|
||||
string @operator
|
||||
|
@ -247,10 +254,10 @@ block math
|
|||
name limit to @limtarget
|
||||
snip \lim_{$1 \to @limtargetsymbol} $0
|
||||
|
||||
string dint
|
||||
string intd
|
||||
name definite integral
|
||||
snip \int_{$|1⟨$1,-\infty$1⟩}^$|2⟨{$2},\infty$2⟩ $3 \dif $0
|
||||
|
||||
string iint
|
||||
string inti
|
||||
name indefinite integral
|
||||
snip \int $1 \dif $0
|
||||
|
|
|
@ -113,6 +113,16 @@
|
|||
"${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
|
||||
# TODO: there might be more to cache in .cache/lutris
|
||||
satellite.persistence.at.state.apps.lutris.directories = [
|
||||
|
|
|
@ -53,6 +53,9 @@
|
|||
programs.kdeconnect.enable = true;
|
||||
programs.firejail.enable = true;
|
||||
# }}}
|
||||
# {{{ SSH keys
|
||||
users.users.pilot.openssh.authorizedKeys.keyFiles = [ ../tethys/keys/id_ed25519.pub ];
|
||||
# }}}
|
||||
|
||||
satellite.pilot.name = "moon";
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
|
@ -62,19 +62,13 @@
|
|||
# {{{ /persist/data
|
||||
"persist-data" = {
|
||||
mountpoint = "/persist/data";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
};
|
||||
# }}}
|
||||
# {{{ /persist/state
|
||||
"persist-state" = {
|
||||
mountpoint = "/persist/state";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
};
|
||||
# }}}
|
||||
# {{{ /local/nix
|
||||
|
|
|
@ -74,4 +74,9 @@ in
|
|||
};
|
||||
# }}}
|
||||
};
|
||||
|
||||
environment.persistence."/persist/local/cache".directories = [
|
||||
"/var/cache/restic-backups-data"
|
||||
"/var/cache/restic-backups-state"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ in
|
|||
overrideFolders = true;
|
||||
|
||||
settings = {
|
||||
# {{{ Device ids
|
||||
# {{{ Device ids
|
||||
devices = {
|
||||
enceladus.id = "QWOAERM-V2FNXPI-TB7NFUS-LKW7JTB-IZY4OEZ-FYDPJNP-6IKPW4Y-YREXDQM";
|
||||
lapetus.id = "VVHM7RC-ZSDOZJI-EGBIJR4-2DOGAXG-OEJZWSH-OYUK5XT-7CDMWSL-3AVM2AZ";
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
# Configure users through nix only
|
||||
mutableUsers = false;
|
||||
|
||||
# Sync up root and `pilot` shell
|
||||
users.root.shell = config.users.users.pilot.shell;
|
||||
|
||||
# {{{ Create pilot user
|
||||
users.pilot = {
|
||||
inherit (config.satellite.pilot) name;
|
||||
|
@ -46,27 +49,6 @@
|
|||
|
||||
hashedPasswordFile = config.sops.secrets.pilot_password.path;
|
||||
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 @@
|
|||
];
|
||||
};
|
||||
# }}}
|
||||
|
||||
# Tell sops-nix to use the hermes keys for decrypting secrets
|
||||
sops.age.sshKeyPaths = [ "/hermes/secrets/hermes/ssh_host_ed25519_key" ];
|
||||
|
||||
# {{{ SSH keys
|
||||
users.users.pilot.openssh.authorizedKeys.keyFiles = [
|
||||
../calypso/keys/id_ed25519.pub
|
||||
../lapetus/keys/id_ed25519.pub
|
||||
../tethys/keys/id_ed25519.pub
|
||||
];
|
||||
# }}}
|
||||
# {{{ Install some packages
|
||||
environment.systemPackages =
|
||||
let
|
||||
cloneConfig = pkgs.writeShellScriptBin "liftoff" ''
|
||||
|
@ -60,6 +64,10 @@
|
|||
neovim # Text editor
|
||||
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
|
||||
# isoImage.squashfsCompression = "gzip -Xcompression-level 1";
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
./services/grafana.nix
|
||||
./services/guacamole
|
||||
./services/homer.nix
|
||||
./services/intray.nix
|
||||
# ./services/intray.nix
|
||||
./services/invidious.nix
|
||||
./services/jellyfin.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;
|
||||
}
|
||||
|
|
|
@ -59,4 +59,7 @@
|
|||
# }
|
||||
];
|
||||
# }}}
|
||||
# {{{ SSH keys
|
||||
users.users.pilot.openssh.authorizedKeys.keyFiles = [ ../calypso/keys/id_ed25519.pub ];
|
||||
# }}}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue