1
Fork 0

Too many things (should have commited more often)

This commit is contained in:
Matei Adriel 2023-05-18 01:56:19 +02:00
parent d51e8b1f97
commit b7a0a94655
No known key found for this signature in database
16 changed files with 143 additions and 80 deletions

View file

@ -1,5 +1,6 @@
args: { args: {
visonum = import ./visonum.nix args; visonum = import ./visonum.nix args;
rwtw = import ./rwtw.nix args; rwtw = import ./rwtw.nix args;
typst = import ./typst.nix args;
} }

8
devshells/typst.nix Normal file
View file

@ -0,0 +1,8 @@
# Shell for using a pinned version of typst
{ pkgs, upkgs, inputs, ... }:
pkgs.mkShell {
nativeBuildInputs = [
# REASON: not on nixpkgs-stable
upkgs.typst
];
}

View file

@ -217,6 +217,7 @@ The following keybinds are available only when running inside firenvim:
| \<leader\>h | Add file to harpoon | harpoon | | \<leader\>h | Add file to harpoon | harpoon |
| C-a | Harpoon quick menu | harpoon | | C-a | Harpoon quick menu | harpoon |
| C-s q/w/e/r/a/s/d/f/z | Open harpoon file with index 0-9 | harpoon | | C-s q/w/e/r/a/s/d/f/z | Open harpoon file with index 0-9 | harpoon |
| <leader>lc | Open [l]ocal [c]argo.toml | rust-tools |
### Undocumented ### Undocumented

View file

