feat: massive

This commit is contained in:
jacekpoz 2023-11-25 17:12:09 +01:00
parent 344fa289e4
commit 63c49e592c
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
47 changed files with 1453 additions and 2564 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
hosts/chmura/jacekpoz.pl/public/
hosts/chmura/jacekpoz.pl/.hugo_build.lock

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "hosts/chmura/jacekpoz.pl/themes/risotto"]
path = hosts/chmura/jacekpoz.pl/themes/risotto
url = https://github.com/jacekpoz/risotto.git

2644
flake.lock

File diff suppressed because it is too large Load diff

View file

@ -73,11 +73,6 @@
helix.url = "github:helix-editor/helix";
neovim-flake = {
url = "github:NotAShelf/neovim-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix.url = "github:ryantm/agenix";
nh = {
@ -92,5 +87,10 @@
nixpak.follows = "nixpak";
};
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}

View file

@ -1,13 +1,15 @@
{
pkgs,
config,
inputs,
lib,
pkgs,
...
}: let
}: with lib; let
caddyConfig = ''
reverse_proxy /_matrix/* localhost:6167
header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin *
respond /.well-known/matrix/server `{"m.server": "m.jacekpoz.pl:443"}`
respond /.well-known/matrix/server `{"m.server": "m.jacekpoz.pl:8448"}`
respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://m.jacekpoz.pl"}}`
'';
in {

View file

@ -82,17 +82,6 @@
services.caddy = {
enable = true;
virtualHosts."trollface.pl".extraConfig = ''
@discord {
header_regexp User-Agent (?i)(Discord)
path /
}
rewrite @discord /trollface.png
root * ${./trollface.pl}
file_server
'';
virtualHosts."test.jacekpoz.pl".extraConfig = ''
reverse_proxy * localhost:3001
'';
@ -108,5 +97,27 @@
networking.firewall.allowedTCPPorts = [ 80 443 22 ];
myOptions = {
programs = {
git = {
enable = true;
userName = "jacekpoz";
userEmail = "jacekpoz@cock.li";
signingKey = "0EEE6B0C9A8CC06820E59C3894E812A8B12AAE3C";
editor = "${pkgs.neovim-nightly}/bin/nvim";
defaultBranch = "master";
};
starship.enable = true;
zsh.enable = true;
btop.enable = true;
neovim.enable = true;
helix.enable = true;
};
services.ssh = {
agent.enable = false;
daemon.enable = true;
};
};
system.stateVersion = "23.11";
}

View file

@ -5,14 +5,17 @@ _: {
./conduit.nix
./configuration.nix
#./discord-autodelete.nix
./firefox-syncserver.nix
./forgejo.nix
#./freshrss.nix
#./grafana.nix
./hardware-configuration.nix
./home-manager.nix
./i2pd.nix
./jacekpoz.pl.nix
./ntfy-sh.nix
./stalwart.nix
./trollface.pl
#./qbittorrent.nix
];
}

View file

@ -0,0 +1,33 @@
{
config,
pkgs,
...
}: let
domain = "ffsync.jacekpoz.pl";
in {
age.secrets.firefox-syncserver-secrets.file = ../../secrets/firefox-syncserver-secrets.age;
services.firefox-syncserver = {
enable = true;
logLevel = "warn";
singleNode = {
enable = true;
capacity = 100;
hostname = domain;
url = "https://${domain}";
};
settings = {
port = 6583;
};
secrets = config.age.secrets.firefox-syncserver-secrets.path;
};
services.mysql.package = pkgs.mariadb;
services.caddy = {
enable = true;
virtualHosts.${domain}.extraConfig = ''
reverse_proxy * localhost:6583
'';
};
}

View file

@ -13,7 +13,6 @@
settings = {
DEFAULT = {
APP_NAME = "fuck it we code";
};
server = {

View file

@ -11,14 +11,6 @@
useGlobalPkgs = true;
extraSpecialArgs = {inherit inputs self config';};
users.${config'.username} = {
imports = [
inputs.neovim-flake.homeManagerModules.default
../../modules/cli/starship.nix
../../modules/cli/zsh.nix
../../modules/tui/btop.nix
../../modules/tui/neovim
];
programs = {
home-manager.enable = true;
direnv = {

View file

@ -0,0 +1,16 @@
{
pkgs,
...
}: {
services.caddy = {
enable = true;
virtualHosts."jacekpoz.pl".extraConfig = ''
root * ${ pkgs.callPackage ./jacekpoz.pl { } }
file_server
'';
virtualHosts."jpoz.pl".extraConfig = ''
redir / https://jacekpoz.pl
redir /git https://jacekpoz.pl/posts/git-workflow
'';
};
}

View file

@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++

View file

@ -0,0 +1 @@
piss blob

View file

@ -0,0 +1,9 @@
+++
title = 'About'
date = 2023-11-12T23:23:47+01:00
draft = false
+++
hello :-)
I like foss and stuff

View file

@ -0,0 +1,115 @@
+++
title = 'My git workflow'
date = 2023-11-12T19:10:04+01:00
draft = false
+++
## TL;DR (if you use nix)
[git module](https://codeberg.org/jacekpoz/niksos/src/branch/master/modules/cli/git.nix) (uses home-manager) and [the config](https://codeberg.org/jacekpoz/niksos/src/branch/master/hosts/niks/configuration.nix#L323-L330)
[ssh module](https://codeberg.org/jacekpoz/niksos/src/branch/master/modules/services/ssh.nix) and [the config](https://codeberg.org/jacekpoz/niksos/src/branch/master/hosts/niks/configuration.nix#L434-L472)
---
Over the past few months I helped a few people learn git so I decided to put this together instead of explaining my workflow each time.
Hopefully this can serve as a simple git guide to get started quickly or as a reference to come back to if you forget something.
I don't use any git wrappers, the cli is enough for me. If you know of a good one let me know, I might try it and add it here.
---
I aliased `git` to `g` in my [zsh config](https://codeberg.org/jacekpoz/niksos/src/branch/master/modules/cli/zsh.nix#L31), which is what I use in all the examples below.
First the basics:
- `g init` initializes the repo in `.`; make sure you create a new one for your repo,
- `g clone forge:username/repo` will download that repository into `./repo`,
- `g remote add origin forge:username/repo` is how you connect the local repo to your preferred git forge (more in [remotes](#remotes)),
- `g add .` adds all the changes you made so far (more in [adding](#adding)),
- `g commit -m "commit message"` creates a commit with whatever you added prior (more in [commits](#commits)),
- `g push` pushes all the commits to the forge (it ignores added but uncommited changes),
- `g status` shows you the current status (added files, unpushed commites, etc.) and handy commands on how to change it.
If you run all these right now you'll get an error akin to this:
```
user@example.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
```
which means you need to generate and setup an ssh key.
## SSH key
`ssh-keygen -t ed25519 -f ~/.ssh/<keyfile>` is what I usually do. Some people might recommend making a single key for all git forges, I keep them separate, you do you.
After running the above you'll be asked to enter a passphrase or leave it empty for no passphrase. I recommend **always** setting a strong passphrase (could be generated with [KeePassXC](https://keepassxc.org)) and adding it to a password manager like the aforementioned. Copying and pasting that passphrase isn't a big deal, having your unlocked key stolen is.
After doing that you'll have 2 files, `~/.ssh/<keyfile>` (the private key) and `~/.ssh/<keyfile>.pub` (the public key). As the name suggests, **DO NOT** share the first one with anyone, it must be kept secure. If that leaks and isn't protected by a password, or the password is cracked, whoever has the file can modify the git history as you.
Now you want to add your public key to your preferred git forge. Here's how to do that on [github](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account), [gitlab](https://docs.gitlab.com/ee/user/ssh.html#add-an-ssh-key-to-your-gitlab-account) and [codeberg](https://docs.codeberg.org/security/ssh-key/#add-the-ssh-key-to-codeberg) (which should work for all forgejo instances). All of these instructions are pretty similar and you should be able to figure it out after the first time.
What we need to do now is tell git which ssh key to use when connecting to our preferred forge.
## Remotes
On my machine I alias all the remotes in my ssh config which both makes them shorter and allows me to add the ssh key to that forge. The nix config is at the top but if you don't use nix this is what you add for each remote to either `/etc/ssh/ssh_config` or (preferably) `~/.ssh/config`:
```
Host example
HostName git.example.com
User git
IdentityFile /path/to/private_key
```
For an example, this is what I'd do for codeberg:
```
Host codeberg
HostName codeberg.org
User git
IdentityFile ~/.ssh/codeberg
```
and change my git remote: `g remote set-url origin codeberg:nickname/repo` (if you added it already).
Now you should finally be able to push your changes! That wasn't so bad, was it? This workflow might not be ideal to you but it's simple and convenient enough for me and I think it should be alright for new users.
The purpose of this post isn't to be a general git guide, it's a reference I (and hopefully others) can go back to. For a general git guide that goes much more in depth than this I can't recommend the [official git book](https://git-scm.com/book/en/v2) enough. This post covers a very small part of the second chapter of that book. If you also want a (maybe not so quick) reference for various git subcommands check their manpages, e.g. `man git-add` for `g add`.
Now, if all you want to do is push a few commits to a repo, this should be enough and you can stop reading. If you want to learn interactive adding, reverting your changes, signing your commits with a GPG key and more, read on!
## Adding
`g add` accepts a [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)#Unix-like) meaning that you can e.g. `g add *.c` to add all files ending with `.c` in the current directory. Passing a single file name of course also works.
`g add -p` gives you access to the interactive mode, which displays hunks (a part of the changes) that you can add `y`, discard `n`, split `s` or manually edit `e` into smaller hunks. It also accepts a glob pattern, just like the normal `g add`. The interactive mode might offer more functionality but I found these 4 options to be enough for almost anything.
## Commits
`g commit` without any flags will let you edit the commit message in your editor of choice. It can be set with either `g config --global core.editor "my_editor"` or with the environment variable `GIT_EDITOR`. If you're on nix and use home-manager check my git module.
`g log` gives you all commits in the current repo. Each commit description starts with something like `commit b155c8912bb2347e030e723a2b37f1a60cb0fe15`. That big mess of characters is the commit hash, its identifier which you will use to refer to that commit. Usually you can type the first few characters of that hash and it should also work. When in doubt use your shell's autocompletion (most likely using the tab key). `g log` has *a lot* of flags, either read its manpage or toy around with the help of autocompletion.
If you want to see the state of your repo at a specific commit use `g checkout`.
Now that we know how to view and refer to a specific commit, we can learn how to revert the changes made in that commit. The terminology on this one is really confusing, I have to check it almost every time I need to revert a commit:
- `g reset --hard commit_hash` will remove that commit and **remove all the changes in that commit locally** — to get them back you have to rewrite them by hand; most of the time not necessary,
- `g revert commit_hash` will create a revert commit — the exact opposite of the one you're reverting, bringing you back to the state before it,
- `g reset --soft commit_hash` will remove that commit but keep its changes, allowing you to make further changes, add and commit them again; in practice this is the one I use the most.
To ammend further changes to the last commit you can add the changes and use `g commit --ammend`. It's probably a faster equivalent to `g reset --soft`, I just happen to have learned the former first and got used to it.
If you want to sign your commits with a GPG key, verifying that you're actually their author, you want to make git aware of your public key. To do that, run `g config --global user.signingkey my_public_gpg_key` and install a pinentry frontend. I use the qt one and can recommend it. If you have no idea what I'm talking about, skip this section. This isn't necessary and your contributions most likely won't be rejected because your commits aren't signed.
---
If you got stuck on some part, find this too hard or have any suggestions for this post, feel free to contact me. All my public contact information is on the sidebar at the top of all pages, I'd be more than happy to help you out. :-)

View file

@ -0,0 +1,31 @@
{
pkgs ? import <nixpkgs> {},
...
}: let
risotto-src = pkgs.fetchFromGitHub {
owner = "jacekpoz";
repo = "risotto";
rev = "7c8cdd97cca30c49f0c13cf2e049f43b39b49d75";
hash = "sha256-CX4aLTY1Z6E0QoRQIUOmfhG1gGCCnLqwBiLjhVMSpY8=";
};
in pkgs.stdenv.mkDerivation {
name = "jacekpoz.pl";
version = "0.1";
src = ./.;
buildInputs = with pkgs; [
hugo
];
dontConfigure = true;
buildPhase = ''
cp -r $src/* .
cp -r ${risotto-src} ./themes/risotto
${pkgs.hugo}/bin/hugo
'';
installPhase = ''
mkdir -p $out
cp -r ./public/* $out/
'';
}

View file

@ -0,0 +1,40 @@
baseURL = "https://jacekpoz.pl/"
theme = "risotto"
languageCode = "en-us"
title = "jacekpoz"
author = "jacekpoz"
copyright = "© 2023 by jacekpoz"
[params]
[params.theme]
palette = "tokyo-night-dark"
[params.about]
title = "jacekpoz"
description = "piss blob"
logo = "jacekpoz.svg"
[[params.socialLinks]]
logo = "email.svg"
title = "Email"
url = "mailto:jacekpoz@cock.li"
[[params.socialLinks]]
logo = "matrix.svg"
title = "Matrix"
url = "https://matrix.to/#/@jacekpoz:jacekpoz.pl"
[menu]
[[menu.main]]
identifier = "posts"
name = "posts"
url = "/posts/"
weight = 1
[[menu.main]]
identifier = "about"
name = "about"
url = "/about"
weight = 2

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="windows-1252"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg fill="#ffffff" height="32px" width="32px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 75.294 75.294" xml:space="preserve">
<g>
<path d="M66.097,12.089h-56.9C4.126,12.089,0,16.215,0,21.286v32.722c0,5.071,4.126,9.197,9.197,9.197h56.9 c5.071,0,9.197-4.126,9.197-9.197V21.287C75.295,16.215,71.169,12.089,66.097,12.089z M61.603,18.089L37.647,33.523L13.691,18.089 H61.603z M66.097,57.206h-56.9C7.434,57.206,6,55.771,6,54.009V21.457l29.796,19.16c0.04,0.025,0.083,0.042,0.124,0.065 c0.043,0.024,0.087,0.047,0.131,0.069c0.231,0.119,0.469,0.215,0.712,0.278c0.025,0.007,0.05,0.01,0.075,0.016 c0.267,0.063,0.537,0.102,0.807,0.102c0.001,0,0.002,0,0.002,0c0.002,0,0.003,0,0.004,0c0.27,0,0.54-0.038,0.807-0.102 c0.025-0.006,0.05-0.009,0.075-0.016c0.243-0.063,0.48-0.159,0.712-0.278c0.044-0.022,0.088-0.045,0.131-0.069 c0.041-0.023,0.084-0.04,0.124-0.065l29.796-19.16v32.551C69.295,55.771,67.86,57.206,66.097,57.206z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
fill="none"
height="32"
width="32"
viewBox="0 0 32 32"
version="1.1"
id="svg113"
sodipodi:docname="jacekpoz revolt.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
inkscape:export-filename="jacekpoz revolt.png"
inkscape:export-xdpi="1800"
inkscape:export-ydpi="1800"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs117" />
<sodipodi:namedview
id="namedview115"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="37.28125"
inkscape:cx="9.0796312"
inkscape:cy="16"
inkscape:window-width="2560"
inkscape:window-height="1399"
inkscape:window-x="1920"
inkscape:window-y="41"
inkscape:window-maximized="1"
inkscape:current-layer="g111" />
<clipPath
id="a">
<path
d="m0 0h32v32h-32z"
id="path90" />
</clipPath>
<g
clip-path="url(#a)"
id="g111">
<path
d="m31.1028 20.9925c0 2.0091-.5252 3.4351-1.3444 4.4745-.8271 1.0495-2.0166 1.7841-3.4762 2.2907-2.9616 1.0282-6.7719 1.0379-10.1824 1.0379-3.4093 0-7.27255-.0094-10.28664-1.0393-1.48698-.5081-2.7015-1.2447-3.54601-2.2958-.83532-1.0397-1.370401-2.4634-1.370401-4.468 0-3.748.807291-8.3097 3.108411-11.90376 2.26699-3.54072 6.01294-6.19919 12.09464-6.19919 5.7647 0 9.4692 2.66321 11.7712 6.23125 2.3312 3.6131 3.2318 8.1799 3.2318 11.8717z"
fill="#fbc546"
stroke="#000"
stroke-width="1.7935"
id="path93" />
<g
clip-rule="evenodd"
fill-rule="evenodd"
id="g109">
<path
d="m19.4545 22.4125c.4709 0 .8531.3822.8531.8531 0 .471-.3822.8532-.8531.8532h-6.8253c-.4709 0-.8531-.3822-.8531-.8532 0-.4709.3822-.8531.8531-.8531z"
fill="#593604"
id="path95" />
<path
d="m27.1329 19.853c0-.9427-.7636-1.7063-1.7063-1.7063-1.0426 0-2.3701 0-3.4126 0-.9428 0-1.7064.7636-1.7064 1.7063 0 .9428.7636 1.7064 1.7064 1.7064h3.4126c.9427 0 1.7063-.7636 1.7063-1.7064z"
fill="#ed6b44"
id="path97" />
<path
d="m11.7761 19.853c0-.9427-.7636-1.7063-1.7064-1.7063-1.04251 0-2.37002 0-3.41258 0-.94274 0-1.70631.7636-1.70631 1.7063 0 .9428.76357 1.7064 1.70631 1.7064h3.41258c.9428 0 1.7064-.7636 1.7064-1.7064z"
fill="#ed6b44"
id="path99" />
<path
d="m 6.498,18.9998 c 1.0178,0 1.9938,-0.4044 2.7139,-1.1236 0.7192,-0.72 1.1236,-1.696 1.1236,-2.7139 0,-0.2841 0,-0.5707 0,-0.8548 0,-2.1201 -1.7191,-3.8392 -3.8392,-3.8392 -8e-4,0 -8e-4,0 -0.0017,0 -1.01781,0 -1.99382,0.4044 -2.71389,1.1236 -0.71921,0.72 -1.12361,1.696 -1.12361,2.7139 v 0.8548 c 0,2.1201 1.71912,3.8392 3.8392,3.8392 z"
fill="#ffffff"
id="path101" />
<path
d="m 5.21658,14.7256 c 0,-0.9376 0.76017,-1.6978 1.69782,-1.6978 h 0.017 c 0.9376,0 1.6978,0.7602 1.6978,1.6978 v 0.0026 c 0,0.9376 -0.7602,1.6978 -1.6978,1.6978 -0.0059,0 -0.0111,0 -0.017,0 -0.93765,0 -1.69782,-0.7602 -1.69782,-1.6978 0,-9e-4 0,-0.0017 0,-0.0026 z"
fill="#000000"
id="path103" />
<path
d="m 25.5857,18.9998 c -1.0178,0 -1.9939,-0.4044 -2.7139,-1.1236 -0.7192,-0.72 -1.1236,-1.696 -1.1236,-2.7139 0,-0.2849 0,-0.5716 0,-0.8565 0,-1.0179 0.4044,-1.9939 1.1236,-2.7139 0.72,-0.7192 1.6961,-1.1236 2.7139,-1.1236 h 0.0034 c 1.0178,0 1.9938,0.4044 2.7139,1.1236 0.7192,0.72 1.1236,1.696 1.1236,2.7139 v 0.8548 c 0,2.1201 -1.7191,3.8392 -3.8392,3.8392 -9e-4,0 -9e-4,0 -0.0017,0 z"
fill="#ffffff"
id="path105" />
<path
d="m 26.8671,14.7256 c 0,-0.9376 -0.7602,-1.6978 -1.6978,-1.6978 -0.006,0 -0.0111,0 -0.017,0 -0.9377,0 -1.6978,0.7602 -1.6978,1.6978 v 0.0026 c 0,0.9376 0.7601,1.6978 1.6978,1.6978 h 0.017 c 0.9376,0 1.6978,-0.7602 1.6978,-1.6978 0,-9e-4 0,-0.0017 0,-0.0026 z"
fill="#000000"
id="path107" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="32px"
height="32px"
viewBox="0 0 520 520"
style="enable-background:new 0 0 520 520;"
xml:space="preserve"
sodipodi:docname="matrix.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs123" /><sodipodi:namedview
id="namedview121"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="1.3965359"
inkscape:cx="187.60706"
inkscape:cy="338.33717"
inkscape:window-width="2560"
inkscape:window-height="1404"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1"
showguides="false" />
<path
d="M13.7,11.9v496.2h35.7V520H0V0h49.4v11.9H13.7z"
id="path114"
style="stroke-width:15;stroke-dasharray:none;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1" />
<path
d="M166.3,169.2v25.1h0.7c6.7-9.6,14.8-17,24.2-22.2c9.4-5.3,20.3-7.9,32.5-7.9c11.7,0,22.4,2.3,32.1,6.8 c9.7,4.5,17,12.6,22.1,24c5.5-8.1,13-15.3,22.4-21.5c9.4-6.2,20.6-9.3,33.5-9.3c9.8,0,18.9,1.2,27.3,3.6c8.4,2.4,15.5,6.2,21.5,11.5 c6,5.3,10.6,12.1,14,20.6c3.3,8.5,5,18.7,5,30.7v124.1h-50.9V249.6c0-6.2-0.2-12.1-0.7-17.6c-0.5-5.5-1.8-10.3-3.9-14.3 c-2.2-4.1-5.3-7.3-9.5-9.7c-4.2-2.4-9.9-3.6-17-3.6c-7.2,0-13,1.4-17.4,4.1c-4.4,2.8-7.9,6.3-10.4,10.8c-2.5,4.4-4.2,9.4-5,15.1 c-0.8,5.6-1.3,11.3-1.3,17v103.3h-50.9v-104c0-5.5-0.1-10.9-0.4-16.3c-0.2-5.4-1.3-10.3-3.1-14.9c-1.8-4.5-4.8-8.2-9-10.9 c-4.2-2.7-10.3-4.1-18.5-4.1c-2.4,0-5.6,0.5-9.5,1.6c-3.9,1.1-7.8,3.1-11.5,6.1c-3.7,3-6.9,7.3-9.5,12.9c-2.6,5.6-3.9,13-3.9,22.1 v107.6h-50.9V169.2H166.3z"
id="path116"
style="stroke-width:1;stroke-dasharray:none;fill:#ffffff;fill-opacity:1" />
<path
d="M506.3,508.1V11.9h-35.7V0H520v520h-49.4v-11.9H506.3z"
id="path118"
style="stroke-width:15;stroke-dasharray:none;stroke:#ffffff;stroke-opacity:1;fill:#ffffff;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@ -0,0 +1 @@
Subproject commit 7c8cdd97cca30c49f0c13cf2e049f43b39b49d75

View file

@ -1,4 +1,12 @@
_: {
users.users.stalwart = {
isSystemUser = true;
group = "stalwart";
home = "/var/lib/stalwart";
};
users.groups.stalwart = {};
services.stalwart-mail = {
enable = true;
settings = {
@ -8,11 +16,21 @@ _: {
user = "stalwart";
group = "stalwart";
};
listener = {
smtp = {
bind = [ "0.0.0.0:9900" ];
};
};
#listener = {
# lmtp = {
# protocol = "lmtp";
# bind = [ "0.0.0.0:9900" ];
# };
# smtp = {
# protocol = "smtp";
# bind = [ "0.0.0.0:9901" ];
# };
# jmap = {
# protocol = "jmap";
# bind = [ "0.0.0.0:9902" ];
# url = "https://mail.jacekpoz.pl/jmap";
# };
#};
};
global = {
thread-pool = 4;
@ -27,4 +45,13 @@ _: {
};
};
};
services.caddy = {
enable = true;
virtualHosts."mail.jacekpoz.pl".extraConfig = ''
handle_path /jmap* {
reverse_proxy * localhost:9902
}
'';
};
}

View file

@ -0,0 +1,16 @@
_ : {
services.caddy = {
enable = true;
virtualHosts."trollface.pl".extraConfig = ''
@discord {
header_regexp User-Agent (?i)(Discord)
path /
}
rewrite @discord /trollface.png
root * ${./.}
file_server
'';
};
}

View file

@ -21,21 +21,21 @@ in {
inputs.agenix.nixosModules.default
];
};
hape = lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit lib inputs self;
config' = {
hostname = "hape";
username = "jacek";
};
};
modules = [
./hape
../modules
inputs.home-manager.nixosModules.home-manager
];
};
#hape = lib.nixosSystem {
# system = "x86_64-linux";
# specialArgs = {
# inherit lib inputs self;
# config' = {
# hostname = "hape";
# username = "jacek";
# };
# };
# modules = [
# ./hape
# ../modules
# inputs.home-manager.nixosModules.home-manager
# ];
#};
chmura = lib.nixosSystem {
system = "x86_86-linux";
specialArgs = {

View file

@ -10,7 +10,7 @@
config = {
permittedInsecurePackages = [
"python-2.7.18.6"
"armcord-3.2.3"
"electron-24.8.6"
];
allowUnfree = true;
};
@ -56,10 +56,15 @@
networking = {
hostName = config'.hostname;
networkmanager.enable = true;
networkmanager = {
enable = true;
dns = "systemd-resolved";
};
firewall.checkReversePath = "loose";
};
services.resolved.enable = true;
# don't wait for network to boot faster
# https://old.reddit.com/r/NixOS/comments/vdz86j/how_to_remove_boot_dependency_on_network_for_a
systemd = {
@ -189,7 +194,10 @@
CHROME_EXECUTABLE = "${pkgs.ungoogled-chromium}/bin/chromium";
NIXOS_OZONE_WL = "1";
#NIXOS_OZONE_WL = "1";
#WLR_DRM_DEVICES = "/dev/dri/card0:/dev/dri/card1";
#DRI_PRIME = "1";
};
systemPackages = with pkgs; [
man-pages
@ -241,6 +249,12 @@
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
amdvlk
];
extraPackages32 = with pkgs; [
driversi686Linux.amdvlk
];
};
cpu.amd.updateMicrocode = true;
};
@ -318,6 +332,8 @@
programs.kdeconnect.enable = true;
programs.noisetorch.enable = true;
myOptions = {
programs = {
git = {
@ -329,7 +345,14 @@
defaultBranch = "master";
};
starship.enable = true;
zsh.enable = true;
zsh = {
enable = true;
extraAliases = {
u = "nixos-rebuild switch -L --use-remote-sudo --flake \"/home/jacek/niksos#niks\" --max-jobs 3 --cores 4";
us = "NIX_SSHOPTS='-t' nixos-rebuild switch -L --use-remote-sudo --flake \"/home/jacek/niksos#chmura\" --target-host chmura --max-jobs 3 --cores 4";
};
profiling = false;
};
anyrun.enable = true;
armcord.enable = true;
btop.enable = true;
@ -379,16 +402,18 @@
};
};
};
schizofox.enable = false;
foot.enable = true;
gtklock.enable = false;
mpv.enable = true;
neovim.enable = true;
swaylock.enable = true;
waybar.enable = true;
zathura.enable = true;
hyprland.enable = true;
hyprland = {
enable = true;
startupSound = ./mathis.m4a;
};
helix.enable = true;
newsboat.enable = true;
};
themes = {
cursor = {
@ -457,16 +482,30 @@
user = "aur";
identityFile = "${config.home-manager.users.${config'.username}.home.homeDirectory}/.ssh/aur";
};
"jacekpoz" = {
hostName = "git.jacekpoz.pl";
user = "forgejo";
identityFile = "${config.home-manager.users.${config'.username}.home.homeDirectory}/.ssh/jacekpoz";
};
"chmura" = {
hostName = "192.168.15.17";
user = "chmura";
identityFile = "${config.home-manager.users.${config'.username}.home.homeDirectory}/.ssh/chmura";
};
"chmura2" = {
hostName = "jacekpoz.pl";
user = "chmura";
identityFile = "${config.home-manager.users.${config'.username}.home.homeDirectory}/.ssh/chmura";
};
"malina" = {
hostName = "192.168.15.13";
user = "malina";
identityFile = "${config.home-manager.users.${config'.username}.home.homeDirectory}/.ssh/malina";
};
"outfoxxed" = {
hostName = "git.outfoxxed.me";
identityFile = "${config.home-manager.users.${config'.username}.home.homeDirectory}/.ssh/outfoxxed";
};
};
};
};

View file

@ -68,7 +68,6 @@
qbittorrent
retroarchFull
ventoy-full
zathura
zellij
nodejs
unzip
@ -107,7 +106,7 @@
rage
fd
udisks
ffmpeg
ffmpeg_6-full
ghc
ghcid
cabal-install
@ -182,18 +181,31 @@
logseq
gamescope
vitetris
gtetrinet
# tp
jetbrains.idea-community
maven
pmd
libsForQt5.umbrello
jdk
checkstyle
plantuml
umlet
graphviz
linuxKernel.packages.linux_zen.cpupower
usbutils
libsForQt5.dolphin
kiwix
inkscape
gomuks
subversion
nushell
twitch-tui
hugo
ytfzf
mat2
simplex-chat-desktop
libsixel
lsix
];
stateVersion = lib.mkDefault "23.11";

BIN
hosts/niks/mathis.m4a Normal file

Binary file not shown.

View file

@ -1,6 +1,6 @@
_: {
virtualisation = {
waydroid.enable = true;
lxc.enable = true;
#lxc.enable = true;
};
}

View file

@ -7,7 +7,19 @@
}: with lib; let
cfg = config.myOptions.programs.zsh;
in {
options.myOptions.programs.zsh.enable = mkEnableOption "enable zsh";
options.myOptions.programs.zsh = {
enable = mkEnableOption "enable zsh";
extraAliases = mkOption {
type = types.attrs;
description = "extra shell aliases";
default = {};
};
profiling = mkOption {
type = types.bool;
description = "enable zsh profiling";
default = false;
};
};
config = mkIf cfg.enable {
home-manager.users.${config'.username} = {
@ -30,12 +42,10 @@ in {
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
g = "git";
woman = "man";
wget = "wget --hsts-file=\"${config.home-manager.users.${config'.username}.xdg.dataHome}/wget-hsts\"";
};
initExtra = ''
bindkey -e
'';
} // cfg.extraAliases;
initExtraFirst = mkIf cfg.profiling "zmodload zsh/zprof";
initExtra = mkIf cfg.profiling "zprof";
history = {
path = "${config.home-manager.users.${config'.username}.xdg.dataHome}/zsh/zsh_history";
size = 9999999999;

View file

@ -111,6 +111,7 @@ in {
"symbols.ron".text = ''
Config(
prefix: ":s",
max_entries: 30,
)
'';
"translate.ron".text = ''

View file

@ -15,13 +15,7 @@ in {
config = mkIf cfg.enable {
home-manager.users.${config'.username} = {
home.packages = with pkgs; [
(armcord.overrideAttrs {
version = "3.2.3";
src = pkgs.fetchurl {
url = "https://github.com/ArmCord/ArmCord/releases/download/v3.2.3/ArmCord_3.2.3_amd64.deb";
sha256 = "0pdsqvdvr0ylc8pjc4d1krxngcwl99jz74m04804bihpwzsyzibp";
};
})
armcord
];
#xdg.configFile = {

View file

@ -12,7 +12,7 @@ _: {
./mpv.nix
./qt.nix
#./rofi.nix
./schizofox.nix
#./schizofox.nix
./swaylock.nix
./waybar.nix
./zathura.nix

View file

@ -154,7 +154,6 @@ in {
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
sponsorblock
tridactyl
violentmonkey
darkreader
@ -385,6 +384,8 @@ in {
"gfx.webrender.all" = true;
"media.ffmpeg.vaapi.enabled" = true;
"identity.sync.tokenserver.uri" = "https://ffsync.jacekpoz.pl/1.0/sync/1.5";
};
};
"unschizo" = {
@ -404,7 +405,6 @@ in {
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
sponsorblock
dearrow
tridactyl
violentmonkey
@ -464,6 +464,8 @@ in {
"gfx.webrender.all" = true;
"media.ffmpeg.vaapi.enabled" = true;
"identity.sync.tokenserver.uri" = "https://ffsync.jacekpoz.pl/1.0/sync/1.5";
};
};
};

View file

@ -21,6 +21,10 @@
in {
options.myOptions.programs.hyprland = {
enable = mkEnableOption "enable hiper ląd";
startupSound = mkOption {
type = types.path;
description = "sound to play on hyprland startup";
};
};
disabledModules = [ "programs/hyprland.nix" ];
@ -37,11 +41,15 @@ in {
pkgs.xdg-desktop-portal-gtk
inputs.xdg-desktop-portal-hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
];
# TODO look into and make use of this
config.common.default = "*";
};
home-manager.users.${config'.username} = {
imports = [ inputs.hyprland.homeManagerModules.default ];
xdg.dataFile."hypr/startup_sound".source = cfg.startupSound;
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
@ -51,7 +59,7 @@ in {
];
extraConfig = ''
#laptop
monitor=eDP-1,2560@1440@60,0x0,1
monitor=eDP-1,2560x1440@165,0x0,1
#second monitor
monitor=HDMI-A-1,2560x1440@144,2560x0,1
@ -79,7 +87,7 @@ in {
workspace = special:btop, decorate:false
workspace = special:amdgpu_top, decorate:false
workspace = special:helvum, decorate:false
workspace = special:pipewire, decorate:false
workspace = special:nixos,decorate:false
workspace = special:rog,decorate:false
workspace = special:keepassxc,decorate:false
@ -117,6 +125,9 @@ in {
#allow_tearing=true
}
#env = WLR_DRM_NO_ATOMIC,1
#windowrulev2 = immediate, title:^(osu!)$
decoration {
#rounding=0
rounding=10
@ -175,6 +186,7 @@ in {
windowrulev2 = float, class:^(Vieb)$
windowrulev2 = float, title:^(Picture-in-Picture)$
windowrulev2 = float, title:^(.*)(Choose User Profile)(.*)$
windowrulev2 = float, title:^(blob:null/)(.*)$
windowrulev2 = float, class:^(xdg-desktop-portal-gtk)$
windowrulev2 = float, class:^(code), title: ^(Open*)
@ -183,8 +195,6 @@ in {
windowrulev2 = float, class:^(org.keepassxc.KeePassXC)$
windowrulev2 = size 960 670, title:^(ROG Control Center)$
#windowrulev2 = immediate, title:^(osu!)$
bind = SUPER, RETURN, exec, ${foot}/bin/${if config.myOptions.programs.foot.server then "footclient" else "foot"}
bind = SUPER, W, exec, ${removeSuffix " %U" config.home-manager.users.${config'.username}.xdg.desktopEntries.firefox-schizo.exec}
bind = SUPERSHIFT, W, exec, ${removeSuffix " %U" config.home-manager.users.${config'.username}.xdg.desktopEntries.firefox-unschizo.exec}
@ -254,7 +264,7 @@ in {
bind = SUPERSHIFT, X, exec, ${hyprland}/bin/hyprctl kill
bind = SUPER, B, togglespecialworkspace, btop
bind = SUPER, A, togglespecialworkspace, amdgpu_top
bind = SUPER, V, togglespecialworkspace, helvum
bind = SUPER, V, togglespecialworkspace, pipewire
bind = SUPER, N, togglespecialworkspace, nixos
bind = SUPER, R, togglespecialworkspace, rog
bind = SUPER, X, togglespecialworkspace, keepassxc
@ -268,17 +278,21 @@ in {
pass_mouse_when_bound=0
}
${if cfg.startupSound != "" then "exec-once=${pkgs.mpv}/bin/mpv --no-video --volume=100 ~/${config.home-manager.users.${config'.username}.xdg.dataFile."hypr/startup_sound".target}" else ""}
exec-once=${pkgs.systemd}/bin/systemctl start --user waybar.service
exec=${pkgs.systemd}/bin/systemctl restart --user waybar.service
exec=${pkgs.procps}/bin/pkill btop
exec=${pkgs.procps}/bin/pkill amdgpu_top
exec=${pkgs.procps}/bin/pkill helvum
exec=${pkgs.procps}/bin/pkill pavucontrol
exec=[workspace special:btop silent;tile] ${foot}/bin/foot -e ${pkgs.btop}/bin/btop
exec=[workspace special:amdgpu_top silent;tile] ${pkgs.amdgpu_top}/bin/amdgpu_top --gui -i 0
exec=[workspace special:amdgpu_top silent;tile] ${pkgs.amdgpu_top}/bin/amdgpu_top --gui -i 1
exec=[workspace special:helvum silent;tile] ${pkgs.helvum}/bin/helvum
exec=[workspace special:pipewire silent;tile] ${pkgs.helvum}/bin/helvum
exec=[workspace special:pipewire silent;tile] ${pkgs.pavucontrol}/bin/pavucontrol
exec-once=[workspace special:nixos silent;tile] cd ~/niksos; ${foot}/bin/foot
exec-once=[workspace special:rog silent;tile] ${pkgs.asusctl}/bin/rog-control-center
exec-once=[workspace special:keepassxc silent;tile] ${pkgs.keepassxc}/bin/keepassxc

View file

@ -32,11 +32,11 @@ in {
# thanks raf :3 https://github.com/NotAShelf/nyx/blob/main/homes/notashelf/themes/qt.nix
qt = {
enable = true;
#platformTheme = "qtct";
platformTheme = "qtct";
style = {
inherit (cfg) name;
package = cfg.package.override {
flavour = cfg.variant;
flavour = [ cfg.variant ];
accents = [ cfg.accentColour ];
};
};
@ -52,7 +52,7 @@ in {
];
sessionVariables = {
QT_STYLE_OVERRIDE = "kvantum";
#QT_STYLE_OVERRIDE = "kvantum";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland;xcb";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";

View file

@ -1,5 +1,6 @@
_: {
imports = [
./preserve-system.nix
./xdg.nix
];
}

View file

@ -0,0 +1,6 @@
{
self,
...
}: {
environment.etc."current-flake".source = self;
}

View file

@ -0,0 +1,57 @@
{
config,
lib,
pkgs,
...
}: with lib; let
cfg = config.services.anki-sync-server;
in {
options.services.anki-sync-server = {
enable = mkEnableOption (lib.mdDoc "anki-sync-server");
package = mkOption {
type = types.package;
default = pkgs.anki-bin;
description = lib.mdDoc "The package to use for the anki sync server.";
};
host = mkOption {
type = types.str;
default = "localhost";
description = lib.mdDoc "anki-sync-server host";
};
port = mkOption {
type = types.port;
default = 27701;
description = lib.mdDoc "anki-sync-server port";
};
openFirewall = mkOption {
default = false;
type = types.bool;
description = lib.mdDoc "Whether to open the firewall for the specified port.";
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
systemd.services.anki-sync-server = {
description = "Selfhosted Anki sync server.";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ cfg.package ];
serviceConfig = {
Type = "simple";
DynamicUser = true;
StateDirectory = "anki-sync-server";
ExecStart = "${cfg.package}/bin/anki --syncserver";
Environment = ''SYNC_BASE="/var/lib/anki-sync-server" SYNC_HOST="${cfg.host}" SYNC_PORT="${cfg.port}"'';
EnvironmentFile = config.age.secrets.anki-user-credentials.path;
Restart = "always";
};
};
};
}

View file

@ -0,0 +1,115 @@
{
config,
config',
lib,
pkgs,
...
}: with lib; let
cfg = config.myOptions.services.fcitx5;
in {
# stolen from https://git.outfoxxed.me/outfoxxed/nixnew/src/branch/master/modules/user/modules/fcitx5
options.myOptions.services.fcitx5.enable = mkEnableOption "enable fcitx5";
config = mkIf cfg.enable {
i18n.inputMethod = {
enabled = "fcitx5";
fcitx5.addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
libsForQt5.fcitx5-qt
];
};
home-manager.users.${config'.username} = {
xdg.configFile = {
"fcitx5/config".text = ''
[Hotkey]
# Enumerate when press trigger key repeatedly
EnumerateWithTriggerKeys=False
# Enumerate Input Method Forward
EnumerateForwardKeys=
# Enumerate Input Method Backward
EnumerateBackwardKeys=
# Skip first input method while enumerating
EnumerateSkipFirst=False
# Enumerate Input Method Group Forward
EnumerateGroupForwardKeys=
# Enumerate Input Method Group Backward
EnumerateGroupBackwardKeys=
# Activate Input Method
ActivateKeys=
# Deactivate Input Method
DeactivateKeys=
# Default Previous page
PrevPage=
# Default Next page
NextPage=
# Default Previous Candidate
PrevCandidate=
# Default Next Candidate
NextCandidate=
# Toggle embedded preedit
TogglePreedit=
[Hotkey/TriggerKeys]
0=Control+grave
[Hotkey/AltTriggerKeys]
0=Shift_L
[Behavior]
# Active By Default
ActiveByDefault=False
# Share Input State
ShareInputState=No
# Show preedit in application
PreeditEnabledByDefault=True
# Show Input Method Information when switch input method
ShowInputMethodInformation=True
# Show Input Method Information when changing focus
showInputMethodInformationWhenFocusIn=False
# Show compact input method information
CompactInputMethodInformation=True
# Show first input method information
ShowFirstInputMethodInformation=True
# Default page size
DefaultPageSize=5
# Override Xkb Option
OverrideXkbOption=False
# Custom Xkb Option
CustomXkbOption=
# Force Enabled Addons
EnabledAddons=
# Force Disabled Addons
DisabledAddons=
# Preload input method to be used by default
PreloadInputMethod=True
'';
"fcitx5/profile".text = ''
[Groups/0]
# Group Name
Name=Default
# Layout
Default Layout=us
# Default Input Method
DefaultIM=mozc
[Groups/0/Items/0]
# Name
Name=keyboard-us
# Layout
Layout=
[Groups/0/Items/1]
# Name
Name=mozc
# Layout
Layout=
[GroupOrder]
0=Default
'';
};
};
};
}

View file

@ -13,6 +13,11 @@
force_default_wallpaper=0
}
animations {
enabled=0
first_launch_animation=0
}
workspace=1,default:true,gapsout:0,gapsin:0,border:false,decorate:false
${if config.myOptions.programs.waybar.enable then "exec-once=systemctl --user stop waybar.service" else ""}

View file

@ -3,5 +3,6 @@ _: {
./neovim
./btop.nix
./helix.nix
./newsboat.nix
];
}

View file

@ -5,208 +5,199 @@
lib,
pkgs,
...
}: with lib; let
}:
with lib; let
cfg = config.myOptions.programs.neovim;
in {
options.myOptions.programs.neovim.enable = mkEnableOption "enable neovim";
config = mkIf cfg.enable {
home-manager.users.${config'.username} = {
imports = [ inputs.neovim-flake.homeManagerModules.default ];
imports = [inputs.nixvim.homeManagerModules.nixvim];
programs.neovim-flake = {
programs.nixvim = {
enable = true;
settings = {
vim = {
defaultEditor = true;
package = pkgs.neovim-nightly;
viAlias = true;
vimAlias = true;
enableEditorconfig = true;
preventJunkFiles = true;
enableLuaLoader = true;
scrollOffset = 7;
useSystemClipboard = false;
maps = {
normal = {
"gD" = {
action = "vim.lsp.buf.declaration";
lua = true;
};
"gd" = {
action = "vim.lsp.buf.definition";
lua = true;
};
"gi" = {
action = "vim.lsp.buf.implementation";
lua = true;
};
"gr" = {
action = "vim.lsp.buf.references";
lua = true;
};
"K" = {
action = "vim.lsp.buf.hover";
lua = true;
};
"<C-k>" = {
action = "vim.lsp.buf.signature_help";
lua = true;
};
"<leader>wa" = {
action = "vim.lsp.buf.add_workspace_folder";
lua = true;
};
"<leader>wr" = {
action = "vim.lsp.buf.remove_workspace_folder";
lua = true;
};
"<leader>wl" = {
action = ''
function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end
'';
lua = true;
};
"<leader>D" = {
action = "vim.lsp.buf.type_definition";
lua = true;
};
"<leader>r" = {
action = "vim.lsp.buf.rename";
lua = true;
};
"<leader>a" = {
action = "vim.lsp.buf.code_action";
lua = true;
};
"<leader>e" = {
action = "vim.diagnostic.open_float";
lua = true;
};
"<leader>q" = {
action = "vim.diagnostic.setloclist";
lua = true;
};
"[d" = {
action = "vim.diagnostic.goto_prev";
lua = true;
};
"]d" = {
action = "vim.diagnostic.goto_next";
lua = true;
};
"<C-f>" = {
action = ''
function()
vim.lsp.buf.format { async = true }
end
'';
lua = true;
};
};
enableMan = true;
colorscheme = "catppuccin";
colorschemes.catppuccin = {
enable = true;
flavour = "mocha";
transparentBackground = true;
};
options = {
number = true;
relativenumber = true;
autoread = true;
so = 7;
cmdheight = 1;
ignorecase = true;
smartcase = true;
showmatch = true;
timeoutlen = 500;
encoding = "utf8";
smarttab = true;
shiftwidth = 4;
tabstop = 4;
expandtab = true;
linebreak = true;
smartindent = true;
updatetime = 300;
hidden = true;
background = "dark";
mousemoveevent = true;
smoothscroll = true;
};
globals = {
mapleader = " ";
};
keymaps = [
{
action = "vim.cmd.CHADopen";
lua = true;
key = "<leader>v";
}
];
plugins = {
airline = {
enable = true;
powerline = true;
theme = "catppuccin";
};
fugitive.enable = true;
treesitter = {
enable = true;
fold = true;
grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
lua
rust
markdown
markdown-inline
python
cmake
cpp
ensureInstalled = [
"lua"
"rust"
"markdown"
"markdown-inline"
"python"
"cmake"
"cpp"
"c"
];
folding = false;
indent = true;
nixvimInjections = true;
incrementalSelection.enable = true;
};
startPlugins = [
(pkgs.fetchFromGitHub {
owner = "slint-ui";
repo = "vim-slint";
rev = "9badce3860297562bb5e80ba1666628f9e0ac632";
hash = "sha256-RKsRGE7KzAxmiviaikoXIVydjt8XxYXS/OMx8ol8kEQ=";
})
];
lsp = {
formatOnSave = false;
};
languages = {
enableLSP = true;
enableFormat = true;
enableTreesitter = true;
enableExtraDiagnostics = true;
nix.enable = true;
html.enable = true;
ts.enable = true;
rust = {
coq-nvim = {
enable = true;
crates.enable = true;
autoStart = "shut-up";
installArtifacts = true;
recommendedKeymaps = true;
};
clang = {
chadtree = {
enable = true;
lsp = {
enable = true;
server = "clangd";
keymap.openFileFolder.tertiary = ["<leader>t" "<middlemouse>"];
};
};
java = {
enable = true;
treesitter.enable = true;
lsp.enable = true;
};
};
autocomplete = {
enable = true;
};
telescope.enable = true;
git = {
enable = true;
gitsigns = {
enable = true;
codeActions = true;
};
};
#filetree.chadtree = {
# enable = true;
#};
filetree.nvimTree = {
enable = true;
mappings = {
toggle = "<leader>v";
};
disableNetrw = true;
openOnSetup = false;
};
terminal.toggleterm = {
toggleterm = {
enable = true;
direction = "float";
mappings.open = "<c-\\>";
openMapping = "<C-\\>";
shadeTerminals = true;
shadingFactor = 2;
size = 10;
};
# TODO laytan/cloak.nvim
gitsigns = {
enable = true;
currentLineBlame = true;
numhl = true;
signcolumn = true;
wordDiff = true;
};
lsp = {
enable = true;
servers = {
rust-analyzer = {
enable = true;
installCargo = false;
installRustc = false;
};
lua-ls.enable = true;
clangd.enable = true;
nil_ls.enable = true;
bashls.enable = true;
};
#onAttach = ''
# vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
# local bufopts = { noremap = true, silent = true, buffer = bufnr }
# vim.keymap.set('n', '<space>wl', function()
# print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
# end, bufopts)
# vim.keymap.set('n', '<C-f>', function() vim.lsp.buf.format { async = true } end, bufopts)
#'';
keymaps = {
lspBuf = {
gD = "declaration";
gd = "definition";
K = "hover";
gi = "implementation";
"<C-k>" = "signature_help";
"<leader>wa" = "add_workspace_folder";
"<leader>wr" = "remove_workspace_folder";
"<leader>wl" = "list_workspace_folders";
"<leader>D" = "type_definition";
"<leader>r" = "rename";
"<leader>a" = "code_action";
gr = "references";
"<C-f>" = "format";
};
diagnostic = {
"<leader>e" = "open_float";
"<leader>j" = "goto_prev";
"<leader>k" = "goto_next";
"<leader>q" = "setloclist";
};
# TODO maybe change
silent = false;
};
};
rust-tools = {
enable = true;
crateGraph = {
enabledGraphvizBackends = ["png" "svg"];
backend = "x11";
};
inlayHints = {
auto = true;
onlyCurrentLine = true;
showParameterHints = true;
};
};
leap.enable = true;
fidget.enable = true;
telescope = {
enable = true;
keymaps = {
"<leader>ff" = "find_files";
"<leader>fg" = "live_grep";
"<leader>fb" = "buffers";
"<leader>fh" = "help_tags";
};
# TODO maybe change
keymapsSilent = false;
};
comment-nvim.enable = true;
crates-nvim.enable = true;
harpoon = {
enable = true;
enableTelescope = true;
keymapsSilent = false;
};
};
theme = {
enable = true;
name = "catppuccin";
style = "mocha";
transparent = true;
};
};
};
extraPlugins = with pkgs.vimPlugins; [
zen-mode-nvim
];
};
};
};

73
modules/tui/newsboat.nix Normal file
View file

@ -0,0 +1,73 @@
{
config,
config',
lib,
...
}: with lib; let
cfg = config.myOptions.programs.newsboat;
in {
options.myOptions.programs.newsboat.enable = mkEnableOption "enable newsboat";
config = mkIf cfg.enable {
home-manager.users.${config'.username} = {
programs.newsboat = {
enable = true;
autoReload = true;
extraConfig = ''
download-full-page yes
download-retries 3
error-log /dev/null
cookie-cache ~/.cache/newsboat/cookies.txt
bind-key j down
bind-key k up
bind-key G end
bind-key g home
bind-key d pagedown
bind-key u pageup
bind-key a toggle-article-read
color listnormal color15 default
color listnormal_unread color2 default
color listfocus_unread color2 color0
color listfocus default color0
color background default default
color article default default
color end-of-text-marker color8 default
color info color4 color8
color hint-separator default color8
color hint-description default color8
color title color14 color8
highlight article "^(Feed|Title|Author|Link|Date): .+" color4 default bold
highlight article "^(Feed|Title|Author|Link|Date):" color14 default bold
highlight article "\\((link|image|video)\\)" color8 default
highlight article "https?://[^ ]+" color4 default
highlight article "\[[0-9]+\]" color6 default bold
user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
'';
urls = [
{
title = "NixOS Weekly";
url = "https://weekly.nixos.org/feeds/all.rss.xml";
}
{
title = "Hacker News";
url = "https://hnrss.org/newest";
}
{
title = "Phoronix";
url = "https://www.phoronix.com/rss.php";
}
{
title = "LWN";
url = "https://lwn.net/headlines/rss";
}
{
title = "Hyprland Commit Feed";
url = "https://github.com/hyprwm/Hyprland/commits/main.atom";
}
];
};
};
};
}

Binary file not shown.

View file

@ -0,0 +1,13 @@
age-encryption.org/v1
-> ssh-ed25519 05IAmg Q5Q02J6CGyf4zY8QaVGwGdVGnDFdbR9X6Yyl9qOSLSE
f0+qlioiZAVhwlCU4852Jrlj1RXz5N3M6lAEmne94Ns
-> ssh-ed25519 HC8P8A ChB/hMIOC4kuF3qr3hoihzHUew+OQ/4+8HqeqCFX3zM
LOdqk/SnJqlbSlo1Kd77ZOCFlLaDLMv5bRwgFzHwk3A
-> ssh-ed25519 sItgaw wjhyB82a6wu7TTBY8qnMwPoTTMkvQErPorPb+vh/XDQ
KF+eHQkRIZzZtFEuavTLzwUkTOXohA0RaCRgCmULS4U
-> ssh-ed25519 YQNd1g 9+4Dk+RioFhqD1EDdSDaA6abrv1nFtXdtzyOWI+ZbwQ
uJCBoQEmlPbiHqmejVB/kVP9899z89U756nHdCzsKTA
-> 6V]-grease YJ} M/%3t4Q
Wtz31Eqy2mUNJQ
--- 9bAuZp6n+rkfsnx4NAbnMGLrhTghunPvFCTc1hC/7v8
<EFBFBD>?ª)±Å<C2B1>gqz÷ ÅUi7ãqã×óúŽJ“[®GʪcîJ# o &É«0Qåf •Š½ÙŒÝ‡2Q~¡žzßY{¸dǤÍ$<24>¡ ÚÔQîg{u>.Üâ­òÖľ©ñ~K+†6lÖ9Oî8

View file

@ -10,4 +10,6 @@ let
in {
"anki-user-credentials.age".publicKeys = niks ++ chmura;
"discord-autodelete-config.age".publicKeys = niks ++ chmura;
"eturnal-turn-secret.age".publicKeys = niks ++ chmura;
"firefox-syncserver-secrets.age".publicKeys = niks ++ chmura;
}