Compare commits

...

11 commits

Author SHA1 Message Date
Anish Lakhwara c3852d464b update grasp 2022-12-20 15:52:49 +10:00
Anish Lakhwara 6bb087555e remove my packages from liteNixPkgs 2022-12-20 15:51:48 +10:00
Anish Lakhwara 42fe110ae9 add archive 2022-12-20 15:51:41 +10:00
Anish Lakhwara b2d450ed08 let tic-80 compile on osx when there's no alsa 2022-12-20 15:51:24 +10:00
Anish Lakhwara efbaf0ff11 make wallabag pure (no secrets :( ) 2022-12-20 15:51:11 +10:00
Anish Lakhwara 96473e4da5 fix dhyan!!! 2022-12-20 15:51:01 +10:00
Anish Lakhwara b2e34273a6 turn pulse back on 2022-12-20 15:50:50 +10:00
Anish Lakhwara 35dd2df792 add contexts to taskrc 2022-12-20 15:50:29 +10:00
Anish Lakhwara 68d40b380a make lsp look nicer 2022-12-20 15:50:16 +10:00
Anish Lakhwara 3b5e19ec12 switch to browsh for viewing html 2022-12-20 15:50:01 +10:00
Anish Lakhwara 332103c227 spice up cli life some more:
- mx for fzf manix
- orage maybe useful as a calendar??
- email notifications
- all user services allowed to send notifications
2022-12-18 02:58:13 +10:00
13 changed files with 110 additions and 76 deletions

View file

@ -312,11 +312,11 @@
"vimwiki-cli": "vimwiki-cli" "vimwiki-cli": "vimwiki-cli"
}, },
"locked": { "locked": {
"lastModified": 1671282000, "lastModified": 1671357603,
"narHash": "sha256-qZb+kmp5tE59dBEC2/A+/rY6mOsWKZwaJCqdZuYbAsg=", "narHash": "sha256-LIathTJK9ElWdjlT+zI+CJFB5adORTM9kYeWqEbKwiU=",
"ref": "main", "ref": "main",
"rev": "4d6a4a515b8b61f9614a1f9fa452d9f5c0fa2da5", "rev": "ea3d0f9a8146f1985dec0b0348a79e3a3038d9b7",
"revCount": 461, "revCount": 465,
"type": "git", "type": "git",
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab" "url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
}, },

View file

@ -104,7 +104,6 @@
overlays = [ overlays = [
agenix.overlay agenix.overlay
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
self.overlays.additions
]; ];
}); });
in in

View file