@ -64,6 +64,7 @@
"telescope-file-browser.nvim": { "branch": "master", "commit": "e0fcb12702ad0d2873544a31730f9aaef04fd032" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "e0fcb12702ad0d2873544a31730f9aaef04fd032" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
"telescope.nvim": { "branch": "master", "commit": "e960efa60e97df58e089b00270f09d60f27202c8" }, "telescope.nvim": { "branch": "master", "commit": "e960efa60e97df58e089b00270f09d60f27202c8" },
"typst.vim": { "branch": "main", "commit": "a9bb264d29331c52ef462e42e0501e3411bc3efb" },
"undotree": { "branch": "master", "commit": "485f01efde4e22cb1ce547b9e8c9238f36566f21" }, "undotree": { "branch": "master", "commit": "485f01efde4e22cb1ce547b9e8c9238f36566f21" },
"venn.nvim": { "branch": "main", "commit": "c114563960b8fb1197695d42798d1f3e7190b798" }, "venn.nvim": { "branch": "main", "commit": "c114563960b8fb1197695d42798d1f3e7190b798" },
"vim-abolish": { "branch": "master", "commit": "cb3dcb220262777082f63972298d57ef9e9455ec" }, "vim-abolish": { "branch": "master", "commit": "cb3dcb220262777082f63972298d57ef9e9455ec" },

View file

@ -53,6 +53,12 @@ return {
ft = { "yml", "yaml" }, ft = { "yml", "yaml" },
cond = env.vscode.not_active(), cond = env.vscode.not_active(),
}, },
{
"kaarmu/typst.vim",
ft = { "typst" },
cond = env.vscode.not_active(),
},
--}}} --}}}
{ {
@ -106,8 +112,8 @@ return {
"christoomey/vim-tmux-navigator", "christoomey/vim-tmux-navigator",
keys = { "<C-h>", "<C-j>", "<C-k>", "<C-l>" }, keys = { "<C-h>", "<C-j>", "<C-k>", "<C-l>" },
cond = env.vscode.not_active() cond = env.vscode.not_active()
and env.neovide.not_active() and env.neovide.not_active()
and env.firenvim.not_active(), and env.firenvim.not_active(),
}, },
{ {

View file

@ -172,6 +172,7 @@ local servers = {
cssls = {}, cssls = {},
jsonls = {}, jsonls = {},
dhall_lsp_server = {}, dhall_lsp_server = {},
typst_lsp = {},
-- pylsp = {}, -- pylsp = {},
-- pyright = {}, -- pyright = {},
} }
@ -182,7 +183,7 @@ M.capabilities = function()
local c = require("cmp_nvim_lsp").default_capabilities() local c = require("cmp_nvim_lsp").default_capabilities()
-- Add folding capabilities -- Add folding capabilities
c.textDocument.foldingRange = c.textDocument.foldingRange =
{ dynamicRegistration = false, lineFoldingOnly = true } { dynamicRegistration = false, lineFoldingOnly = true }
return c return c
end end
-- }}} -- }}}
@ -218,7 +219,7 @@ function lspconfig.config()
require("lspconfig")[lsp].setup({ require("lspconfig")[lsp].setup({
on_attach = details.on_attach, on_attach = details.on_attach,
settings = details.settings, -- Specific per-language settings settings = details.settings, -- Specific per-language settings
flags = { flags = {
debounce_text_changes = 150, -- This will be the default in neovim 0.7+ debounce_text_changes = 150, -- This will be the default in neovim 0.7+
}, },

View file

@ -6,17 +6,19 @@ local M = {
config = function() config = function()
require("rust-tools").setup({ require("rust-tools").setup({
server = { server = {
on_attach = lspconfig.on_attach, on_attach = function(client, bufnr)
K.nmap(
"<leader>lc",
"<cmd>RustOpenCargo<cr>",
"Open [c]argo.toml",
true,
true
)
lspconfig.on_attach(client, bufnr)
end,
}, },
}) })
K.nmap(
"<leader>lc",
"<cmd>RustOpenCargo<cr>",
"Open [c]argo.toml",
true,
true
)
end, end,
} }

View file

@ -310,11 +310,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1682493015, "lastModified": 1684171562,
"narHash": "sha256-KiMOAe8u83QDF40Z25kWMkZbqr9U+mvjvEJy5Qvw0nw=", "narHash": "sha256-BMUWjVWAUdyMWKk0ATMC9H0Bv4qAV/TXwwPUvTiC5IQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "60c0f762658916a4a5b5a36b3e06486f8301daf4", "rev": "55af203d468a6f5032a519cba4f41acf5a74b638",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -326,11 +326,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1681737997, "lastModified": 1683408522,
"narHash": "sha256-pHhjgsIkRMu80LmVe8QoKIZB6VZGRRxFmIvsC5S89k4=", "narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f00994e78cd39e6fc966f0c4103f908e63284780", "rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -42,7 +42,7 @@
rosepine-base16.url = github:edunfelt/base16-rose-pine-scheme; rosepine-base16.url = github:edunfelt/base16-rose-pine-scheme;
rosepine-base16.flake = false; rosepine-base16.flake = false;
# Impermanence # Impermanence
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
# Slambda # Slambda

View file

@ -1,7 +1,29 @@
{ pkgs, inputs, ... }: { pkgs, inputs, ... }:
let
# {{{ Global extensions
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
buster-captcha-solver
bypass-paywalls-clean
clearurls # removes ugly args from urls
don-t-fuck-with-paste # disallows certain websites from disabling pasting
gesturefy # mouse gestures
i-dont-care-about-cookies
localcdn # caches libraries locally
privacy-badger # blocks some trackers
privacy-pass # captcha stuff
skip-redirect # attempts to skip to the final reddirect for certain urls
terms-of-service-didnt-read
translate-web-pages
ublock-origin
unpaywall
user-agent-string-switcher
];
# }}}
in
{ {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
profiles.adrielus = { profiles.adrielus = {
# {{{ High level user settings # {{{ High level user settings
# Unique user id # Unique user id
@ -20,30 +42,15 @@
userContent = builtins.readFile ./userContent.css; userContent = builtins.readFile ./userContent.css;
# }}} # }}}
# {{{ Extensions # {{{ Extensions
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [ extensions = with inputs.firefox-addons.packages.${pkgs.system}; extensions ++ [
buster-captcha-solver
bypass-paywalls-clean
clearurls # removes ugly args from urls
don-t-fuck-with-paste # disallows certain websites from disabling pasting
firenvim # summon a nvim instance inside the browser firenvim # summon a nvim instance inside the browser
gesturefy # mouse gestures
i-dont-care-about-cookies
localcdn # caches libraries locally
lovely-forks # displays forks on github lovely-forks # displays forks on github
octolinker # github import to link thingy octolinker # github import to link thingy
octotree # github file tree octotree # github file tree
privacy-badger # blocks some trackers
privacy-pass # captcha stuff
refined-github # a bunch of github modifications refined-github # a bunch of github modifications
return-youtube-dislikes return-youtube-dislikes
steam-database # adds info from steamdb on storepages steam-database # adds info from steamdb on storepages
sponsorblock # skip youtube sponsors sponsorblock # skip youtube sponsors
skip-redirect # attempts to skip to the final reddirect for certain urls
terms-of-service-didnt-read
translate-web-pages
ublock-origin
unpaywall
user-agent-string-switcher
vimium-c # vim keybinds vimium-c # vim keybinds
youtube-shorts-block youtube-shorts-block
]; ];
@ -156,7 +163,8 @@
}; };
# {{{ Standalone "apps" which actually run inside a browser. # {{{ Standalone "apps" which actually run inside a browser.
apps = { apps.extensions = extensions;
apps.app = {
# {{{ Job stuff # {{{ Job stuff
asana = { asana = {
url = "https://app.asana.com/"; url = "https://app.asana.com/";
@ -171,7 +179,6 @@
displayName = "Clockodo"; displayName = "Clockodo";
id = 2; id = 2;
}; };
# }}} # }}}
gitlab = { gitlab = {
@ -187,6 +194,13 @@
displayName = "Desmos"; displayName = "Desmos";
id = 4; id = 4;
}; };
monkey-type = {
url = "https://monkeytype.com/";
icon = ./icons/monkeytype.png;
displayName = "Monkeytype";
id = 5;
};
}; };
# }}} # }}}
}; };
@ -203,6 +217,7 @@
# Tell apps firefox is the default browser using an env var. # Tell apps firefox is the default browser using an env var.
home.sessionVariables.BROWSER = "firefox"; home.sessionVariables.BROWSER = "firefox";
# }}} # }}}
# {{{ Persistence # {{{ Persistence
home.persistence."/persist/home/adrielus".directories = [ home.persistence."/persist/home/adrielus".directories = [
".cache/mozilla/firefox" # Non important cache ".cache/mozilla/firefox" # Non important cache

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View file

@ -57,6 +57,11 @@ config.adjust_window_size_when_changing_font_size = false -- Makes it work with
config.automatically_reload_config = true config.automatically_reload_config = true
config.font_size = font_size config.font_size = font_size
config.use_fancy_tab_bar = false config.use_fancy_tab_bar = false
config.disable_default_key_bindings = true
-- config.enable_kitty_keyboard = true -- Let's apps recognise more distinct keys
config.enable_csi_u_key_encoding = true -- For some reason I need this for all keybinds to work inside neovim.
-- }}}
-- {{{ Keybinds
-- }}} -- }}}
-- and finally, return the configuration to wezterm -- and finally, return the configuration to wezterm

