Skip to content

Commit

Permalink
Merge pull request #10 from tsandrini/various_updates
Browse files Browse the repository at this point in the history
Various updates
  • Loading branch information
tsandrini authored Nov 11, 2023
2 parents af2b86b + 2c4a0f6 commit 97ff27b
Show file tree
Hide file tree
Showing 93 changed files with 6,332 additions and 4,445 deletions.
7 changes: 7 additions & 0 deletions .cz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[tool.commitizen]
name = "cz_conventional_commits"
tag_format = "v$version"
version_scheme = "semver"
version = "0.3.0"
update_changelog_on_bump = true
major_version_zero = true
12 changes: 12 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"customizations": {
"vscode": {
"extensions": [
"mkhl.direnv"
]
}
},
"image": "ghcr.io/cachix/devenv:latest",
"overrideCommand": false,
"updateContentCommand": "devenv ci"
}
9 changes: 9 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if ! has nix_direnv_version || ! nix_direnv_version 2.2.1; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.1/direnvrc" "sha256-zelF0vLbEl5uaqrfIzbgNzJWGmLzCmYAkInj/LNxvKs="
fi

nix_direnv_watch_file shells/devenv.nix
if ! use flake .#devenv --impure
then
echo "devenv could not be built. The devenv environment was not loaded. Make the necessary changes to devenv.nix and hit enter to try again." >&2
fi
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
.vim/plugged/
result/
build/

result/
.direnv/
.devenv/
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Changelog

## v0.3.0 (2023-11-11)

### Feat

- **modules,lib**: add direnv module,add additional lib helpers
- **devenv**: update devenv with devcontainers and other features

### Fix

- **modules.system.users**: fix allowed users setting

## v0.2.0 (2017-02-13)

## v0.1.0 (2017-02-13)
156 changes: 73 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Table of Contents
# tensorfiles