@ -4,6 +4,7 @@
binutils binutils
coreutils coreutils
dnsutils dnsutils
dasht
dosfstools dosfstools
#git #git
bottom bottom
@ -87,6 +88,9 @@
fi fi
vim flake.nix vim flake.nix
} }
mx() {
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
}
autopair-init autopair-init
''; '';
sessionVariables = { sessionVariables = {

View file

@ -31,6 +31,9 @@ in
inotify-tools inotify-tools
]; ];
# set up env
xsession.enable = true;
xresources.properties = { xresources.properties = {
"*.foreground" = "#95E6CB"; "*.foreground" = "#95E6CB";
"*.background" = "#1F2430"; "*.background" = "#1F2430";

View file

@ -1,35 +1,4 @@
{ config, pkgs, lib, ... }: { pkgs, ... }:
with lib;
let
safeName = lib.replaceStrings [ "@" ":" "\\" "[" "]" ] [ "-" "-" "-" "" "" ];
imapnotifyAccounts =
filter (a: a.imapnotify.enable) (attrValues config.accounts.email.accounts);
genAccountUnit = account:
let name = safeName account.name;
in
{
name = "imapnotify-${name}-mine";
value = {
Unit = { Description = "imapnotify for ${name}"; };
Service = {
ExecStart = "${pkgs.goimapnotify}/bin/goimapnotify -conf /nix/store/6030i9xdga98l2zyqarrqv5mrjynwm3i-imapnotify-anish-config.json"; # TODO horrible hard coded config location
Restart = "always";
RestartSec = 30;
Type = "simple";
# this is why we're overriding this stupid thing
# We need dbus for notify-send on systemd
Environment = [
"DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus"
"NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/default/config"
];
};
Install = { WantedBy = [ "default.target" ]; };
};
};
in
{ {
#age.secrets.fastmail.file = "/etc/nixos/secrets/fastmail.age"; #age.secrets.fastmail.file = "/etc/nixos/secrets/fastmail.age";
#age.secrets.fastmail.owner = "anish"; #age.secrets.fastmail.owner = "anish";
@ -37,22 +6,21 @@ in
neomutt neomutt
himalaya himalaya
imapfilter imapfilter
browsh
# icat
]; ];
services.mbsync = { services.mbsync = {
enable = true; enable = true;
frequency = "*:0/30"; frequency = "*:0/30";
#postExec = "${pkgs.notmuch}/bin/notmuch new"; postExec = "${pkgs.notmuch}/bin/notmuch new";
}; };
# call our stupid way of overriding the imapnotify service
systemd.user.services = listToAttrs (map genAccountUnit [{ name = "anish"; }]);
services.imapnotify.enable = true; services.imapnotify.enable = true;
programs.mbsync.enable = true; programs.mbsync.enable = true;
programs.msmtp.enable = true; programs.msmtp.enable = true;
programs.notmuch.enable = true; programs.notmuch.enable = true;
home.file.".mailcap".text = '' home.file.".mailcap".text = ''
text/html; firefox %s text/html; browsh %s
application/pdf; zathura %s application/pdf; zathura %s
image/png; feh %s image/png; feh %s
image/jpeg; feh %s image/jpeg; feh %s
@ -304,10 +272,10 @@ in
extraConfig.local.subFolders = "Verbatim"; extraConfig.local.subFolders = "Verbatim";
}; };
imapnotify = { imapnotify = {
enable = false; enable = true;
boxes = [ "Inbox" ]; boxes = [ "Inbox" ];
onNotify = "${pkgs.isync}/bin/mbsync anish && ${pkgs.notmuch}/bin/notmuch index"; onNotify = "${pkgs.isync}/bin/mbsync anish && ${pkgs.notmuch}/bin/notmuch new";
onNotifyPost = "${pkgs.libnotify}/bin/notify-send -a mail 'email: new in %s'"; onNotifyPost = "${pkgs.libnotify}/bin/notify-send 'New Email 📩'";
}; };
msmtp.enable = true; msmtp.enable = true;
msmtp.extraConfig = { msmtp.extraConfig = {

View file

@ -345,10 +345,16 @@ in
nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR> nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR> nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR> nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
nnoremap <leader>vsd :lua rim.lsp.diagnostic.show_line_diagnostics(); vim.lsp.util.show_line_diagnostics()<CR> nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR> nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
nnoremap <leader>vll :call LspLocationList()<CR>
nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr> nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
" lspsaga stuff doesn't work
" nnoremap <leader>vd :call Lspsaga peek_definition<CR>
" nnoremap <leader>vrn :call Lspsaga rename<CR><CR>
" nnoremap <leader>vh :call Lspsaga hover_doc<CR>
" nnoremap <leader>vca :call Lspsaga code_action<CR>
" nnoremap <leader>vsd :call Lspsaga show_line_diagnostics<CR>
" nnoremap <leader>vn :call Lspsaga diagnostic_jump_prev<CR>
" dashboard " dashboard
let g:dashboard_custom_header = [ let g:dashboard_custom_header = [
@ -431,6 +437,33 @@ in
end end
end end
vim.diagnostic.config({
signs = true,
update_in_insert = false,
underline = false,
severity_sort = true,
float = {
focusable = false,
style = 'minimal',
border = 'rounded',
source = 'always',
},
})
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
vim.lsp.handlers.hover,
{
border = 'rounded',
}
)
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(
vim.lsp.handlers.signature_help,
{
border = 'rounded',
}
)
vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true}) vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true})
-- autopairs -- autopairs
@ -534,11 +567,11 @@ in
null_ls.setup({ null_ls.setup({
sources = { sources = {
null_ls.builtins.diagnostics.shellcheck, null_ls.builtins.diagnostics.shellcheck,
null_ls.builtins.diagnostics.proselint.with({ filetypes = { "vimwiki", "mail", }, }),
-- null_ls.builtins.code_actions.statix, -- null_ls.builtins.code_actions.statix,
-- null_ls.builtins.diagnostics.clj_kondo, -- null_ls.builtins.diagnostics.clj_kondo,
-- null_ls.builtins.formatting.isort, -- null_ls.builtins.formatting.isort,
-- null_ls.builtins.formatting.black, -- null_ls.builtins.formatting.black,
-- null_ls.builtins.code_actions.proselint,
}, },
}) })
@ -548,11 +581,25 @@ in
local format = require("lsp-format") local format = require("lsp-format")
local navic = require("nvim-navic") local navic = require("nvim-navic")
-- lspsaga, code_action lightbulb is annoying
-- local saga = require('lspsaga')
-- saga.init_lsp_saga({
-- code_action_lightbulb = {
-- enable = true,
-- enable_in_insert = true,
-- cache_code_action = true,
-- sign = true,
-- update_time = 150,
-- sign_priority = 4,
-- virtual_text = false,
-- },
-- })
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local lspconfig = require('lspconfig') local lspconfig = require('lspconfig')
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver' } local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua' }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
lspconfig[lsp].setup { lspconfig[lsp].setup {
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
@ -768,6 +815,7 @@ in
python-with-my-packages python-with-my-packages
nodejs nodejs
clojure-lsp clojure-lsp
clojure
rnix-lsp rnix-lsp
terraform-lsp terraform-lsp
rust-analyzer rust-analyzer
@ -780,6 +828,7 @@ in
statix statix
nodePackages.typescript nodePackages.typescript
nodePackages.typescript-language-server nodePackages.typescript-language-server
sumneko-lua-language-server
]; ];
plugins = with pkgs.vimPlugins // customPlugins; [ plugins = with pkgs.vimPlugins // customPlugins; [
@ -795,7 +844,7 @@ in
undotree undotree
telescope-nvim telescope-nvim
plenary-nvim plenary-nvim
nvim-gps nvim-navic
nvim-treesitter nvim-treesitter
nvim-treesitter-context nvim-treesitter-context
my-fterm my-fterm
@ -806,6 +855,7 @@ in
nvim-peekup nvim-peekup
zen-mode-nvim zen-mode-nvim
twilight-nvim twilight-nvim
lspsaga-nvim
# language # language
vim-nix vim-nix
@ -854,7 +904,6 @@ in
vim-tidal vim-tidal
# experimental # experimental
nvim-luapad nvim-luapad
nvim-navic
scnvim scnvim
leap leap
vim-beancount vim-beancount