View file

@ -14,10 +14,11 @@ let
dhall-lsp-server # dhall dhall-lsp-server # dhall
tectonic # something related to latex (?) tectonic # something related to latex (?)
texlab # latex texlab # latex
nodePackages_latest.vscode-langservers-extracted # Web stuff nodePackages_latest.vscode-langservers-extracted # web stuff
python310Packages.python-lsp-server # Python python310Packages.python-lsp-server # python
pyright # Python pyright # python
rust-analyzer # rust rust-analyzer # rust
upkgs.typst-lsp # typst
# Formatters # Formatters
luaformatter # Lua luaformatter # Lua
@ -29,6 +30,7 @@ let
nodePackages_latest.purs-tidy # Purescript nodePackages_latest.purs-tidy # Purescript
nodePackages_latest.prettier # Js & friends nodePackages_latest.prettier # Js & friends
nodePackages_latest.prettier_d_slim # Js & friends nodePackages_latest.prettier_d_slim # Js & friends
upkgs.typst-fmt # Typst
# Linters # Linters
ruff # Python linter ruff # Python linter
@ -52,10 +54,11 @@ let
# Preview # Preview
zathura # Pdf reader zathura # Pdf reader
xdotool # For zathura reverse search or whatever it's called xdotool # For zathura reverse search or whatever it's called
glow #Mmd preview in terminal glow # Md preview in terminal
pandoc # Md processing pandoc # Md processing
libsForQt5.falkon # Aparently needed for md preview libsForQt5.falkon # Needed for one of the md preview plugins I tried
# Latex setup
texlive.combined.scheme-full # Latex stuff texlive.combined.scheme-full # Latex stuff
python38Packages.pygments # required for latex syntax highlighting python38Packages.pygments # required for latex syntax highlighting
sage sage

View file