1. [About](#1-about)
2. [Software](#2-software)
1. [Academics](#21-academics)
2. [Secrets](#22-secrets)
3. [Installation](#3-installation)
4. [(rough) Roadmap](#4-rough-roadmap)
5. [Troubleshooting](#5-troubleshooting)
1. [`Write error: disk full;` during `nixos-install`](#write-error-disk-full-during-nixos-install)
6. [References](#6-references)
## Table of Contents

# 1. About
1. [About](1-about)
2. [Software](2-software)
1. [Academics](21-academics)
2. [Secrets](22-secrets)
3. [Installation](3-installation)
4. [(rough) Roadmap](4-rough-roadmap)
5. [Troubleshooting](5-troubleshooting)
1. [`Write error: disk full;` during `nixos-install`](write-error-disk-full-during-nixos-install)
6. [References](6-references)

## 1. About

Hello my dear explorer! Let's enjoy computing that actually doesn't suck together!

Expand All @@ -20,87 +22,72 @@ Hello my dear explorer! Let's enjoy computing that actually doesn't suck togethe
For more info refer to the [documentation](https://tsandrini.github.io/tensorfiles/).
The project is also hosted at on [FlakeHub](https://flakehub.com/flake/tsandrini/tensorfiles/).

# 2. Software
## 2. Software

I use the following software

| # | Tool | Comment |
|--------------|---------------------------|-------------------------------------------------------|
| Shell | [Zsh](https://www.zsh.org/) & [OMZ](https://ohmyz.sh/) & [Powerlevel10k](https://github.com/romkatv/powerlevel10k) | pw10k makes the zsh experience surprisingly pleasant |
| DM | [LightDM](https://github.com/canonical/lightdm) or [xinit](https://www.x.org/archive/X11R6.8.1/doc/xinit.1.html) | |
| WM | [xmonad](https://github.com/xmonad/xmonad) & [xmobar](https://github.com/jaor/xmobar) | using anything else rn feels like stone age |
| Editor | [nvim](https://github.com/neovim/neovim) | sorry Moolenaar, ideas great, not the managment tho -- Rest In Peace. |
| IDE | emacs & [doom-emacs](https://github.com/hlissner/doom-emacs) | (using anything else rn feels like stone age)^2 |
| Terminal | [alacritty](https://github.com/alacritty/alacritty) | sorry [st](https://st.suckless.org/), I am really liking the rust experience more |
| Browser | firefox (dev-edition) | qute is nice but not that secure unfortunately |
| App launcher | [dmenu](https://tools.suckless.org/dmenu/) | Rofi has a nice frontend, but is practically unusable |
| Fetch | [nitch](https://github.com/ssleert/nitch) | whatsup my fellow nimmers |
| File manager | [lf](https://github.com/gokcehan/lf) | ranger, but actually usable |
| News reader | [newsboat](https://newsboat.org/) | modern web is barely usable for reading news D: |
| ls | [exa](https://github.com/ogham/exa) | fast, ls-compatible with added features |
| cat | [bat](https://github.com/sharkdp/bat) | |
| Colors uwu? | [pywal](https://github.com/dylanaraps/pywal) | TODO should probably comment more on colors |


## 2.1. Academics
TODO rewrite into a list, tables are super unreadable in code

### 2.1. Academics

TODO comment more?

1. [org-roam](https://www.orgroam.com/): This is the heart of everything that I do, TODOs, daily
journals, scratchpads, notetaking and personal research wiki. The internal
wiki is interlinked with zotero entries as well as anki cards.
1. [org-roam](https://www.orgroam.com/): This is the heart of everything that I
do, TODOs, daily journals, scratchpads, notetaking and personal research wiki.
The internal wiki is interlinked with zotero entries as well as anki cards.
- TODOs: [org-agenda](https://orgmode.org/manual/Agenda-Views.html)
- visualization: [org-roam-ui](https://github.com/org-roam/org-roam-ui)
- anki connection: [org-anki-editor](https://github.com/louietan/anki-editor)
![img](pkgs/docs/docs/assets/images/showcase_org_roam_ui.png)
2. [zotero](https://www.zotero.org/): This is my backend for all of my bibliography as well as the
individual `.pdf` files. As of now I keep them up to date between machines
using [syncthing](https://syncthing.net/), but I’ll probably set up a personal cloud when I’ll
have spare time.
3. [anki](https://apps.ankiweb.net/): Since I have the memory of worm I try to keep my long-term
memory of different subjects fresh using flashcards. I sync the cards
using ankis official cloud.

## 2.2. Secrets

For my day to day passwords I use a locally synced [keepassxc](https://keepassxc.org/) encrypted
database and for the NixOS based secrets I use [agenix](https://github.com/ryantm/agenix). I also try to avoid
2. [zotero](https://www.zotero.org/): This is my backend for all of my
bibliography as well as the individual `.pdf` files. As of now I keep them up
to date between machines using [syncthing](https://syncthing.net/), but
I’ll probably set up a personal cloud when I’ll have spare time.
3. [anki](https://apps.ankiweb.net/): Since I have the memory of worm I try to
keep my long-term memory of different subjects fresh using flashcards. I sync
the cards using ankis official cloud.

### 2.2. Secrets

For my day to day passwords I use a locally synced
[keepassxc](https://keepassxc.org/) encrypted database and for the NixOS based
secrets I use [agenix](https://github.com/ryantm/agenix). I also try to avoid
using any globally available pubkeys and rather tend to use machine specific
ones instead (for obvious reasons).

*Note*: plz no pwn xd, if you see any vulnerabilities please DM me instead,
thanks <3.

# 3. Installation
## 3. Installation

TODO

# 4. (rough) Roadmap
## 4. (rough) Roadmap

- [-] ****organization****
- [ ] finish doc
- [x] decouple <nix/roles/base.nix>
- [x] decouple <nix/flake.nix>
- [x] move <nix/> to be the project root
- [-] ****implementation****
- [ ] syncthing (local version)
- [ ] syncthing (remote)
- [ ] searx (remote)
- [X] newsboat
- [ ] thunderbird
- [ ] zotero
- [ ] anki
- [ ] emacs
- [ ] discord
- [ ] misc? vlc? libre?
- [ ] ****machines****
- [ ] jetbundle
- [ ] pi
- [ ] server

# 5. Troubleshooting

## `Write error: disk full;` during `nixos-install`
- [ ] finish doc
- [x] decouple <nix/roles/base.nix>
- [x] decouple <nix/flake.nix>
- [x] move nix/ to be the project root
- [-] ****implementation****
- [ ] syncthing (local version)
- [ ] syncthing (remote)
- [ ] searx (remote)
- [X] newsboat
- [ ] thunderbird
- [ ] zotero
- [ ] anki
- [ ] emacs
- [ ] discord
- [ ] misc? vlc? libre?
- [ ] ****machines****
- [ ] jetbundle
- [ ] pi
- [ ] server

## 5. Troubleshooting

### `Write error: disk full;` during `nixos-install`

If you get any error of this kind during the installation of this flake
you have most likely run out of `$TMPDIR` space. This is usually due
Expand Down Expand Up @@ -130,7 +117,7 @@ tmpfs, for example
mount -o remount,size=15G /tmp
```

# 6. References
## 6. References

The whole nix ecosystem is in its foundations a revolutionary piece of
software and once you get the hang of it you feel like you&rsquo;ve really
Expand All @@ -140,14 +127,17 @@ appropriate extensive documentation/tutorials/etc&#x2026; which is, however,
currently not the case.

Due to this exact reason I&rsquo;m leaving here a list of resources/flakes that
helped me to (somewhat) learn the ways of nix (TODO: maybe write more? manual.org?)

- [Nix Pills: obligatory pills](https://nixos.org/guides/nix-pills/)
- [NixOS search: this should be your homepage really](https://search.nixos.org/options)
- [Home-Manager opts search: the same search but for home-manager, secondary homepage tbh](https://mipmip.github.io/home-manager-option-search/)
- [hlissner/dotfiles: great resource for learning how to appropriately modularize code](https://github.com/hlissner/dotfiles)
- [notusknot/dotfiles-nix: a more straightforward config but with all the needed parts, great introduction to flakes, home-manager](https://github.com/notusknot/dotfiles-nix)
- [Nix Cookbook: custom scripts, package wrapper scripts](https://nixos.wiki/wiki/Nix_Cookbook)
- [balsoft/nixos-config: more modularized but not overly complicated config](https://github.com/balsoft/nixos-config)
- [A really nice blogpost/tutorial on encrypted nixos opt-in system using btrfs](https://mt-caret.github.io/blog/posts/2020-06-29-optin-state.html)
- [Github code search: thanks to how the nix lang works the code search should be of a huge help, included an example](https://github.com/search?q=pkgs.writeShellScriptBin+language%3ANix&type=code&l=Nix)
helped me to (somewhat) learn the ways of nix (TODO: maybe write more?
manual.org?)

- [Nix Pills: obligatory pills](https://nixos.org/guides/nix-pills/)
- [NixOS search: this should be your homepage really](https://search.nixos.org/options)
- [Home-Manager opts search: the same search but for home-manager, secondary
homepage tbh](https://mipmip.github.io/home-manager-option-search/)
- [hlissner/dotfiles: great resource for learning how to appropriately modularize code](https://github.com/hlissner/dotfiles)
- [notusknot/dotfiles-nix: a more straightforward config but with all the needed
parts, great introduction to flakes, home-manager](https://github.com/notusknot/dotfiles-nix)
- [Nix Cookbook: custom scripts, package wrapper scripts](https://nixos.wiki/wiki/Nix_Cookbook)
- [balsoft/nixos-config: more modularized but not overly complicated config](https://github.com/balsoft/nixos-config)
- [A really nice blogpost/tutorial on encrypted nixos opt-in system using btrfs](https://mt-caret.github.io/blog/posts/2020-06-29-optin-state.html)
- [Github code search: thanks to how the nix lang works the code search should be of a huge help, included an example](https://github.com/search?q=pkgs.writeShellScriptBin+language%3ANix&type=code&l=Nix)
8 changes: 8 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[default.extend-identifiers]
nitch = "nitch"
edn = "edn"
fo = "fo"


[files]
extend-exclude = ["etc", "secrets"]
38 changes: 38 additions & 0 deletions etc/dotfiles/config/kmonad/config.kbd
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
(defcfg
input (device-file "/dev/input/by-id/usb-Keychron_Keychron_Q8-event-kbd")
output (uinput-sink "My KMonad output"
"sleep 1 && setxkbmap -layout us,cz -variant ,qwerty -option compose:ralt,grp:alt_shift_toggle")
cmp-seq ralt ;; Set the compose key to `RightAlt'
cmp-seq-delay 5 ;; 5ms delay between each compose-key sequence press

fallthrough true
allow-cmd false
)

(defsrc
esc 1 2 3 4 5 6 7 8 9 0 - = bspc ins
tab q w e r t y u i o p [ ] \ del
caps a s d f g h j k l ; ' ret home
lsft z x c v b n m , . / rsft up
lctl lmet lalt spc ralt left down right
)

(defalias
etc (layer-toggle etc)
)

(deflayer qwerty
esc 1 2 3 4 5 6 7 8 9 0 - = bspc print
tab q w e r t y u i o p [ ] \ pgup
@etc a s d f g h j k l ; ' ret pgdn
lsft z x c v b n m , . / rsft up
lctl lmet lalt spc ralt left down right
)

(deflayer etc
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ XX / 7 8 9 - _ _ _ _
_ _ _ _ _ XX * 4 5 6 + _ _ _
_ _ \( \) . XX 0 1 2 3 _ _ _
_ _ _ _ _ _ _ _
)
12 changes: 12 additions & 0 deletions etc/dotfiles/config/kmonad/kmonad.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=kmonad keyboard config

[Service]
Restart=always
RestartSec=3
ExecStart=/usr/bin/kmonad /home/tsandrini/.config/kmonad/config.kbd
Nice=-20

[Install]
DefaultInstance=config
WantedBy=default.target
1 change: 1 addition & 0 deletions etc/dotfiles/config/nvim/fnl/dotfiles/core.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
(nvim.ex.set "formatoptions+=l")
(nvim.ex.set "rulerformat=%l:%c")
(nvim.ex.set :nofoldenable)
(nvim.ex.set "clipboard=unnamedplus")

(nvim.ex.set :wildmenu)
(nvim.ex.set "wildmode=full")
Expand Down
2 changes: 1 addition & 1 deletion etc/dotfiles/config/nvim/fnl/dotfiles/plugins.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
:Olical/nvim-local-fennel {}
:tpope/vim-repeat {}
:kyazdani42/nvim-web-devicons {}
:nvim-treesitter/nvim-treesitter {:mod :treesitter}
;; :nvim-treesitter/nvim-treesitter {:mod :treesitter}
;:neovim/nvim-lspconfig {}
;:glepnir/lspsaga.nvim {:mod :lspsaga}
;:folke/trouble.nvim {:mod :trouble}
Expand Down
27 changes: 27 additions & 0 deletions etc/dotfiles/doom.d/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,30 @@
("Study INTR" :keys "i"
:todo-state "INTR")))
))))

;; accept completion from copilot and fallback to company
(use-package! copilot
:hook (prog-mode . copilot-mode)
:bind (:map copilot-completion-map
("<tab>" . 'copilot-accept-completion)
("TAB" . 'copilot-accept-completion)
("C-TAB" . 'copilot-accept-completion-by-word)
("C-<tab>" . 'copilot-accept-completion-by-word)))

(use-package! lsp-nix
:ensure lsp-mode
:after (lsp-mode)
:demand t
:custom
(lsp-nix-nil-formatter ["alejandra"]))


(use-package! nix-mode
:hook (nix-mode . lsp-deferred)
:ensure t)

(use-package! kbd-mode)

;; (add-hook 'tuareg-mode-hook #'merlin-mode)
;; (add-hook 'caml-mode-hook #'merlin-mode)
;; (use-package! merlin-company)
Loading

0 comments on commit 97ff27b

Please sign in to comment.