View file

@ -40,6 +40,15 @@ include /nix/store/64nvv0ac2dr8rdz2414f53x97j3msiz0-taskwarrior-2.6.2/share/doc/
uda.priority.values=H,M,,L uda.priority.values=H,M,,L
news.version=2.6.0 news.version=2.6.0
## Contexts
context.poor.read=-purchase
context.dev.read=+dev
context.ops.read=+ops
context.bucket.read=+in
context.focused=(priority:H or priority:M) -idea -backlog -finances urgency > 5.0
# context.work=+Work -idea -personal
# context.offwork=-Work
## Reports ## Reports
# List # List
@ -57,7 +66,7 @@ report.unblocked.labels=ID,Deps,Proj,Tags,Due,Active,Description
report.unblocked.columns=id,depends,project,tags,due,start.active,description report.unblocked.columns=id,depends,project,tags,due,start.active,description
# Next # Next
report.next.filter=(status:pending -Waiting -in -backlog pro.not:ideas limit:0) report.next.filter=(status:pending -in -backlog pro.not:ideas limit:0)
report.next.labels=ID,Active,Deps,P,Project,Tag,Recur,S,Due,Until,Description report.next.labels=ID,Active,Deps,P,Project,Tag,Recur,S,Due,Until,Description
report.next.columns=id,start.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description report.next.columns=id,start.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description

View file

@ -23,9 +23,9 @@
# For some reason this doesn't work in the profile, but does over here?? # For some reason this doesn't work in the profile, but does over here??
# Something weird in the way I'm importing nixpkgs in the profile or something # Something weird in the way I'm importing nixpkgs in the profile or something
services."grasp".enable = true; services.grasp.enable = true;
services."grasp".path = "/home/anish/kitaab/grasp/grasp.wiki"; services.grasp.path = "/home/anish/kitaab/grasp/grasp.wiki";
services."grasp".user = "anish"; services.grasp.user = "anish";
# Backups # Backups
age.secrets.borg-password.file = "${self}/secrets/borg-password.age"; age.secrets.borg-password.file = "${self}/secrets/borg-password.age";

View file

@ -66,6 +66,7 @@ in
scrot scrot
ripcord ripcord
xfce.orage
feh feh
sxiv sxiv
xkblayout-state xkblayout-state

View file