@ -53,7 +53,10 @@
# Temp stuff # Temp stuff
xsession.initExtra = '' # systemd.servinces.dbus-update-activation-environment = {
command -v dbus-update-activation-environment >/dev/null 2>&1 && dbus-update-activation-environment --systemd XDG_SESSION_CLASS XDG_CONFIG_DIRS XDG_DATA_DIRS XDG_SESSION_DESKTOP XDG_CURRENT_DESKTOP XDG_SESSION_TYPE DCONF_PROFILE XDG_DESKTOP_PORTAL_DIR DISPLAY WAYLAND_DISPLAY SWAYSOCK XMODIFIERS XCURSOR_SIZE XCURSOR_THEME GDK_PIXBUF_MODULE_FILE GIO_EXTRA_MODULES GTK_IM_MODULE QT_PLUGIN_PATH QT_QPA_PLATFORMTHEME QT_STYLE_OVERRIDE QT_IM_MODULE NIXOS_OZONE_WL || systemctl --user import-environment XDG_SESSION_CLASS XDG_CONFIG_DIRS XDG_DATA_DIRS XDG_SESSION_DESKTOP XDG_CURRENT_DESKTOP XDG_SESSION_TYPE DCONF_PROFILE XDG_DESKTOP_PORTAL_DIR DISPLAY WAYLAND_DISPLAY SWAYSOCK XMODIFIERS XCURSOR_SIZE XCURSOR_THEME GDK_PIXBUF_MODULE_FILE GIO_EXTRA_MODULES GTK_IM_MODULE QT_PLUGIN_PATH QT_QPA_PLATFORMTHEME QT_STYLE_OVERRIDE QT_IM_MODULE NIXOS_OZONE_WL # script = lib.escapeShellArgs "${pkgs.dbu}/bin/dbus-update-activation-environment --systemd --all";
''; # serviceConfig.Restart = "no";
# serviceConfig.User = config.home.user;
# };
xsession.initExtra = "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all";
} }

View file

@ -7,4 +7,6 @@
# HACK: copied from @lily on discord. # HACK: copied from @lily on discord.
systemd.user.services.xdg-desktop-portal.path = lib.mkAfter [ "/run/current-system/sw" ]; systemd.user.services.xdg-desktop-portal.path = lib.mkAfter [ "/run/current-system/sw" ];
services.gnome.at-spi2-core.enable = true;
} }

View file

@ -1,43 +1,58 @@
# Allows installing web apps as desktop apps
{ lib, pkgs, config, ... }: { lib, pkgs, config, ... }:
let cfg = config.programs.firefox.apps; let cfg = config.programs.firefox.apps;
in in
{ {
options.programs.firefox.apps = lib.mkOption { options.programs.firefox.apps = {
type = lib.types.attrsOf extensions = lib.mkOption {
(lib.types.submodule ({ name, ... }: { type = lib.types.listOf lib.types.package;
options = { description = "Extensions to install for all apps";
name = lib.mkOption { default = [ ];
type = lib.types.str; };
description = "The name of the app";
default = name;
};
id = lib.mkOption { app = lib.mkOption {
type = lib.types.int; type = lib.types.attrsOf
description = "The id of the firefox profile for the app"; (lib.types.submodule ({ name, ... }: {
example = 3; options = {
}; name = lib.mkOption {
type = lib.types.str;
description = "The name of the app";
default = name;
};
displayName = lib.mkOption { id = lib.mkOption {
type = lib.types.str; type = lib.types.int;
description = "The name of the app in stuff like menus"; description = "The id of the firefox profile for the app";
default = name; example = 3;
}; };
url = lib.mkOption { displayName = lib.mkOption {
type = lib.types.str; type = lib.types.str;
description = "The url the app should point to"; description = "The name of the app in stuff like menus";
example = "https://example.com"; default = name;
}; };
icon = lib.mkOption { url = lib.mkOption {
type = lib.types.path; type = lib.types.str;
description = "The icon to use for the app"; description = "The url the app should point to";
}; example = "https://example.com";
}; };
}));
description = "Attr set of firefox web apps to install as desktop apps"; icon = lib.mkOption {
type = lib.types.path;
description = "The icon to use for the app";
};
extensions = lib.mkOption {
type = lib.types.listOf lib.types.package;
description = "Extensions to install for this app";
default = [ ];
};
};
}));
description = "Attr set of firefox web apps to install as desktop apps";
};
}; };
config = config =
@ -52,7 +67,7 @@ in
}; };
userChrome = builtins.readFile ./theme.css; userChrome = builtins.readFile ./theme.css;
extensions = cfg.extensions ++ app.extensions;
isDefault = false; isDefault = false;
id = app.id; id = app.id;
}; };
@ -66,7 +81,7 @@ in
}; };
in in
{ {
programs.firefox.profiles = lib.mapAttrs (_: mkProfile) cfg; programs.firefox.profiles = lib.mapAttrs (_: mkProfile) cfg.app;
xdg.desktopEntries = lib.mapAttrs (_: mkDesktopEntry) cfg; xdg.desktopEntries = lib.mapAttrs (_: mkDesktopEntry) cfg.app;
}; };
} }