@ -16,17 +16,18 @@
]; ];
startAt = "*08:00:00"; startAt = "*08:00:00";
script = '' script = ''
cd /home/anish/usr/dhyan
source .envrc source .envrc
bb -m dhyan.main bb -m dhyan.main
''; '';
serviceConfig = { serviceConfig = {
User = "anish"; User = "anish";
WorkingDirectory = "/home/anish/usr/dhyan";
Environment = "/home/anish/usr/.envrc";
}; };
}; };
systemd.timers.dhyan = { systemd.timers.dhyan = {
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
partOf = [ "kitaab-sync.service" ]; partOf = [ "dhyan.service" ];
timerConfig.OnCalendar = [ "08:00:00" ]; timerConfig.OnCalendar = [ "08:00:00" ];
}; };
} }

View file

@ -11,7 +11,7 @@
192.168.1.240 fin.mossnet.lan 192.168.1.240 fin.mossnet.lan
192.168.1.240 paper.mossnet.lan 192.168.1.240 paper.mossnet.lan
192.168.1.240 books.mossnet.lan 192.168.1.240 books.mossnet.lan
192.168.1.240 archive.mossnet.lan 192.f.1.240 archive.mossnet.lan
''; '';
# 10.0.69.4 mossnet.lan # 10.0.69.4 mossnet.lan
# 10.0.69.4 links.mossnet.lan # 10.0.69.4 links.mossnet.lan

View file

@ -1,15 +1,10 @@
{ pkgs, config, lib, ... }: { self, pkgs, config, lib, ... }:
let
wallabag-password = builtins.readFile "/run/agenix/wallabag_password";
wallabag-secret = builtins.readFile "/run/agenix/wallabag_secret";
in
{ {
age.secrets.wallabag-password.file = "/run/agenix/wallabag_password"; # age.secrets.wallabag-password.file = "${self}/secrets/wallabag-password.age";
age.secrets.wallabag-password.owner = "wallabag"; # age.secrets.wallabag-secret.file = "${self}/secrets/wallabag-secret.age";
age.secrets.wallabag-secret.file = "/run/agenix/wallabag_secret"; # age.secrets.wallabag-password.owner = "wallabag";
age.secrets.wallabag-secret.owner = "wallabag"; # age.secrets.wallabag-secret.owner = "wallabag";
services.postgresql = { services.postgresql = {
enable = true; enable = true;
package = pkgs.postgresql_11; package = pkgs.postgresql_11;
@ -36,8 +31,7 @@ in
database_port: ~ database_port: ~
database_name: wallabag database_name: wallabag
database_user: wallabag database_user: wallabag
# TODO agenix database_password: wallabag
database_password: ${wallabag-password}
# For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite" # For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite"
database_path: ~ database_path: ~
database_table_prefix: wallabag_ database_table_prefix: wallabag_
@ -59,8 +53,7 @@ in
locale: en locale: en
# A secret key that's used to generate certain security-related tokens # A secret key that's used to generate certain security-related tokens
# TODO agenix secret: SAFGOECRIlfal89oe6u0(*^dsaaih961
secret: ${wallabag-secret} SAFGOECRIlfal89oe6u0(*^dsaaih961
# two factor stuff # two factor stuff
twofactor_auth: true twofactor_auth: true

View file

@ -33,8 +33,7 @@ pkgs.stdenv.mkDerivation rec {
mesa_glu mesa_glu
mesa_glu mesa_glu
freeglut freeglut
alsaLib ] ++ lib.optional stdenv.isLinux alsaLib;
];
configurePhase = '' configurePhase = ''
echo [DIRECTORY] $(pwd) echo [DIRECTORY] $(pwd)
@ -51,13 +50,21 @@ pkgs.stdenv.mkDerivation rec {
mkdir -p $out/bin mkdir -p $out/bin
chmod a+x bin/tic80 chmod a+x bin/tic80
cp -v bin/tic80 $out/bin cp -v bin/tic80 $out/bin
# Create Desktop Item
mkdir -p "$out/share/applications"
ln -s "${desktopItem}"/share/applications/* "$out/share/applications/"
mkdir -p "$out/share/icons/hicolor/128x128/apps" # the long folder path is crucial, just using $out/share/icons does not work
ln -s "$out/build/linux/tic80.png" "$out/share/icons/hicolor/128x128/apps/tic-80.png"
''; '';
tic80Item = pkgs.makeDesktopItem { desktopItem = pkgs.makeDesktopItem {
name = "TIC-80"; name = "TIC-80";
exec = "tic80"; exec = "tic80 %U";
comment = "Tiny Computer"; comment = "Tiny Computer";
categories = [ "Development" "Game" ]; categories = [ "Development" "Game" ];
desktopName = "TIC-80"; desktopName = "TIC-80";
icon = "tic-80";
}; };
} }