Compare commits
No commits in common. "old" and "main" have entirely different histories.
8
.direnv/bin/nix-direnv-reload
Normal file
8
.direnv/bin/nix-direnv-reload
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
dir="$(realpath $(dirname ${BASH_SOURCE[0]})/../..)"
|
||||
_nix_direnv_force_reload=1 direnv exec "$dir" true
|
||||
direnv reload
|
||||
# direnv reload updates the mtime of .envrc. Also update the timestamp of the
|
||||
# profile_rc file to keep track that we actually are up to date.
|
||||
touch $dir/.direnv/{nix,flake}-profile-*.rc
|
||||
|
1863
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc
Normal file
1863
.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc
Normal file
File diff suppressed because it is too large
Load diff
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.direnv/
|
79
README.md
Normal file
79
README.md
Normal file
|
@ -0,0 +1,79 @@
|
|||
[![NixOS](https://img.shields.io/badge/NixOS-unstable-blue.svg?style=flat&logo=NixOS&logoColor=white)](https://nixos.org)
|
||||
[![MIT License](https://img.shields.io/github/license/divnix/devos)][mit]
|
||||
|
||||
> #### ⚠ Advisory ⚠
|
||||
> Do you remember how you got here? Where were you going? What were you leaving behind?
|
||||
> Are you sure you want to go down this rabbit hole, Alice?
|
||||
|
||||
## Getting Started
|
||||
This is my personal deployment hub. I configure all my personal servers from this repo. Good luck if you're looking to graft this.
|
||||
You'll probably want to run some `install.sh` that will configure the base NixOS system. Some of them aren't in a good state.
|
||||
From there you can either install the host you want with `sudo nixos-rebuild switch --flake .#<host>` or enter the cockpit with `nix develop` and deploy servers remotely through `deploy`
|
||||
|
||||
|
||||
## Personal dotfiles
|
||||
<img src="./screenshots/fakebusy.png" width="100%" />
|
||||
|
||||
<p align="center">
|
||||
<span><img src="./screenshots/desktop.png" height="178" /></span>
|
||||
<span><img src="./screenshots/rofi.png" height="178" /></span>
|
||||
<span><img src="./screenshots/firefox.png" height="178" /></span>
|
||||
</p>
|
||||
|
||||
------
|
||||
|
||||
| | |
|
||||
|----------------|----------------------------------------------------------|
|
||||
| **Shell:** | bash / zsh |
|
||||
| **DM:** | lightdm + lightdm-mini-greeter |
|
||||
| **WM:** | bspwm + polybar |
|
||||
| **Editor:** | nvim |
|
||||
| **Terminal:** | kitty |
|
||||
| **Launcher:** | rofi |
|
||||
| **Browser:** | firefox |
|
||||
| **GTK Theme:** | [Ant Dracula](https://github.com/EliverLara/Ant-Dracula) |
|
||||
|
||||
-----
|
||||
|
||||
|
||||
### Status: Tectonic
|
||||
The planet is cooling down, and approaching stability. It is well understood, and the continents are not expected to change much more. One should expect some more localized changes, and further development.
|
||||
|
||||
## Shoulders
|
||||
Summoning is powerful magic, and cannot be created in isolation. It stands on the [shoulders of the
|
||||
following giants][giants]:
|
||||
|
||||
### :onion: — like the layers of an onion
|
||||
- [`serokell/deploy-rs`][deploy]
|
||||
- [`NixOS/nixpkgs`][nixpkgs]
|
||||
- [`ryantm/agenix`][agenix]
|
||||
- [`direnv/direnv`][direnv]
|
||||
|
||||
:heart:
|
||||
|
||||
### But Why?
|
||||
The future is more uncertain than ever. Make dependable what you can, in whatever way you know how.
|
||||
Stop doing it by yourself, unless we learn to work with one another will we be able to grow long term solutions.
|
||||
|
||||
Managing servers by hand sucks, k8s doesn't allow me to transitively deploy all my configuration to multiple personal machines, and ansible wasn't good enough.
|
||||
|
||||
You probably don't want to use nixOS, I'm a masocist
|
||||
|
||||
### Grafts
|
||||
https://github.com/hlissner/dotfiles
|
||||
|
||||
# License
|
||||
DevOS is licensed under the [MIT License][mit].
|
||||
|
||||
[community]: https://github.com/divnix/devos/tree/community
|
||||
[deploy]: https://github.com/serokell/deploy-rs
|
||||
[dotfiles]: https://github.com/hlissner/dotfiles
|
||||
[flake-doc]: https://github.com/NixOS/nix/blob/master/src/nix/flake.md
|
||||
[flakes]: https://nixos.wiki/wiki/Flakes
|
||||
[giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants
|
||||
[home-manager]: https://nix-community.github.io/home-manager
|
||||
[mit]: https://mit-license.org
|
||||
[nix]: https://nixos.org/manual/nix/stable
|
||||
[nixos]: https://nixos.org/manual/nixos/stable
|
||||
[nixpkgs]: https://github.com/NixOS/nixpkgs
|
||||
|
7
dns/creds.json
Normal file
7
dns/creds.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"hedns": {
|
||||
"TYPE": "HEDNS",
|
||||
"username": "iamanish",
|
||||
"password": "$HE_PASSWORD"
|
||||
}
|
||||
}
|
59
dns/dnsconfig.js
Normal file
59
dns/dnsconfig.js
Normal file
|
@ -0,0 +1,59 @@
|
|||
// Providers:
|
||||
|
||||
var REG_NONE = NewRegistrar('none'); // No registrar.
|
||||
var DNS_BIND = NewDnsProvider('bind'); // ISC BIND.
|
||||
var DNS_HEDNS = NewDnsProvider('hedns');
|
||||
|
||||
D("lakhwara.com", REG_NONE,
|
||||
DnsProvider(DNS_HEDNS),
|
||||
DefaultTTL(300),
|
||||
//SOA('@', 'ns1.he.net.', 'hostmaster.he.net.', 2022041702, 86400, 7200, 3600000, 86400, TTL(172800)),
|
||||
A('anish', '69.61.2.203'),
|
||||
A('@', '69.61.2.203'),
|
||||
//A('coaching', '103.16.130.98'),
|
||||
TXT('anish', 'datkey=dat://1a240a14fab2bae9c85ebad29bddc04505aaba24e5fb809c2ccb4cdf71e3a7d5'),
|
||||
CNAME('fm1._domainkey', 'fm1.lakhwara.com.dkim.fmhosted.com.'),
|
||||
CNAME('fm2._domainkey', 'fm2.lakhwara.com.dkim.fmhosted.com.'),
|
||||
CNAME('fm3._domainkey', 'fm3.lakhwara.com.dkim.fmhosted.com.'),
|
||||
MX('@', 10, 'in1-smtp.messagingengine.com.'),
|
||||
MX('@', 20, 'in2-smtp.messagingengine.com.'),
|
||||
//NAMESERVER('ns1.he.net.'),
|
||||
//NAMESERVER('ns2.he.net.'),
|
||||
//NAMESERVER('ns3.he.net.'),
|
||||
//NAMESERVER('ns4.he.net.'),
|
||||
//NAMESERVER('ns5.he.net.'),
|
||||
TXT('@', 'v=spf1 include:spf.messagingengine.com ?all')
|
||||
)
|
||||
|
||||
D('sealight.xyz', REG_NONE, DnsProvider(DNS_HEDNS),
|
||||
DefaultTTL(86400),
|
||||
//SOA('@', 'ns1.he.net.', 'hostmaster.he.net.', 2022121008, 86400, 7200, 3600000, 172800, TTL(172800)),
|
||||
//NAMESERVER('ns1.he.net.'),
|
||||
//NAMESERVER('ns2.he.net.'),
|
||||
//NAMESERVER('ns3.he.net.'),
|
||||
//NAMESERVER('ns4.he.net.'),
|
||||
//NAMESERVER('ns5.he.net.'),
|
||||
// capsul: helix
|
||||
A('bridge', '69.61.2.203', TTL(300)),
|
||||
A('rss', '69.61.2.203', TTL(300)),
|
||||
A('git', '69.61.2.203', TTL(300)),
|
||||
A('bin', '69.61.2.203', TTL(300)),
|
||||
A('ci', '69.61.2.203', TTL(300)),
|
||||
A('write', '69.61.2.203', TTL(300)),
|
||||
// vultr -> nulled: lituus
|
||||
A('@', '45.77.48.108', TTL(300)),
|
||||
A('jitsi', '45.77.48.108', TTL(300)),
|
||||
A('chat', '45.77.48.108', TTL(300)),
|
||||
A('element', '45.77.48.108', TTL(300)),
|
||||
A('turn', '45.77.48.108', TTL(300)),
|
||||
//nullhex free email real estate
|
||||
CNAME('key1._domainkey', 'key1.nullhex.com.'),
|
||||
CNAME('autoconfig', 'autoconfig.nullhex.com.'),
|
||||
MX('@', 10, 'smtp-in-1.nullhex.com.'),
|
||||
MX('@', 20, 'smtp-in-2.nullhex.com.'),
|
||||
TXT('@', 'v=spf1 a mx ~all'),
|
||||
SRV('_autodiscover._tcp', 0, 1, 443, 'autodiscover.nullhex.com.'),
|
||||
TXT('_dmarc', 'v=DMARC1; p=quarantine;'),
|
||||
SRV('_imaps._tcp', 0, 1, 993, 'imap.nullhex.com.'),
|
||||
SRV('_submissions._tcp', 0, 1, 465, 'smtp.nullhex.com.')
|
||||
);
|
26
dns/test_nullhex.sh
Normal file
26
dns/test_nullhex.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "error: domain missing (sealight.xyz)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
domain="$1"
|
||||
errors=""
|
||||
|
||||
dig +short MX "$domain" | grep -q 'smtp-in-1.nullhex.com' || errors="smtp-in-1.nullhex.com record not found"
|
||||
dig +short MX "$domain" | grep -q 'smtp-in-2.nullhex.com' || errors="$errors\nsmtp-in-2.nullhex.com record not found"
|
||||
dig +short TXT "$domain" | grep -q '^"v=spf1 a mx ~all"$' || errors="$errors\nspf record not found"
|
||||
dig +short CNAME "key1._domainkey.$domain" | grep -q 'key1.nullhex.com' || errors="$errors\nkey1._domainkey.$domain record not found"
|
||||
dig +short TXT "_dmarc.$domain" | grep -q '^"v=DMARC1; p=quarantine;"$' || errors="$errors\ndmarc TXT record is missing"
|
||||
dig +short SRV "_autodiscover._tcp.$domain" | grep -q '443 autodiscover.nullhex.com.' || errors="$errors\nautodiscover SRV record is missing"
|
||||
dig +short SRV "_imaps._tcp.$domain" | grep -q '993 imap.nullhex.com.' || errors="$errors\nimap SRV record is missing"
|
||||
dig +short SRV "_submissions._tcp.$domain" | grep -q '465 smtp.nullhex.com.' || errors="$errors\nsmtp SRV record is missing"
|
||||
dig +short CNAME "autoconfig.$domain" | grep -q 'autoconfig.nullhex.com.' || errors="$errors\nautoconfig CNAME record is missing"
|
||||
|
||||
if [ ! -z "$errors" ]; then
|
||||
echo "$errors"
|
||||
exit 1
|
||||
else
|
||||
echo "success! u are redy"
|
||||
fi
|
22
dns/zones/lakhwara.com.zone
Normal file
22
dns/zones/lakhwara.com.zone
Normal file
|
@ -0,0 +1,22 @@
|
|||
; lakhwara.com Dumped Sun May 28 22:30:02 2023
|
||||
;
|
||||
lakhwara.com. 172800 IN SOA ns1.he.net. hostmaster.he.net. (
|
||||
2022041702 ;serial
|
||||
86400 ;refresh
|
||||
7200 ;retry
|
||||
3600000 ;expire
|
||||
86400 ) ;minimum
|
||||
anish.lakhwara.com. 86400 IN A 103.16.130.98
|
||||
anish.lakhwara.com. 86400 IN TXT datkey=dat://1a240a14fab2bae9c85ebad29bddc04505aaba24e5fb809c2ccb4cdf71e3a7d5
|
||||
fm1._domainkey.lakhwara.com. 86400 IN CNAME fm1.lakhwara.com.dkim.fmhosted.com.
|
||||
fm2._domainkey.lakhwara.com. 86400 IN CNAME fm2.lakhwara.com.dkim.fmhosted.com.
|
||||
fm3._domainkey.lakhwara.com. 86400 IN CNAME fm3.lakhwara.com.dkim.fmhosted.com.
|
||||
lakhwara.com. 86400 IN A 103.16.130.98
|
||||
lakhwara.com. 86400 IN MX 10 in1-smtp.messagingengine.com.
|
||||
lakhwara.com. 86400 IN MX 20 in2-smtp.messagingengine.com.
|
||||
lakhwara.com. 86400 IN NS ns1.he.net.
|
||||
lakhwara.com. 86400 IN NS ns2.he.net.
|
||||
lakhwara.com. 86400 IN NS ns3.he.net.
|
||||
lakhwara.com. 86400 IN NS ns4.he.net.
|
||||
lakhwara.com. 86400 IN NS ns5.he.net.
|
||||
lakhwara.com. 86400 IN TXT "v=spf1 include:spf.messagingengine.com ?all"
|
30
dns/zones/sealight.xyz.zone
Normal file
30
dns/zones/sealight.xyz.zone
Normal file
|
@ -0,0 +1,30 @@
|
|||
; sealight.xyz Dumped Sat Dec 10 03:57:51 2022
|
||||
;
|
||||
sealight.xyz. 172800 IN SOA ns1.he.net. hostmaster.he.net. (
|
||||
2022121008 ;serial
|
||||
86400 ;refresh
|
||||
7200 ;retry
|
||||
3600000 ;expire
|
||||
172800 ) ;minimum
|
||||
autoconfig.sealight.xyz. 86400 IN CNAME autoconfig.nullhex.com.
|
||||
bridge.sealight.xyz. 300 IN A 69.61.38.225
|
||||
chat.sealight.xyz. 300 IN A 45.77.48.108
|
||||
element.sealight.xyz. 300 IN A 45.77.48.108
|
||||
git.sealight.xyz. 300 IN A 69.61.38.225
|
||||
jitsi.sealight.xyz. 300 IN A 69.61.38.225
|
||||
key1._domainkey.sealight.xyz. 86400 IN CNAME key1.nullhex.com.
|
||||
rss.sealight.xyz. 300 IN A 69.61.38.225
|
||||
sealight.xyz. 300 IN A 45.77.48.108
|
||||
sealight.xyz. 86400 IN MX 10 smtp-in-1.nullhex.com.
|
||||
sealight.xyz. 86400 IN MX 20 smtp-in-2.nullhex.com.
|
||||
sealight.xyz. 172800 IN NS ns1.he.net.
|
||||
sealight.xyz. 172800 IN NS ns2.he.net.
|
||||
sealight.xyz. 172800 IN NS ns3.he.net.
|
||||
sealight.xyz. 172800 IN NS ns4.he.net.
|
||||
sealight.xyz. 172800 IN NS ns5.he.net.
|
||||
sealight.xyz. 86400 IN TXT "v=spf1 a mx ~all"
|
||||
turn.sealight.xyz. 300 IN A 69.61.38.225
|
||||
_autodiscover._tcp.sealight.xyz. 86400 IN SRV 0 1 443 autodiscover.nullhex.com.
|
||||
_dmarc.sealight.xyz. 86400 IN TXT "v=DMARC1; p=quarantine;"
|
||||
_imaps._tcp.sealight.xyz. 86400 IN SRV 0 1 993 imap.nullhex.com.
|
||||
_submissions._tcp.sealight.xyz. 86400 IN SRV 0 1 465 smtp.nullhex.com.
|
625
flake.lock
Normal file
625
flake.lock
Normal file
|
@ -0,0 +1,625 @@
|
|||
{
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723293904,
|
||||
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"basant": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"poonam": [
|
||||
"poonam"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682226636,
|
||||
"narHash": "sha256-fmETHfUtQ5zOVr/4MT5wE7eNALCSQCnEUYZYmV3UEwg=",
|
||||
"ref": "main",
|
||||
"rev": "095d14ff2469c8f3de7cbf45d229c0f46a733aae",
|
||||
"revCount": 77,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.sealight.xyz/aynish/basant"
|
||||
},
|
||||
"original": {
|
||||
"ref": "main",
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.sealight.xyz/aynish/basant"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1700795494,
|
||||
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"deploy-rs": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718194053,
|
||||
"narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
|
||||
"owner": "serokell",
|
||||
"repo": "deploy-rs",
|
||||
"rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "serokell",
|
||||
"repo": "deploy-rs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"locked": {
|
||||
"lastModified": 1642188268,
|
||||
"narHash": "sha256-DNz4xScpXIn7rSDohdayBpPR9H9OWCMDOgTYegX081k=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "696acc29668b644df1740b69e1601119bf6da83b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"dirt-samples-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1698439458,
|
||||
"narHash": "sha256-Mp8qBpsOvW9Zguv95Kv7EU6S3ICaF2aO02Wz6xGURtE=",
|
||||
"owner": "tidalcycles",
|
||||
"repo": "dirt-samples",
|
||||
"rev": "9a6dff8f9ec3cd55b287290cf04e01afa6b8f532",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tidalcycles",
|
||||
"repo": "dirt-samples",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"disko": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724031427,
|
||||
"narHash": "sha256-o1HdAf+7IGv9M13R3c+zc/sJ0QgeEnhsvHBcodI4UpM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "4e719b38fa7c85f4f65d0308ca7084c91e7bdd6d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641205782,
|
||||
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1667395993,
|
||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"grasp": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682644301,
|
||||
"narHash": "sha256-gMBFZLf41s3+cnhxgZVRvj2JSAFYv4jn2xBKwEESthE=",
|
||||
"ref": "main",
|
||||
"rev": "a2d85675b930ffc26f6891b2e14491795907be4e",
|
||||
"revCount": 137,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.sealight.xyz/aynish/grasp.git"
|
||||
},
|
||||
"original": {
|
||||
"ref": "main",
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.sealight.xyz/aynish/grasp.git"
|
||||
}
|
||||
},
|
||||
"hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1723310128,
|
||||
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1703113217,
|
||||
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720042825,
|
||||
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-matrix-appservices": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixlib": "nixlib",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1683490239,
|
||||
"narHash": "sha256-QKzpvl2XrqbobWq/I/smDa9hEniwctjJybXPVILHP0w=",
|
||||
"owner": "coffeetables",
|
||||
"repo": "nix-matrix-appservices",
|
||||
"rev": "e795d2fbc61da45d49802bb3e8f8d0c70ddc1e68",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "coffeetables",
|
||||
"repo": "nix-matrix-appservices",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"nixlib": {
|
||||
"locked": {
|
||||
"lastModified": 1643502816,
|
||||
"narHash": "sha256-Wrbt6Gs+hjXD3HUICPBJHKnHEUqiyx8rzHCgvqC1Bok=",
|
||||
"owner": "divnix",
|
||||
"repo": "nixpkgs.lib",
|
||||
"rev": "ebed7ec5bcb5d01e298535989c6c321df18b631a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "divnix",
|
||||
"repo": "nixpkgs.lib",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1723310128,
|
||||
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "master",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1662099760,
|
||||
"narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "67e45078141102f45eff1589a831aeaa3182b41e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1723938990,
|
||||
"narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1724040334,
|
||||
"narHash": "sha256-Ia4gRRmhFn4oJ4SJKJPDNPomsRRFWU+bqCK7yuiLW4E=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "24471a48600e18669d13d24c9640b9859357d2cf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"poonam": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1730098805,
|
||||
"narHash": "sha256-LvLTqCX3BZ92srebbpMFMCOOBXJ1GZn/rbayiEcXScE=",
|
||||
"ref": "main",
|
||||
"rev": "ec87c69f50283d106d16338963baaa614580ce4a",
|
||||
"revCount": 1512,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
|
||||
},
|
||||
"original": {
|
||||
"ref": "main",
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"basant": "basant",
|
||||
"deploy-rs": "deploy-rs",
|
||||
"disko": "disko",
|
||||
"grasp": "grasp",
|
||||
"hardware": "hardware",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-matrix-appservices": "nix-matrix-appservices",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nur": "nur",
|
||||
"poonam": "poonam",
|
||||
"rust-overlay": "rust-overlay",
|
||||
"tidalcycles": "tidalcycles",
|
||||
"unstable": "unstable",
|
||||
"vimwikicli": "vimwikicli"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724034091,
|
||||
"narHash": "sha256-b1g7w0sw+MDAhUAeCoX1vlTghsqcDZkxr+k9OZmxPa8=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "c7d36e0947826e0751a5214ffe82533fbc909bc0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"superdirt-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1697377840,
|
||||
"narHash": "sha256-9qU9CHYAXbN1IE3xXDqGipuroifVaSVXj3c/cDfwM80=",
|
||||
"owner": "musikinformatik",
|
||||
"repo": "superdirt",
|
||||
"rev": "c7f32998572984705d340e7c1b9ed9ad998a39b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "musikinformatik",
|
||||
"repo": "superdirt",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tidal-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1712519522,
|
||||
"narHash": "sha256-LbvxQmVxHElidCgvt+w0g1k+QQbNLebK46vtRCgsLeQ=",
|
||||
"owner": "tidalcycles",
|
||||
"repo": "tidal",
|
||||
"rev": "88f09edf6bef2228d5f530dea872b08a9d803066",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tidalcycles",
|
||||
"ref": "v1.9.5",
|
||||
"repo": "tidal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tidalcycles": {
|
||||
"inputs": {
|
||||
"dirt-samples-src": "dirt-samples-src",
|
||||
"nixpkgs": [
|
||||
"unstable"
|
||||
],
|
||||
"superdirt-src": "superdirt-src",
|
||||
"tidal-src": "tidal-src",
|
||||
"vim-tidal-src": "vim-tidal-src",
|
||||
"vowel-src": "vowel-src"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723223284,
|
||||
"narHash": "sha256-NAT+g5nsaJZkpR0sCZjerd1xx233ZUdRH3ZWwZhzq/c=",
|
||||
"owner": "mitchmindtree",
|
||||
"repo": "tidalcycles.nix",
|
||||
"rev": "82f3e8e8d02eb9f0c9dfe9ab3773b825c6bc1982",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mitchmindtree",
|
||||
"repo": "tidalcycles.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1723637854,
|
||||
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vim-tidal-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1685703852,
|
||||
"narHash": "sha256-8gyk17YLeKpLpz3LRtxiwbpsIbZka9bb63nK5/9IUoA=",
|
||||
"owner": "tidalcycles",
|
||||
"repo": "vim-tidal",
|
||||
"rev": "e440fe5bdfe07f805e21e6872099685d38e8b761",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "tidalcycles",
|
||||
"repo": "vim-tidal",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vimwikicli": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1662448409,
|
||||
"narHash": "sha256-Xd8CuFcEpEQK/TjNBXcp1HqPJCc7LwkMqKa1WiAP1Zc=",
|
||||
"ref": "main",
|
||||
"rev": "a73c4695cf116c2e8194a5caa837c2f9e1a7e2fb",
|
||||
"revCount": 7,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli"
|
||||
},
|
||||
"original": {
|
||||
"ref": "main",
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli"
|
||||
}
|
||||
},
|
||||
"vowel-src": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1641306144,
|
||||
"narHash": "sha256-zfF6cvAGDNYWYsE8dOIo38b+dIymd17Pexg0HiPFbxM=",
|
||||
"owner": "supercollider-quarks",
|
||||
"repo": "vowel",
|
||||
"rev": "ab59caa870201ecf2604b3efdd2196e21a8b5446",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "supercollider-quarks",
|
||||
"repo": "vowel",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
275
flake.nix
Normal file
275
flake.nix
Normal file
|
@ -0,0 +1,275 @@
|
|||
{
|
||||
description = "Sealight NixOS Config";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
|
||||
# ngipkgs.url = "github:Chickensoupwithrice/ngipkgs?ref=aynish/atomic-server-module";
|
||||
# ngipkgs-local.url = "path:/home/anish/usr/ngipkgs";
|
||||
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
# Tools
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
deploy-rs.url = "github:serokell/deploy-rs";
|
||||
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# My Packages
|
||||
poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main";
|
||||
poonam.inputs.nixpkgs.follows = "nixpkgs";
|
||||
basant.url = "git+ssh://gitea@git.sealight.xyz/aynish/basant?ref=main";
|
||||
vimwikicli.url =
|
||||
"git+ssh://gitea@git.sealight.xyz/aynish/vimwiki-cli?ref=main";
|
||||
basant.inputs.nixpkgs.follows = "nixpkgs";
|
||||
basant.inputs.poonam.follows = "poonam";
|
||||
vimwikicli.inputs.nixpkgs.follows = "nixpkgs";
|
||||
grasp.url = "git+ssh://gitea@git.sealight.xyz/aynish/grasp.git?ref=main";
|
||||
grasp.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Matrix
|
||||
nix-matrix-appservices.url = "gitlab:coffeetables/nix-matrix-appservices";
|
||||
|
||||
# Others
|
||||
nur.url = "github:nix-community/NUR";
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
tidalcycles.url = "github:mitchmindtree/tidalcycles.nix";
|
||||
tidalcycles.inputs.nixpkgs.follows = "unstable";
|
||||
# TODO hundred rabbits software
|
||||
# TODO needs secrets
|
||||
# dhyan.url = "git+ssh://gitea@git.sealight.xyz/aynish/dhyan?ref=main";
|
||||
# dhyan.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# TODO needs secrets
|
||||
# muneem.url = "git+ssh://gitea@git.sealight.xyz/aynish/muneem?ref=main";
|
||||
# muneem.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, unstable, nixos-hardware, home-manager, deploy-rs
|
||||
, agenix, disko, basant, grasp, nix-matrix-appservices, nur, tidalcycles
|
||||
, rust-overlay, vimwikicli, ... }@inputs:
|
||||
let
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
unstableOverlay = final: prev: {
|
||||
# We already have these in scope
|
||||
unstable = unstable.legacyPackages.${prev.system};
|
||||
deploy = deploy-rs.packages.${prev.system}.deploy-rs;
|
||||
};
|
||||
vimwikiOverlay = final: prev: {
|
||||
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
|
||||
};
|
||||
|
||||
nixpkgsFor = forAllSystems (system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
||||
"ripcord"
|
||||
"vcv-rack"
|
||||
"SunVox"
|
||||
"renoise"
|
||||
];
|
||||
# config.permittedInsecurePackages = [
|
||||
# "python3.10-django-3.1.14" # Needed for archivebox deployments on curve
|
||||
# # Check when archive box updates it's dependeny
|
||||
# ];
|
||||
overlays = [
|
||||
rust-overlay.overlays.default
|
||||
tidalcycles.overlays.default
|
||||
agenix.overlays.default
|
||||
nur.overlay
|
||||
nix-matrix-appservices.overlay
|
||||
unstableOverlay
|
||||
vimwikiOverlay
|
||||
self.overlays.additions
|
||||
self.overlays.modifications
|
||||
];
|
||||
});
|
||||
|
||||
# for when space matters
|
||||
litePkgsFor = forAllSystems (system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
# config.permittedInsecurePackages = [
|
||||
# "forgejo-1.19.4-0" # Needed for archivebox deployments on curve
|
||||
# # Check when archive box updates it's dependeny
|
||||
# ];
|
||||
overlays = [
|
||||
agenix.overlays.default
|
||||
self.overlays.additions
|
||||
self.overlays.modifications
|
||||
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
|
||||
];
|
||||
});
|
||||
in {
|
||||
# Your custom packages
|
||||
# Acessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system:
|
||||
let pkgs = nixpkgsFor.${system};
|
||||
in import ./pkgs { pkgs = pkgs; });
|
||||
# Devshell for bootstrapping
|
||||
# Acessible through 'nix develop' or 'nix-shell' (legacy)
|
||||
devShells = forAllSystems (system:
|
||||
let pkgs = nixpkgsFor.${system};
|
||||
in import ./shell.nix { pkgs = pkgs; });
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays;
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
nixosModules = import ./modules/nixos;
|
||||
# Reusable home-manager modules you might want to export
|
||||
# These are usually stuff you would upstream into home-manager
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
nixosConfigurations = {
|
||||
curve = nixpkgs.lib.nixosSystem rec {
|
||||
specialArgs = { inherit inputs self; };
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgsFor.${system};
|
||||
modules = [
|
||||
./hosts/curve
|
||||
agenix.nixosModules.age
|
||||
self.nixosModules.backup
|
||||
self.nixosModules.wireguard
|
||||
self.nixosModules.wallabag
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-x270
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
nix.registry.unstable.flake = unstable;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.anish = import ./home/gui;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
helix = nixpkgs.lib.nixosSystem rec {
|
||||
specialArgs = { inherit inputs self; };
|
||||
system = "x86_64-linux";
|
||||
pkgs = litePkgsFor.${system};
|
||||
modules = [
|
||||
./hosts/helix
|
||||
agenix.nixosModules.age
|
||||
self.nixosModules.backup
|
||||
self.nixosModules.wireguard
|
||||
basant.nixosModule
|
||||
# self.nixosModules.microbin
|
||||
disko.nixosModules.disko
|
||||
{
|
||||
nixpkgs.flake.setNixPath = false;
|
||||
nixpkgs.flake.setFlakeRegistry = false;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
lituus = nixpkgs.lib.nixosSystem rec {
|
||||
specialArgs = { inherit inputs self; };
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgsFor.${system};
|
||||
modules = [
|
||||
./hosts/lituus
|
||||
agenix.nixosModules.age
|
||||
self.nixosModules.backup
|
||||
self.nixosModules.hesienbridge
|
||||
nix-matrix-appservices.nixosModule
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.anish = import ./home/core;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
box = nixpkgs.lib.nixosSystem rec {
|
||||
specialArgs = { inherit inputs self; };
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgsFor.${system};
|
||||
modules = [
|
||||
./hosts/box
|
||||
agenix.nixosModules.age
|
||||
self.nixosModules.backup
|
||||
self.nixosModules.wireguard
|
||||
self.nixosModules.gonic
|
||||
self.nixosModules.gpodder2go
|
||||
self.nixosModules.wallabag
|
||||
self.nixosModules.ulogger-server
|
||||
grasp.nixosModule
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.anish = import ./home/dev;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||
homeConfigurations = {
|
||||
"anish@work" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs =
|
||||
nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [ ./home/core.nix ./home/profiles/firefox ];
|
||||
};
|
||||
};
|
||||
|
||||
deploy.nodes = {
|
||||
box = {
|
||||
hostname = "mossnet.lan";
|
||||
autoRollback = false;
|
||||
magicRollback = false;
|
||||
remoteBuild = true;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
||||
self.nixosConfigurations.box;
|
||||
};
|
||||
};
|
||||
lituus = {
|
||||
hostname = "sealight.xyz";
|
||||
# autoRollback = false;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
||||
self.nixosConfigurations.lituus;
|
||||
};
|
||||
};
|
||||
helix = {
|
||||
hostname = "git.sealight.xyz";
|
||||
autoRollback = false;
|
||||
magicRollback = false;
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
||||
self.nixosConfigurations.helix;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
checks = builtins.mapAttrs
|
||||
(system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||
};
|
||||
}
|
9
home/core/default.nix
Normal file
9
home/core/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ self, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../profiles/cli
|
||||
../profiles/direnv
|
||||
../profiles/git
|
||||
];
|
||||
home.stateVersion = "22.05";
|
||||
}
|
5
home/dev/default.nix
Normal file
5
home/dev/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ self, pkgs, ... }: {
|
||||
imports =
|
||||
[ ../profiles/cli ../profiles/nvim ../profiles/direnv ../profiles/git ];
|
||||
home.stateVersion = "22.05";
|
||||
}
|
14
home/gui/default.nix
Normal file
14
home/gui/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../core
|
||||
../profiles/nvim
|
||||
../profiles/firefox
|
||||
../profiles/desktop
|
||||
../profiles/email
|
||||
../profiles/cal
|
||||
../profiles/sync/kitaab
|
||||
../profiles/ssh
|
||||
../profiles/task
|
||||
];
|
||||
}
|
62
home/home.nix
Normal file
62
home/home.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./nvim.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# If you want to use overlays your own flake exports (from overlays dir):
|
||||
# outputs.overlays.modifications
|
||||
# outputs.overlays.additions
|
||||
|
||||
# Or overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: Set your username
|
||||
home = {
|
||||
username = "anish";
|
||||
homeDirectory = "/home/anish/";
|
||||
};
|
||||
|
||||
# Add stuff for your user as you see fit:
|
||||
# programs.neovim.enable = true;
|
||||
# home.packages = with pkgs; [ steam ];
|
||||
|
||||
# Enable home-manager and git
|
||||
programs.home-manager.enable = true;
|
||||
# programs.git.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
# systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "22.05";
|
||||
}
|
98
home/profiles/cal/default.nix
Normal file
98
home/profiles/cal/default.nix
Normal file
|
@ -0,0 +1,98 @@
|
|||
{ pkgs, config, age, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
khal
|
||||
khard
|
||||
vdirsyncer
|
||||
];
|
||||
|
||||
xdg.configFile = {
|
||||
"vdirsyncer/config".text = ''
|
||||
[general]
|
||||
status_path = "/home/anish/.config/vdirsyncer/status/"
|
||||
|
||||
[pair contacts]
|
||||
a = "contacts_local"
|
||||
b = "contacts_remote"
|
||||
collections = ["from b"]
|
||||
metadata = ["displayname"]
|
||||
|
||||
[storage contacts_local]
|
||||
type = "filesystem"
|
||||
path = "~/.contacts/"
|
||||
fileext = ".vcf"
|
||||
|
||||
[storage contacts_remote]
|
||||
type = "carddav"
|
||||
url = "http://mossnet.lan:5252/anish"
|
||||
username = "anish"
|
||||
password.fetch = ["command", "echo", "acceptsanypassword"]
|
||||
|
||||
[pair calendar]
|
||||
a = "calendar_local"
|
||||
b = "calendar_remote"
|
||||
collections = ["from b"]
|
||||
metadata = ["displayname"]
|
||||
|
||||
[storage calendar_local]
|
||||
type = "filesystem"
|
||||
path = "~/.calendar/"
|
||||
fileext = ".ics"
|
||||
|
||||
[storage calendar_remote]
|
||||
type = "caldav"
|
||||
url = "http://mossnet.lan:5252/anish"
|
||||
username = "anish"
|
||||
password.fetch = ["command", "echo", "allpasswordsaccepted"]
|
||||
'';
|
||||
|
||||
"khal/config".text = ''
|
||||
[calendars]
|
||||
|
||||
[[calendar_local]]
|
||||
path = ~/.calendar/*
|
||||
type = discover
|
||||
|
||||
[[contacts_local]]
|
||||
path = ~/.contacts/*
|
||||
type = birthdays
|
||||
|
||||
[locale]
|
||||
timeformat = %H:%M
|
||||
dateformat = %Y-%m-%d
|
||||
longdateformat = %Y-%m-%d
|
||||
datetimeformat = %Y-%m-%d %H:%M
|
||||
longdatetimeformat = %Y-%m-%d %H:%M
|
||||
'';
|
||||
|
||||
"khard/khard.conf".text = ''
|
||||
[addressbooks]
|
||||
[[personal]]
|
||||
path = ~/.contacts/*
|
||||
|
||||
[general]
|
||||
debug = no
|
||||
default_action = list
|
||||
editor = nvim, -i, NONE
|
||||
merge_editor = nvim, -d
|
||||
|
||||
[contact table]
|
||||
display = first_name
|
||||
group_by_addressbook = no
|
||||
reverse = no
|
||||
show_nicknames = yes
|
||||
show_uids = no
|
||||
sort = last_name
|
||||
localize_dates = yes
|
||||
preferred_phone_number_type = pref, cell, home
|
||||
preferred_email_address_type = pref, home, work
|
||||
|
||||
[vcard]
|
||||
private_objects = Jabber,
|
||||
preferred_version = 3.0
|
||||
search_in_source_files = no
|
||||
skip_unparsable = no
|
||||
'';
|
||||
};
|
||||
}
|
5
home/profiles/cli/bin/clear-vim-trash.sh
Executable file
5
home/profiles/cli/bin/clear-vim-trash.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
working_directory=$(pwd)
|
||||
vim_directory="${working_directory//\//%}.vim"
|
||||
trash "$HOME/.local/share/nvim/sessions/${vim_directory}"
|
19
home/profiles/cli/dasht-queries.txt
Normal file
19
home/profiles/cli/dasht-queries.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
`dasht-docsets-intstall`
|
||||
|
||||
Bash
|
||||
Clojure
|
||||
Docker
|
||||
Elixir
|
||||
HTML
|
||||
JavaScript
|
||||
Jinja
|
||||
Lua_5.4
|
||||
Nginx
|
||||
OpenGL_4
|
||||
PostgreSQL
|
||||
Processing
|
||||
Python_3
|
||||
React
|
||||
Rust
|
||||
TypeScript
|
||||
Vim
|
315
home/profiles/cli/default.nix
Normal file
315
home/profiles/cli/default.nix
Normal file
|
@ -0,0 +1,315 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
binutils
|
||||
coreutils
|
||||
dnsutils
|
||||
dasht
|
||||
dosfstools
|
||||
#git
|
||||
git-machete
|
||||
bottom
|
||||
gptfdisk
|
||||
starship
|
||||
iputils
|
||||
jq
|
||||
manix
|
||||
moreutils
|
||||
nix-index
|
||||
cached-nix-shell
|
||||
nmap
|
||||
ripgrep
|
||||
skim
|
||||
tealdeer
|
||||
usbutils
|
||||
utillinux
|
||||
whois
|
||||
iftop
|
||||
wget
|
||||
curl
|
||||
eza
|
||||
bat
|
||||
fd
|
||||
ncdu
|
||||
du-dust
|
||||
# dia-cli
|
||||
duf
|
||||
trash-cli
|
||||
nix-index
|
||||
silver-searcher
|
||||
tcpdump
|
||||
mtr
|
||||
file
|
||||
lsof
|
||||
atool
|
||||
strace
|
||||
zip
|
||||
unzip
|
||||
rsync
|
||||
tmux
|
||||
pwgen
|
||||
glow
|
||||
pass
|
||||
less
|
||||
gdb
|
||||
xxd
|
||||
taskwarrior
|
||||
gnupg
|
||||
syncthing
|
||||
dijo
|
||||
#ssb-patchwork
|
||||
fontconfig
|
||||
pandoc
|
||||
taskwarrior-tui
|
||||
python3Packages.howdoi
|
||||
vimwiki-cli
|
||||
|
||||
(pkgs.writeScriptBin "jq-repl" ''
|
||||
#!/usr/bin/env bash
|
||||
if [[ -z $1 ]] || [[ $1 == "-" ]]; then
|
||||
input=$(mktemp)
|
||||
trap "rm -f $input" EXIT
|
||||
cat /dev/stdin > $input
|
||||
else
|
||||
input=$1
|
||||
fi
|
||||
|
||||
echo "" \ | fzf --phony --preview-window="up:90%" --print-query --preview "jq --color-output -r {q} $input"
|
||||
'')
|
||||
(pkgs.writeScriptBin "clear-vim-trash" (builtins.readFile ./bin/clear-vim-trash.sh))
|
||||
(pkgs.writeScriptBin "flakify" ''
|
||||
#!/usr/bin/env zsh
|
||||
if [ ! -e flake.nix ]; then
|
||||
nix flake new -t github:nix-community/nix-direnv .
|
||||
elif [ ! -e .envrc ]; then
|
||||
echo "use flake" > .envrc
|
||||
direnv allow
|
||||
fi
|
||||
vim flake.nix
|
||||
'')
|
||||
(pkgs.writeScriptBin "mx" ''
|
||||
#!/usr/bin/env bash
|
||||
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
|
||||
'')
|
||||
(pkgs.writeScriptBin "monitor" ''
|
||||
# hotplug
|
||||
connect() {
|
||||
# Turn it on if it was off
|
||||
xrandr --output HDMI-2 --auto
|
||||
xrandr --output HDMI-2 --same-as eDP-1
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
xrandr --output HDMI-2 --off
|
||||
}
|
||||
|
||||
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
|
||||
'')
|
||||
(pkgs.writeScriptBin "disconnect-keyboard" ''
|
||||
# keyboard on curve is busted
|
||||
get_keyboard_id() {
|
||||
xinput list | grep 'AT Translated Set' | cut -f2 | cut -d'=' -f2 | xinput float
|
||||
}
|
||||
|
||||
disconnect_keyboard() {
|
||||
id=$(get_keyboard_id)
|
||||
xinput float $id
|
||||
unset id
|
||||
}
|
||||
|
||||
attach_keyboard() {
|
||||
id=$(get_keyboard_id)
|
||||
xinput reattach $id 3
|
||||
unset id
|
||||
}
|
||||
|
||||
disconnect_keyboard
|
||||
'')
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = false;
|
||||
|
||||
initExtra = ''
|
||||
bindkey -v
|
||||
autopair-init
|
||||
'';
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo"; # Needed to run home-manager switch on non-nixOS
|
||||
};
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "hlissner";
|
||||
repo = "zsh-autopair";
|
||||
rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49";
|
||||
sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1";
|
||||
};
|
||||
file = "autopair.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.6.0";
|
||||
sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4";
|
||||
};
|
||||
file = "zsh-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autoquoter";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ianthehenry";
|
||||
repo = "zsh-autoquoter";
|
||||
rev = "819a615fbfd2ad25c5d311080e3a325696b45de7";
|
||||
sha256 = "r0jdo+YFTOejvNMTqzXi5ftcLzDpuKejX0wMFwqKdJY=";
|
||||
};
|
||||
file = "zsh-autoquoter.zsh";
|
||||
}
|
||||
# {
|
||||
# name = "zsh-nix-shell";
|
||||
# file = "nix-shell.plugin.zsh";
|
||||
# src = pkgs.fetchFromGitHub {
|
||||
# owner = "chisui";
|
||||
# repo = "zsh-nix-shell";
|
||||
# rev = "v0.5.0";
|
||||
# sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
|
||||
# };
|
||||
# }
|
||||
];
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
services.kdeconnect.enable = true;
|
||||
|
||||
home.shellAliases = {
|
||||
# quick cd
|
||||
".." = "cd ..";
|
||||
"..." = "cd ../..";
|
||||
"...." = "cd ../../..";
|
||||
"....." = "cd ../../../..";
|
||||
|
||||
icat = "kitty +kitten icat";
|
||||
yt = "ytfzf -T kitty -t ";
|
||||
gen-secret = "< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c\${1:-32};echo;";
|
||||
|
||||
# modern cli tools
|
||||
ls = "eza --icons";
|
||||
l = "esa -l --icons";
|
||||
la = "eza -la --icons";
|
||||
tree = "ls --tree --icons";
|
||||
cat = "bat";
|
||||
unzip = "aunpack";
|
||||
copy = "xclip -selection clipboard";
|
||||
paste = "xclip -selection clipboard -o";
|
||||
rm = "echo USE TRASH, FOOL: trash ";
|
||||
trash = "trash-put";
|
||||
make-secret = "< /dev/urandom \\tr -dc _A-Za-z0-9 | head -c \${1:-32};echo;";
|
||||
|
||||
# task warrior
|
||||
t = "task -BLOCKED -idea -backlog";
|
||||
tw = "t rc.context:work";
|
||||
# TODO find a reasonable way to manage this from a non-nix managed file in ~/.task/context or something
|
||||
# we can do something like task rc.context:$(cat ~/.task/context) to read context
|
||||
# and write a little script make-context = cat $@ > ~/.task/context or something
|
||||
tt = "taskwarrior-tui -r list";
|
||||
ti = "task +idea";
|
||||
tb = "task +backlog list";
|
||||
ttb = "taskwarrior-tui -r backlog";
|
||||
tr = "task newest limit:page";
|
||||
twait = "task +wait";
|
||||
ta = "task add";
|
||||
tai = "task add +idea";
|
||||
tn = "task-note";
|
||||
ts = "task sync";
|
||||
# taskwarrior task lists
|
||||
twt = "task tags +PENDING | tail -n +4 | cut -d ' ' -f1 | fzf --preview 'task +{}'";
|
||||
# task warrior projects list
|
||||
tp = "task projects +PENDING | tail -n +4 | head -n -2 | cut -d ' ' -f1 | fzf --preview 'task pro:{}'";
|
||||
|
||||
# keeping for posterity but now sxhkbd handles screenshot with <Super+O>
|
||||
# scrot = "flameshot screen -c -p ~/screenshots/";
|
||||
# scrotgui = "flameshot gui -p ~/screenshots/";
|
||||
|
||||
# git
|
||||
g = "git";
|
||||
|
||||
# grep
|
||||
grep = "rg";
|
||||
gi = "grep -i";
|
||||
|
||||
# internet ip
|
||||
myip = "dig +short myip.opendns.com @208.67.222.222 2>&1";
|
||||
|
||||
# nix
|
||||
n = "nix";
|
||||
np = "n profile";
|
||||
ni = "np install";
|
||||
nr = "np remove";
|
||||
ns = "n search --no-update-lock-file";
|
||||
nf = "n flake";
|
||||
nfl = "nf lock";
|
||||
nepl = "n repl '<nixpkgs>'";
|
||||
srch = "ns nixpkgs";
|
||||
orch = "ns override";
|
||||
nrb = "cd /tmp; sudo nixos-rebuild switch --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
||||
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
||||
ned = "cd /home/anish/usr/helm; vim; cd $OLDPWD";
|
||||
ncd = "cd /home/anish/usr/helm";
|
||||
mn = ''
|
||||
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
|
||||
'';
|
||||
|
||||
# sudo
|
||||
s = "sudo -E ";
|
||||
pls = "s";
|
||||
si = "sudo -i";
|
||||
se = "sudoedit";
|
||||
|
||||
# top
|
||||
top = "btm";
|
||||
|
||||
# systemd
|
||||
ctl = "systemctl";
|
||||
stl = "s systemctl";
|
||||
utl = "systemctl --user";
|
||||
ut = "systemctl --user start";
|
||||
un = "systemctl --user stop";
|
||||
up = "s systemctl start";
|
||||
dn = "s systemctl stop";
|
||||
jtl = "journalctl";
|
||||
|
||||
# quick ssh
|
||||
kssh = "kitty +kitten ssh";
|
||||
smm = "ssh 10.0.69.4"; # box over wireguard
|
||||
sm = "ssh mossnet.lan"; # box regular
|
||||
sl = "ssh sealight.xyz"; # lituus
|
||||
sh = "ssh git.sealight.xyz"; # helix
|
||||
sb = "ssh cyberian@69.61.38.246"; # bonfire for allwell
|
||||
};
|
||||
}
|
92
home/profiles/cli/starship.toml
Normal file
92
home/profiles/cli/starship.toml
Normal file
|
@ -0,0 +1,92 @@
|
|||
[aws]
|
||||
symbol = " "
|
||||
|
||||
[character]
|
||||
success_symbol = "[❯](bold purple)"
|
||||
vicmd_symbol = "[❮](bold purple)"
|
||||
|
||||
[battery]
|
||||
full_symbol = " "
|
||||
charging_symbol = " "
|
||||
discharging_symbol = " "
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
style = "cyan"
|
||||
read_only = " 🔒"
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
|
||||
[elixir]
|
||||
symbol = " "
|
||||
|
||||
[elm]
|
||||
symbol = " "
|
||||
|
||||
[git_branch]
|
||||
format = "[$symbol$branch]($style) "
|
||||
symbol = " "
|
||||
style = "bold dimmed white"
|
||||
|
||||
[git_status]
|
||||
format = '([「$all_status$ahead_behind」]($style) )'
|
||||
conflicted = "⚠️"
|
||||
ahead = "⟫${count} "
|
||||
behind = "⟪${count}"
|
||||
diverged = "🔀 "
|
||||
untracked = "📁 "
|
||||
stashed = "↪ "
|
||||
modified = "𝚫 "
|
||||
staged = "✔ "
|
||||
renamed = "⇆ "
|
||||
deleted = "✘ "
|
||||
style = "bold bright-white"
|
||||
|
||||
[golang]
|
||||
symbol = " "
|
||||
|
||||
[hg_branch]
|
||||
symbol = " "
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
|
||||
[julia]
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
disabled = false
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
format = '[$symbol$state]($style) '
|
||||
symbol = " "
|
||||
pure_msg = "λ"
|
||||
impure_msg = "⎔"
|
||||
|
||||
[nodejs]
|
||||
symbol = " "
|
||||
|
||||
[package]
|
||||
symbol = " "
|
||||
|
||||
[php]
|
||||
symbol = " "
|
||||
|
||||
[python]
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
||||
[rust]
|
||||
symbol = " "
|
||||
|
||||
[status]
|
||||
disabled = false
|
80
home/profiles/desktop/Xresources
Executable file
80
home/profiles/desktop/Xresources
Executable file
|
@ -0,0 +1,80 @@
|
|||
!! Colors
|
||||
#define blk #1F2430
|
||||
#define bblk #F28779
|
||||
#define red #A6CC70
|
||||
#define bred #FFCC66
|
||||
#define grn #5CCFE6
|
||||
#define bgrn #F29E74
|
||||
#define ylw #77A8D9
|
||||
#define bylw #5C6773
|
||||
#define blu #707A8C
|
||||
#define bblu #F27983
|
||||
#define mag #BAE67E
|
||||
#define bmag #FFD580
|
||||
#define cyn #73D0FF
|
||||
#define bcyn #FFA759
|
||||
#define wht #95E6CB
|
||||
#define bwht #CBCCC6
|
||||
#define bg blk
|
||||
#define fg wht
|
||||
|
||||
*.foreground: fg
|
||||
*.background: bg
|
||||
*.cursorColor: mag
|
||||
|
||||
*.color0: blk
|
||||
*.color8: bblk
|
||||
*.color1: red
|
||||
*.color9: bred
|
||||
*.color2: grn
|
||||
*.color10: bgrn
|
||||
*.color3: ylw
|
||||
*.color11: bylw
|
||||
*.color4: blu
|
||||
*.color12: bblu
|
||||
*.color5: mag
|
||||
*.color13: bmag
|
||||
*.color6: cyn
|
||||
*.color14: bcyn
|
||||
*.color7: wht
|
||||
*.color15: bwht
|
||||
|
||||
! greys
|
||||
*.color234: #1E2029
|
||||
*.color235: #282a36
|
||||
*.color236: #373844
|
||||
*.color237: #44475a
|
||||
*.color239: #565761
|
||||
*.color240: #6272a4
|
||||
*.color241: #b6b6b2
|
||||
|
||||
|
||||
!! general
|
||||
st.scratch.font: JetBrainsMono:pixelsize=16
|
||||
|
||||
|
||||
!! xst
|
||||
st.font: JetBrainsMono:pixelsize=12
|
||||
st.borderpx: 10
|
||||
|
||||
|
||||
!! urxvt
|
||||
URxvt*depth: 32
|
||||
URxvt*.background: blk
|
||||
URxvt*.borderless: 1
|
||||
URxvt*.buffered: true
|
||||
URxvt*.cursorBlink: true
|
||||
URxvt*.font: xft:Fira Code:pixelsize=12
|
||||
URxvt*.internalBorder: 10
|
||||
URxvt*.letterSpace: 0
|
||||
URxvt*.lineSpace: 0
|
||||
URxvt*.loginShell: false
|
||||
URxvt*.matcher.button: 1
|
||||
URxvt*.matcher.rend.0: Uline Bold fg5
|
||||
URxvt*.saveLines: 5000
|
||||
URxvt*.scrollBar: false
|
||||
URxvt*.underlineColor: grey
|
||||
URxvt.clipboard.autocopy: true
|
||||
URxvt.iso14755: false
|
||||
URxvt.iso14755_52: false
|
||||
URxvt.perl-ext-common: default,matcher
|
44
home/profiles/desktop/ayu-Xresources
Normal file
44
home/profiles/desktop/ayu-Xresources
Normal file
|
@ -0,0 +1,44 @@
|
|||
!
|
||||
! Generated with :
|
||||
! XRDB2Xreources.py
|
||||
!
|
||||
*.foreground: #1F2430
|
||||
*.background: #0f1419
|
||||
*.cursorColor: #f29718
|
||||
!
|
||||
! Black
|
||||
*.color0: #000000
|
||||
*.color8: #323232
|
||||
!
|
||||
! Red
|
||||
*.color1: #ff3333
|
||||
*.color9: #ff6565
|
||||
!
|
||||
! Green
|
||||
*.color2: #b8cc52
|
||||
*.color10: #eafe84
|
||||
!
|
||||
! Yellow
|
||||
*.color3: #e7c547
|
||||
*.color11: #fff779
|
||||
!
|
||||
! Blue
|
||||
*.color4: #36a3d9
|
||||
*.color12: #68d5ff
|
||||
!
|
||||
! Magenta
|
||||
*.color5: #f07178
|
||||
*.color13: #ffa3aa
|
||||
!
|
||||
! Cyan
|
||||
*.color6: #95e6cb
|
||||
*.color14: #c7fffd
|
||||
!
|
||||
! White
|
||||
*.color7: #ffffff
|
||||
*.color15: #ffffff
|
||||
!
|
||||
! Bold, Italic, Underline
|
||||
*.colorBD: #e6e1cf
|
||||
!*.colorIT:
|
||||
!*.colorUL:
|
23
home/profiles/desktop/ayu-dark-kitty.conf
Normal file
23
home/profiles/desktop/ayu-dark-kitty.conf
Normal file
|
@ -0,0 +1,23 @@
|
|||
|
||||
background #0A0E14
|
||||
foreground #B3B1AD
|
||||
cursor #E6B450
|
||||
selection_background #273747
|
||||
color0 #000000
|
||||
color8 #4D5566
|
||||
color1 #FF3333
|
||||
color9 #D96C75
|
||||
color2 #C2D94C
|
||||
color10 #91B362
|
||||
color3 #FF8F40
|
||||
color11 #F29668
|
||||
color4 #59C2FF
|
||||
color12 #6994BF
|
||||
color5 #D4BFFF
|
||||
color13 #A37ACC
|
||||
color6 #95E6CB
|
||||
color14 #4CBF99
|
||||
color7 #ffffff
|
||||
color15 #F0F0F0
|
||||
selection_foreground #B3B1AD
|
||||
|
25
home/profiles/desktop/ayu-kitty.conf
Normal file
25
home/profiles/desktop/ayu-kitty.conf
Normal file
|
@ -0,0 +1,25 @@
|
|||
#: This is a port of ayu Mirage color scheme
|
||||
#: based on :
|
||||
#: https://github.com/ayu-theme/ayu-colors
|
||||
|
||||
background #1F2430
|
||||
foreground #CBCCC6
|
||||
cursor #FFCC66
|
||||
selection_background #33415E
|
||||
color0 #000000
|
||||
color8 #4D5566
|
||||
color1 #FF3333
|
||||
color9 #F27983
|
||||
color2 #BAE67E
|
||||
color10 #A6CC70
|
||||
color3 #FFA759
|
||||
color11 #F29E74
|
||||
color4 #73D0FF
|
||||
color12 #77A8D9
|
||||
color5 #D4BFFF
|
||||
color13 #A37ACC
|
||||
color6 #95E6CB
|
||||
color14 #4CBF99
|
||||
color7 #ffffff
|
||||
color15 #F0F0F0
|
||||
selection_foreground #CBCCC6
|
BIN
home/profiles/desktop/background.jpg
Normal file
BIN
home/profiles/desktop/background.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 MiB |
317
home/profiles/desktop/bin/bluetoothmenu
Executable file
317
home/profiles/desktop/bin/bluetoothmenu
Executable file
|
@ -0,0 +1,317 @@
|
|||
#!/usr/bin/env bash
|
||||
# __ _ _ _ _ _ _
|
||||
# _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__
|
||||
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
|
||||
# | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | |
|
||||
# |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
|
||||
#
|
||||
# Author: Nick Clyde (clydedroid)
|
||||
#
|
||||
# A script that generates a rofi menu that uses bluetoothctl to
|
||||
# connect to bluetooth devices and display status info.
|
||||
#
|
||||
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
|
||||
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
|
||||
#
|
||||
# Depends on:
|
||||
# Arch repositories: rofi, bluez-utils (contains bluetoothctl)
|
||||
|
||||
# Constants
|
||||
divider="---------"
|
||||
goback="Back"
|
||||
|
||||
# Checks if bluetooth controller is powered on
|
||||
power_on() {
|
||||
if bluetoothctl show | grep -q "Powered: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles power state
|
||||
toggle_power() {
|
||||
if power_on; then
|
||||
bluetoothctl power off
|
||||
show_menu
|
||||
else
|
||||
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
||||
rfkill unblock bluetooth && sleep 3
|
||||
fi
|
||||
bluetoothctl power on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is scanning for new devices
|
||||
scan_on() {
|
||||
if bluetoothctl show | grep -q "Discovering: yes"; then
|
||||
echo "Scan: on"
|
||||
return 0
|
||||
else
|
||||
echo "Scan: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles scanning state
|
||||
toggle_scan() {
|
||||
if scan_on; then
|
||||
kill $(pgrep -f "bluetoothctl scan on")
|
||||
bluetoothctl scan off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl scan on &
|
||||
echo "Scanning..."
|
||||
sleep 5
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is able to pair to devices
|
||||
pairable_on() {
|
||||
if bluetoothctl show | grep -q "Pairable: yes"; then
|
||||
echo "Pairable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Pairable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles pairable state
|
||||
toggle_pairable() {
|
||||
if pairable_on; then
|
||||
bluetoothctl pairable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl pairable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is discoverable by other devices
|
||||
discoverable_on() {
|
||||
if bluetoothctl show | grep -q "Discoverable: yes"; then
|
||||
echo "Discoverable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Discoverable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles discoverable state
|
||||
toggle_discoverable() {
|
||||
if discoverable_on; then
|
||||
bluetoothctl discoverable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl discoverable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is connected
|
||||
device_connected() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Connected: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_connection() {
|
||||
if device_connected $1; then
|
||||
bluetoothctl disconnect $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl connect $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is paired
|
||||
device_paired() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Paired: yes"; then
|
||||
echo "Paired: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Paired: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device paired state
|
||||
toggle_paired() {
|
||||
if device_paired $1; then
|
||||
bluetoothctl remove $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl pair $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is trusted
|
||||
device_trusted() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Trusted: yes"; then
|
||||
echo "Trusted: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Trusted: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_trust() {
|
||||
if device_trusted $1; then
|
||||
bluetoothctl untrust $1
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl trust $1
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints a short string with the current bluetooth status
|
||||
# Useful for status bars like polybar, etc.
|
||||
print_status() {
|
||||
if power_on; then
|
||||
printf ''
|
||||
|
||||
paired_devices_cmd="devices Paired"
|
||||
# Check if an outdated version of bluetoothctl is used to preserve backwards compatibility
|
||||
if (( $(echo "$(bluetoothctl version | cut -d ' ' -f 2) < 5.65" | bc -l) )); then
|
||||
paired_devices_cmd="paired-devices"
|
||||
fi
|
||||
|
||||
mapfile -t paired_devices < <(bluetoothctl $paired_devices_cmd | grep Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
|
||||
for device in "${paired_devices[@]}"; do
|
||||
if device_connected $device; then
|
||||
device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-)
|
||||
|
||||
if [ $counter -gt 0 ]; then
|
||||
printf ", %s" "$device_alias"
|
||||
else
|
||||
printf " %s" "$device_alias"
|
||||
fi
|
||||
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
# A submenu for a specific device that allows connecting, pairing, and trusting
|
||||
device_menu() {
|
||||
device=$1
|
||||
|
||||
# Get device name and mac address
|
||||
device_name=$(echo $device | cut -d ' ' -f 3-)
|
||||
mac=$(echo $device | cut -d ' ' -f 2)
|
||||
|
||||
# Build options
|
||||
if device_connected $mac; then
|
||||
connected="Connected: yes"
|
||||
else
|
||||
connected="Connected: no"
|
||||
fi
|
||||
paired=$(device_paired $mac)
|
||||
trusted=$(device_trusted $mac)
|
||||
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | $divider)
|
||||
echo "No option chosen."
|
||||
;;
|
||||
$connected)
|
||||
toggle_connection $mac
|
||||
;;
|
||||
$paired)
|
||||
toggle_paired $mac
|
||||
;;
|
||||
$trusted)
|
||||
toggle_trust $mac
|
||||
;;
|
||||
$goback)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Opens a rofi menu with current bluetooth status and options to connect
|
||||
show_menu() {
|
||||
# Get menu options
|
||||
if power_on; then
|
||||
power="Power: on"
|
||||
|
||||
# Human-readable names of devices, one per line
|
||||
# If scan is off, will only list paired devices
|
||||
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
|
||||
|
||||
# Get controller flags
|
||||
scan=$(scan_on)
|
||||
pairable=$(pairable_on)
|
||||
discoverable=$(discoverable_on)
|
||||
|
||||
# Options passed to rofi
|
||||
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||
else
|
||||
power="Power: off"
|
||||
options="$power\nExit"
|
||||
fi
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "Bluetooth")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"" | $divider)
|
||||
echo "No option chosen."
|
||||
;;
|
||||
$power)
|
||||
toggle_power
|
||||
;;
|
||||
$scan)
|
||||
toggle_scan
|
||||
;;
|
||||
$discoverable)
|
||||
toggle_discoverable
|
||||
;;
|
||||
$pairable)
|
||||
toggle_pairable
|
||||
;;
|
||||
*)
|
||||
device=$(bluetoothctl devices | grep "$chosen")
|
||||
# Open a submenu if a device is selected
|
||||
if [[ $device ]]; then device_menu "$device"; fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Rofi command to pipe into, can add any options here
|
||||
rofi_command="rofi -theme theme/passmenu.rasi -dmenu -no-fixed-num-lines -yoffset -100 -i -p"
|
||||
|
||||
case "$1" in
|
||||
--status)
|
||||
print_status
|
||||
;;
|
||||
*)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
71
home/profiles/desktop/bin/bspswallow
Executable file
71
home/profiles/desktop/bin/bspswallow
Executable file
|
@ -0,0 +1,71 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Get class of a wid
|
||||
get_class() {
|
||||
id=$1
|
||||
if [ -z "$id" ]; then
|
||||
echo ""
|
||||
else
|
||||
xprop -id "$id" | sed -n \
|
||||
-e '/WM_CLASS/s/\( "\)/\n/g; s/[^\n]*\n\([^"]*\)[^\n]*/\1\n/g' \
|
||||
-e '/WM_COMMAND/s/[^"]*/\n\n/1; s/\n"//1; s/\n\([^"]*\)".*/\n\1/; /\n/p' | sed '/^$/d' | head -n1
|
||||
fi
|
||||
}
|
||||
|
||||
get_pid() {
|
||||
xprop _NET_WM_PID -id "$1" | awk '/[0-9]+/ {print $3}'
|
||||
}
|
||||
|
||||
get_ppid() {
|
||||
ps -o ppid= -p $1
|
||||
}
|
||||
|
||||
check_swallowing_process() {
|
||||
pid=$(get_pid $1)
|
||||
[ -z $pid ] && return 0
|
||||
gppid=$(get_ppid $(get_ppid $pid))
|
||||
grep -i "^$(ps -o cmd= -p $gppid | awk '{print $1}' | sed 's_^.*/__')$" ~/.config/bspwm/terminals && return 0
|
||||
[ "$(get_ppid "$(get_ppid "$(get_pid "$1")")")" = "$(get_pid "$2")" ] && return 0 || return 1
|
||||
}
|
||||
|
||||
swallow() {
|
||||
addedtodesktop=$2
|
||||
lasttermdesktop=$(bspc query -D -n last)
|
||||
|
||||
swallowerid=$1
|
||||
swallowingid=$(bspc query -N -n last)
|
||||
if [ "$addedtodesktop" = "$lasttermdesktop" ] && check_swallowing_process "$swallowerid" "$swallowingid"; then
|
||||
grep -q "^$(get_class "$swallowerid")$" ~/.config/bspwm/{noswallow, terminals} && return
|
||||
grep -i "^$(get_class "$swallowingid")$" ~/.config/bspwm/terminals || return
|
||||
echo "$swallowerid $swallowingid" >> /tmp/swallowids
|
||||
bspc node "$swallowingid" --flag hidden=on
|
||||
fi
|
||||
}
|
||||
|
||||
spit() {
|
||||
spitterid=$1
|
||||
spitterdesktop=$2
|
||||
grep "^$spitterid" /tmp/swallowids || return
|
||||
spittingid=$(grep "^$spitterid" /tmp/swallowids | head -n1 | awk '{print $2}')
|
||||
|
||||
bspc node "$spittingid" --flag hidden=off
|
||||
|
||||
termdesktop=$(bspc query -D -n "$spittingid")
|
||||
[ "$termdesktop" = "$spitterdesktop" ] || bspc node "$spittingid" -d "$spitterdesktop"
|
||||
|
||||
bspc node "$spittingid" -f
|
||||
sed -i "/^$spitterid/d" /tmp/swallowids
|
||||
}
|
||||
|
||||
bspc subscribe node_add node_remove | while read -r event
|
||||
do
|
||||
case $(echo "$event" | awk '{ print $1 }') in
|
||||
node_add)
|
||||
swallow $(echo "$event" | awk '{print $5 " " $3}')
|
||||
;;
|
||||
node_remove)
|
||||
spit $(echo "$event" | awk '{print $4 " " $3}')
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
11
home/profiles/desktop/bin/hotplug-monitor.sh
Executable file
11
home/profiles/desktop/bin/hotplug-monitor.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
connect() {
|
||||
xrandr --output HDMI-2 --same-as eDP-1
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
xrandr --output HDMI-2 --off
|
||||
}
|
||||
|
||||
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
|
15
home/profiles/desktop/bin/ku
Executable file
15
home/profiles/desktop/bin/ku
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# get into a shell that has poonam
|
||||
cd ~/kitaab || exit;
|
||||
nix develop;
|
||||
# Use fzf to select a file and capture the output
|
||||
selected_file=$(${pkgs.poonam}/main report --titles=false | head -n -2 | fzf --preview 'bat --color=always --terminal-width -1 ./vimwiki/{}')
|
||||
echo $selected_file
|
||||
|
||||
# Add additional details to the file path
|
||||
# file_path="./vimwiki/${selected_file}"
|
||||
#
|
||||
# # Open the file in vim for editing
|
||||
# vim "${file_path}"
|
||||
#
|
3
home/profiles/desktop/bin/mpv-ify
Executable file
3
home/profiles/desktop/bin/mpv-ify
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
URL="$(xclip -selection clipboard -o)"
|
||||
mpv $URL
|
68
home/profiles/desktop/bin/passmenu
Executable file
68
home/profiles/desktop/bin/passmenu
Executable file
|
@ -0,0 +1,68 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Prompts for a pass entry, then for a specific field. Similar to passmenu, but
|
||||
# uses rofi, and can resume from a previous session.
|
||||
#
|
||||
# Example: passmenu [RESUME]
|
||||
|
||||
ROFI_CMD='rofi -dmenu -theme theme/passmenu.rasi'
|
||||
MSG_CMD='notify-send'
|
||||
set -e
|
||||
shopt -s nullglob globstar
|
||||
|
||||
for prog in xclip pass; do
|
||||
if ! command -v "$prog" >/dev/null; then
|
||||
>&2 echo "$prog not installed, aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ $1 == -r ]]; then
|
||||
resume=1; shift
|
||||
fi
|
||||
|
||||
url=
|
||||
# Get qutebrowser's current url
|
||||
win=$(xdotool getactivewindow)
|
||||
if [[ -n $win ]]; then
|
||||
winname=$(xdotool getwindowname $win)
|
||||
if [[ $winname =~ " - Mozilla Firefox$" ]]; then
|
||||
url=${winname% - Mozilla*}
|
||||
url=${url##* - }
|
||||
while (( ${#url//[^.]/} > 1 )); do
|
||||
url=${url#*.}
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
LAST_ENTRY_FILE=/tmp/_upm
|
||||
if [[ -n $resume && -f $LAST_ENTRY_FILE ]]; then
|
||||
entry="$(<$LAST_ENTRY_FILE)"
|
||||
else
|
||||
prefix=${PASSWORD_STORE_DIR-~/.password-store}
|
||||
password_files=( "$prefix"/**/*.gpg )
|
||||
password_files=( "${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "${password_files[@]%.gpg}" )
|
||||
entry=$(printf "%s\n" "${password_files[@]}" | $ROFI_CMD -p "..." -filter "$url")
|
||||
fi
|
||||
|
||||
if [[ -z $entry ]]; then
|
||||
$MSG_CMD "Error!" "Failed to select $entry"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "$entry" >/tmp/_upm
|
||||
secrets="$(pass show "$entry")"
|
||||
if [[ -n $secrets ]]; then
|
||||
fields=$(awk -F': ' 'NR>1 && !/^otpauth:/ {print $1}' <<<"$secrets")
|
||||
field=$(printf "password\n%s\notp\n" "${fields[@]}" | $ROFI_CMD -p "$entry")
|
||||
case $field in
|
||||
password) pass -c "$entry" ;;
|
||||
otp) printf "%s" "$(pass otp -c "$entry")" ;;
|
||||
*) printf "%s" "$(awk -v "key=$field:" '$1 == key {print $2}' <<<"$secrets")" | xclip -selection clipboard -in ;;
|
||||
esac
|
||||
$MSG_CMD "Success!" "Copied <b>$entry/$field</b> to clipboard for 45s"
|
||||
else
|
||||
$MSG_CMD "Error!" "Failed to retrieve $entry"
|
||||
exit 2
|
||||
fi
|
1
home/profiles/desktop/bin/paste
Executable file
1
home/profiles/desktop/bin/paste
Executable file
|
@ -0,0 +1 @@
|
|||
curl -F "content=$(xclip -o)" -X POST https://bin.sealight.xyz/upload
|
31
home/profiles/desktop/bin/powermenu
Executable file
31
home/profiles/desktop/bin/powermenu
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
rofi_command="rofi -theme theme/powermenu.rasi"
|
||||
|
||||
### Options ###
|
||||
power_off="\tShutdown"
|
||||
reboot="\tReboot"
|
||||
lock="\tLock"
|
||||
suspend="\tSleep"
|
||||
log_out="\tLogout"
|
||||
# Variable passed to rofi
|
||||
options="$power_off\n$reboot\n$lock\n$suspend\n$log_out"
|
||||
|
||||
case "$(echo -e "$options" | $rofi_command -dmenu)" in
|
||||
" Shutdown")
|
||||
systemctl poweroff
|
||||
;;
|
||||
" Reboot")
|
||||
systemctl reboot
|
||||
;;
|
||||
" Lock")
|
||||
dm-tool lock
|
||||
;;
|
||||
" Sleep")
|
||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
|
||||
systemctl suspend
|
||||
;;
|
||||
" Logout")
|
||||
bspc quit
|
||||
;;
|
||||
esac
|
56
home/profiles/desktop/bin/screenshot
Executable file
56
home/profiles/desktop/bin/screenshot
Executable file
|
@ -0,0 +1,56 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
timer=5
|
||||
|
||||
# Options
|
||||
select=" "
|
||||
window=" "
|
||||
screen=" "
|
||||
record=" "
|
||||
delay=" "
|
||||
cancel=" "
|
||||
|
||||
# Variable passed to rofi
|
||||
options="$select\n$window\n$screen\n$delay\n$cancel"
|
||||
|
||||
rofi_command="rofi -theme theme/screenshotmenu.rasi"
|
||||
|
||||
setFilename() {
|
||||
directory="/tmp/"
|
||||
filename="IMG_$(date +%Y%m%d_%H%M%S).jpg"
|
||||
filepath=$directory$filename
|
||||
}
|
||||
|
||||
notify() {
|
||||
dunstify "Screenshot saved and copied to clipboard" -i accessories-screenshot
|
||||
}
|
||||
|
||||
chosen="$(echo -e "$options" | $rofi_command -dmenu)"
|
||||
case $chosen in
|
||||
$select)
|
||||
setFilename
|
||||
maim -Buosd 0.25 \
|
||||
| tee $filepath | xclip -selection c -t image/png
|
||||
notify
|
||||
;;
|
||||
$window)
|
||||
setFilename
|
||||
maim -Buod 0.25 -i $(xdotool getactivewindow) \
|
||||
| tee $filepath | xclip -selection c -t image/png
|
||||
notify
|
||||
;;
|
||||
$screen)
|
||||
setFilename
|
||||
maim -Buod 0.25 \
|
||||
| tee $filepath | xclip -selection c -t image/png
|
||||
notify
|
||||
;;
|
||||
$delay)
|
||||
setFilename
|
||||
maim -Buod $timer \
|
||||
| tee $filepath | xclip -selection c -t image/png
|
||||
notify
|
||||
;;
|
||||
$record)
|
||||
kooha
|
||||
esac
|
115
home/profiles/desktop/bin/wifimenu
Executable file
115
home/profiles/desktop/bin/wifimenu
Executable file
|
@ -0,0 +1,115 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# rofi config without entry so to make select from available options only
|
||||
rofiprompt=theme/passmenu.rasi
|
||||
# normal rofi menu
|
||||
rofidmenu=theme/passmenu.rasi
|
||||
# rofi config for password
|
||||
rofipass=theme/passmenu.rasi
|
||||
|
||||
# Power Status
|
||||
flag=$(cat /sys/class/net/wl*/flags)
|
||||
|
||||
if [ "$flag" = "0x1003" ]; then
|
||||
power="On"
|
||||
else
|
||||
power="Off"
|
||||
fi
|
||||
|
||||
# Connection Status
|
||||
state=$(cat /sys/class/net/wl*/operstate)
|
||||
|
||||
if [ "$state" = "up" ]; then
|
||||
status=$(nmcli | grep "^wlp" | sed 's/\ connected\ to/Connected to/' | cut -d ':' -f2)
|
||||
else
|
||||
status="Disconnected"
|
||||
fi
|
||||
|
||||
# ┌─┐┌─┐┬ ┬┌─┐┬─┐
|
||||
# ├─┘│ ││││├┤ ├┬┘
|
||||
# ┴ └─┘└┴┘└─┘┴└─
|
||||
|
||||
powertoggle=$( [ "$flag" = "0x1003" ] && echo "Power Off" || echo "Power On" )
|
||||
|
||||
powerswitch() {
|
||||
if [ "$powertoggle" = "Power Off" ]; then
|
||||
nmcli radio wifi off
|
||||
elif [ "$powertoggle" = "Power On" ]; then
|
||||
nmcli radio wifi on
|
||||
fi
|
||||
}
|
||||
|
||||
# ┌─┐┌─┐┌┐┌┌┐┌┌─┐┌─┐┌┬┐
|
||||
# │ │ │││││││├┤ │ │
|
||||
# └─┘└─┘┘└┘┘└┘└─┘└─┘ ┴
|
||||
|
||||
connections() {
|
||||
list=$(nmcli --fields "SECURITY,SSID" device wifi list | tail -n +2 | sed "s/ */ /g" | sed -E "s/WPA*.?//g" | sed "s/^--//g" | sed "s/ //g")
|
||||
networks=$(printf "$list" | rofi -theme $rofiprompt -dmenu -i -hover-select -p "Select Wifi Network
|
||||
$status")
|
||||
wifi=$( echo "$networks" | sed "s/ //g" | sed "s/ //g" | xargs)
|
||||
[ -z "$networks" ] && exit
|
||||
nopass="No Password"
|
||||
pass=$(printf "$nopass\nCancel" | rofi -theme $rofipass -dmenu -i -hover-select -password -p "Wifi Password")
|
||||
|
||||
if [ "$pass" = "" ]; then
|
||||
exit
|
||||
elif [ "$pass" = "$nopass" ]; then
|
||||
nmcli dev wifi con "$wifi" && printf "exit" | rofi -theme $rofiprompt -dmenu -only-match -i -p "Successfully Connected to $wifi" && exit
|
||||
elif [ "$pass" = "Cancel" ]; then
|
||||
exit
|
||||
else
|
||||
nmcli dev wifi con "$wifi" password "$pass" && printf "exit" | rofi -theme $rofiprompt -dmenu -i -only-match -p "Successfully Connected to $wifi" && exit
|
||||
fi
|
||||
|
||||
printf "exit" | rofi -theme $rofiprompt -dmenu -i -p -only-match "Failed to Connect $wifi" && exit
|
||||
}
|
||||
|
||||
|
||||
# ┌┬┐┌─┐┌┐┌┬ ┬┌─┐┬
|
||||
# │││├─┤││││ │├─┤│
|
||||
# ┴ ┴┴ ┴┘└┘└─┘┴ ┴┴─┘
|
||||
|
||||
manual() {
|
||||
|
||||
wifi=$(rofi -theme $rofidmenu -dmenu -i -p "Enter Wifi Name")
|
||||
|
||||
[ -z "$wifi" ] && exit
|
||||
nopass="Run Without Password"
|
||||
pass=$(printf "$nopass\nCancel" | rofi -theme $rofipass -dmenu -i -password -p "Wifi Password")
|
||||
|
||||
if [ "$pass" = "" ]; then
|
||||
exit
|
||||
elif [ "$pass" = "$nopass" ]; then
|
||||
nmcli dev wifi con "$wifi" && printf "exit" | rofi -theme $rofiprompt -dmenu -i -only-match -p "Successfully Connected to $wifi" && exit
|
||||
elif [ "$pass" = "Cancel" ]; then
|
||||
exit
|
||||
else
|
||||
nmcli dev wifi con "$wifi" password "$pass" && printf "exit" | rofi -theme $rofiprompt -dmenu -i -only-match -p "Successfully Connected to $wifi" && exit
|
||||
fi
|
||||
|
||||
printf "exit" | rofi -theme $rofiprompt -dmenu -only-match -i -p "Failed to Connect $wifi" && exit
|
||||
}
|
||||
|
||||
# ┌─┐┌─┐┌┬┐┬┌─┐┌┐┌┌─┐
|
||||
# │ │├─┘ │ ││ ││││└─┐
|
||||
# └─┘┴ ┴ ┴└─┘┘└┘└─┘
|
||||
|
||||
options="$powertoggle\nConnections\nConnect Manually"
|
||||
|
||||
rofiwifi=$(printf "$options" | rofi -theme $rofiprompt -dmenu -i -hover-select -p "Wifi
|
||||
Powered: $power
|
||||
Status: $status")
|
||||
|
||||
case $rofiwifi in
|
||||
$powertoggle)
|
||||
powerswitch
|
||||
;;
|
||||
Connections)
|
||||
notify-send "Scanning"
|
||||
connections
|
||||
;;
|
||||
"Connect Manually")
|
||||
manual
|
||||
esac 2>/dev/null
|
||||
|
48
home/profiles/desktop/bspwmrc
Executable file
48
home/profiles/desktop/bspwmrc
Executable file
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# case $HOSTNAME in
|
||||
# kuro) export LAN=eno1 ;;
|
||||
# shiro) export LAN=wlp3s0 ;;
|
||||
# esac
|
||||
|
||||
export MONITOR=$(xrandr -q | grep primary | cut -d' ' -f1)
|
||||
export MONITORS=( $(xrandr -q | grep ' connected' | cut -d' ' -f1) )
|
||||
MONITOR=${MONITOR:-${MONITORS[0]}}
|
||||
|
||||
# Only have workspaces for primary monitor
|
||||
bspc monitor $MONITOR -d {1,2,3,4,5}
|
||||
|
||||
bspc config remove_disabled_monitors true
|
||||
bspc config remove_unplugged_monitors true
|
||||
|
||||
bspc config borderless_monocle true
|
||||
bspc config gapless_monocle true
|
||||
|
||||
bspc config border_width 1
|
||||
bspc config window_gap 4
|
||||
|
||||
bspc config normal_border_color "#181a23"
|
||||
bspc config active_border_color "#181a23"
|
||||
bspc config focused_border_color "#bd93f9"
|
||||
bspc config presel_feedback_color "#bd93f9"
|
||||
|
||||
bspc config split_ratio 0.71
|
||||
|
||||
# Extra padding for polybar
|
||||
bspc config -m primary top_padding 34
|
||||
bspc config -m primary bottom_padding 0
|
||||
|
||||
# Rules
|
||||
bspc rule -r '*'
|
||||
|
||||
bspc rule -a Pinentry state=floating center=on
|
||||
bspc rule -a Firefox state=fullscreen
|
||||
bspc rule -a feh state=fullscreen
|
||||
|
||||
# bspswallow
|
||||
pgrep bspswallow || bspswallow &
|
||||
|
||||
# polybar
|
||||
for file in "$XDG_CONFIG_HOME"/bspwm/rc.d/*; do
|
||||
source "$file"
|
||||
done
|
191
home/profiles/desktop/default.nix
Normal file
191
home/profiles/desktop/default.nix
Normal file
|
@ -0,0 +1,191 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
dracula-gtk = pkgs.fetchFromGitHub {
|
||||
owner = "dracula";
|
||||
repo = "gtk";
|
||||
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
|
||||
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
|
||||
};
|
||||
in
|
||||
{
|
||||
home.pointerCursor = {
|
||||
x11.enable = true;
|
||||
x11.defaultCursor = "left_ptr";
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors";
|
||||
};
|
||||
# Install themes
|
||||
home.packages = with pkgs; [
|
||||
ayu-theme-gtk
|
||||
dracula-theme
|
||||
capitaine-cursors
|
||||
paper-icon-theme
|
||||
papirus-icon-theme
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
qt5ct
|
||||
gtk-engine-murrine
|
||||
gtk_engines
|
||||
maim
|
||||
kitty
|
||||
libreoffice
|
||||
inotify-tools
|
||||
offpunk
|
||||
termpdfpy
|
||||
libsForQt5.kontact
|
||||
thunderbird
|
||||
];
|
||||
|
||||
# GTK4 color scheme?
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
|
||||
# Move required config files around
|
||||
xdg.enable = true; # This doesn't seem to do anything so we have below
|
||||
xdg.configHome = "/home/anish/.config"; # TODO bad hardcode
|
||||
xdg.configFile = {
|
||||
"Kvantum/Dracula/Dracula.kvconfig".source = "${dracula-gtk}/kde/kvantum/Dracula-purple-solid/Dracula-purple-solid.kvconfig";
|
||||
"Kvantum/Dracula/Dracula.svg".source = "${dracula-gtk}/kde/kvantum/Dracula-purple-solid/Dracula-purple-solid.svg";
|
||||
"Kvantum/kvantum.kvconfig".text = "[General]\ntheme=Dracula";
|
||||
};
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
|
||||
};
|
||||
home.file = {
|
||||
".config/bspwm/rc.d/polybar".source = ./run.sh;
|
||||
".config/bspwm/bspwmrc".source = ./bspwmrc;
|
||||
".config/sxhkdrc".source = ./sxhkdrc;
|
||||
".config/rofi/theme" = {
|
||||
source = ./rofi;
|
||||
recursive = true;
|
||||
};
|
||||
".config/polybar" = {
|
||||
source = ./polybar;
|
||||
recursive = true;
|
||||
};
|
||||
".config/dunst/dunstrc".source = ./dunstrc;
|
||||
".config/kitty/kitty.conf".source = ./kitty.conf;
|
||||
".config/kitty/ayu.conf".source = ./ayu-kitty.conf;
|
||||
".config/zathura/zathurarc".source = ./zathurarc;
|
||||
".background-image".source = ./background.jpg;
|
||||
#gtk4 theme
|
||||
".config/gtk-4.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=1
|
||||
'';
|
||||
# gtk3 theme
|
||||
".config/gtk-3.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-theme-name=Dracula
|
||||
gtk-icon-theme-name=Paper
|
||||
gtk-cursor-theme-name=Capitaine Cursors - White
|
||||
gtk-fallback-icon-theme=gnome
|
||||
gtk-application-prefer-dark-theme=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintfull
|
||||
gtk-xft-rgba=none
|
||||
'';
|
||||
# GTK2 global theme (widget and icon theme)
|
||||
".config/gtk-2.0/gtkrc".text = ''
|
||||
gtk-theme-name=Ayu-Mirage
|
||||
gtk-icon-theme-name=Capitaine Cursors - White
|
||||
gtk-font-name="Sans 10"
|
||||
'';
|
||||
".local/bin/passmenu".source = ./bin/passmenu;
|
||||
".local/bin/paste".source = ./bin/paste;
|
||||
".local/bin/bluetoothmenu".source = ./bin/bluetoothmenu;
|
||||
".local/bin/wifimenu".source = ./bin/wifimenu;
|
||||
".local/bin/powermenu".source = ./bin/powermenu;
|
||||
".local/bin/screenshot".source = ./bin/screenshot;
|
||||
".local/bin/mpv-ify".source = ./bin/mpv-ify;
|
||||
".local/bin/bspswallow".source = ./bin/bspswallow;
|
||||
".config/bspwm/terminals".text = "Kitty";
|
||||
# ".local/bin/hotplug-monitor.sh".source = ./bin/hotplug-monitor.sh;
|
||||
};
|
||||
|
||||
xdg.desktopEntries = {
|
||||
ocr = {
|
||||
name = "OCR image";
|
||||
exec = "${pkgs.writeScript "ocr" ''
|
||||
${pkgs.xfce.xfce4-screenshooter}/bin/xfce4-screenshooter -r --save /tmp/ocr-tmp.png
|
||||
${pkgs.tesseract}/bin/tesseract /tmp/ocr-tmp.png | ${pkgs.xclip}/bin/xclip -sel clip
|
||||
rm /tmp/ocr-tmp.png
|
||||
''}";
|
||||
};
|
||||
screenshot = {
|
||||
name = "Screenshot";
|
||||
exec = "screenshot";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "gtk";
|
||||
style = { name = "qt5ct-style"; };
|
||||
};
|
||||
|
||||
# set up env
|
||||
xsession.enable = true;
|
||||
|
||||
xresources.properties = {
|
||||
"*.foreground" = "#95E6CB";
|
||||
"*.background" = "#1F2430";
|
||||
"*.cursorColor" = "#BAE67E";
|
||||
# Black
|
||||
"*.color0" = "#1F2430";
|
||||
"*.color8" = "#F28779";
|
||||
# Red
|
||||
"*.color1" = "#A6CC70";
|
||||
"*.color9" = "#FFCC66";
|
||||
# Green
|
||||
"*.color2" = "#5CCFE6";
|
||||
"*.color10" = "#F29E74";
|
||||
# Yellow
|
||||
"*.color3" = "#77A8D9";
|
||||
"*.color11" = "#5C6773";
|
||||
# Blue
|
||||
"*.color4" = "#707A8C";
|
||||
"*.color12" = "#F27983";
|
||||
# Magenta
|
||||
"*.color5" = "#BAE67E";
|
||||
"*.color13" = "#FFD580";
|
||||
# Cyan
|
||||
"*.color6" = "#73D0FF";
|
||||
"*.color14" = "#FFA759";
|
||||
# White
|
||||
"*.color7" = "#95E6CB";
|
||||
"*.color15" = "#CBCCC6";
|
||||
# Bold, Italic, Underline
|
||||
"*.colorBD" = "#e6e1cf";
|
||||
};
|
||||
|
||||
programs.autorandr.enable = true;
|
||||
services.udiskie.automount = true;
|
||||
|
||||
services.mpris-proxy.enable = true; # bluetooth media control
|
||||
|
||||
# Compositor
|
||||
# services.picom = {
|
||||
# enable = true;
|
||||
# fade = true;
|
||||
# fadeDelta = 1;
|
||||
# fadeSteps = [ "0.01" "0.022" ];
|
||||
# shadow = true;
|
||||
# shadowOffsets = [ (-10) (-10) ];
|
||||
# shadowOpacity = "0.22";
|
||||
# # activeOpacity = "1.00";
|
||||
# # inactiveOpacity = "0.92";
|
||||
# extraOptions = ''
|
||||
# shadow-radius = 12;
|
||||
# # blur-background = true;
|
||||
# # blur-background-frame = true;
|
||||
# # blur-background-fixed = true;
|
||||
# blur-kern = "7x7box";
|
||||
# blur-strength = 320;
|
||||
# corner-radius = 3
|
||||
# '';
|
||||
# };
|
||||
}
|
443
home/profiles/desktop/dunstrc
Normal file
443
home/profiles/desktop/dunstrc
Normal file
|
@ -0,0 +1,443 @@
|
|||
# vim: ft=cfg
|
||||
|
||||
# See dunst(5) for all configuration options
|
||||
|
||||
[global]
|
||||
### Display ###
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = none
|
||||
|
||||
### Geometry ###
|
||||
|
||||
# dynamic width from 0 to 300
|
||||
# width = (0, 300)
|
||||
# constant width of 300
|
||||
width = (160, 320)
|
||||
|
||||
# The maximum height of a single notification, excluding the frame.
|
||||
height = 400
|
||||
|
||||
# Position the notification in the top right corner
|
||||
origin = top-right
|
||||
|
||||
# Offset from the origin
|
||||
offset = 12x36
|
||||
|
||||
# Scale factor. It is auto-detected if value is 0.
|
||||
scale = 0
|
||||
|
||||
# Maximum number of notification (0 means no limit)
|
||||
notification_limit = 5
|
||||
|
||||
### Progress bar ###
|
||||
|
||||
# Turn on the progess bar. It appears when a progress hint is passed with
|
||||
# for example dunstify -h int:value:12
|
||||
progress_bar = true
|
||||
|
||||
# Set the progress bar height. This includes the frame, so make sure
|
||||
# it's at least twice as big as the frame width.
|
||||
progress_bar_height = 2
|
||||
|
||||
# Set the frame width of the progress bar
|
||||
progress_bar_frame_width = 0
|
||||
|
||||
# Set the minimum width for the progress bar
|
||||
progress_bar_min_width = 160
|
||||
|
||||
# Set the maximum width for the progress bar
|
||||
progress_bar_max_width = 320
|
||||
|
||||
|
||||
# Show how many messages are currently hidden (because of
|
||||
# notification_limit).
|
||||
indicate_hidden = yes
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
|
||||
transparency = 0
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 1
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 8
|
||||
|
||||
# Padding between text and icon.
|
||||
text_icon_padding = 8
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 1
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#414868"
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = frame
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = yes
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules
|
||||
# section for how to disable this if necessary
|
||||
# idle_threshold = 120
|
||||
|
||||
### Text ###
|
||||
|
||||
font = Iosevka Nerd Font 10
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0
|
||||
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <https://docs.gtk.org/Pango/pango_markup.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = full
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = "<b>%s</b>\n%b"
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = left
|
||||
|
||||
# Vertical alignment of message text and icon.
|
||||
# Possible values are "top", "center" and "bottom".
|
||||
vertical_alignment = top
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = -1
|
||||
|
||||
# Specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = end
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = true
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = no
|
||||
|
||||
### Icons ###
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = left
|
||||
|
||||
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||
# max_icon_size takes precedence over this.
|
||||
min_icon_size = 0
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 160
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /usr/share/icons/kora/status/symbolic/:/usr/share/icons/kora/status/scalable/:/usr/share/icons/kora/apps/scalable/:/usr/share/icons/kora/mimes/scalable/:/usr/share/icons/kora/devices/scalable:/usr/share/icons/kora/places/scalable
|
||||
|
||||
### History ###
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = no
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 8
|
||||
|
||||
### Misc/Advanced ###
|
||||
|
||||
# dmenu path.
|
||||
dmenu = /usr/bin/dmenu -p dunst
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/xdg-open
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = dunst
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = dunst
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 0
|
||||
|
||||
# Ignore the dbus closeNotification message.
|
||||
# Useful to enforce the timeout set by dunst configuration. Without this
|
||||
# parameter, an application may close the notification sent before the
|
||||
# user defined timeout.
|
||||
ignore_dbusclose = false
|
||||
|
||||
### Wayland ###
|
||||
# These settings are Wayland-specific. They have no effect when using X11
|
||||
|
||||
# Uncomment this if you want to let notications appear under fullscreen
|
||||
# applications (default: overlay)
|
||||
# layer = top
|
||||
|
||||
# Set this to true to use X11 output on Wayland.
|
||||
force_xwayland = false
|
||||
|
||||
### Legacy
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false
|
||||
|
||||
### mouse
|
||||
|
||||
# Defines list of actions for each mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: Invoke the action determined by the action_name rule. If there is no
|
||||
# such action, open the context menu.
|
||||
# * open_url: If the notification has exactly one url, open it. If there are multiple
|
||||
# ones, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
# * context: Open context menu for the notification.
|
||||
# * context_all: Open context menu for all notifications.
|
||||
# These values can be strung together for each mouse event, and
|
||||
# will be executed in sequence.
|
||||
mouse_left_click = do_action
|
||||
mouse_middle_click = close_current
|
||||
mouse_right_click = context
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#24283b"
|
||||
foreground = "#c0caf5"
|
||||
highlight = "#bb9af7"
|
||||
timeout = 3
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
icon = /dev/null
|
||||
|
||||
[urgency_normal]
|
||||
background = "#24283b"
|
||||
foreground = "#a9b1d6"
|
||||
highlight = "#bb9af7"
|
||||
timeout = 5
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
icon = /dev/null
|
||||
|
||||
[urgency_critical]
|
||||
background = "#24283b"
|
||||
foreground = "#c0caf5"
|
||||
frame_color = "#e9af68"
|
||||
highlight = "#bb9af7"
|
||||
timeout = 5
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
# Messages can be matched by
|
||||
# appname (discouraged, see desktop_entry)
|
||||
# body
|
||||
# category
|
||||
# desktop_entry
|
||||
# icon
|
||||
# match_transient
|
||||
# msg_urgency
|
||||
# stack_tag
|
||||
# summary
|
||||
#
|
||||
# and you can override the
|
||||
# background
|
||||
# foreground
|
||||
# format
|
||||
# frame_color
|
||||
# fullscreen
|
||||
# new_icon
|
||||
# set_stack_tag
|
||||
# set_transient
|
||||
# set_category
|
||||
# timeout
|
||||
# urgency
|
||||
# skip_display
|
||||
# history_ignore
|
||||
# action_name
|
||||
# word_wrap
|
||||
# ellipsize
|
||||
# alignment
|
||||
#
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||
# the desktop-entry won't get localized.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||
# client
|
||||
#[transient_disable]
|
||||
# match_transient = yes
|
||||
# set_transient = no
|
||||
#
|
||||
# Make the handling of transient notifications more strict by making them not
|
||||
# be placed in history.
|
||||
#[transient_history_ignore]
|
||||
# match_transient = yes
|
||||
# history_ignore = yes
|
||||
|
||||
# fullscreen values
|
||||
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||
# delay: displays the new notification, if there is no fullscreen window active
|
||||
# If the notification is already drawn, it won't get undrawn.
|
||||
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||
# withdrawn from screen again and will get delayed like a new notification
|
||||
#[fullscreen_delay_everything]
|
||||
# fullscreen = delay
|
||||
#[fullscreen_show_critical]
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# skip_display = true
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
# summary = "foobar"
|
||||
# history_ignore = yes
|
||||
|
||||
#[skip-display]
|
||||
# # This notification will not be displayed, but will be included in the history
|
||||
# summary = "foobar"
|
||||
# skip_display = yes
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
#[stack-volumes]
|
||||
# appname = "some_volume_notifiers"
|
||||
# set_stack_tag = "volume"
|
||||
#
|
||||
#[play_sound]
|
||||
# summary = "*"
|
||||
# script = ~/.local/share/sounds/notify_sound
|
50
home/profiles/desktop/eww/eww.scss
Normal file
50
home/profiles/desktop/eww/eww.scss
Normal file
|
@ -0,0 +1,50 @@
|
|||
* {
|
||||
all: unset;
|
||||
color: #cdd6f4;
|
||||
}
|
||||
|
||||
/* Calendar */
|
||||
|
||||
.cal-box {
|
||||
background-color: #181825;
|
||||
border-radius: 8px;
|
||||
font-family: JetBrainsMono Nerd Font;
|
||||
font-size: 1.2em;
|
||||
|
||||
.cal-inner-box {
|
||||
padding: 1rem 1rem .3rem 1rem;
|
||||
|
||||
.cal {
|
||||
&.highlight {
|
||||
padding: 10rem;
|
||||
}
|
||||
|
||||
padding: .8rem .25rem 0rem;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
calendar:selected {
|
||||
color: #9ece6a;
|
||||
}
|
||||
|
||||
calendar.header {
|
||||
color: #ad8ee6;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar.button {
|
||||
color: #449dab;
|
||||
}
|
||||
|
||||
calendar.highlight {
|
||||
color: #7aa2f7;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
calendar:indeterminate {
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
|
13
home/profiles/desktop/eww/eww.yuck
Normal file
13
home/profiles/desktop/eww/eww.yuck
Normal file
|
@ -0,0 +1,13 @@
|
|||
; includes:
|
||||
;widgets
|
||||
(include "widgets.yuck")
|
||||
|
||||
;; Calendar Windows ;;
|
||||
|
||||
(defwindow calendar
|
||||
:geometry (geometry :x "-19px"
|
||||
:y "50px"
|
||||
:width "270px"
|
||||
:height "60px"
|
||||
:anchor "top right")
|
||||
(cal))
|
20
home/profiles/desktop/eww/widgets.yuck
Normal file
20
home/profiles/desktop/eww/widgets.yuck
Normal file
|
@ -0,0 +1,20 @@
|
|||
; widgets
|
||||
|
||||
(defpoll time0 :interval "10s" "date '+%H':%M")
|
||||
(defpoll date :interval "10s" "date '+%b %d'")
|
||||
|
||||
;; Calendar Widgets ;;
|
||||
(defwidget cal []
|
||||
(box :class "cal-box"
|
||||
:orientation "v"
|
||||
(box :class "cal-inner-box"
|
||||
(calendar :class "cal"
|
||||
:day calendar_day
|
||||
:month calendar_month
|
||||
:year calendar_year))))
|
||||
(defpoll calendar_day :interval "10h"
|
||||
"date '+%d'")
|
||||
(defpoll calendar_month :interval "10h"
|
||||
"calendar")
|
||||
(defpoll calendar_year :interval "10h"
|
||||
"date '+%Y'")
|
13
home/profiles/desktop/kitty.conf
Normal file
13
home/profiles/desktop/kitty.conf
Normal file
|
@ -0,0 +1,13 @@
|
|||
include ayu.conf
|
||||
font_family Hermit
|
||||
font_size 13
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
open_url_with default
|
||||
mouse_map left click ungrabbed mouse_click_url_or_select
|
||||
confirm_os_window_close 0
|
||||
enable_audio_bell no
|
||||
-- Allows zen-mode.nvim to increase font size
|
||||
-- allow_remote_control socket-only
|
||||
-- listen_on unix:/tmp/kitty
|
385
home/profiles/desktop/polybar.conf
Normal file
385
home/profiles/desktop/polybar.conf
Normal file
|
@ -0,0 +1,385 @@
|
|||
[colors]
|
||||
black = ${xrdb:color0}
|
||||
bblack = ${xrdb:color8}
|
||||
red = ${xrdb:color1}
|
||||
bred = ${xrdb:color9}
|
||||
green = ${xrdb:color2}
|
||||
bgreen = ${xrdb:color10}
|
||||
yellow = ${xrdb:color3}
|
||||
byellow = ${xrdb:color11}
|
||||
blue = ${xrdb:color4}
|
||||
bblue = ${xrdb:color12}
|
||||
magenta = ${xrdb:color5}
|
||||
bmagenta = ${xrdb:color13}
|
||||
cyan = ${xrdb:color6}
|
||||
bcyan = ${xrdb:color14}
|
||||
white = ${xrdb:color7}
|
||||
bwhite = ${xrdb:color15}
|
||||
|
||||
bg = ${xrdb:background}
|
||||
fg = ${colors.magenta}
|
||||
bg-alt = #1E2029
|
||||
fg-alt = #373844
|
||||
bg-dark = #181a23
|
||||
|
||||
alert = ${colors.yellow}
|
||||
accent = #604c7e
|
||||
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 34
|
||||
|
||||
[bar/main]
|
||||
monitor = ${env:MONITOR}
|
||||
monitor-strict = true
|
||||
enable-ipc = true
|
||||
wm-restack = bspwm
|
||||
# REQUIRED to move the window with hideit.sh
|
||||
override-redirect = true
|
||||
fixed-center = true
|
||||
|
||||
background = ${colors.bg}
|
||||
foreground = ${colors.fg}
|
||||
|
||||
width = 100%
|
||||
height = 34
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
# bottom = true
|
||||
|
||||
overline-size = 0
|
||||
overline-color = #f00
|
||||
underline-size = 0
|
||||
underline-color = #00f
|
||||
|
||||
border-bottom-size = 0
|
||||
border-top-size = 1
|
||||
border-color = ${colors.bg-dark}
|
||||
|
||||
padding-left = 2
|
||||
padding-right = 2
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
font-0 = "Fira Code:pixelsize=9;2"
|
||||
font-1 = "Wuncon Siji:pixelsize=12;2"
|
||||
font-2 = "Siji:pixelsize=10;2"
|
||||
|
||||
; modules-left = volume pad cpu memory pad pkg mail
|
||||
modules-left = pulseaudio pad cpu memory pad fs
|
||||
modules-center = bspwm
|
||||
modules-right = syncthing redshift wlan pad network-up pad network-down pad battery pad date
|
||||
|
||||
;tray-position = center
|
||||
;tray-padding = 2
|
||||
;tray-transparent = true
|
||||
;tray-background = #0063ff
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
pin-workspaces = true
|
||||
enable-click = true
|
||||
|
||||
# ws-icon-0 = 1;
|
||||
# ws-icon-1 = 2;
|
||||
# ws-icon-2 = 3;
|
||||
# ws-icon-3 = 4;
|
||||
# ws-icon-4 = 5;
|
||||
# ws-icon-5 = 6;
|
||||
ws-icon-default =
|
||||
|
||||
format = <label-state> <label-mode>
|
||||
label-padding = 1
|
||||
|
||||
label-focused = %icon%
|
||||
label-focused-background = ${colors.bg-dark}
|
||||
label-focused-foreground = ${colors.fg}
|
||||
# label-focused-underline = ${colors.magenta}
|
||||
; label-focused-foreground = ${xrdb:color2}
|
||||
label-focused-padding = 1
|
||||
|
||||
label-occupied = %icon%
|
||||
label-occupied-foreground = ${colors.accent}
|
||||
label-occupied-padding = 1
|
||||
|
||||
; label-urgent = %icon%
|
||||
label-urgent-foreground = ${colors.alert}
|
||||
; label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 1
|
||||
|
||||
label-empty = %icon%
|
||||
label-empty-foreground = ${colors.fg-alt}
|
||||
label-empty-padding = 1
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
|
||||
label = %date% %time%
|
||||
date = %A, %h %d
|
||||
date-alt = %Y-%m-%d
|
||||
time = %I:%M %p
|
||||
time-alt = %H:%M:%S
|
||||
format-prefix = ""
|
||||
format-prefix-padding = 1
|
||||
; format-prefix-background = ${colors.bg-alt}
|
||||
format-prefix-foreground = ${colors.accent}
|
||||
; format-underline = ${xrdb:color4}
|
||||
|
||||
[module/fs]
|
||||
type = internal/fs
|
||||
mount-0 = /
|
||||
mount-1 = /mnt/projects ; for desktops
|
||||
mount-2 = /home ; for laptop
|
||||
interval = 30
|
||||
|
||||
; Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = "<bar-used>"
|
||||
format-mounted-foreground = ${colors.accent}
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted =
|
||||
label-unmounted =
|
||||
label-unmounted-foreground = ${colors.fg-alt}
|
||||
|
||||
bar-used-indicator =
|
||||
bar-used-width = 8
|
||||
bar-used-foreground-0 = ${colors.fg}
|
||||
bar-used-foreground-1 = ${colors.fg}
|
||||
bar-used-foreground-2 = ${colors.yellow}
|
||||
bar-used-foreground-3 = ${colors.alert}
|
||||
bar-used-foreground-4 = ${colors.alert}
|
||||
bar-used-fill = |
|
||||
bar-used-empty = ¦
|
||||
bar-used-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:80:...%
|
||||
label-padding-left = 2
|
||||
|
||||
; [module/mpd]
|
||||
; type = internal/mpd
|
||||
; host = /home/hlissner/.config/mpd/mpd.sock
|
||||
;
|
||||
; format-online = <label-song> <toggle>
|
||||
; format-padding = 5
|
||||
;
|
||||
; label-song-maxlen = 45
|
||||
; label-song-ellipsis = true
|
||||
;
|
||||
; icon-prev =
|
||||
; icon-seekb =
|
||||
; icon-stop =
|
||||
; icon-play =
|
||||
; icon-pause =
|
||||
; icon-next =
|
||||
; icon-seekf =
|
||||
;
|
||||
; icon-random =
|
||||
; icon-repeat =
|
||||
;
|
||||
; toggle-on-foreground = ${colors.fg}
|
||||
; toggle-off-foreground = #66
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format = <bar-load>
|
||||
format-prefix = ""
|
||||
format-foreground = ${colors.accent}
|
||||
; format-underline = #f90000
|
||||
; label = %percentage%%
|
||||
format-padding = 1
|
||||
|
||||
bar-load-indicator =
|
||||
bar-load-width = 8
|
||||
bar-load-foreground-0 = ${colors.fg}
|
||||
bar-load-foreground-1 = ${colors.fg}
|
||||
bar-load-foreground-2 = ${colors.yellow}
|
||||
bar-load-foreground-3 = ${colors.alert}
|
||||
bar-load-foreground-4 = ${colors.alert}
|
||||
bar-load-fill = |
|
||||
bar-load-empty = ¦
|
||||
bar-load-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 3
|
||||
format = <bar-used>
|
||||
format-prefix = ""
|
||||
format-prefix-foreground = ${colors.accent}
|
||||
; format-underline = #4bffdc
|
||||
; label = %percentage_used%%
|
||||
format-padding-left = 1
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-indicator =
|
||||
bar-used-width = 8
|
||||
bar-used-foreground-0 = ${colors.fg}
|
||||
bar-used-foreground-1 = ${colors.fg}
|
||||
bar-used-foreground-2 = ${colors.yellow}
|
||||
bar-used-foreground-3 = ${colors.alert}
|
||||
bar-used-foreground-4 = ${colors.alert}
|
||||
bar-used-fill = |
|
||||
bar-used-empty = ¦
|
||||
bar-used-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = ${env:WLP:wlp3s0}
|
||||
interval = 3.0
|
||||
|
||||
format-connected = <ramp-signal>
|
||||
format-disconnected =
|
||||
format-disconnected-foreground =
|
||||
|
||||
; label-connected =
|
||||
; label-disconnected = !
|
||||
; label-disconnected-foreground = ${colors.red}
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-0-foreground = ${colors.yellow}
|
||||
ramp-signal-1 =
|
||||
ramp-signal-1-foreground = ${colors.yellow}
|
||||
ramp-signal-2 =
|
||||
ramp-signal-2-foreground = ${colors.yellow}
|
||||
ramp-signal-3 =
|
||||
ramp-signal-3-foreground = ${colors.accent}
|
||||
ramp-signal-4 =
|
||||
ramp-signal-4-foreground = ${colors.fg}
|
||||
|
||||
[module/network-up]
|
||||
type = internal/network
|
||||
interface = ${env:LAN:eno1}
|
||||
interval = 4.0
|
||||
label-connected = "%upspeed%"
|
||||
format-connected-prefix = " "
|
||||
format-connected-prefix-foreground = ${colors.accent}
|
||||
format-connected-foreground = ${colors.fg}
|
||||
format-connected-background =
|
||||
format-connected-underline =
|
||||
format-disconnected-prefix = " "
|
||||
format-disconnected-prefix-foreground = ${colors.alert}
|
||||
format-disconnected-foreground = ${colors.alert}
|
||||
|
||||
[module/network-down]
|
||||
type = internal/network
|
||||
interface = ${env:LAN:eno1}
|
||||
interval = 4.0
|
||||
label-connected = "%downspeed%"
|
||||
format-connected-prefix = " "
|
||||
format-connected-prefix-foreground = ${colors.accent}
|
||||
format-connected-foreground = ${colors.fg}
|
||||
format-connected-background =
|
||||
format-connected-underline =
|
||||
format-disconnected-prefix = " "
|
||||
format-disconnected-prefix-foreground = ${colors.alert}
|
||||
format-disconnected-foreground = ${colors.alert}
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
; format-volume = <label-volume> <bar-volume>
|
||||
format-volume = <ramp-volume> <bar-volume>
|
||||
; label-volume = " "
|
||||
label-volume-foreground = ${colors.accent}
|
||||
|
||||
; format-muted-prefix = " "
|
||||
format-muted-foreground = ${colors.alert}
|
||||
label-muted =
|
||||
|
||||
bar-volume-width = 8
|
||||
# bar-volume-foreground-0 = ${colors.magenta}
|
||||
# bar-volume-foreground-1 = ${colors.magenta}
|
||||
# bar-volume-foreground-2 = ${colors.magenta}
|
||||
# bar-volume-foreground-3 = ${colors.magenta}
|
||||
# bar-volume-foreground-4 = ${colors.magenta}
|
||||
# bar-volume-foreground-5 = ${colors.magenta}
|
||||
# bar-volume-foreground-6 = ${colors.magenta}
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 1
|
||||
bar-volume-indicator-foreground = #ff
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 1
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 1
|
||||
bar-volume-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT2
|
||||
adapter = ADP1
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-underline = #ffb52a
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-discharging-underline = ${self.format-charging-underline}
|
||||
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-foreground = ${colors.fg-alt}
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-0-foreground = ${colors.red}
|
||||
ramp-capacity-1-foreground = #575864
|
||||
ramp-capacity-2-foreground = ${colors.fg-alt}
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-framerate = 1000
|
||||
animation-charging-foreground = ${colors.fg}
|
||||
|
||||
|
||||
;=====================================================
|
||||
; Custom scripts
|
||||
;=====================================================
|
||||
|
||||
[module/pad]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-foreground = ${colors.fg-alt}
|
||||
|
||||
[module/redshift]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/modules/redshift
|
||||
exec-if = pgrep -x redshift
|
||||
interval = 60
|
||||
format-padding = 1
|
||||
|
||||
[module/syncthing]
|
||||
type = custom/script
|
||||
exec = echo 1
|
||||
exec-if = systemctl is-active syncthing
|
||||
format = ""
|
||||
format-foreground = ${colors.fg}
|
||||
interval = 30
|
||||
|
||||
; vim:ft=dosini
|
379
home/profiles/desktop/polybar/config
Normal file
379
home/profiles/desktop/polybar/config
Normal file
|
@ -0,0 +1,379 @@
|
|||
[colors]
|
||||
|
||||
yellow = #ffd580
|
||||
orange = #fe8019
|
||||
blue = #73d0ff
|
||||
green = #bae67e
|
||||
red = #ff3333
|
||||
bg = #1f2430
|
||||
fg = #bfbab0
|
||||
icons = #bae67e
|
||||
cyan = #95e6cb
|
||||
text = ${xrdb:color2}
|
||||
unfocus = ${xrdb:color1}
|
||||
accent = #604c7e
|
||||
sky = #73d0ff
|
||||
mauve = #bae67e
|
||||
alert = ${colors.yellow}
|
||||
|
||||
bg-alt = #1E2029
|
||||
fg-alt = #373844
|
||||
bg-dark = #181a23
|
||||
|
||||
[bar/mybar]
|
||||
; monitor = VGA-1
|
||||
|
||||
override-redirect = false
|
||||
|
||||
; Put the bar at the bottom of the screen
|
||||
bottom = false
|
||||
|
||||
; Prefer fixed center position for the `modules-center` block
|
||||
fixed-center = true
|
||||
|
||||
width = 100%
|
||||
height = 34
|
||||
|
||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
background = ${colors.bg}
|
||||
|
||||
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||
foreground = ${colors.fg}
|
||||
|
||||
line-size = 0
|
||||
line-color = #fff
|
||||
|
||||
; Number of spaces to add at the beginning/end of the bar
|
||||
; Individual side values can be defined using:
|
||||
; padding-{left,right}
|
||||
padding-right = 1
|
||||
padding-left = 0
|
||||
|
||||
; Number of spaces to add before/after each module
|
||||
; Individual side values can be defined using:
|
||||
; module-margin-{left,right}
|
||||
module-margin = 0
|
||||
margin-bottom = 34
|
||||
|
||||
font-0 = "Iosevka Nerd Font,Iosevka NF:pixelsize=10;1" ; Icon Size
|
||||
font-1 = "Iosevka Nerd Font,Iosevka NF:pixelsize=12;4" ; Large Text font
|
||||
font-2 = "FiraCode Nerd Font:pixelsize=12;2"
|
||||
font-3 = "Siji:pixelsize=10;2"
|
||||
font-4 = "Iosevka Nerd Font,Iosevka NF:pixelsize=8;1" ; Small Icon Size
|
||||
|
||||
; Add module mpd for artist - title info
|
||||
modules-left = bspwm sps volume
|
||||
; modules-center = title
|
||||
modules-right = wireless-network sps battery sps memory sps cpu sps date
|
||||
|
||||
; The separator will be inserted between the output of each module
|
||||
separator =
|
||||
|
||||
; This value is used to add extra spacing between elements
|
||||
; @deprecated: This parameter will be removed in an upcoming version
|
||||
spacing = 0
|
||||
|
||||
; Opacity value between 0.0 and 1.0 used on fade in/out
|
||||
dim-value = 1.0
|
||||
|
||||
wm-name = bspwm
|
||||
|
||||
tray-position = right
|
||||
|
||||
; If true, the bar will not shift its
|
||||
; contents when the tray changes
|
||||
tray-detached = false
|
||||
|
||||
; Tray icon max size
|
||||
tray-maxsize = 16
|
||||
|
||||
tray-background = ${colors.bg}
|
||||
;offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
|
||||
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
|
||||
; Pad the sides of each tray icon
|
||||
tray-padding = 0
|
||||
|
||||
; Scale factor for tray clients
|
||||
tray-scale = 1.0
|
||||
|
||||
wm-restack = bspwm
|
||||
|
||||
dpi-x = 133
|
||||
dpi-y = 133
|
||||
|
||||
enable-ipc = false
|
||||
|
||||
; Fallback click handlers that will be called if
|
||||
; there's no matching module handler found.
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
pin-workspaces = true
|
||||
enable-click = true
|
||||
|
||||
ws-icon-0 = 1;%{T2} %{T-}
|
||||
ws-icon-1 = 2;%{T2} %{T-}
|
||||
ws-icon-2 = 3;%{T2} %{T-}
|
||||
ws-icon-3 = 4;%{T2} %{T-}
|
||||
ws-icon-4 = 5;%{T2} %{T-}
|
||||
ws-icon-default =
|
||||
; fuzzy-match = true
|
||||
|
||||
format = <label-state> <label-mode>
|
||||
label-padding = 1
|
||||
label-foreground = ${colors.green}
|
||||
|
||||
label-focused = %icon%
|
||||
label-focused-background = ${colors.yellow}
|
||||
label-focused-foreground = ${colors.bg}
|
||||
# label-focused-underline = ${colors.magenta}
|
||||
; label-focused-foreground = ${xrdb:color2}
|
||||
label-focused-padding = 1
|
||||
|
||||
label-occupied = %icon%
|
||||
label-occupied-foreground = ${colors.accent}
|
||||
label-occupied-padding = 1
|
||||
|
||||
label-urgent = %icon%
|
||||
label-urgent-foreground = ${colors.alert}
|
||||
; label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 1
|
||||
; label-urgent-font = 3
|
||||
|
||||
label-empty = %icon%
|
||||
label-empty-foreground = ${colors.fg-alt}
|
||||
label-empty-padding = 1
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
|
||||
; Seconds to sleep between updates
|
||||
interval = 1.0
|
||||
|
||||
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
|
||||
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||
date = %{T2} %{T-}%{T1} %d/%a%{T-}
|
||||
|
||||
; Optional time format
|
||||
time = %{T2} %H:%M%{T-}
|
||||
|
||||
; if `date-alt` or `time-alt` is defined, clicking
|
||||
; the module will toggle between formats
|
||||
date-alt = %{T2} %{T-} %{T1} %a, %d %b %y%{T-}
|
||||
time-alt = %{T2} %H:%M:%S%{T-}
|
||||
|
||||
label = %date%%time%
|
||||
label-font = 0
|
||||
label-foreground = ${colors.green}
|
||||
|
||||
[module/wireless-network]
|
||||
type = internal/network
|
||||
interface = wlp3s0
|
||||
|
||||
label-connected = %essid%
|
||||
label-connected-font = 2
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
label-connected-foreground = #82b414
|
||||
|
||||
|
||||
format-disconnected = <label-disconnected>
|
||||
label-disconnected = ""
|
||||
label-disconnected-foreground = #f92672
|
||||
|
||||
ramp-signal-foreground = #82b414
|
||||
ramp-signal-0 = " "
|
||||
ramp-signal-1 = " "
|
||||
ramp-signal-2 = " "
|
||||
ramp-signal-3 = " "
|
||||
ramp-signal-4 = " "
|
||||
ramp-signal-5 = " "
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 0.5
|
||||
|
||||
label = %{T2} %{T-}%{T1} %percentage:2%%%{T-}
|
||||
|
||||
label-foreground = ${colors.cyan}
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
|
||||
; Seconds to sleep between updates
|
||||
; Default: 1
|
||||
interval = 0.5
|
||||
format = <label>
|
||||
|
||||
; Available tokens:
|
||||
; %percentage_used% (default)
|
||||
; %percentage_free%
|
||||
; %gb_used%
|
||||
; %gb_free%
|
||||
; %gb_total%
|
||||
; %mb_used%
|
||||
; %mb_free%
|
||||
; %mb_total%
|
||||
; %percentage_swap_used%
|
||||
; %percentage_swap_free%
|
||||
; %mb_swap_total%
|
||||
; %mb_swap_free%
|
||||
; %mb_swap_used%
|
||||
; %gb_swap_total%
|
||||
; %gb_swap_free%
|
||||
; %gb_swap_used%
|
||||
|
||||
label = %{T2} %{T-}%{T1} %gb_used%%{T-}
|
||||
|
||||
label-foreground = ${colors.cyan}
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
|
||||
host = 0.0.0.0
|
||||
port = 6600
|
||||
|
||||
interval = 2
|
||||
|
||||
format-online = <label-song>
|
||||
format-online-background = ${colors.bg}
|
||||
format-online-foreground = ${colors.yellow}
|
||||
#format-online-padding = 20
|
||||
|
||||
label-song = %{T2}%artist% - %title%%{T-}
|
||||
label-song-maxlen = 55
|
||||
label-song-ellipsis = true
|
||||
|
||||
label-offline = "MPD is offline"
|
||||
|
||||
[module/mpd_i]
|
||||
type = internal/mpd
|
||||
|
||||
interval = 2
|
||||
|
||||
format-online = <icon-prev> <toggle> <icon-next>
|
||||
format-online-background = ${colors.bg}
|
||||
format-online-foreground = ${colors.yellow}
|
||||
#format-online-padding = 2
|
||||
|
||||
label-offline = "MPD is offline"
|
||||
|
||||
; Only applies if <icon-X> is used
|
||||
icon-play = %{T1}奈%{T-}
|
||||
icon-pause = %{T1}%{T-}
|
||||
icon-stop = %{T1}%{T-}
|
||||
icon-prev = %{T1}ﭣ%{T-}
|
||||
icon-next = %{T1}ﭡ%{T-}
|
||||
|
||||
;An empty module used to add 1 unit spacings whenever needed
|
||||
[module/sps]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-padding = 0
|
||||
|
||||
[module/volume]
|
||||
type = internal/pulseaudio
|
||||
|
||||
use-ui-max = false
|
||||
|
||||
interval = 5
|
||||
|
||||
format-volume = <ramp-volume> <bar-volume>
|
||||
|
||||
format-muted = <label-muted>
|
||||
format-muted-prefix = " "
|
||||
format-muted-prefix-font = 2
|
||||
format-muted-prefix-foreground = ${colors.mauve}
|
||||
|
||||
label-volume = "%percentage%% "
|
||||
label-muted = "Mute"
|
||||
|
||||
label-volume-foreground = ${colors.mauve}
|
||||
label-muted-foreground = ${colors.mauve}
|
||||
|
||||
bar-volume-width = 8
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 6
|
||||
bar-volume-indicator-foreground = ${colors.mauve}
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 6
|
||||
bar-volume-fill-foreground = ${colors.mauve}
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 6
|
||||
bar-volume-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
ramp-volume-0 = " "
|
||||
ramp-volume-1 = " "
|
||||
ramp-volume-2 = " "
|
||||
ramp-volume-3 = " "
|
||||
ramp-volume-4 = " "
|
||||
ramp-volume-5 = " "
|
||||
ramp-volume-6 = " "
|
||||
ramp-volume-7 = " "
|
||||
ramp-volume-8 = " "
|
||||
ramp-volume-9 = " "
|
||||
ramp-volume-font = 1
|
||||
ramp-volume-foreground = ${colors.mauve}
|
||||
|
||||
ramp-headphones-0 =
|
||||
ramp-headphones-1 =
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
|
||||
full-at = 99
|
||||
|
||||
adapter = ACAD
|
||||
battery = BAT0
|
||||
|
||||
poll-interval = 2
|
||||
time-format = %H:%M
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-prefix =
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
|
||||
format-full = <label-full>
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-font = 2
|
||||
format-full-prefix-foreground = ${colors.sky}
|
||||
|
||||
label-charging = "%percentage%% "
|
||||
label-discharging = "%percentage%% "
|
||||
label-full = "%percentage%%"
|
||||
|
||||
label-charging-foreground = ${colors.sky}
|
||||
label-discharging-foreground = ${colors.sky}
|
||||
label-charging-font = 2
|
||||
label-discharging-font = 2
|
||||
label-full-foreground = ${colors.sky}
|
||||
label-full-font = 2
|
||||
|
||||
ramp-capacity-0 = " "
|
||||
ramp-capacity-1 = " "
|
||||
ramp-capacity-2 = " "
|
||||
ramp-capacity-3 = " "
|
||||
ramp-capacity-4 = " "
|
||||
ramp-capacity-font = 1
|
||||
ramp-capacity-foreground = ${colors.sky}
|
||||
|
||||
animation-charging-0 = " "
|
||||
animation-charging-1 = " "
|
||||
animation-charging-2 = " "
|
||||
animation-charging-3 = " "
|
||||
animation-charging-4 = " "
|
||||
animation-charging-font = 1
|
||||
animation-charging-foreground = ${colors.sky}
|
||||
animation-charging-framerate = 750
|
||||
|
||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||
|
387
home/profiles/desktop/polybar/config.bak
Normal file
387
home/profiles/desktop/polybar/config.bak
Normal file
|
@ -0,0 +1,387 @@
|
|||
[colors]
|
||||
black = ${xrdb:color0}
|
||||
bblack = ${xrdb:color8}
|
||||
red = ${xrdb:color1}
|
||||
bred = ${xrdb:color9}
|
||||
green = ${xrdb:color2}
|
||||
bgreen = ${xrdb:color10}
|
||||
yellow = ${xrdb:color3}
|
||||
byellow = ${xrdb:color11}
|
||||
blue = ${xrdb:color4}
|
||||
bblue = ${xrdb:color12}
|
||||
magenta = ${xrdb:color5}
|
||||
bmagenta = ${xrdb:color13}
|
||||
cyan = ${xrdb:color6}
|
||||
bcyan = ${xrdb:color14}
|
||||
white = ${xrdb:color7}
|
||||
bwhite = ${xrdb:color15}
|
||||
|
||||
bg = ${xrdb:background}
|
||||
fg = ${colors.magenta}
|
||||
bg-alt = #1E2029
|
||||
fg-alt = #373844
|
||||
bg-dark = #181a23
|
||||
|
||||
alert = ${colors.yellow}
|
||||
accent = #604c7e
|
||||
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 34
|
||||
|
||||
[bar/main]
|
||||
monitor = ${env:MONITOR}
|
||||
monitor-strict = true
|
||||
enable-ipc = true
|
||||
wm-restack = bspwm
|
||||
# REQUIRED to move the window with hideit.sh
|
||||
override-redirect = true
|
||||
fixed-center = true
|
||||
|
||||
background = ${colors.bg}
|
||||
foreground = ${colors.fg}
|
||||
|
||||
width = 100%
|
||||
height = 34
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
# bottom = true
|
||||
|
||||
overline-size = 0
|
||||
overline-color = #f00
|
||||
underline-size = 0
|
||||
underline-color = #00f
|
||||
|
||||
border-bottom-size = 0
|
||||
border-top-size = 1
|
||||
border-color = ${colors.bg-dark}
|
||||
|
||||
padding-left = 2
|
||||
padding-right = 2
|
||||
module-margin-left = 0
|
||||
module-margin-right = 0
|
||||
|
||||
font-0 = "Fira Code:pixelsize=13;2"
|
||||
font-1 = "Wuncon Siji:pixelsize=16;2"
|
||||
font-2 = "Siji:pixelsize=10;2"
|
||||
|
||||
; modules-left = volume pad cpu memory pad pkg mail
|
||||
modules-left = pulseaudio pad cpu memory pad fs
|
||||
modules-center = bspwm
|
||||
modules-right = syncthing redshift wlan pad network-up pad network-down pad battery pad date
|
||||
|
||||
;tray-position = center
|
||||
;tray-padding = 2
|
||||
;tray-transparent = true
|
||||
;tray-background = #0063ff
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
pin-workspaces = true
|
||||
enable-click = true
|
||||
|
||||
# ws-icon-0 = 1;
|
||||
# ws-icon-1 = 2;
|
||||
# ws-icon-2 = 3;
|
||||
# ws-icon-3 = 4;
|
||||
# ws-icon-4 = 5;
|
||||
# ws-icon-5 = 6;
|
||||
ws-icon-default =
|
||||
fuzzy-match = true
|
||||
|
||||
format = <label-state> <label-mode>
|
||||
label-padding = 1
|
||||
|
||||
label-focused = %icon%
|
||||
label-focused-background = ${colors.bg-dark}
|
||||
label-focused-foreground = ${colors.fg}
|
||||
# label-focused-underline = ${colors.magenta}
|
||||
; label-focused-foreground = ${xrdb:color2}
|
||||
label-focused-padding = 1
|
||||
|
||||
label-occupied = %icon%
|
||||
label-occupied-foreground = ${colors.accent}
|
||||
label-occupied-padding = 1
|
||||
|
||||
; label-urgent = %icon%
|
||||
label-urgent-foreground = ${colors.alert}
|
||||
; label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 1
|
||||
|
||||
label-empty = %icon%
|
||||
label-empty-foreground = ${colors.fg-alt}
|
||||
label-empty-padding = 1
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
|
||||
label = %date% %time%
|
||||
date = %A, %h %d
|
||||
date-alt = %Y-%m-%d
|
||||
time = %I:%M %p
|
||||
time-alt = %H:%M:%S
|
||||
format-prefix = ""
|
||||
format-prefix-padding = 1
|
||||
; format-prefix-background = ${colors.bg-alt}
|
||||
format-prefix-foreground = ${colors.accent}
|
||||
; format-underline = ${xrdb:color4}
|
||||
|
||||
[module/fs]
|
||||
type = internal/fs
|
||||
mount-0 = /
|
||||
# mount-1 = /mnt/projects ; for desktops
|
||||
mount-2 = /home/anish
|
||||
interval = 30
|
||||
|
||||
; Available tags:
|
||||
; <label-mounted> (default)
|
||||
; <bar-free>
|
||||
; <bar-used>
|
||||
; <ramp-capacity>
|
||||
format-mounted = "<bar-used>"
|
||||
format-mounted-foreground = ${colors.accent}
|
||||
; Available tokens:
|
||||
; %mountpoint%
|
||||
; %type%
|
||||
; %fsname%
|
||||
; %percentage_free%
|
||||
; %percentage_used%
|
||||
; %total%
|
||||
; %free%
|
||||
; %used%
|
||||
; Default: %mountpoint% %percentage_free%%
|
||||
|
||||
; Available tags:
|
||||
; <label-unmounted> (default)
|
||||
format-unmounted =
|
||||
label-unmounted =
|
||||
label-unmounted-foreground = ${colors.fg-alt}
|
||||
|
||||
bar-used-indicator =
|
||||
bar-used-width = 8
|
||||
bar-used-foreground-0 = ${colors.fg}
|
||||
bar-used-foreground-1 = ${colors.fg}
|
||||
bar-used-foreground-2 = ${colors.yellow}
|
||||
bar-used-foreground-3 = ${colors.alert}
|
||||
bar-used-foreground-4 = ${colors.alert}
|
||||
bar-used-fill = |
|
||||
bar-used-empty = ¦
|
||||
bar-used-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:80:...%
|
||||
label-padding-left = 2
|
||||
|
||||
; [module/mpd]
|
||||
; type = internal/mpd
|
||||
; host = /home/hlissner/.config/mpd/mpd.sock
|
||||
;
|
||||
; format-online = <label-song> <toggle>
|
||||
; format-padding = 5
|
||||
;
|
||||
; label-song-maxlen = 45
|
||||
; label-song-ellipsis = true
|
||||
;
|
||||
; icon-prev =
|
||||
; icon-seekb =
|
||||
; icon-stop =
|
||||
; icon-play =
|
||||
; icon-pause =
|
||||
; icon-next =
|
||||
; icon-seekf =
|
||||
;
|
||||
; icon-random =
|
||||
; icon-repeat =
|
||||
;
|
||||
; toggle-on-foreground = ${colors.fg}
|
||||
; toggle-off-foreground = #66
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format = <bar-load>
|
||||
format-prefix = ""
|
||||
format-foreground = ${colors.accent}
|
||||
; format-underline = #f90000
|
||||
; label = %percentage%%
|
||||
format-padding = 1
|
||||
|
||||
bar-load-indicator =
|
||||
bar-load-width = 8
|
||||
bar-load-foreground-0 = ${colors.fg}
|
||||
bar-load-foreground-1 = ${colors.fg}
|
||||
bar-load-foreground-2 = ${colors.yellow}
|
||||
bar-load-foreground-3 = ${colors.alert}
|
||||
bar-load-foreground-4 = ${colors.alert}
|
||||
bar-load-fill = |
|
||||
bar-load-empty = ¦
|
||||
bar-load-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 3
|
||||
format = <bar-used>
|
||||
format-prefix = ""
|
||||
format-prefix-foreground = ${colors.accent}
|
||||
; format-underline = #4bffdc
|
||||
; label = %percentage_used%%
|
||||
format-padding-left = 1
|
||||
|
||||
; Only applies if <bar-used> is used
|
||||
bar-used-indicator =
|
||||
bar-used-width = 8
|
||||
bar-used-foreground-0 = ${colors.fg}
|
||||
bar-used-foreground-1 = ${colors.fg}
|
||||
bar-used-foreground-2 = ${colors.yellow}
|
||||
bar-used-foreground-3 = ${colors.alert}
|
||||
bar-used-foreground-4 = ${colors.alert}
|
||||
bar-used-fill = |
|
||||
bar-used-empty = ¦
|
||||
bar-used-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = ${env:WLP:wlp3s0}
|
||||
interval = 3.0
|
||||
|
||||
format-connected = <ramp-signal>
|
||||
format-disconnected =
|
||||
format-disconnected-foreground =
|
||||
|
||||
; label-connected =
|
||||
; label-disconnected = !
|
||||
; label-disconnected-foreground = ${colors.red}
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-0-foreground = ${colors.yellow}
|
||||
ramp-signal-1 =
|
||||
ramp-signal-1-foreground = ${colors.yellow}
|
||||
ramp-signal-2 =
|
||||
ramp-signal-2-foreground = ${colors.yellow}
|
||||
ramp-signal-3 =
|
||||
ramp-signal-3-foreground = ${colors.accent}
|
||||
ramp-signal-4 =
|
||||
ramp-signal-4-foreground = ${colors.fg}
|
||||
|
||||
|
||||
[module/network-up]
|
||||
type = internal/network
|
||||
interface = ${env:LAN:eno1}
|
||||
interval = 4.0
|
||||
label-connected = "%upspeed%"
|
||||
format-connected-prefix = " "
|
||||
format-connected-prefix-foreground = ${colors.accent}
|
||||
format-connected-foreground = ${colors.fg}
|
||||
format-connected-background =
|
||||
format-connected-underline =
|
||||
format-disconnected-prefix = " "
|
||||
format-disconnected-prefix-foreground = ${colors.alert}
|
||||
format-disconnected-foreground = ${colors.alert}
|
||||
|
||||
[module/network-down]
|
||||
type = internal/network
|
||||
interface = ${env:LAN:eno1}
|
||||
interval = 4.0
|
||||
label-connected = "%downspeed%"
|
||||
format-connected-prefix = " "
|
||||
format-connected-prefix-foreground = ${colors.accent}
|
||||
format-connected-foreground = ${colors.fg}
|
||||
format-connected-background =
|
||||
format-connected-underline =
|
||||
format-disconnected-prefix = " "
|
||||
format-disconnected-prefix-foreground = ${colors.alert}
|
||||
format-disconnected-foreground = ${colors.alert}
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
; format-volume = <label-volume> <bar-volume>
|
||||
format-volume = <ramp-volume> <bar-volume>
|
||||
; label-volume = " "
|
||||
label-volume-foreground = ${colors.accent}
|
||||
|
||||
; format-muted-prefix = " "
|
||||
format-muted-foreground = ${colors.alert}
|
||||
label-muted =
|
||||
|
||||
bar-volume-width = 8
|
||||
# bar-volume-foreground-0 = ${colors.magenta}
|
||||
# bar-volume-foreground-1 = ${colors.magenta}
|
||||
# bar-volume-foreground-2 = ${colors.magenta}
|
||||
# bar-volume-foreground-3 = ${colors.magenta}
|
||||
# bar-volume-foreground-4 = ${colors.magenta}
|
||||
# bar-volume-foreground-5 = ${colors.magenta}
|
||||
# bar-volume-foreground-6 = ${colors.magenta}
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 1
|
||||
bar-volume-indicator-foreground = #ff
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 1
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 1
|
||||
bar-volume-empty-foreground = ${colors.fg-alt}
|
||||
|
||||
; Only applies if <ramp-volume> is used
|
||||
ramp-volume-0 =
|
||||
ramp-volume-1 =
|
||||
ramp-volume-2 =
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = ADP1
|
||||
full-at = 98
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-underline = #ffb52a
|
||||
|
||||
format-discharging = <ramp-capacity> <label-discharging>
|
||||
format-discharging-underline = ${self.format-charging-underline}
|
||||
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-foreground = ${colors.fg-alt}
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-0-foreground = ${colors.red}
|
||||
ramp-capacity-1-foreground = #575864
|
||||
ramp-capacity-2-foreground = ${colors.fg-alt}
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-framerate = 1000
|
||||
animation-charging-foreground = ${colors.fg}
|
||||
|
||||
|
||||
;=====================================================
|
||||
; Custom scripts
|
||||
;=====================================================
|
||||
|
||||
[module/pad]
|
||||
type = custom/text
|
||||
content = " "
|
||||
content-foreground = ${colors.fg-alt}
|
||||
|
||||
[module/redshift]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/modules/redshift
|
||||
exec-if = pgrep -x redshift
|
||||
interval = 60
|
||||
format-padding = 1
|
||||
|
||||
[module/syncthing]
|
||||
type = custom/script
|
||||
exec = echo 1
|
||||
exec-if = systemctl is-active syncthing
|
||||
format = ""
|
||||
format-foreground = ${colors.fg}
|
||||
interval = 30
|
||||
|
||||
; vim:ft=dosini
|
21
home/profiles/desktop/polybar/modules/redshift
Executable file
21
home/profiles/desktop/polybar/modules/redshift
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Specifying the icon(s) in the script
|
||||
# This allows us to change its appearance conditionally
|
||||
pgrep -x redshift &> /dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
temp=$(redshift -p 2>/dev/null | grep temp | cut -d' ' -f3)
|
||||
temp=${temp//K/}
|
||||
fi
|
||||
|
||||
icon=""
|
||||
# OPTIONAL: Append ' ${temp}K' after $icon
|
||||
if [[ -z $temp ]]; then
|
||||
echo "%{F#65737E}$icon" # Greyed out (not running)
|
||||
elif [[ $temp -ge 5000 ]]; then
|
||||
echo "%{F#8FA1B3}$icon" # Blue
|
||||
elif [[ $temp -ge 4000 ]]; then
|
||||
echo "%{F#EBCB8B}$icon" # Yellow
|
||||
else
|
||||
echo "%{F#D08770}$icon" # Orange
|
||||
fi
|
7
home/profiles/desktop/polybar/run.sh
Executable file
7
home/profiles/desktop/polybar/run.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
pkill -u $UID -x polybar
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
polybar main >$XDG_DATA_HOME/polybar.log 2>&1 &
|
||||
echo 'Polybar launched...'
|
10
home/profiles/desktop/rofi/appmenu.rasi
Normal file
10
home/profiles/desktop/rofi/appmenu.rasi
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* -*- mode: css; -*- */
|
||||
@import "config.rasi"
|
||||
|
||||
textbox-icon {
|
||||
str: " ";
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: false;
|
||||
}
|
21
home/profiles/desktop/rofi/base.cyclemenu.rasi
Normal file
21
home/profiles/desktop/rofi/base.cyclemenu.rasi
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* -*- mode: css; -*- */
|
||||
@import "config.rasi"
|
||||
|
||||
window {
|
||||
y-offset: 0;
|
||||
children: [ listview ];
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
listview {
|
||||
scrollbar: false;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 30px;
|
||||
background-color: @bg-light;
|
||||
}
|
||||
element.selected {
|
||||
background-color: @accent;
|
||||
text-color: @bg;
|
||||
}
|
14
home/profiles/desktop/rofi/bookmarkmenu.rasi
Normal file
14
home/profiles/desktop/rofi/bookmarkmenu.rasi
Normal file
|
@ -0,0 +1,14 @@
|
|||
/* -*- mode: css; -*- */
|
||||
@import "config.rasi"
|
||||
|
||||
listview {
|
||||
columns: 1;
|
||||
}
|
||||
|
||||
textbox-icon {
|
||||
str: " ";
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: false;
|
||||
}
|
142
home/profiles/desktop/rofi/config.rasi
Normal file
142
home/profiles/desktop/rofi/config.rasi
Normal file
|
@ -0,0 +1,142 @@
|
|||
/* -*- mode: css; -*- */
|
||||
configuration {
|
||||
icon-theme: "Paper";
|
||||
cycle: true;
|
||||
disable-history: false;
|
||||
monitor: "-4";
|
||||
|
||||
/* Vim-esque C-j/C-k as up/down in rofi */
|
||||
kb-accept-entry: "Return,Control+m,KP_Enter";
|
||||
kb-row-down: "Down,Control+n,Control+j";
|
||||
kb-remove-to-eol: "";
|
||||
kb-row-up: "Up,Control+p,Control+k";
|
||||
}
|
||||
|
||||
* {
|
||||
bg-light: #1c1c1c;
|
||||
bg-focus: #282a36;
|
||||
bg-dark: #181a23;
|
||||
fg-list: #bbc2cf;
|
||||
on: #8BD49C;
|
||||
off: #cc6666;
|
||||
|
||||
accent: #ffcc66;
|
||||
bg: #1f2430f3;
|
||||
separatorcolor: transparent;
|
||||
fg: #bfbab0;
|
||||
selectioncolor: #fafafa;
|
||||
|
||||
text-color: @foregroundcolor;
|
||||
|
||||
magenta: #bd93f9;
|
||||
blue: #61bfff;
|
||||
|
||||
text-font: "Fira Sans 15";
|
||||
text-mono-font: "Fira Code 13";
|
||||
/* icon-font: "Hurmit Nerd Font Mono 26"; */
|
||||
icon-font: "FontAwesome 20";
|
||||
|
||||
background-color: transparent;
|
||||
text-color: @fg-list;
|
||||
font: @text-font;
|
||||
border-color: @bg-dark;
|
||||
}
|
||||
|
||||
|
||||
/**** Layout ****/
|
||||
window {
|
||||
width: 1000px;
|
||||
y-offset: -150px;
|
||||
anchor: north;
|
||||
location: center;
|
||||
border: 1px;
|
||||
border-radius: 6px 6px 0 0;
|
||||
children: [ inputbar, listview ];
|
||||
|
||||
}
|
||||
|
||||
listview {
|
||||
lines: 12;
|
||||
fixed-height: false;
|
||||
/* reverse: true; */
|
||||
columns: 2;
|
||||
scrollbar: true;
|
||||
spacing: 1px;
|
||||
/* Remove strange gap between listview and inputbar */
|
||||
margin: -2px 0 0;
|
||||
}
|
||||
|
||||
/*
|
||||
TODO Not supported in stable branch of rofi
|
||||
@media only (max-height: 1080px) {
|
||||
window {
|
||||
y-offset: -30%;
|
||||
}
|
||||
listview {
|
||||
lines: 14;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
scrollbar {
|
||||
handle-width: 1px;
|
||||
}
|
||||
inputbar {
|
||||
children: [ textbox-icon, prompt, entry ];
|
||||
border: 0 0 0;
|
||||
}
|
||||
textbox-icon, prompt {
|
||||
padding: 11px;
|
||||
expand: false;
|
||||
border: 0 1px 0 0;
|
||||
margin: 0 -2px 0 0;
|
||||
}
|
||||
textbox-icon {
|
||||
padding: 7px 4px 0;
|
||||
}
|
||||
entry, element {
|
||||
padding: 10px 13px;
|
||||
}
|
||||
textbox {
|
||||
padding: 24px;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
|
||||
/**** Looks ****/
|
||||
scrollbar {
|
||||
background-color: @bg-dark;
|
||||
handle-color: @accent;
|
||||
border-color: @bg-dark;
|
||||
}
|
||||
listview, inputbar {
|
||||
background-color: @bg;
|
||||
}
|
||||
textbox-icon, prompt, entry {
|
||||
text-color: @accent;
|
||||
}
|
||||
prompt, entry {
|
||||
background-color: @bg;
|
||||
}
|
||||
textbox-icon, prompt {
|
||||
background-color: #2f313d;
|
||||
}
|
||||
prompt {
|
||||
background-color: @bg-focus;
|
||||
}
|
||||
textbox-icon {
|
||||
font: @icon-font;
|
||||
}
|
||||
entry {
|
||||
font: @text-font-mono;
|
||||
text-color: @fg;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @bg;
|
||||
text-color: @fg;
|
||||
}
|
||||
element selected {
|
||||
background-color: @bg-dark;
|
||||
text-color: @accent;
|
||||
}
|
15
home/profiles/desktop/rofi/emojimenu.rasi
Normal file
15
home/profiles/desktop/rofi/emojimenu.rasi
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* -*- mode: css; -*- */
|
||||
|
||||
@import "config.rasi"
|
||||
|
||||
listview {
|
||||
columns: 4;
|
||||
}
|
||||
|
||||
textbox-icon {
|
||||
str: "🎑";
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: false;
|
||||
}
|
11
home/profiles/desktop/rofi/filemenu.rasi
Normal file
11
home/profiles/desktop/rofi/filemenu.rasi
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* -*- mode: css; -*- */
|
||||
|
||||
@import "config.rasi"
|
||||
|
||||
textbox-icon {
|
||||
str: " ";
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: true;
|
||||
}
|
43
home/profiles/desktop/rofi/iconmenu.rasi
Normal file
43
home/profiles/desktop/rofi/iconmenu.rasi
Normal file
|
@ -0,0 +1,43 @@
|
|||
@import "config.rasi"
|
||||
|
||||
* {
|
||||
icon-font : "Iosevka Nerd Font Mono 24";
|
||||
text-color : @fg;
|
||||
background-color : @bg;
|
||||
|
||||
margin : 0px;
|
||||
padding : 0px;
|
||||
spacing : 0px;
|
||||
}
|
||||
|
||||
window {
|
||||
location : north;
|
||||
children : [mainbox];
|
||||
}
|
||||
|
||||
mainbox {
|
||||
children : [listview];
|
||||
}
|
||||
|
||||
listview {
|
||||
columns : 8;
|
||||
lines : 1;
|
||||
}
|
||||
|
||||
element {
|
||||
children : [element-text];
|
||||
}
|
||||
|
||||
element-text {
|
||||
font : @icon-font;
|
||||
cursor : pointer;
|
||||
padding : 4px;
|
||||
|
||||
vertical-align : 0.5;
|
||||
horizontal-align : 0.5;
|
||||
}
|
||||
|
||||
element-text selected {
|
||||
text-color : @bg;
|
||||
background-color : @accent;
|
||||
}
|
10
home/profiles/desktop/rofi/passmenu.rasi
Normal file
10
home/profiles/desktop/rofi/passmenu.rasi
Normal file
|
@ -0,0 +1,10 @@
|
|||
/* -*- mode: css; -*- */
|
||||
@import "config.rasi"
|
||||
|
||||
listview {
|
||||
columns: 1;
|
||||
}
|
||||
|
||||
textbox-icon {
|
||||
str: " ";
|
||||
}
|
23
home/profiles/desktop/rofi/powermenu.rasi
Normal file
23
home/profiles/desktop/rofi/powermenu.rasi
Normal file
|
@ -0,0 +1,23 @@
|
|||
/** -*- mode: css; -*-
|
||||
* This theme is intended for a 5 items wide menu on a 1920x1080 pixels resolution.
|
||||
* You may have to tweak values such as the window padding if you have a different resolution.
|
||||
*/
|
||||
@import "appmenu.rasi"
|
||||
|
||||
window {
|
||||
children: [ listview ];
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
listview {
|
||||
scrollbar: false;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 30px;
|
||||
background-color: @bg;
|
||||
}
|
||||
element.selected {
|
||||
background-color: @off;
|
||||
text-color: @bg;
|
||||
}
|
22
home/profiles/desktop/rofi/screenshotmenu.rasi
Normal file
22
home/profiles/desktop/rofi/screenshotmenu.rasi
Normal file
|
@ -0,0 +1,22 @@
|
|||
@import "appmenu.rasi"
|
||||
|
||||
window {
|
||||
children: [ listview ];
|
||||
width: 264px;
|
||||
y-offset: -540px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
|
||||
listview {
|
||||
scrollbar: false;
|
||||
lines: 1;
|
||||
columns: 6;
|
||||
}
|
||||
|
||||
element {
|
||||
background-color: @bg;
|
||||
}
|
||||
element.selected {
|
||||
background-color: @off;
|
||||
text-color: @bg;
|
||||
}
|
27
home/profiles/desktop/rofi/windowmenu.rasi
Normal file
27
home/profiles/desktop/rofi/windowmenu.rasi
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* -*- mode: css; -*- */
|
||||
|
||||
@import "config.rasi"
|
||||
|
||||
listview {
|
||||
columns: 1;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
width: 1100px;
|
||||
}
|
||||
|
||||
textbox-icon {
|
||||
str: " ";
|
||||
}
|
||||
|
||||
prompt {
|
||||
enabled: false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Elements are tab-delimited, which look weird in the default variable-pitch
|
||||
* font, so use a monospace one.
|
||||
*/
|
||||
element {
|
||||
font: "Fira Code 12";
|
||||
}
|
9
home/profiles/desktop/run.sh
Executable file
9
home/profiles/desktop/run.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Cheap hack to get pointerCursor working because for some reason it doesn't...
|
||||
xsetroot -xcf /etc/profiles/per-user/anish/share/icons/capitaine-cursors/cursors/left_ptr 32
|
||||
|
||||
pkill -u $UID -x polybar
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
polybar mybar >$XDG_DATA_HOME/polybar.log 2>&1 &
|
131
home/profiles/desktop/sxhkdrc
Normal file
131
home/profiles/desktop/sxhkdrc
Normal file
|
@ -0,0 +1,131 @@
|
|||
super + alt + Escape
|
||||
bspc quit
|
||||
|
||||
super + {_,shift + }q
|
||||
bspc node -{c,k}
|
||||
|
||||
super + t
|
||||
bspc desktop -l next
|
||||
|
||||
super + apostrophe
|
||||
bspc window -s last
|
||||
|
||||
# Attach to a detached session. If none is available create a new one, rather
|
||||
# than attach to one that is already attached to elsewhere.
|
||||
super + Return
|
||||
kitty
|
||||
|
||||
ctrl + super + Return
|
||||
xst -e bash -c "(tmux ls | grep -qEv 'attached|scratch' && tmux at) || tmux"
|
||||
|
||||
super + space
|
||||
rofi -show drun -modi drun,run -show-icons -theme theme/appmenu.rasi
|
||||
|
||||
super + Tab
|
||||
rofi -show window -show-icons -theme theme/windowmenu.rasi
|
||||
|
||||
super + e
|
||||
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy
|
||||
|
||||
super + a
|
||||
paste
|
||||
|
||||
super + p
|
||||
passmenu
|
||||
|
||||
super + s
|
||||
powermenu
|
||||
|
||||
super + o
|
||||
screenshot
|
||||
|
||||
super + w
|
||||
wifimenu
|
||||
|
||||
super + b
|
||||
bluetoothmenu
|
||||
|
||||
# super + Escape
|
||||
# pkill -USR1 -x sxhkd
|
||||
|
||||
super + n
|
||||
xkblayout-state set +1
|
||||
|
||||
#
|
||||
##
|
||||
|
||||
## Toggle floating/fullscreen
|
||||
super + {_,ctrl + }f
|
||||
bspc node -t ~{floating,fullscreen}
|
||||
|
||||
super + {_,shift + }{h,j,k,l}
|
||||
bspc node -{f,s} {west,south,north,east}
|
||||
|
||||
super + ctrl + {h,j,k,l}
|
||||
bspc node -p {west,south,north,east}
|
||||
|
||||
## Resize by preselection
|
||||
super + alt + {1-9}
|
||||
$DOTFLES/bin/bspwm/presel 0.{1-9}
|
||||
|
||||
super + alt + {h,j,k,l}
|
||||
bspc node -p {west,south,north,east}
|
||||
|
||||
super + alt + Return
|
||||
$DOTFILES/bin/bspwm/subtract-presel
|
||||
|
||||
super + alt + Delete
|
||||
bspc node -p cancel
|
||||
|
||||
super + {_,shift +}{1-9,0}
|
||||
bspc {desktop -f,node -d} {1-9,10};
|
||||
|
||||
# expand a window by moving one of its side outward
|
||||
super + {Left,Down,Up,Right}
|
||||
bspc node -z {left -40 0,bottom 0 40,top 0 -40,right 40 0}
|
||||
|
||||
# contract a window by moving one of its side inward
|
||||
super + ctrl + {Left,Down,Up,Right}
|
||||
bspc node -z {right -40 0,top 0 40,bottom 0 -40,left 40 0}
|
||||
|
||||
# move a floating window
|
||||
super + shift + {Left,Down,Up,Right}
|
||||
bspc node -v {-40 0,0 40,0 -40,40 0}
|
||||
|
||||
|
||||
#
|
||||
## Media keys
|
||||
super + u
|
||||
mpv-ify
|
||||
|
||||
# screenshot region
|
||||
Print
|
||||
scrcap
|
||||
# screencast region to mp4
|
||||
super + Print
|
||||
scrrec -s ~/recordings/$(date +%F-%T).mp4
|
||||
# screencast region to gif
|
||||
super + ctrl + Print
|
||||
scrrec -s ~/recordings/$(date +%F-%T).gif
|
||||
|
||||
XF86MonBrightnessUp
|
||||
light -A 5
|
||||
XF86MonBrightnessDown
|
||||
light -U 5
|
||||
|
||||
XF86AudioMute
|
||||
amixer -q set Master toggle
|
||||
XF86AudioLowerVolume
|
||||
amixer -q set Master 10%- unmute
|
||||
XF86AudioRaiseVolume
|
||||
amixer -q set Master 10%+ unmute
|
||||
|
||||
XF86Audio{Play,Pause}
|
||||
spt-send toggle
|
||||
XF86AudioNext
|
||||
spt-send next
|
||||
XF86AudioPrev
|
||||
spt-send prev
|
||||
|
||||
# X86Search
|
||||
|
50
home/profiles/desktop/xdg.nix
Normal file
50
home/profiles/desktop/xdg.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
# xdg.nix
|
||||
#
|
||||
# Set up and enforce XDG compliance. Other modules will take care of their own,
|
||||
# but this takes care of the general cases.
|
||||
|
||||
{ config, home-manager, ... }:
|
||||
{
|
||||
### A tidy $HOME is a tidy mind
|
||||
home-manager.users.anish.xdg.enable = true;
|
||||
|
||||
environment = {
|
||||
sessionVariables = {
|
||||
# These are the defaults, and xdg.enable does set them, but due to load
|
||||
# order, they're not set before environment.variables are set, which could
|
||||
# cause race conditions.
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_BIN_HOME = "$HOME/.local/bin";
|
||||
};
|
||||
variables = {
|
||||
# Conform more programs to XDG conventions. The rest are handled by their
|
||||
# respective modules.
|
||||
__GL_SHADER_DISK_CACHE_PATH = "$XDG_CACHE_HOME/nv";
|
||||
ASPELL_CONF = ''
|
||||
per-conf $XDG_CONFIG_HOME/aspell/aspell.conf;
|
||||
personal $XDG_CONFIG_HOME/aspell/en_US.pws;
|
||||
repl $XDG_CONFIG_HOME/aspell/en.prepl;
|
||||
'';
|
||||
#CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv";
|
||||
HISTFILE = "$XDG_DATA_HOME/bash/history";
|
||||
INPUTRC = "$XDG_CONFIG_HOME/readline/inputrc";
|
||||
LESSHISTFILE = "$XDG_CACHE_HOME/lesshst";
|
||||
WGETRC = "$XDG_CONFIG_HOME/wgetrc";
|
||||
|
||||
# Tools I don't use
|
||||
# SUBVERSION_HOME = "$XDG_CONFIG_HOME/subversion";
|
||||
# BZRPATH = "$XDG_CONFIG_HOME/bazaar";
|
||||
# BZR_PLUGIN_PATH = "$XDG_DATA_HOME/bazaar";
|
||||
# BZR_HOME = "$XDG_CACHE_HOME/bazaar";
|
||||
# ICEAUTHORITY = "$XDG_CACHE_HOME/ICEauthority";
|
||||
};
|
||||
|
||||
# Move ~/.Xauthority out of $HOME (setting XAUTHORITY early isn't enough)
|
||||
#extraInit = ''
|
||||
# export XAUTHORITY=/tmp/Xauthority
|
||||
# [ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY"
|
||||
#'';
|
||||
};
|
||||
}
|
41
home/profiles/desktop/zathurarc
Normal file
41
home/profiles/desktop/zathurarc
Normal file
|
@ -0,0 +1,41 @@
|
|||
set notification-error-bg "#1f2430"
|
||||
set notification-error-fg "#fb4934"
|
||||
set notification-warning-bg "#1f2430"
|
||||
set notification-warning-fg "#fabd2f"
|
||||
set notification-bg "#1f2430"
|
||||
set notification-fg "#b8bb26"
|
||||
|
||||
set completion-bg "#1f2430"
|
||||
set completion-fg "#bfbab0"
|
||||
set completion-group-bg "#3c3836"
|
||||
set completion-group-fg "#928374"
|
||||
set completion-highlight-bg "#83a598"
|
||||
set completion-highlight-fg "#504945"
|
||||
|
||||
# Define the color in index mode
|
||||
set index-bg "#1f2430"
|
||||
set index-fg "#bfbab0"
|
||||
set index-active-bg "#83a598"
|
||||
set index-active-fg "#504945"
|
||||
|
||||
set inputbar-bg "#1f2430"
|
||||
set inputbar-fg "#bfbab0"
|
||||
|
||||
set statusbar-bg "#1f2430"
|
||||
set statusbar-fg "#bfbab0"
|
||||
|
||||
set highlight-color "#fabd2f"
|
||||
set highlight-active-color "#fe8019"
|
||||
|
||||
set default-bg "#1f2430"
|
||||
set default-fg "#bfbab0"
|
||||
set render-loading true
|
||||
set render-loading-bg "#1f2430"
|
||||
set render-loading-fg "#bfbab0"
|
||||
|
||||
# Recolor book content's color
|
||||
set recolor-lightcolor "#1f2430"
|
||||
set recolor-darkcolor "#bfbab0"
|
||||
set recolor "true"
|
||||
# set recolor-keephue true # keep original color
|
||||
|
9
home/profiles/direnv/default.nix
Normal file
9
home/profiles/direnv/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
# enableFlakes = true;
|
||||
};
|
||||
};
|
||||
}
|
302
home/profiles/email/default.nix
Normal file
302
home/profiles/email/default.nix
Normal file
|
@ -0,0 +1,302 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
#age.secrets.fastmail.file = "/etc/nixos/secrets/fastmail.age";
|
||||
#age.secrets.fastmail.owner = "anish";
|
||||
home.packages = with pkgs; [
|
||||
neomutt
|
||||
himalaya
|
||||
imapfilter
|
||||
browsh
|
||||
# icat
|
||||
];
|
||||
services.mbsync = {
|
||||
enable = true;
|
||||
frequency = "*:0/30";
|
||||
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
||||
};
|
||||
|
||||
services.imapnotify.enable = true;
|
||||
programs.mbsync.enable = true;
|
||||
programs.msmtp.enable = true;
|
||||
programs.notmuch.enable = true;
|
||||
home.file.".mailcap".text = ''
|
||||
text/html; firefox %s
|
||||
application/pdf; zathura %s
|
||||
image/png; feh %s
|
||||
image/jpeg; feh %s
|
||||
'';
|
||||
|
||||
programs.neomutt = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
# Shamelessly Stolen from https://gideonwolfe.com/posts/workflow/neomutt/intro/
|
||||
# set editor to neovim
|
||||
set editor = "nvim +':set textwidth=0'"
|
||||
|
||||
#set virtual_spoolfile=yes
|
||||
set folder="~/Maildir/anish"
|
||||
set mbox_type = Maildir
|
||||
mailboxes `find ~/Maildir/anish/* -maxdepth 0 -type d | grep -v "Trash\|Spam\|tmp\|new\|cur" | sed 's|/home/anish/Maildir/anish|=\"|g' | sed 's|$|\"|g' | tr '\n' ' '`
|
||||
|
||||
## Folder with emails
|
||||
#set folder = "~/Mail/anish"
|
||||
# Type of mailbox
|
||||
# Directory to poll for new mail
|
||||
#set spoolfile = +Inbox
|
||||
# Directory to save sent messages into
|
||||
#set record = +Sent
|
||||
# Sets the drafts folder
|
||||
set postponed = ~/Mail/anish/Drafts
|
||||
# File that headers will be cached
|
||||
# set header_cache = ~/.cache/mutt
|
||||
|
||||
set my_name = "Anish"
|
||||
set imap_check_subscribed
|
||||
|
||||
# Set preffered view modes
|
||||
auto_view text/html text/calendar application/ics # view html automatically
|
||||
alternative_order text/plain text/enriched text/html text/*
|
||||
|
||||
# main options
|
||||
set use_from
|
||||
set from="anish@lakhwara.com"
|
||||
set sendmail="msmtpq" # send from default account using msmtp
|
||||
set sendmail_wait=-1
|
||||
set edit_headers # show headers when composing
|
||||
set fast_reply # skip to compose when replying
|
||||
#set askcc # ask for CC:
|
||||
set fcc_attach # save attachments with the body
|
||||
set forward_format = "Fwd: %s" # format of subject when forwarding
|
||||
set forward_decode # decode when forwarding
|
||||
set attribution = "On %d, %n wrote:" # format of quoting header
|
||||
set reply_to # reply to Reply to: field
|
||||
set reverse_name # reply as whomever it was to
|
||||
set include # include message in replies
|
||||
set forward_quote # include message in forwards
|
||||
set text_flowed
|
||||
set ssl_force_tls
|
||||
set fast_reply
|
||||
#unset sig_dashes # no dashes before sig
|
||||
#unset mime_forward # forward attachments as part of body
|
||||
#unset help # No help bar at the top of index
|
||||
set status_on_top # Status bar on top of index
|
||||
#set tmpdir = ~/Programs/neomutt/temp # where to keep temp files
|
||||
|
||||
unset confirmappend # don't ask, just do!
|
||||
set quit # don't ask, just do!!
|
||||
unset mark_old # read/new is good enough for me
|
||||
set pipe_decode # strip headers and eval mimes when piping
|
||||
set thorough_search # strip headers and eval mimes before searching
|
||||
set timeout = 0
|
||||
|
||||
# status bar, date format, finding stuff etc.
|
||||
set status_chars = " *%A"
|
||||
set status_format = "[ Folder: %f ] [%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]%>─%?p?( %p postponed )?"
|
||||
set date_format = "%d.%m.%Y %H:%M"
|
||||
set reply_regexp = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
|
||||
set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
|
||||
set send_charset = "utf-8:iso-8859-1:us-ascii"
|
||||
set charset = "utf-8"
|
||||
set arrow_cursor = "no" # Change `color indicator` depending
|
||||
|
||||
# notmuch shortcuts
|
||||
# Points to the notmuch directory
|
||||
set nm_default_url = "notmuch://$HOME/Mail/anish"
|
||||
# Makes notmuch return threads rather than messages
|
||||
set nm_query_type = "threads"
|
||||
# Binding for notmuch search
|
||||
macro index,pager S "<vfolder-from-query>" "Search mailbox"
|
||||
|
||||
# Pager View Options
|
||||
set pager_index_lines = 10 # Shows 10 lines of index when pager is active
|
||||
set pager_context = 3
|
||||
set pager_stop
|
||||
set menu_scroll
|
||||
set tilde
|
||||
set mail_check_stats
|
||||
unset markers
|
||||
|
||||
#set header_cache = "~/.cache/mutt"
|
||||
#set message_cachedir = "~/.cache/mutt"
|
||||
|
||||
set query_command = "khard email --parsable --search-in-source-files '%s'"
|
||||
|
||||
### Mappings Settings
|
||||
|
||||
# General rebindings
|
||||
bind attach <return> view-mailcap
|
||||
bind attach l view-mailcap
|
||||
bind editor <space> noop
|
||||
bind pager c imap-fetch-mail
|
||||
bind index G last-entry
|
||||
bind index g noop
|
||||
bind index gg first-entry
|
||||
bind pager,attach h exit
|
||||
bind pager j next-line
|
||||
bind pager k previous-line
|
||||
bind pager l view-attachments
|
||||
bind index D delete-message
|
||||
bind index U undelete-message
|
||||
bind index L limit
|
||||
bind index h noop
|
||||
bind index l display-message
|
||||
bind browser h goto-parent
|
||||
bind browser l select-entry
|
||||
bind pager,browser gg top-page
|
||||
bind pager,browser G bottom-page
|
||||
bind index,pager,browser d half-down
|
||||
bind index,pager,browser u half-up
|
||||
# bind index,pager R group-reply
|
||||
bind index \031 previous-undeleted # Mouse wheel
|
||||
bind index \005 next-undeleted # Mouse wheel
|
||||
bind pager \031 previous-line # Mouse wheel
|
||||
bind pager \005 next-line # Mouse wheel
|
||||
bind editor <Tab> complete-query
|
||||
|
||||
|
||||
# sidebar mappings
|
||||
set sidebar_short_path=yes
|
||||
set sidebar_delim_chars='/'
|
||||
bind index,pager \Ck sidebar-prev
|
||||
bind index,pager \Cj sidebar-next
|
||||
bind index,pager \Co sidebar-open
|
||||
bind index,pager \Cp sidebar-prev-new
|
||||
bind index,pager \Cn sidebar-next-new
|
||||
bind index,pager B sidebar-toggle-visible
|
||||
|
||||
# global index and pager shortcuts
|
||||
bind index,pager @ compose-to-sender
|
||||
bind index,pager D purge-message
|
||||
bind index <tab> sync-mailbox
|
||||
bind index <space> collapse-thread
|
||||
|
||||
# Email completion bindings
|
||||
bind editor <Tab> complete-query
|
||||
bind editor ^T complete
|
||||
|
||||
# Press A to archive
|
||||
macro index,pager A "<clear-flag><save-message>=/Archive" "mark message as Archived"
|
||||
# Press C to add contact to Khard address book
|
||||
macro index,pager C \
|
||||
"<pipe-message>khard add-email<return>" \
|
||||
"add the sender email address to khard"
|
||||
|
||||
### Color Settings
|
||||
# Header colors:
|
||||
color header blue default ".*"
|
||||
color header brightmagenta default "^(From)"
|
||||
color header brightcyan default "^(Subject)"
|
||||
color header brightwhite default "^(CC|BCC)"
|
||||
|
||||
mono bold bold
|
||||
mono underline underline
|
||||
mono indicator reverse
|
||||
mono error bold
|
||||
color normal default default
|
||||
color indicator brightyellow default # currently selected message. default makes bar clear, disabled arrow to save space.
|
||||
color sidebar_highlight red default
|
||||
color sidebar_divider brightblack black
|
||||
color sidebar_flagged red black
|
||||
color sidebar_new green black
|
||||
color normal brightyellow default
|
||||
color error red default
|
||||
color tilde black default
|
||||
color message cyan default
|
||||
color markers red white
|
||||
color attachment white default
|
||||
color search brightmagenta default
|
||||
color status brightyellow black
|
||||
color hdrdefault brightgreen default
|
||||
color quoted green default
|
||||
color quoted1 blue default
|
||||
color quoted2 cyan default
|
||||
color quoted3 yellow default
|
||||
color quoted4 red default
|
||||
color quoted5 brightred default
|
||||
color signature brightgreen default
|
||||
color bold black default
|
||||
color underline black default
|
||||
color normal default default
|
||||
|
||||
color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses
|
||||
color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL
|
||||
color body green default "\`[^\`]*\`" # Green text between ` and `
|
||||
color body brightblue default "^# \.*" # Headings as bold blue
|
||||
color body brightcyan default "^## \.*" # Subheadings as bold cyan
|
||||
color body brightgreen default "^### \.*" # Subsubheadings as bold green
|
||||
color body yellow default "^(\t| )*(-|\\*) \.*" # List items as yellow
|
||||
color body brightcyan default "[;:][-o][)/(|]" # emoticons
|
||||
color body brightcyan default "[;:][)(|]" # emoticons
|
||||
color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon?
|
||||
color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon?
|
||||
color body red default "(BAD signature)"
|
||||
color body cyan default "(Good signature)"
|
||||
color body brightblack default "^gpg: Good signature .*"
|
||||
color body brightyellow default "^gpg: "
|
||||
color body brightyellow red "^gpg: BAD signature from.*"
|
||||
mono body bold "^gpg: Good signature"
|
||||
mono body bold "^gpg: BAD signature from.*"
|
||||
color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]"
|
||||
|
||||
# Default index colors:
|
||||
color index yellow default '.*'
|
||||
color index_author red default '.*'
|
||||
color index_number blue default
|
||||
color index_subject cyan default '.*'
|
||||
|
||||
# For new mail:
|
||||
color index brightyellow black "~N"
|
||||
color index_author brightred black "~N"
|
||||
color index_subject brightcyan black "~N"
|
||||
|
||||
color progress black cyan
|
||||
|
||||
'';
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
accounts.anish = {
|
||||
primary = true;
|
||||
address = "anish@lakhwara.com";
|
||||
#alias = [ "*@lakhwara.com" ];
|
||||
#gpg = {
|
||||
# key = "";
|
||||
# signByDefault = true;
|
||||
#};
|
||||
imap.host = "imap.fastmail.com";
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
remove = "both";
|
||||
extraConfig.local.subFolders = "Verbatim";
|
||||
};
|
||||
imapnotify = {
|
||||
enable = true;
|
||||
boxes = [ "Inbox" ];
|
||||
onNotify = "${pkgs.isync}/bin/mbsync anish && ${pkgs.notmuch}/bin/notmuch new";
|
||||
onNotifyPost = "${pkgs.libnotify}/bin/notify-send 'New Email 📩'";
|
||||
};
|
||||
msmtp.enable = true;
|
||||
msmtp.extraConfig = {
|
||||
"port" = "465";
|
||||
};
|
||||
notmuch.enable = true;
|
||||
realName = "Anish Lakhwara";
|
||||
signature = {
|
||||
text = ''
|
||||
Thanks,
|
||||
Anish
|
||||
'';
|
||||
showSignature = "append";
|
||||
};
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat /run/agenix/fastmail";
|
||||
smtp = {
|
||||
host = "smtp.fastmail.com";
|
||||
};
|
||||
userName = "anish@lakhwara.com";
|
||||
neomutt.enable = true;
|
||||
himalaya.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
1
home/profiles/email/imapnotify-anish-config.json
Normal file
1
home/profiles/email/imapnotify-anish-config.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"boxes":["Inbox"],"host":"imap.fastmail.com","onNewMail":"/nix/store/pmvvqwrsyv6ah0x8c82hgkddas5f9ajb-isync-1.4.4/bin/mbsync anish && /nix/store/wyi8a02kk3vh5y7qhdkfzyibb1yl0xc1-notmuch-0.37/bin/notmuch index","onNewMailPost":{"mail":"/nix/store/q360zpybna4djr4kjhjg6hmkk3vj7pjf-libnotify-0.8.1/bin/notify-send -a mail 'email: new in %s'"},"passwordCmd":"'/nix/store/a7gvj343m05j2s32xcnwr35v31ynlypr-coreutils-9.1/bin/cat' '/run/agenix/fastmail'","port":993,"tls":true,"username":"anish@lakhwara.com"}
|
158
home/profiles/firefox/default.nix
Normal file
158
home/profiles/firefox/default.nix
Normal file
|
@ -0,0 +1,158 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Imperative steps:
|
||||
# - Enable & configure plugins
|
||||
# - Run :colourscheme --url https://raw.githubusercontent.com/lonepie/dracula-tridactyl/main/dracula.css dracula for tridactyl theme
|
||||
# - Import css for sidebery from sidebery.css
|
||||
# - Configure wallabagger, shaarli, grasp
|
||||
|
||||
|
||||
programs.browserpass.enable = true;
|
||||
programs.browserpass.browsers = [ "firefox" ];
|
||||
#env.XDG_DEXSTOP_DIR = "$HOME/";
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles.anish = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
name = "anish";
|
||||
userChrome = (builtins.readFile ./userChrome.css);
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
# Find extensions: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
|
||||
ublock-origin
|
||||
# wallabagger
|
||||
# tree-style-tab
|
||||
tridactyl
|
||||
promnesia
|
||||
sidebery
|
||||
(buildFirefoxXpiAddon {
|
||||
pname = "shaarli";
|
||||
version = "2.0.0";
|
||||
addonId = "shaarli@imirhil.fr";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/815126/shaarli-2.0.0.xpi";
|
||||
sha256 = "W/OpvOfMclibP6LeG573/DlMs0p8fF0efyd+i8Sudgg=";
|
||||
meta = { };
|
||||
})
|
||||
(buildFirefoxXpiAddon {
|
||||
pname = "grasp";
|
||||
version = "0.6.6";
|
||||
addonId = "{37e42980-a7c9-473c-96d5-13f18e0efc74}";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3502186/grasp-0.6.6.xpi";
|
||||
sha256 = "L4JhT29MeA34nHIlB8FtCU7hrpbWljZZBusx12uxblE=";
|
||||
meta = { };
|
||||
})
|
||||
];
|
||||
|
||||
settings = {
|
||||
"browser.zoom.siteSpecific" = false;
|
||||
"zoom.minPercent" = "150"; # TODO doesn't seem to work anymore, you have to manually go into preferences and set the zoom level.
|
||||
"devtools.theme" = "dark";
|
||||
# Enable userContent.css and userChrome.css for our theme modules
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
# Stop creating ~/Downloads!
|
||||
"browser.download.dir" = "/home/anish/downloads"; # TODO Don't hardcode this!
|
||||
# Don't use the built-in password manager; a nixos user is more likely
|
||||
# using an external one (you are using one, right?).
|
||||
# I am, but it's far too convienent. I'm enabling 2FA anyway so w/e
|
||||
#"signon.rememberSignons" = false;
|
||||
# Do not check if Firefox is the default browser
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
# Disable the "new tab page" feature and show a blank tab instead
|
||||
# https://wiki.mozilla.org/Privacy/Reviews/New_Tab
|
||||
# https://support.mozilla.org/en-US/kb/new-tab-page-show-hide-and-customize-top-sites#w_how-do-i-turn-the-new-tab-page-off
|
||||
"browser.newtabpage.enabled" = false;
|
||||
"browser.newtab.url" = "about:blank";
|
||||
# Disable Activity Stream
|
||||
# https://wiki.mozilla.org/Firefox/Activity_Stream
|
||||
"browser.newtabpage.activity-stream.enabled" = false;
|
||||
# Disable new tab tile ads & preload
|
||||
# http://www.thewindowsclub.com/disable-remove-ad-tiles-from-firefox
|
||||
# http://forums.mozillazine.org/viewtopic.php?p=13876331#p13876331
|
||||
# https://wiki.mozilla.org/Tiles/Technical_Documentation#Ping
|
||||
# https://gecko.readthedocs.org/en/latest/browser/browser/DirectoryLinksProvider.html#browser-newtabpage-directory-source
|
||||
# https://gecko.readthedocs.org/en/latest/browser/browser/DirectoryLinksProvider.html#browser-newtabpage-directory-ping
|
||||
"browser.newtabpage.enhanced" = false;
|
||||
"browser.newtab.preload" = false;
|
||||
"browser.newtabpage.directory.ping" = "";
|
||||
"browser.newtabpage.directory.source" = "data:text/plain,{}";
|
||||
# Disable some not so useful functionality.
|
||||
"media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
|
||||
"extensions.htmlaboutaddons.recommendations.enabled" = false;
|
||||
"extensions.htmlaboutaddons.discover.enabled" = false;
|
||||
"extensions.pocket.enabled" = false;
|
||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
|
||||
"extensions.pocket.api" = "";
|
||||
"extensions.pocket.oAuthConsumerKey" = "";
|
||||
"extensions.pocket.showHome" = false;
|
||||
"extensions.pocket.site" = "";
|
||||
"app.normandy.enabled" = false;
|
||||
"app.normandy.api_url" = "";
|
||||
"extensions.shield-recipe-client.enabled" = false;
|
||||
"app.shield.optoutstudies.enabled" = false;
|
||||
# Disable battery API
|
||||
# https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1313580
|
||||
"dom.battery.enabled" = false;
|
||||
# Disable "beacon" asynchronous HTTP transfers (used for analytics)
|
||||
# https://developer.mozilla.org/en-US/docs/Web/API/navigator.sendBeacon
|
||||
"beacon.enabled" = false;
|
||||
# Disable pinging URIs specified in HTML <a> ping= attributes
|
||||
# http://kb.mozillazine.org/Browser.send_pings
|
||||
"browser.send_pings" = false;
|
||||
# Disable gamepad API to prevent USB device enumeration
|
||||
# https://www.w3.org/TR/gamepad/
|
||||
# https://trac.torproject.org/projects/tor/ticket/13023
|
||||
"dom.gamepad.enabled" = false;
|
||||
# Don't try to guess domain names when entering an invalid domain name in URL bar
|
||||
# http://www-archive.mozilla.org/docs/end-user/domain-guessing.html
|
||||
"browser.fixup.alternate.enabled" = false;
|
||||
# Disable telemetry
|
||||
# https://wiki.mozilla.org/Platform/Features/Telemetry
|
||||
# https://wiki.mozilla.org/Privacy/Reviews/Telemetry
|
||||
# https://wiki.mozilla.org/Telemetry
|
||||
# https://www.mozilla.org/en-US/legal/privacy/firefox.html#telemetry
|
||||
# https://support.mozilla.org/t5/Firefox-crashes/Mozilla-Crash-Reporter/ta-p/1715
|
||||
# https://wiki.mozilla.org/Security/Reviews/Firefox6/ReviewNotes/telemetry
|
||||
# https://gecko.readthedocs.io/en/latest/browser/experiments/experiments/manifest.html
|
||||
# https://wiki.mozilla.org/Telemetry/Experiments
|
||||
# https://support.mozilla.org/en-US/questions/1197144
|
||||
# https://firefox-source-docs.mozilla.org/toolkit/components/telemetry/telemetry/internals/preferences.html#id1
|
||||
"toolkit.telemetry.enabled" = false;
|
||||
"toolkit.telemetry.unified" = false;
|
||||
"toolkit.telemetry.archive.enabled" = false;
|
||||
"experiments.supported" = false;
|
||||
"experiments.enabled" = false;
|
||||
"experiments.manifest.uri" = "";
|
||||
"privacy.donottrackheader.enabled" = true;
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
"privacy.trackingprotection.socialtracking.enabled" = true;
|
||||
"privacy.partition.network_state.ocsp_cache" = true;
|
||||
# Disable health reports (basically more telemetry)
|
||||
# https://support.mozilla.org/en-US/kb/firefox-health-report-understand-your-browser-perf
|
||||
# https://gecko.readthedocs.org/en/latest/toolkit/components/telemetry/telemetry/preferences.html
|
||||
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
|
||||
"browser.newtabpage.activity-stream.telemetry" = false;
|
||||
"browser.ping-centre.telemetry" = false;
|
||||
"toolkit.telemetry.bhrPing.enabled" = false;
|
||||
"toolkit.telemetry.firstShutdownPing.enabled" = false;
|
||||
"toolkit.telemetry.hybridContent.enabled" = false;
|
||||
"toolkit.telemetry.newProfilePing.enabled" = false;
|
||||
"toolkit.telemetry.reportingpolicy.firstRun" = false;
|
||||
"toolkit.telemetry.shutdownPingSender.enabled" = false;
|
||||
"toolkit.telemetry.updatePing.enabled" = false;
|
||||
|
||||
# As well as Firefox 'experiments'
|
||||
"experiments.activeExperiment" = false;
|
||||
"network.allow-experiments" = false;
|
||||
"datareporting.healthreport.uploadEnabled" = false;
|
||||
"datareporting.healthreport.service.enabled" = false;
|
||||
"datareporting.policy.dataSubmissionEnabled" = false;
|
||||
# Pipewire optimizations
|
||||
# https://gitlab.freedesktop.org/pipewire/pipewire/-/wikis/Performance-tuning#firefox
|
||||
"reader.parse-on-load.enabled" = false;
|
||||
"media.webspeech.synth.enabled" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
135
home/profiles/firefox/sidebery.css
Normal file
135
home/profiles/firefox/sidebery.css
Normal file
|
@ -0,0 +1,135 @@
|
|||
/* ROOT */
|
||||
|
||||
#root {
|
||||
/* Tab and PinnedTab height adjustment */
|
||||
--tabs-height: 33px;
|
||||
--tabs-pinned-height: var(--tabs-height);
|
||||
/* Dark Theme base settings */
|
||||
--bg: #1f2430 !important;
|
||||
--tabs-fg: #d4d4d4 !important;
|
||||
--tabs-bg-hover: #3b3948 !important;
|
||||
--tabs-activated-bg: #5b5b66 !important;
|
||||
--nav-btn-activated-bg: #1f222f !important;
|
||||
}
|
||||
|
||||
#root .Tab {
|
||||
--tabs-indent: 7px;
|
||||
}
|
||||
|
||||
/* TABS */
|
||||
|
||||
.Tab .lvl-wrapper:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.Tab {
|
||||
margin: auto;
|
||||
width: 94%;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.Tab .close > svg:hover {
|
||||
/* Styling the tab close button */
|
||||
border-radius: 3px;
|
||||
background: #492121 !important;
|
||||
opacity: 100%;
|
||||
}
|
||||
|
||||
.Tab .title {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
|
||||
/* PINNED TABS */
|
||||
|
||||
.PinnedDock {
|
||||
background-color: var(--bg) !important;
|
||||
}
|
||||
|
||||
.PinnedTab {
|
||||
margin: 5px 0px 4px 6px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
|
||||
/* NAV BAR */
|
||||
|
||||
.NavigationBar {
|
||||
height: 41px !important;
|
||||
padding: 4.5px 0px 0px 4.5px !important;
|
||||
background-color: #2B2A33 !important;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.NavigationBar .panel-btn:hover {
|
||||
border-radius: 3px !important;
|
||||
background-color: var(--tabs-bg-hover) !important;
|
||||
}
|
||||
|
||||
.NavigationBar .panel-btn[data-active="true"] {
|
||||
border-radius: 3px !important;
|
||||
background-color: var(--bg) !important;
|
||||
}
|
||||
|
||||
.NavigationBar .panel-btn[data-active="true"]:hover {
|
||||
border-radius: 3px !important;
|
||||
background-color: var(--tabs-bg-hover) !important;
|
||||
}
|
||||
|
||||
.NavigationBar .panel-btn > svg,
|
||||
.NavigationBar .panel-btn > img {
|
||||
fill: #f2f2f2 !important;
|
||||
}
|
||||
|
||||
|
||||
/* SIDEBAR HACK PATCHES */
|
||||
|
||||
@media (max-width: 50px) {
|
||||
/* Fix to tab tree identation when minimised */
|
||||
#root:not(:hover) .Tab {
|
||||
--tabs-indent: 0px;
|
||||
}
|
||||
|
||||
.Tab[data-lvl] > div.lvl-wrapper {
|
||||
right: -2px;
|
||||
}
|
||||
|
||||
.Tab {
|
||||
max-width: 34px;
|
||||
}
|
||||
|
||||
.Tab .fav {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.Tab .audio {
|
||||
z-index: 1;
|
||||
margin-left: -12px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.Tab .title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.PinnedTab {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.NavigationBar .settings-btn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* OPTIONS */
|
||||
|
||||
/* Disable these two snippets below to make pinned tabs wrap when minimised */
|
||||
.PinnedDock {
|
||||
flex-wrap: nowrap! important;
|
||||
}
|
||||
|
||||
.PinnedTab {
|
||||
overflow: hidden !important;
|
||||
min-width: var(--tabs-pinned-width) !important;
|
||||
}
|
278
home/profiles/firefox/treestyletab.css
Normal file
278
home/profiles/firefox/treestyletab.css
Normal file
|
@ -0,0 +1,278 @@
|
|||
:root{
|
||||
--dark-0: #1A1E28;
|
||||
--dark-base: #1F2430;
|
||||
--dark-1: #2A3141;
|
||||
--dark-2: #323A4E;
|
||||
--dark-3: #424D67;
|
||||
--dark-4: #4A5673;
|
||||
--light-0: #E8E7E3;
|
||||
--light-base: #CCCAC2;
|
||||
--light-1: #C3C0B7;
|
||||
--light-2: #B9B7AC;
|
||||
--light-3: #B0ADA0;
|
||||
--light-4: #A7A395;
|
||||
--accent: #FFCC66;
|
||||
--yellow: #695380;
|
||||
--green: #D5FF80;
|
||||
--red: #f28779;
|
||||
--extension-icon-mask: grayscale(85%) invert(30%) sepia(13%) saturate(1019%) hue-rotate(184deg) brightness(95%) contrast(96%);
|
||||
}
|
||||
|
||||
:root.incognito{
|
||||
--dark-0: #1C0E34;
|
||||
--dark-base: #20103c;
|
||||
--dark-1: #2F1D4E;
|
||||
--dark-2: #38225D;
|
||||
--dark-3: #4A2D7B;
|
||||
--dark-4: #53338A;
|
||||
--light-0: #CC6B9C;
|
||||
--light-base: #B9407C;
|
||||
--light-1: #AB3B73;
|
||||
--light-2: #9C3569;
|
||||
--light-3: #8D305E;
|
||||
--light-4: #7D2B54;
|
||||
--accent: #e9207e;
|
||||
--yellow: #C9B336;
|
||||
--green: #36C987;
|
||||
--red: #C9365D;
|
||||
--extension-icon-mask: grayscale(85%) invert(17%) sepia(33%) saturate(3632%) hue-rotate(245deg) brightness(92%) contrast(90%);
|
||||
}
|
||||
|
||||
|
||||
:root{
|
||||
--tab-border-radius: 7px; /* border radius of tabs */
|
||||
--animation-duration: 200ms; /* duration of different animations [0s: turn all animations off] */
|
||||
--spacing: 14px; /* spacing between tabs. [<15px: compact tabs] */
|
||||
--distance-from-edge: 10px; /* distance between tabs, and left-right edges of sidebar*/
|
||||
--hover-text-spacing: 0.1; /* should be left alone. with hover sidebar, if text is visible in collapsed status, increase this */
|
||||
|
||||
--ease-in: cubic-bezier(0.32, 0, 0.67, 0);
|
||||
--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
|
||||
--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
|
||||
|
||||
--collapsed-width: 60px;
|
||||
}
|
||||
|
||||
/************UNCUSTOMIZED CSS************/
|
||||
#tabbar-container #tabbar{
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
|
||||
:root, #background{
|
||||
background: var(--dark-base) !important;
|
||||
}
|
||||
|
||||
#all-tabs{
|
||||
margin: 10px var(--distance-from-edge);
|
||||
}
|
||||
|
||||
tab-item:not(.collapsed) {
|
||||
margin-top: var(--spacing);
|
||||
border-radius: var(--tab-border-radius);
|
||||
border: none !important;
|
||||
padding-top: 9px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
tab-item.collapsed{
|
||||
height: 0;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
tab-item:not([data-level="0"]):not(.pinned){
|
||||
border-left: dashed 2px var(--light-4) !important;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
margin-top: calc(var(--spacing)/2);
|
||||
}
|
||||
|
||||
tab-item tab-favicon{
|
||||
left: 0;
|
||||
filter: var(--extension-icon-mask);
|
||||
transition: left calc(var(--animation-duration)*2) var(--ease-out);
|
||||
}
|
||||
|
||||
.highlighter {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
tab-item .label {
|
||||
color: var(--light-2) !important;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
|
||||
tab-item .twisty:before{
|
||||
background: var(--light-3) !important;
|
||||
}
|
||||
|
||||
tab-item.active .label {
|
||||
color: var(--light-0) !important;
|
||||
}
|
||||
|
||||
tab-item.active {
|
||||
background: var(--dark-3) !important;
|
||||
}
|
||||
|
||||
|
||||
tab-item:not(.active).highlighted{
|
||||
background: var(--dark-1) !important;
|
||||
}
|
||||
|
||||
tab-item:not(active):hover {
|
||||
background: var(--dark-1);
|
||||
}
|
||||
|
||||
tab-item:hover tab-closebox {
|
||||
right: 10px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
tab-item:not(pinned) tab-closebox {
|
||||
position: absolute;
|
||||
margin-top: 2px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
right: -30px;
|
||||
border-radius: 50%;
|
||||
padding-top: 2px;
|
||||
padding-left: 2px;
|
||||
background: var(--light-4);
|
||||
transition : all var(--animation-duration) var(--ease-out);
|
||||
}
|
||||
|
||||
.sound-button:after {
|
||||
background: var(--light-3) !important;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.counter{
|
||||
color: var(--light-4) !important;
|
||||
background: var(--dark-2) !important;
|
||||
border-radius: 7px;
|
||||
margin: 2px 2px 0px 0px;
|
||||
padding: 0 4px;
|
||||
padding-bottom: 2px;
|
||||
order: -2 !important;
|
||||
}
|
||||
|
||||
.counter:before, .counter:after{ content: ""}
|
||||
|
||||
/********LEFT CONTENT TAB(static)*************/
|
||||
|
||||
:root.left tab-item{
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
:root.left tab-item tab-favicon {
|
||||
transform: scale(120%);
|
||||
margin-right: 5px;
|
||||
left: 80%;
|
||||
}
|
||||
|
||||
:root.left tab-item .label {
|
||||
transform: translateX(10px);
|
||||
right: 28%;
|
||||
}
|
||||
|
||||
|
||||
:root.left tab-item[data-child-ids] .twisty{
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/********RIGHT CONTENT TAB(hover)*************/
|
||||
|
||||
:root.right tab-item .label {
|
||||
margin-left: 10px;
|
||||
margin-right: calc(var(--collapsed-width)*0.3) !important;
|
||||
}
|
||||
|
||||
:root.right tab-item:not(pinned):hover tab-closebox{
|
||||
right: calc(var(--collapsed-width)*0.3);
|
||||
}
|
||||
|
||||
:root.right tab-item:not([data-level="0"]):not(.pinned){
|
||||
border: none !important;
|
||||
border-right: dashed 2px var(--light-4) !important;
|
||||
border-radius: var(--tab-border-radius);
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
:root.right tab-item.active:not([data-level="0"]):not(.pinned){
|
||||
margin-right: 5px !important;
|
||||
}
|
||||
|
||||
:root.right .sound-button{
|
||||
order: -1 !important;
|
||||
}
|
||||
|
||||
:root.right tab-item.active.pinned {
|
||||
position: relative;
|
||||
left: 190px !important;
|
||||
}
|
||||
|
||||
:root.right tab-item.active.pinned tab-favicon {
|
||||
transform: scale(130%) !important;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
/***********************************/
|
||||
|
||||
.tab
|
||||
.favicon
|
||||
.favicon-default::before {
|
||||
filter: var(--extension-icon-mask); // change for light theme
|
||||
}
|
||||
|
||||
.tab[data-current-favicon-uri="undefined"]
|
||||
.favicon
|
||||
.favicon-default::before{
|
||||
background: url("chrome://branding/content/identity-icons-brand.svg") no-repeat center !important;
|
||||
mask: none !important;
|
||||
}
|
||||
|
||||
/***********NEW TAB BUTTON**********/
|
||||
|
||||
.newtab-button-box {
|
||||
border: none !important;
|
||||
margin: 0 50px;
|
||||
}
|
||||
|
||||
.newtab-button {
|
||||
border: none !important;
|
||||
border-radius: 8px;
|
||||
padding: 8px 0 !important;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.newtab-button::before{
|
||||
background: var(--light-3) !important;
|
||||
}
|
||||
|
||||
.newtab-action-selector-anchor {
|
||||
border: none !important;
|
||||
margin-right: 10px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.newtab-button:hover {
|
||||
background: var(--dark-1);
|
||||
}
|
||||
|
||||
/**********PINNED TAB***************/
|
||||
|
||||
tab-item.pinned {
|
||||
margin: 5px !important;
|
||||
padding: 5px !important;
|
||||
transition : all 0.1s var(--ease-out);
|
||||
}
|
||||
|
||||
/***********************************/
|
||||
|
||||
#all-tabs {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
|
125
home/profiles/firefox/userChrome.css
Normal file
125
home/profiles/firefox/userChrome.css
Normal file
|
@ -0,0 +1,125 @@
|
|||
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||
|
||||
/* Hide main tabs toolbar */
|
||||
#TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
|
||||
/*** NAV BAR ***/
|
||||
/* Hide urlbar */
|
||||
#nav-bar {
|
||||
position: relative !important;
|
||||
z-index: 2 !important;
|
||||
height: 2px !important;
|
||||
min-height: 2px !important;
|
||||
margin-bottom: -2px !important;
|
||||
opacity: 0 !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* But unfocus it when we invoke it with ctrl+L */
|
||||
#nav-bar:focus-within {
|
||||
height: auto !important;
|
||||
margin-bottom: 0px !important;
|
||||
opacity: 1 !important;
|
||||
overflow: show !important;
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
min-height: 0 !important;
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
#urlbar-input-container {
|
||||
height: 28px !important;
|
||||
}
|
||||
|
||||
/* hides the sidebar header */
|
||||
#sidebar-header {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.tab[selected="true"] {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
.tabbrowser-tab {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
.tabbrowser-tab[visuallyselected="true"] {
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
/* Credits to https://github.com/MrOtherGuy for hthe following snippet*/
|
||||
|
||||
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_sidebar.css made available under Mozilla Public License v. 2.0
|
||||
See the above repository for updates as well as full license text. */
|
||||
|
||||
/* Show sidebar only when the cursor is over it */
|
||||
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
|
||||
|
||||
#sidebar-box{
|
||||
--uc-sidebar-width: 44px; /* Only thing I (gale) changed */
|
||||
--uc-sidebar-hover-width: 210px;
|
||||
--uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */
|
||||
position: relative;
|
||||
min-width: var(--uc-sidebar-width) !important;
|
||||
width: var(--uc-sidebar-width) !important;
|
||||
max-width: var(--uc-sidebar-width) !important;
|
||||
z-index:1;
|
||||
}
|
||||
|
||||
#sidebar-box[positionend]{ direction: rtl }
|
||||
#sidebar-box[positionend] > *{ direction: ltr }
|
||||
|
||||
#sidebar-box[positionend]:-moz-locale-dir(rtl){ direction: ltr }
|
||||
#sidebar-box[positionend]:-moz-locale-dir(rtl) > *{ direction: rtl }
|
||||
|
||||
#main-window[sizemode="fullscreen"] #sidebar-box{ --uc-sidebar-width: 1px; }
|
||||
|
||||
#sidebar-splitter{ display: none }
|
||||
|
||||
#sidebar-header{ overflow: hidden; /*color: var(--chrome-color, inherit) !important*/}
|
||||
|
||||
#sidebar{
|
||||
transition: min-width 115ms linear var(--uc-autohide-sidebar-delay) !important;
|
||||
min-width: var(--uc-sidebar-width) !important;
|
||||
will-change: min-width;
|
||||
}
|
||||
|
||||
#sidebar-box:hover > #sidebar{ min-width: var(--uc-sidebar-hover-width) !important; transition-delay: 0ms !important }
|
||||
|
||||
.sidebar-panel{
|
||||
/*background-color: transparent !important;
|
||||
color: var(--newtab-text-primary-color) !important;*/
|
||||
}
|
||||
|
||||
.sidebar-panel #search-box{
|
||||
-moz-appearance: none !important;
|
||||
/*background-color: rgba(249,249,250,0.1) !important;
|
||||
color: inherit !important;
|
||||
*/
|
||||
}
|
||||
|
||||
/* Add sidebar divider and give it background */
|
||||
|
||||
#sidebar,
|
||||
#sidebar-header{
|
||||
/*background-color: inherit !important;*/
|
||||
border-inline: 1px solid rgb(80,80,80);
|
||||
border-inline-width: 0px 1px;
|
||||
}
|
||||
|
||||
#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
|
||||
#sidebar-box[positionend] > *{
|
||||
border-inline-width: 1px 0px;
|
||||
}
|
||||
|
||||
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
|
||||
|
||||
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ inset-inline: auto 0px !important; }
|
||||
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ margin-inline: 0px !important; border-left-style: solid !important; }
|
275
home/profiles/firefox/userChrome.css.bak
Normal file
275
home/profiles/firefox/userChrome.css.bak
Normal file
|
@ -0,0 +1,275 @@
|
|||
/* @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); */
|
||||
|
||||
@-moz-document url(chrome://browser/content/browser.xul),
|
||||
url(chrome://browser/content/browser.xhtml)
|
||||
{
|
||||
/*** TREE STYLE TABS ***/
|
||||
/* Hide main tabs toolbar */
|
||||
#TabsToolbar {
|
||||
visibility: collapse !important;
|
||||
}
|
||||
/* Sidebar min and max width removal */
|
||||
:root {
|
||||
/* expanded width of the sidebar.
|
||||
used for userChrome-static, and hover */
|
||||
--sidebar-width: 250px;
|
||||
/* initial width of the sidebar.
|
||||
advised not to change since tst css relies on this value*/
|
||||
--sidebar-collapsed-width: 60px;
|
||||
}
|
||||
|
||||
#sidebar-box {
|
||||
z-index: 1000 !important;
|
||||
position: relative !important;
|
||||
min-width: var(--sidebar-collapsed-width) !important;
|
||||
max-width: var(--sidebar-collapsed-width) !important;
|
||||
}
|
||||
|
||||
#sidebar-header,
|
||||
#sidebar-splitter {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* inner width = expanded width & move inner to only show initial-width long section */
|
||||
#sidebar-box #sidebar {
|
||||
position: absolute !important;
|
||||
min-width: var(--sidebar-width) !important;
|
||||
max-width: var(--sidebar-width) !important;
|
||||
width: var(--sidebar-width) !important;
|
||||
transform: translateX(calc(var(--sidebar-collapsed-width) - var(--sidebar-width)));
|
||||
transition: all var(--transition-time) var(--ease-out);
|
||||
}
|
||||
|
||||
/* move inner to show entire sidebar */
|
||||
#sidebar-box #sidebar:hover {
|
||||
transform: translateX(0) !important;
|
||||
box-shadow: 2px 0 33px -3px var(--sidebar-shadow-color);
|
||||
}
|
||||
|
||||
#sidebar-box[sidebarcommand="viewBookmarksSidebar"] #sidebar {
|
||||
transform: translateX(0) !important;
|
||||
box-shadow: 2px 0 33px -3px var(--sidebar-shadow-color);
|
||||
}
|
||||
/* hide sidebar header for tree style tabs sidebar */
|
||||
#sidebar-box #sidebar-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
border-right: solid var(--dividers) var(--sidebar-shadow-color) !important;
|
||||
}
|
||||
|
||||
toolbar {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
#tabbrowser-arrowscrollbox {
|
||||
margin: 7px 14px 7px 14px;
|
||||
}
|
||||
|
||||
.tabbrowser-tab::after {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.tab-background .tab-line,
|
||||
.tab-background .tab-bottom-line {
|
||||
display: none;
|
||||
}
|
||||
|
||||
tab[selected="true"] > .tab-stack > .tab-background {
|
||||
background: var(--tl-tab-background-gradient, var(--arrowpanel-dimmed-further)) !important;
|
||||
}
|
||||
|
||||
tab:not([selected="true"]) > .tab-stack:hover > .tab-background {
|
||||
background: var(--arrowpanel-background) !important;
|
||||
}
|
||||
|
||||
.tab-stack {
|
||||
border-radius: 7px;
|
||||
margin-right: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tab-stack .tab-icon-image,
|
||||
.tab-stack .tab-label-container {
|
||||
transform: translateX(0px);
|
||||
transition: all var(--tl-animation-duration) var(--ease-out) !important;
|
||||
}
|
||||
|
||||
.tab-stack .tab-icon-image {
|
||||
transition-duration: calc(var(--tl-animation-duration) * 2) !important;
|
||||
}
|
||||
|
||||
tab:not([pinned="true"]) .tab-stack:hover .tab-icon-image {
|
||||
transform: translateX(-25px) !important;
|
||||
}
|
||||
|
||||
.tab-stack:hover .tab-label-container {
|
||||
transform: translateX(-23px) !important;
|
||||
}
|
||||
|
||||
/* containers */
|
||||
tab:not([selected="true"]).identity-color-blue > .tab-stack,
|
||||
tab:not([selected="true"]).identity-color-orange > .tab-stack,
|
||||
tab:not([selected="true"]).identity-color-green > .tab-stack,
|
||||
tab:not([selected="true"]).identity-color-pink > .tab-stack{
|
||||
border-radius: 0 0 7px 7px !important;
|
||||
}
|
||||
|
||||
tab[selected="true"].identity-color-blue > .tab-stack .tab-label-container,
|
||||
tab[selected="true"].identity-color-orange > .tab-stack .tab-label-container,
|
||||
tab[selected="true"].identity-color-green > .tab-stack .tab-label-container,
|
||||
tab[selected="true"].identity-color-pink > .tab-stack .tab-label-container{
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
/* blue */
|
||||
tab[selected="true"].identity-color-blue > .tab-stack > .tab-background{
|
||||
background: linear-gradient(to right, #3182CE , #0BC5EA) !important;
|
||||
}
|
||||
|
||||
tab:not([selected="true"]).identity-color-blue > .tab-stack > .tab-background{
|
||||
border-top: solid 4px #63B3ED !important;
|
||||
}
|
||||
|
||||
/* orange */
|
||||
tab[selected="true"].identity-color-orange > .tab-stack > .tab-background{
|
||||
background: linear-gradient(to right, #DD6B20 , #F56565) !important;
|
||||
}
|
||||
|
||||
tab:not([selected="true"]).identity-color-orange > .tab-stack > .tab-background{
|
||||
border-top: solid 4px #F6AD55 !important;
|
||||
}
|
||||
|
||||
/* green */
|
||||
tab[selected="true"].identity-color-green > .tab-stack > .tab-background{
|
||||
background: linear-gradient(to right, #38A169 , #38B2AC) !important;
|
||||
}
|
||||
|
||||
tab:not([selected="true"]).identity-color-green > .tab-stack > .tab-background{
|
||||
border-top: solid 4px #68D391 !important;
|
||||
}
|
||||
|
||||
/* pink */
|
||||
tab[selected="true"].identity-color-pink > .tab-stack > .tab-background{
|
||||
background: linear-gradient(to right, #D53F8C , #9F7AEA) !important;
|
||||
}
|
||||
|
||||
tab:not([selected="true"]).identity-color-pink > .tab-stack > .tab-background{
|
||||
border-top: solid 4px #F687B3 !important;
|
||||
}
|
||||
|
||||
|
||||
.tab-stack .tab-close-button {
|
||||
border-radius: 50%;
|
||||
margin-left: -20px !important;
|
||||
background: var(--lwt-text-color);
|
||||
fill: var(--lwt-accent-color) !important;
|
||||
transform: translateX(30px) !important;
|
||||
transition: all var(--tl-animation-duration) var(--ease-out) !important;
|
||||
}
|
||||
|
||||
.tab-stack:hover .tab-close-button {
|
||||
transform: translateX(0px) !important;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[closebuttons="activetab"] > #tabbrowser-arrowscrollbox >
|
||||
.tabbrowser-tab > .tab-stack > .tab-content > .tab-close-button:not([selected="true"]){
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* hide tabs */
|
||||
.tabbrowser-tab {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#tabs-newtab-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.titlebar-spacer {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
/*** TAB BAR ***/
|
||||
/* Ensure tab doesn't show through auto-completion popup */
|
||||
.tabbrowser-tab { z-index: 0 !important; }
|
||||
/* Ensure tab "spacers" don't show through the completion window */
|
||||
#tabbrowser-arrowscrollbox > spacer { z-index: -1 !important; }
|
||||
#mainPopupSet { z-index: 9999 !important; }
|
||||
|
||||
/* Hide tabbar if only one tab */
|
||||
@import url(./css/tabs-hide-if-only-one.css);
|
||||
|
||||
|
||||
/* Remove the colored overline on the focused tab */
|
||||
.tabbrowser-tab .tab-line { background: none !important; }
|
||||
|
||||
/* Replace favicon on tabs with close button on mouse hover */
|
||||
.tabbrowser-tab:not(:hover) .tab-close-button,
|
||||
.tabbrowser-tab:not([pinned]):hover .tab-icon-image { display: none !important; }
|
||||
.tabbrowser-tab:not([pinned]):hover .tab-close-button { display:block !important; }
|
||||
|
||||
.tabbrowser-tab:hover .tab-throbber,
|
||||
.tabbrowser-tab:hover .tab-icon-image,
|
||||
.tabbrowser-tab:hover .tab-sharing-icon-overlay,
|
||||
.tabbrowser-tab:hover .tab-icon-overlay,
|
||||
.tabbrowser-tab:hover .tab-label-container,
|
||||
.tabbrowser-tab:hover .tab-icon-sound {
|
||||
-moz-box-ordinal-group: 2 !important;
|
||||
}
|
||||
|
||||
.tabbrowser-tab .tab-close-button {
|
||||
margin-left: -2px !important;
|
||||
margin-right: 4px !important;
|
||||
}
|
||||
|
||||
.tab-close-button:hover {
|
||||
fill-opacity: 0 !important;
|
||||
}
|
||||
|
||||
.tabbrowser-tab::after,
|
||||
.tabbrowser-tab::before {
|
||||
border-left: none !important;
|
||||
border-right: none !important;
|
||||
}
|
||||
|
||||
.scrollbutton-up[orient="horizontal"]~spacer { border-width: 0px; opacity: 0 }
|
||||
|
||||
|
||||
/*** NAV BAR ***/
|
||||
/* Hide urlbar */
|
||||
#nav-bar {
|
||||
position: relative !important;
|
||||
z-index: 2 !important;
|
||||
height: 2px !important;
|
||||
min-height: 2px !important;
|
||||
margin-bottom: -2px !important;
|
||||
opacity: 0 !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
/* But unfocus it when we invoke it with ctrl+L */
|
||||
#nav-bar:focus-within {
|
||||
height: auto !important;
|
||||
margin-bottom: 0px !important;
|
||||
opacity: 1 !important;
|
||||
overflow: show !important;
|
||||
}
|
||||
|
||||
#urlbar-container {
|
||||
min-height: 0 !important;
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
#urlbar-input-container {
|
||||
height: 28px !important;
|
||||
}
|
||||
|
||||
/*** Load local overrides ***/
|
||||
@import url(./userChrome.local.css);
|
||||
}
|
272
home/profiles/firefox/userstyles/stylus-2020-02-11.json
Normal file
272
home/profiles/firefox/userstyles/stylus-2020-02-11.json
Normal file
File diff suppressed because one or more lines are too long
3
home/profiles/git/attributes
Normal file
3
home/profiles/git/attributes
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.lisp diff=lisp
|
||||
*.el diff=lisp
|
||||
*.org diff=org
|
48
home/profiles/git/config
Normal file
48
home/profiles/git/config
Normal file
|
@ -0,0 +1,48 @@
|
|||
[user]
|
||||
name = Anish Lakhwara
|
||||
email = anish+git@lakhwara.com
|
||||
[core]
|
||||
whitespace = trailing-space
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[github]
|
||||
user = chickensoupwithrice
|
||||
[gitlab]
|
||||
user =
|
||||
[rebase]
|
||||
autosquash = true
|
||||
[push]
|
||||
default = current
|
||||
[pull]
|
||||
rebase = true
|
||||
[alias]
|
||||
unadd = reset HEAD
|
||||
# data analysis
|
||||
ranked-authors = !git authors | sort | uniq -c | sort -n
|
||||
emails = !git log --format="%aE" | sort -u
|
||||
email-domains = !git log --format="%aE" | awk -F'@' '{print $2}' | sort -u
|
||||
# pretty log
|
||||
ls = !git log --graph --abbrev-commit --decorate --color=always --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) - %C(dim red)%an%C(reset)%C(bold yellow)%d%C(reset)' --all
|
||||
[filter "lfs"]
|
||||
required = true
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
||||
clean = git-lfs clean -- %f
|
||||
[url "https://github.com/"]
|
||||
insteadOf = gh:
|
||||
[url "git@github.com:"]
|
||||
insteadOf = ssh+gh:
|
||||
[url "git@github.com:chickensoupwithrice/"]
|
||||
insteadOf = gh:/
|
||||
[url "https://gitlab.com/"]
|
||||
insteadOf = gl:
|
||||
[url "https://gist.github.com/"]
|
||||
insteadOf = gist:
|
||||
[url "https://bitbucket.org/"]
|
||||
insteadOf = bb:
|
||||
[url "https://git.v0.com"]
|
||||
insteadOf = v0:
|
||||
[diff "lisp"]
|
||||
xfuncname = "^(((;;;+ )|\\(|([ \t]+\\(((cl-|el-patch-)?def(un|var|macro|method|custom)|gb/))).*)$"
|
||||
[diff "org"]
|
||||
xfuncname = "^(\\*+ +.*)$"
|
99
home/profiles/git/default.nix
Normal file
99
home/profiles/git/default.nix
Normal file
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
#xdg.configFile = {
|
||||
# "git/config".source = ./config;
|
||||
# "git/ignore".source = ./ignore;
|
||||
# "git/attributes".source = ./attributes;
|
||||
#};
|
||||
|
||||
programs.lazygit.enable = true;
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Anish Lakhwara";
|
||||
userEmail = "anish+git@lakhwara.com";
|
||||
delta.enable = true;
|
||||
# TODO enable signing
|
||||
|
||||
ignores = [
|
||||
"*~"
|
||||
"*.*~"
|
||||
"\\#*"
|
||||
".\\#*"
|
||||
"*.swp"
|
||||
".*.sw[a-z]"
|
||||
"*.un~"
|
||||
".netrwhist"
|
||||
".vim/*"
|
||||
".DS_Store?"
|
||||
".DS_Store"
|
||||
".CFUserTextEncoding"
|
||||
".Trash"
|
||||
".Xauthority"
|
||||
"thumbs.db"
|
||||
"Thumbs.db"
|
||||
"Icon?"
|
||||
".ccls-cache/"
|
||||
".sass-cache/"
|
||||
"__pycache__/"
|
||||
"*.class"
|
||||
"*.exe"
|
||||
"*.o"
|
||||
"*.pyc"
|
||||
"*.elc"
|
||||
".nrepl-port"
|
||||
".envrc"
|
||||
".lsp/*"
|
||||
".direnv/*"
|
||||
".clj-kondo/*"
|
||||
".cpcache/*"
|
||||
".tmp"
|
||||
".direnv"
|
||||
"result"
|
||||
"node_modules/"
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
pull.rebase = false;
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
|
||||
aliases = {
|
||||
a = "add -p";
|
||||
co = "checkout";
|
||||
cob = "checkout -b";
|
||||
f = "fetch -p";
|
||||
c = "commit -v";
|
||||
p = "push";
|
||||
ba = "branch -a";
|
||||
bd = "branch -d";
|
||||
bD = "branch -D";
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
ds = "diff --staged";
|
||||
r = "restore";
|
||||
rs = "restore --staged";
|
||||
st = "status -sb";
|
||||
|
||||
# reset
|
||||
soft = "reset --soft";
|
||||
hard = "reset --hard";
|
||||
s1ft = "soft HEAD~1";
|
||||
h1rd = "hard HEAD~1";
|
||||
|
||||
# logging
|
||||
lg =
|
||||
"log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
plog =
|
||||
"log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s'";
|
||||
tlog =
|
||||
"log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative";
|
||||
rank = "shortlog -sn --no-merges";
|
||||
authors = "authors | sort | uniq -c | sort -n";
|
||||
ls = "log --graph --abbrev-commit --decorate --color=always --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) - %C(dim red)%an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
|
||||
# delete merged branches
|
||||
bdm = "!git branch --merged | grep -v '*' | xargs -n 1 git branch -d";
|
||||
};
|
||||
};
|
||||
}
|
37
home/profiles/git/ignore
Normal file
37
home/profiles/git/ignore
Normal file
|
@ -0,0 +1,37 @@
|
|||
# For emacs:
|
||||
*~
|
||||
*.*~
|
||||
\#*
|
||||
.\#*
|
||||
|
||||
# For vim:
|
||||
*.swp
|
||||
.*.sw[a-z]
|
||||
*.un~
|
||||
.netrwhist
|
||||
.vim/*
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store?
|
||||
.DS_Store
|
||||
.CFUserTextEncoding
|
||||
.Trash
|
||||
.Xauthority
|
||||
thumbs.db
|
||||
Thumbs.db
|
||||
Icon?
|
||||
|
||||
# Code stuffs #
|
||||
###############
|
||||
.ccls-cache/
|
||||
.sass-cache/
|
||||
__pycache__/
|
||||
|
||||
# Compiled thangs #
|
||||
###################
|
||||
*.class
|
||||
*.exe
|
||||
*.o
|
||||
*.pyc
|
||||
*.elc
|
968
home/profiles/nvim/default.nix
Normal file
968
home/profiles/nvim/default.nix
Normal file
|
@ -0,0 +1,968 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
customPlugins = {
|
||||
vim-zettel = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "vim-zettel";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "michal-h21";
|
||||
repo = "vim-zettel";
|
||||
rev = "929d90eec62e6f693c2702d2b6f76a93f2f1689d";
|
||||
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
|
||||
};
|
||||
};
|
||||
lsp-format = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "lsp-format";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "lukas-reineke";
|
||||
repo = "lsp-format.nvim";
|
||||
rev = "84e117b99bb2bc0d0c8122e2b256046f046f8aff";
|
||||
sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4=";
|
||||
};
|
||||
};
|
||||
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "lspsaga.nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "glepnir";
|
||||
repo = "lspsaga.nvim";
|
||||
rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e";
|
||||
sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk=";
|
||||
};
|
||||
};
|
||||
nvim-luapad = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "nvim-luapad";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "rafcamlet";
|
||||
repo = "nvim-luapad";
|
||||
rev = "9815e2659ce8e2ef4b55e401531cf09b6423e0ea";
|
||||
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
|
||||
};
|
||||
};
|
||||
leap = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "leap";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "ggandor";
|
||||
repo = "leap.nvim";
|
||||
rev = "1bb1fec369b1e9ae96e6ff1b829ea9272c51f844";
|
||||
sha256 = "dH0v1D5q5OlMLA/omTDMb/taKyIgQ5VfVMYXJ609k/k=";
|
||||
};
|
||||
};
|
||||
nvim-navic = pkgs.vimUtils.buildVimPlugin {
|
||||
name = "nvim-navic";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "SmiteshP";
|
||||
repo = "nvim-navic";
|
||||
rev = "096b23e73c84a653fd317c0c10261875fa573a6d";
|
||||
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
|
||||
};
|
||||
};
|
||||
my-which-key-nvim = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "which-key.nvim";
|
||||
version = "2022-05-04";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "folke";
|
||||
repo = "which-key.nvim";
|
||||
rev = "bd4411a2ed4dd8bb69c125e339d837028a6eea71";
|
||||
sha256 = "0vf685xgdb967wmvffk1pfrvbhg1jkvzp1kb7r0vs90mg8gpv1aj";
|
||||
};
|
||||
meta.homepage = "https://github.com/folke/which-key.nvim/";
|
||||
};
|
||||
scnvim = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "scnvim";
|
||||
version = "2022-06-04";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "davidgranstrom";
|
||||
repo = "scnvim";
|
||||
rev = "746cc0db820d02a9c36b8f9ba2eac9725fa73107";
|
||||
sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc=";
|
||||
};
|
||||
};
|
||||
yuck-vim = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "yuck.vim";
|
||||
version = "2021-08-09";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "elkowar";
|
||||
repo = "yuck.vim";
|
||||
rev = "6dc3da77c53820c32648cf67cbdbdfb6994f4e08";
|
||||
sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE=";
|
||||
};
|
||||
};
|
||||
nvim-parinfer = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "nvim-parinfer";
|
||||
version = "v1.2.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gpanders";
|
||||
repo = "nvim-parinfer";
|
||||
rev = "82bce5798993f4fe5ced20e74003b492490b4fe8";
|
||||
sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc=";
|
||||
};
|
||||
};
|
||||
my-marks = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "marks";
|
||||
version = "2022-08-31";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "chentoast";
|
||||
repo = "marks.nvim";
|
||||
rev = "b27cbb78e9082229590b396d3ae4fe07f1aeafe0";
|
||||
sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk=";
|
||||
};
|
||||
};
|
||||
my-fterm = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "fterm";
|
||||
version = "2022-07-22";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "numToStr";
|
||||
repo = "FTerm.nvim";
|
||||
rev = "efd10656724a269e21ba68d65e2b058a4e606424";
|
||||
sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE=";
|
||||
};
|
||||
};
|
||||
my-nvim-peekup = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "nvim-peekup";
|
||||
version = "0.1.0";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gennaro-tedesco";
|
||||
repo = "nvim-peekup";
|
||||
rev = "73a67c1ee3b5a7ea7b42d85399bf093f428c8ee3";
|
||||
sha256 = "czKjJgCpvRSdtR7rNGlJrluDgPIdx94KUyx33op5gdY=";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
my-python-packages = python-packages: with python-packages; [
|
||||
tasklib
|
||||
pynvim
|
||||
six
|
||||
pylsp-mypy
|
||||
#pyls-isort
|
||||
#pyls-black
|
||||
black
|
||||
isort
|
||||
# other python packages you want
|
||||
];
|
||||
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
|
||||
in
|
||||
{
|
||||
home.sessionVariables.EDITOR = "nvim";
|
||||
home.shellAliases = {
|
||||
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
|
||||
# kitaab zettel
|
||||
kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD";
|
||||
# kitaab recents
|
||||
kr = "cd /home/anish/kitaab/vimwiki; eza --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
|
||||
# kitaab get by tagged
|
||||
kt = "cd /home/anish/kitaab/vimwiki; eza *_index.wiki | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./{}';cd $OLDPWD";
|
||||
# List files that have no links in them
|
||||
ku = "cd /home/anish/kitaab/;vim ./vimwiki/$(python3 poonam/main.py report --titles=false | tail -n +4 | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 ./vimwiki/{}');cd $OLDPWD";
|
||||
};
|
||||
# Add %update to the highlight clause for vimwiki files
|
||||
home.file.".config/nvim/after/syntax/vimwiki.vim".text = ''
|
||||
" match with %update
|
||||
syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
|
||||
" match with %link
|
||||
syntax match VimwikiPlaceholder /^\s*%link\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
|
||||
'';
|
||||
|
||||
#environment.systemPackages = with customPlugins; [ tidal ];
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
" so our custom files still get included
|
||||
set runtimepath+=/home/anish/.config/nvim/
|
||||
set tabstop=2
|
||||
set showmatch
|
||||
set shiftwidth=2
|
||||
set noexpandtab
|
||||
set autoindent
|
||||
set undofile
|
||||
set signcolumn=auto:4
|
||||
set title
|
||||
|
||||
" set foldmethod=indent " fold based on indent
|
||||
set number
|
||||
set nocompatible
|
||||
set relativenumber
|
||||
set showtabline=2
|
||||
set noexpandtab
|
||||
set autowriteall
|
||||
set list lcs=tab:\|\
|
||||
filetype plugin on
|
||||
|
||||
" include - in word to move across easier in lisp / clojure
|
||||
set iskeyword+=-
|
||||
|
||||
set termguicolors
|
||||
colorscheme ayu-mirage
|
||||
|
||||
" set spell
|
||||
set spelllang=en_gb
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set incsearch
|
||||
" if hidden is not set, TextEdit might fail.
|
||||
set hidden
|
||||
" Some servers have issues with backup files, see #649
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
" Better display for messages
|
||||
set cmdheight=2
|
||||
" You will have bad experience for diagnostic messages when it's default 4000.
|
||||
set updatetime=300
|
||||
" don't give |ins-completion-menu| messages.
|
||||
set shortmess+=c
|
||||
" always show signcolumns
|
||||
set signcolumn=yes
|
||||
" highlight row
|
||||
set cursorline
|
||||
|
||||
let mapleader = "\<Space>"
|
||||
let maplocalleader = ","
|
||||
|
||||
" window
|
||||
nmap <leader>wh :topleft vnew<CR>
|
||||
nmap <leader>wl :botright vnew<CR>
|
||||
nmap <leader>wk :topleft new<CR>
|
||||
nmap <leader>wj :botright new<CR>
|
||||
|
||||
" tabs
|
||||
nmap <leader>rt :retab!<CR>
|
||||
vmap <leader>rt :retab!<CR>
|
||||
|
||||
" moving splits with vim movements.
|
||||
:tnoremap <A-h> <C-\><C-N><C-w>h
|
||||
:tnoremap <A-j> <C-\><C-N><C-w>j
|
||||
:tnoremap <A-k> <C-\><C-N><C-w>k
|
||||
:tnoremap <A-l> <C-\><C-N><C-w>l
|
||||
:inoremap <A-h> <C-\><C-N><C-w>h
|
||||
:inoremap <A-j> <C-\><C-N><C-w>j
|
||||
:inoremap <A-k> <C-\><C-N><C-w>k
|
||||
:inoremap <A-l> <C-\><C-N><C-w>l
|
||||
:nnoremap <A-h> <leader>h
|
||||
:nnoremap <A-j> <leader>j
|
||||
:nnoremap <A-k> <leader>k
|
||||
:nnoremap <A-l> <leader>l
|
||||
:nnoremap <F5> "=strftime("%Y-%m-%d %H:%M")<CR>
|
||||
:inoremap <F5> <C-R>=strftime("%Y-%m-%d %H:%M")<CR>
|
||||
:inoremap <F4> <C-R>=strftime("%H:%M")<CR>
|
||||
|
||||
" tidal nvim terminal
|
||||
let g:tidal_target = "terminal"
|
||||
|
||||
" latex
|
||||
" let g:tex_flavor='latex'
|
||||
" let g:vimtex_view_method='zathura'
|
||||
" let g:vimtex_quickfix_mode=0
|
||||
" set conceallevel=1
|
||||
" let g:tex_conceal='abdmg'
|
||||
|
||||
" telescope
|
||||
" Find files using Telescope command-line sugar.
|
||||
nnoremap <leader>ff <cmd>Telescope find_files<cr>
|
||||
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
|
||||
nnoremap <leader>fb <cmd>Telescope buffers<cr>
|
||||
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
|
||||
nnoremap <leader>ft <cmd>Telescope tags<cr>
|
||||
|
||||
" exit normal mode in terminal
|
||||
:tnoremap <C-n> <C-\><C-n>
|
||||
|
||||
" Sexp in Conjure (since it's fennel)
|
||||
let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck"
|
||||
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"
|
||||
" we only use fennel with love; no we don't...
|
||||
let g:conjure#client#fennel#stdio#command = "fennel"
|
||||
" let g:conjure#extract#tree_sitter#enabled = true
|
||||
map <localleader>lt :ConjureLogToggle<CR>
|
||||
|
||||
let g:rainbow_active = 0
|
||||
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
|
||||
|
||||
" general commands
|
||||
map <leader>t :NERDTreeToggle<CR>
|
||||
map <leader>s :w<CR>
|
||||
map <leader>q :q<CR>
|
||||
map <leader>r :RainbowParenthesesToggleAll<CR>
|
||||
nnoremap <BS> :noh<CR>
|
||||
map Q <Nop>
|
||||
nnoremap Y y$
|
||||
nnoremap <leader>n :vnew<CR>
|
||||
" center moving
|
||||
nnoremap n nzzzv
|
||||
nnoremap N Nzzzv
|
||||
nnoremap J mzJ'z
|
||||
" undo points
|
||||
inoremap , ,<c-g>u
|
||||
inoremap . .<c-g>u
|
||||
inoremap ? ?<c-g>u
|
||||
inoremap ! !<c-g>u
|
||||
inoremap ) )<c-g>u
|
||||
inoremap [ [<c-g>u
|
||||
inoremap ] ]<c-g>u
|
||||
inoremap { {<c-g>u
|
||||
inoremap ( (<c-g>u
|
||||
inoremap } }<c-g>u
|
||||
" moving text
|
||||
vnoremap J :m '>+1<CR>gv=gv
|
||||
vnoremap K :m '>-2<CR>gv=gv
|
||||
inoremap <c-j> <esc>:m .+1<CR>==
|
||||
inoremap <c-k> <esc>:m .-2<CR>==
|
||||
nnoremap <leader>j <esc>:m .+1<CR>==
|
||||
nnoremap <leader>k <esc>:m .-2<CR>==
|
||||
" Pasting
|
||||
:map <leader>sy :!xclip -i<CR><CR>
|
||||
:vmap <leader>sy "*y
|
||||
:map <leader>sp :r!xclip -o<CR>
|
||||
|
||||
" barbar
|
||||
nnoremap <silent> gT :BufferPrevious<CR>
|
||||
nnoremap <silent> gt :BufferNext<CR>
|
||||
nnoremap <silent> gj :BufferPick<CR>
|
||||
nnoremap <silent> gq :BufferClose<CR>
|
||||
|
||||
" git
|
||||
nnoremap <leader>ga :G fetch --all
|
||||
nmap <leader>gs :G<CR>
|
||||
nmap <leader>gl :diffget //3<CR>
|
||||
nmap <leader>gh :diffget //2<CR>
|
||||
nmap <leader>gb :GBranches<CR>
|
||||
nnoremap <leader>gp :Git! push<CR>
|
||||
nnoremap <leader>gd :Gdiff<CR>
|
||||
nnoremap <leader>gc :G commit -v -q %:p<CR>
|
||||
|
||||
" kitaab
|
||||
map <leader>cz :VimwikiIndex<CR>:ZettelNew
|
||||
map <leader>zs :ZettelSearch<CR>
|
||||
map <leader>zn :ZettelNew<CR>
|
||||
map <leader>zo :ZettelOpen<CR>
|
||||
map <leader>zf :Telescope oldfiles only_cwd=true<CR>
|
||||
map <leader>wt :VimwikiMakeTomorrowDiaryNote
|
||||
map <leader>wd :VimwikiMakeYesterdayDiaryNote
|
||||
map <leader>zm :ZenMode<CR>:setlocal nospell<CR>
|
||||
let g:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }]
|
||||
let g:sync_taskwarrior = 0
|
||||
let g:zettel_format = "%y%m%d-%H%M"
|
||||
let g:vimwiki_list = [{'path': '~/kitaab/vimwiki', 'nested_syntaxes': {'python': 'python', 'c++': 'cpp', 'nix': 'nix', 'bash': 'sh'}}]
|
||||
|
||||
let g:mapleader="\<Space>"
|
||||
|
||||
" fzf
|
||||
" not sure we even use this
|
||||
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
|
||||
|
||||
" lsp commands
|
||||
nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR>
|
||||
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
|
||||
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
|
||||
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
|
||||
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
|
||||
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
|
||||
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
|
||||
" nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
|
||||
" nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<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 :Lspsaga peek_definition<CR>
|
||||
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
|
||||
nnoremap <leader>vh :Lspsaga hover_doc<CR>
|
||||
nnoremap <leader>vca :Lspsaga code_action<CR>
|
||||
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
|
||||
nnoremap <leader>vs :Dasht<Space>
|
||||
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
|
||||
nnoremap <leader>vo :LSoutlineToggle<CR>
|
||||
|
||||
" dashboard
|
||||
let g:dashboard_custom_header = [
|
||||
\' ',
|
||||
\' ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⣿⠁⠀⠀⠀⠀⠀⠀⠀⢠⣿⣶⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣧⠀⠀⠀⠀⠀⠀⠀⠀⢻⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⢴⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⡀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⡆⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠈⢿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⠟⠉⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠶⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⢀⣀⡤⠤⠤⠖⣒⠒⡖⠲⡦⣤⣄⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣤⣤⣤⣤⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⣠⢶⠉⠩⢀⣠⡤⠤⠯⠬⠥⣼⣅⡃⠸⠉⠛⡷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⢶⢻⢻⢹⣃⣨⣧⣤⣴⣹⣉⠛⢶⣄⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⣰⠞⠁⢈⡤⠚⠉⠀⠀⠘⣆⡀⠀⡀⠀⠉⠙⠲⢼⣰⢡⣟⢶⣄⠀⠀⠀⠀⠀⠀⠀⢀⣠⠶⡟⣇⣺⠾⠋⠉⠁⠀⠀⠀⠀⠀⠉⠙⠳⢿⣷⣄⠀⠀⠀⠀ ',
|
||||
\'⠀⢀⡼⡁⢸⣰⠏⠀⠀⠀⠀⠀⠀⠘⡞⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿⡞⡼⣷⣄⠀⠀⠀⣠⣾⠛⠄⣷⠟⠋⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⢠⠀⠈⠻⣧⠀⠀⠀ ',
|
||||
\'⠀⡼⠁⢀⡼⠁⠀⠀⠀⣀⠤⠖⠛⠛⠛⠛⠓⠲⠤⣄⡀⠀⠀⠀⠀⠻⢷⣿⣿⣷⣤⣾⠹⢌⡷⠛⠁⠀⠀⠀⠀⣀⡤⠔⠛⠉⠉⠈⠉⠛⠲⣄⣇⠀⠀⠙⣷⠀⠀ ',
|
||||
\'⢰⠷⣀⡜⠁⠀⠀⢀⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠲⣤⡀⢀⡤⠚⢻⣿⣿⢣⢈⡴⠋⠀⠀⠀⠀⣠⠔⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⡇⠀⠀⠘⣇⠀ ',
|
||||
\'⣾⣇⣹⢃⡀⠀⢀⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣷⣾⣞⡇⢹⡼⠋⠀⠀⠀⢠⡴⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⠀⠀⠀⢹⠀ ',
|
||||
\'⢹⢀⣿⠘⡇⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢟⢱⢹⡾⠋⠀⠀⠀⣠⣾⣿⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⢸⡀ ',
|
||||
\'⢸⣅⣯⠀⣆⠀⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢻⣹⢸⡼⠋⠀⠀⠀⢀⡼⢻⣻⣿⡽⡹⠳⢤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡾⠀⠀⠀⢸⠀ ',
|
||||
\'⠈⣿⣿⡀⠘⠀⠈⣿⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⢾⢻⢿⣿⠟⠋⠀⠀⠀⠀⣠⣟⠘⣿⡏⠋⠻⢥⣃⡎⣽⠻⢦⣄⣀⠀⠀⠀⠀⠀⣀⡴⣾⠃⠀⠀⠀⡼⠀ ',
|
||||
\'⠀⠙⣎⣧⠀⠀⠀⠈⢻⣍⠓⠲⣶⣶⣶⣶⡖⢋⣿⣏⡧⠞⠋⠁⠀⠀⠀⢀⣤⠞⠁⠈⠻⣷⣧⠀⡀⠀⠉⠓⢧⣇⢰⢈⠙⢻⠒⡖⢲⠚⣍⡴⠃⠀⠀⠀⣴⠃⠀ ',
|
||||
\'⠀⠀⠙⢾⣷⡀⠀⠀⠀⠈⠙⠓⠾⠿⠾⠿⠿⠚⠉⠁⠀⠀⠀⠀⠀⣠⡴⠛⠁⠀⠀⠀⠀⠀⠙⠷⣝⠣⠀⠀⠀⠈⠉⠒⠶⠾⠤⠧⠼⠚⠉⠀⠀⠀⢀⡴⠃⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠙⠿⣦⣀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⢀⣠⡴⠞⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠶⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⢀⡴⠟⠁⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠈⠛⠒⠤⠤⣄⣀⣀⣀⣠⠤⠤⠶⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠒⠦⠤⢤⣀⣀⣠⡤⠤⠟⠋⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡶⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⢷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⢀⣴⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣦⣀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠘⠻⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠏⠀⠀⠀⠀⠀⠀⠀⠀⠰⡆⠀⠀⠀⠀⠀⠀⠀⠀⠹⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠽⠟⠁⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠿⠂⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⠓⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ',
|
||||
\]
|
||||
let g:dashboard_default_executive = 'telescope'
|
||||
nmap <Leader>ss :<C-u>SessionSave<CR>
|
||||
nmap <Leader>sl :<C-u>SessionLoad<CR>
|
||||
" nnoremap <silent> <Leader>fh :DashboardFindHistory<CR>
|
||||
" nnoremap <silent> <Leader>fm :DashboardJumpMark<CR>
|
||||
" nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
|
||||
autocmd FileType dashboard set showtabline=0 | autocmd WinLeave <buffer> set showtabline=2
|
||||
let g:dashboard_custom_footer = ["Run wild"]
|
||||
let g:dashboard_custom_section={
|
||||
\ 'create_zettel': {
|
||||
\ 'description': [' Create Zettel SPC c z'],
|
||||
\ 'command': ':VimwikiIndex' },
|
||||
\ 'load_session': {
|
||||
\ 'description': [' Load Session SPC s l'],
|
||||
\ 'command': 'SessionLoad' }
|
||||
\ }
|
||||
|
||||
let g:scnvim_snippet_format = "luasnip"
|
||||
|
||||
|
||||
" lua config
|
||||
lua <<EOF
|
||||
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||
for type, icon in pairs(signs) do
|
||||
local hl = "DiagnosticSign" .. type
|
||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||
end
|
||||
vim.g.diagnostics_active = true
|
||||
function _G.toggle_diagnostics()
|
||||
if vim.g.diagnostics_active then
|
||||
vim.g.diagnostics_active = false
|
||||
vim.lsp.diagnostic.clear(0)
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = function() end
|
||||
else
|
||||
vim.g.diagnostics_active = true
|
||||
vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with(
|
||||
vim.lsp.diagnostic.on_publish_diagnostics, {
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = false,
|
||||
}
|
||||
)
|
||||
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',
|
||||
}
|
||||
)
|
||||
|
||||
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
||||
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
||||
opts = opts or {}
|
||||
opts.border = opts.border or 'rounded'
|
||||
return orig_util_open_floating_preview(contents, syntax, opts, ...)
|
||||
end
|
||||
|
||||
|
||||
vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true})
|
||||
|
||||
-- autopairs
|
||||
require('nvim-autopairs').setup{}
|
||||
|
||||
-- marks
|
||||
require('marks').setup{}
|
||||
|
||||
-- Setup nvim-cmp.
|
||||
local has_words_before = function()
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local lspkind = require("lspkind")
|
||||
local cmp = require('cmp')
|
||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
||||
local t = function(str)
|
||||
return vim.api.nvim_replace_termcodes(str, true, true, true)
|
||||
end
|
||||
local check_back_space = function()
|
||||
local col = vim.fn.col(".") - 1
|
||||
return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") ~= nil
|
||||
end
|
||||
cmp.setup {
|
||||
formatting = {
|
||||
format = lspkind.cmp_format({
|
||||
mode = 'symbol_text',
|
||||
maxwidth = 50,
|
||||
})
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true
|
||||
}),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, {"i", "s"}),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require'luasnip'.lsp_expand(args.body)
|
||||
end
|
||||
},
|
||||
sources = {
|
||||
{name = 'buffer'}, {name = 'nvim_lsp'},
|
||||
{name = "look"}, {name = "path"},
|
||||
{name = "calc"}, {name = "spell"},
|
||||
{name = 'cmp-conjure'}, {name = "luasnip"},
|
||||
{name = 'tags'}
|
||||
},
|
||||
completion = {completeopt = 'menu,menuone,noinsert'}
|
||||
}
|
||||
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
-- null-ls
|
||||
-- being very janky
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.diagnostics.shellcheck,
|
||||
null_ls.builtins.diagnostics.proselint.with({ filetypes = { "vimwiki", "mail", }, }),
|
||||
null_ls.builtins.diagnostics.commitlint,
|
||||
null_ls.builtins.diagnostics.jsonlint,
|
||||
-- null_ls.builtins.code_actions.statix,
|
||||
-- null_ls.builtins.diagnostics.clj_kondo,
|
||||
-- null_ls.builtins.formatting.isort,
|
||||
-- null_ls.builtins.formatting.black,
|
||||
},
|
||||
})
|
||||
|
||||
-- Setup lspconfig
|
||||
require("lsp-format").setup {}
|
||||
require("nvim-navic").setup {}
|
||||
local format = require("lsp-format")
|
||||
local navic = require("nvim-navic")
|
||||
|
||||
-- lspsaga, code_action lightbulb is annoying
|
||||
local saga = require('lspsaga')
|
||||
saga.init_lsp_saga({
|
||||
border_style = "rounded",
|
||||
code_action_icon = "",
|
||||
code_action_num_shortcut = true,
|
||||
code_action_lightbulb = {
|
||||
enable = false,
|
||||
enable_in_insert = false,
|
||||
cache_code_action = true,
|
||||
sign = true,
|
||||
update_time = 150,
|
||||
sign_priority = 20,
|
||||
virtual_text = false,
|
||||
},
|
||||
code_action_keys = {
|
||||
quit = 'q',
|
||||
exec = '<CR>',
|
||||
},
|
||||
-- show outline
|
||||
show_outline = {
|
||||
win_position = 'right',
|
||||
--set special filetype win that outline window split.like NvimTree neotree
|
||||
-- defx, db_ui
|
||||
auto_enter = true,
|
||||
auto_preview = true,
|
||||
virt_text = '┃',
|
||||
jump_key = 'o',
|
||||
-- auto refresh when change buffer
|
||||
auto_refresh = true,
|
||||
},
|
||||
})
|
||||
|
||||
capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
|
||||
-- fennel-ls is bleeding edge
|
||||
local lspconfig = require('lspconfig')
|
||||
require("lspconfig.configs")["fennel-ls"] = {
|
||||
default_config = {
|
||||
cmd = {"fennel-ls"},
|
||||
filetypes = {"fennel"},
|
||||
root_dir = function(dir) return lspconfig.util.find_git_ancestor(dir) end,
|
||||
settings = {}
|
||||
}
|
||||
}
|
||||
|
||||
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'lua_ls', 'nil_ls', 'gopls'}
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig[lsp].setup {
|
||||
on_attach = function(client, bufnr)
|
||||
format.on_attach(client)
|
||||
navic.attach(client, bufnr)
|
||||
end,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
end
|
||||
|
||||
-- fennel-ls doesn't support gps
|
||||
lspconfig['fennel-ls'].setup {
|
||||
on_attach = function(client, bufnr)
|
||||
format.on_attach(client)
|
||||
end,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
||||
-- deprecated pylsp
|
||||
-- require('lspconfig').pylsp.setup {
|
||||
-- on_attach = function(client, bufnr)
|
||||
-- format.on_attach(client)
|
||||
-- navic.attach(client, bufnr)
|
||||
-- end,
|
||||
-- capabilities = capabilities,
|
||||
-- settings = {
|
||||
-- pylsp = {
|
||||
-- configurationSources = { "flake8", "mypy", "black" },
|
||||
-- plugins = {
|
||||
-- black = {enabled = true},
|
||||
-- jedi_signature_help = {enabled = true},
|
||||
-- jedi_completion = { include_params = true },
|
||||
-- pylsp_mypy={ enabled = true },
|
||||
-- pycodestyle={
|
||||
-- enabled=true,
|
||||
-- ignore={'E501', 'E231'},
|
||||
-- maxLineLength=120,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- }
|
||||
|
||||
require('gitsigns').setup { sign_priority=80 }
|
||||
|
||||
-- treesitter
|
||||
require('nvim-treesitter.configs').setup {
|
||||
-- parser_install_dir = "~/.local/share/nvim/site/parser/",
|
||||
-- ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider', 'beancount', 'janet'},
|
||||
highlight = { enabled = true, additional_vim_regex_highting = true, },
|
||||
textobjects = { enabled = true },
|
||||
}
|
||||
-- 'glsl' needs c++ compiler lol
|
||||
|
||||
-- lualine
|
||||
local navic = require("nvim-navic")
|
||||
require('lualine').setup {
|
||||
options = { theme = 'ayu' },
|
||||
sections = {
|
||||
lualine_c = {
|
||||
'filename', { navic.get_location, condition=navic.is_available },
|
||||
},
|
||||
lualine_y = {
|
||||
function()
|
||||
local msg = 'No Active Lsp'
|
||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||
local clients = vim.lsp.get_active_clients()
|
||||
if next(clients) == nil then
|
||||
return msg
|
||||
end
|
||||
for _, client in ipairs(clients) do
|
||||
local filetypes = client.config.filetypes
|
||||
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
|
||||
return client.name
|
||||
end
|
||||
end
|
||||
return msg
|
||||
end
|
||||
},
|
||||
lualine_x = {'filetype'}
|
||||
}
|
||||
}
|
||||
|
||||
-- nvim-lint
|
||||
-- require('lint').linters_by_ft = {
|
||||
-- markdown = {'vale'},
|
||||
-- }
|
||||
|
||||
-- f_term
|
||||
local map = vim.api.nvim_set_keymap
|
||||
local opts = { noremap = true, silent = true }
|
||||
map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
|
||||
map('t', '<A-i>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
|
||||
|
||||
-- Custom functions
|
||||
function update_date()
|
||||
local time = os.date("%Y-%m-%d %H:%M")
|
||||
local message = "%update " .. time
|
||||
local lines = vim.api.nvim_buf_get_lines(0, 0,4,false)
|
||||
for i=1,4,1 do
|
||||
if (lines[i]:len() == 0) then
|
||||
vim.api.nvim_buf_set_lines(0, i-1, i, false, {message, ""})
|
||||
return
|
||||
end
|
||||
end
|
||||
if (lines[4]:len() ~= 0) then
|
||||
vim.api.nvim_buf_set_lines(0, 3, 4, false, {message})
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
"BufWritePre",
|
||||
{ pattern = { "*.wiki" }, callback = update_date}
|
||||
)
|
||||
|
||||
-- set spelling for text files
|
||||
vim.api.nvim_create_autocmd(
|
||||
{ "BufRead", "BufNewFile" },
|
||||
{ pattern = { "*.wiki", "*.txt", "*.md", "*.tex" },
|
||||
command = "setlocal spell" }
|
||||
)
|
||||
vim.api.nvim_create_autocmd(
|
||||
"FileType",
|
||||
{ pattern = { "mail" },
|
||||
command = "setlocal spell" }
|
||||
)
|
||||
|
||||
-- auto session
|
||||
require('auto-session').setup {
|
||||
log_level = 'info',
|
||||
auto_session_suppress_dirs = {'~/'}
|
||||
}
|
||||
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal"
|
||||
|
||||
require("which-key").setup{}
|
||||
require('leap').set_default_keymaps()
|
||||
|
||||
-- supercollider
|
||||
local scnvim = require 'scnvim'
|
||||
local map = scnvim.map
|
||||
local map_expr = scnvim.map_expr
|
||||
scnvim.setup {
|
||||
keymaps = {
|
||||
['<localleader>e'] = map('editor.send_line', {'i', 'n'}),
|
||||
['<localleader>s'] = map_expr('CmdPeriod.run', {'i', 'n'}),
|
||||
['<localleader>t'] = {
|
||||
map('editor.send_block', {'i', 'n'}),
|
||||
map('editor.send_selection', 'x'),
|
||||
},
|
||||
['<CR>'] = map('postwin.toggle'),
|
||||
['<M-CR>'] = map('postwin.toggle', 'i'),
|
||||
['<M-L>'] = map('postwin.clear', {'n', 'i'}),
|
||||
['<C-k>'] = map('signature.show', {'n', 'i'}),
|
||||
['<F12>'] = map('sclang.hard_stop', {'n', 'x', 'i'}),
|
||||
['<leader>st'] = map('sclang.start'),
|
||||
['<leader>sk'] = map('sclang.recompile'),
|
||||
['<F1>'] = map_expr('s.boot'),
|
||||
['<F2>'] = map_expr('s.meter'),
|
||||
}
|
||||
}
|
||||
-- You gotta run :SCNvimGenerateAssets for this first
|
||||
-- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
|
||||
|
||||
-- zen mode
|
||||
require('zen-mode').setup{
|
||||
window = {
|
||||
backdrop = 1.0, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
||||
-- height and width can be:
|
||||
-- * an absolute number of cells when > 1
|
||||
-- * a percentage of the width / height of the editor when <= 1
|
||||
-- * a function that returns the width or the height
|
||||
width = 120, -- width of the Zen window
|
||||
height = 1, -- height of the Zen window
|
||||
-- by default, no options are changed for the Zen window
|
||||
-- uncomment any of the options below, or add other vim.wo options you want to apply
|
||||
options = {
|
||||
signcolumn = "no", -- disable signcolumn
|
||||
number = false, -- disable number column
|
||||
relativenumber = false, -- disable relative numbers
|
||||
cursorline = false, -- disable cursorline
|
||||
cursorcolumn = false, -- disable cursor column
|
||||
foldcolumn = "0", -- disable fold column
|
||||
list = false, -- disable whitespace characters
|
||||
},
|
||||
},
|
||||
plugins = {
|
||||
-- disable some global vim options (vim.o...)
|
||||
-- comment the lines to not apply the options
|
||||
options = {
|
||||
enabled = true,
|
||||
ruler = false, -- disables the ruler text in the cmd line area
|
||||
showcmd = false, -- disables the command in the last line of the screen
|
||||
},
|
||||
twilight = { enabled = true }, -- enable to start Twilight when zen mode opens
|
||||
gitsigns = { enabled = false }, -- disables git signs
|
||||
tmux = { enabled = false }, -- disables the tmux statusline
|
||||
-- this will change the font size on kitty when in zen mode
|
||||
-- to make this work, you need to set the following kitty options:
|
||||
-- - allow_remote_control socket-only
|
||||
-- - listen_on unix:/tmp/kitty
|
||||
kitty = {
|
||||
enabled = true,
|
||||
font = "+2", -- font size increment
|
||||
},
|
||||
},
|
||||
}
|
||||
require('twilight').setup{}
|
||||
|
||||
-- hologram
|
||||
require('hologram').setup{
|
||||
auto_display = false -- WIP automatic markdown image display, may be prone to breaking
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
'';
|
||||
extraPackages = with pkgs // customPlugins; [
|
||||
# used to compile tree-sitter grammar
|
||||
python-with-my-packages
|
||||
nodejs
|
||||
clojure-lsp
|
||||
clojure
|
||||
nil
|
||||
terraform-lsp
|
||||
rust-analyzer
|
||||
clj-kondo
|
||||
zls
|
||||
gopls
|
||||
gcc
|
||||
nodePackages_latest.pyright
|
||||
shellcheck
|
||||
proselint
|
||||
statix
|
||||
nodePackages.typescript
|
||||
nodePackages.typescript-language-server
|
||||
luajitPackages.lua-lsp
|
||||
fennel-ls
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins // customPlugins; [
|
||||
# ui
|
||||
lualine-nvim
|
||||
fzf-vim
|
||||
nerdtree
|
||||
neovim-ayu
|
||||
rainbow_parentheses-vim
|
||||
vim-surround
|
||||
vim-devicons
|
||||
nvim-web-devicons
|
||||
undotree
|
||||
telescope-nvim
|
||||
plenary-nvim
|
||||
nvim-navic
|
||||
(nvim-treesitter.withPlugins (p: [ p.nix p.clojure p.python p.fennel p.lua p.html p.css p.regex p.supercollider p.beancount p.markdown p.glsl p.yaml p.toml p.dockerfile p.json ]))
|
||||
nvim-treesitter-context
|
||||
my-fterm
|
||||
barbar-nvim
|
||||
auto-session
|
||||
my-marks
|
||||
which-key-nvim
|
||||
nvim-peekup
|
||||
zen-mode-nvim
|
||||
twilight-nvim
|
||||
my-lspsaga
|
||||
vim-dasht
|
||||
|
||||
# language
|
||||
vim-nix
|
||||
vim-elixir
|
||||
emmet-vim
|
||||
csv-vim
|
||||
direnv-vim
|
||||
zig-vim
|
||||
conjure
|
||||
|
||||
# kitaab stuff
|
||||
vimwiki
|
||||
taskwiki
|
||||
vim-zettel
|
||||
hologram-nvim
|
||||
|
||||
# lsp stuff
|
||||
# nvim-lint
|
||||
null-ls-nvim
|
||||
nvim-lspconfig
|
||||
nvim-cmp
|
||||
cmp-nvim-lsp
|
||||
cmp-treesitter
|
||||
nvim-lsp-ts-utils
|
||||
cmp-conjure
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-spell
|
||||
nvim-autopairs
|
||||
cmp_luasnip
|
||||
luasnip
|
||||
lsp-format
|
||||
friendly-snippets
|
||||
lspkind-nvim
|
||||
|
||||
# git stuff
|
||||
vim-fugitive
|
||||
gitsigns-nvim
|
||||
fzf-checkout-vim
|
||||
|
||||
# Clojure stuff
|
||||
# conjure
|
||||
vim-sexp
|
||||
vim-sexp-mappings-for-regular-people
|
||||
fennel-vim
|
||||
|
||||
vim-tidal
|
||||
# experimental
|
||||
nvim-luapad
|
||||
scnvim
|
||||
leap
|
||||
vim-beancount
|
||||
# vimtex
|
||||
# custom
|
||||
yuck-vim
|
||||
nvim-parinfer
|
||||
# vim-processing
|
||||
];
|
||||
withPython3 = true;
|
||||
extraPython3Packages = pkgs: with pkgs; [ tasklib six ];
|
||||
vimAlias = true;
|
||||
};
|
||||
}
|
||||
|
9
home/profiles/nvim/package.json
Normal file
9
home/profiles/nvim/package.json
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"console.log": {
|
||||
"prefix": "clog",
|
||||
"body": [
|
||||
"console.log('$1')"
|
||||
],
|
||||
"description": "Log output to console"
|
||||
}
|
||||
}
|
10
home/profiles/ssh/default.nix
Normal file
10
home/profiles/ssh/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
home.file.".ssh/config".text = ''
|
||||
Host mossnet.lan
|
||||
ForwardAgent Yes
|
||||
Host sealight.xyz
|
||||
ForwardAgent Yes
|
||||
Host git.sealight.xyz
|
||||
ForwardAgent Yes
|
||||
'';
|
||||
}
|
39
home/profiles/sync/kitaab/default.nix
Normal file
39
home/profiles/sync/kitaab/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
name = "kitaab-sync";
|
||||
# Note this will fail if index.wiki is open in vim while this runs
|
||||
mkStartScript = name: pkgs.writeShellScript "${name}.sh" ''
|
||||
# set -euo pipefail # Sometimes vimwiki is open and that causes `vimwiki tags rebuild` to fail, we still want to push to git in those cases
|
||||
PATH=/run/current-system/sw/bin:/etc/profiles/per-user/anish/bin:$PATH
|
||||
cd /home/anish/kitaab/vimwiki
|
||||
vimwiki tags rebuild
|
||||
cd ..
|
||||
pushd kalpana/
|
||||
${pkgs.luaPackages.fennel}/bin/fennel main.fnl build
|
||||
popd
|
||||
pushd vimwiki/
|
||||
git add -A .
|
||||
popd
|
||||
git diff-index --quiet HEAD || git commit -m 'syncing kitaab' # if nothing, don't exit 1
|
||||
git push
|
||||
exit 0
|
||||
'';
|
||||
in
|
||||
{
|
||||
systemd.user.services.kitaab-sync = {
|
||||
Service = {
|
||||
ExecStart = "${mkStartScript name}";
|
||||
Path = [ pkgs.luaPackages.fennel ];
|
||||
};
|
||||
};
|
||||
systemd.user.timers.kitaab-sync = {
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
PartOf = [ "kitaab-sync.service" ];
|
||||
};
|
||||
Timer = {
|
||||
OnCalendar = [ "hourly" ];
|
||||
};
|
||||
};
|
||||
}
|
3
home/profiles/task/bin/set-backlog.sh
Executable file
3
home/profiles/task/bin/set-backlog.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
task rc.bulk=0 rc.confirmation=off rc.dependency.confirmation=off rc.recurrence.confirmation=off "$@" modify -idea +backlog
|
3
home/profiles/task/bin/set-focus.sh
Executable file
3
home/profiles/task/bin/set-focus.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
task rc.bulk=0 rc.confirmation=off rc.dependency.confirmation=off rc.recurrence.confirmation=off "$@" modify -idea -backlog
|
3
home/profiles/task/bin/set-idea.sh
Executable file
3
home/profiles/task/bin/set-idea.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
task rc.bulk=0 rc.confirmation=off rc.dependency.confirmation=off rc.recurrence.confirmation=off "$@" modify +idea -backlog
|
61
home/profiles/task/bin/task-note.py
Executable file
61
home/profiles/task/bin/task-note.py
Executable file
|
@ -0,0 +1,61 @@
|
|||
#! /usr/bin/env cached-nix-shell
|
||||
#! nix-shell -i python3 -p python3
|
||||
|
||||
"""Manage Taskwarrior notes"""
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import datetime
|
||||
|
||||
NOTES_DIR = "~/kitaab/vimwiki/task-notes"
|
||||
EDITOR = os.environ["EDITOR"]
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
|
||||
def write_note(task_id: int):
|
||||
"""Open `$EDITOR` to take notes about task with ID `task_id`."""
|
||||
task_uuid = os.popen(f"task _get {task_id}.uuid").read().rstrip()
|
||||
|
||||
if not task_uuid:
|
||||
logging.error(f"{task_id} has no UUID!")
|
||||
sys.exit(1)
|
||||
|
||||
logging.debug(f"Task {task_id} has UUID {task_uuid}")
|
||||
|
||||
notes_dir = os.path.expanduser(NOTES_DIR)
|
||||
os.makedirs(notes_dir, exist_ok=True)
|
||||
notes_basename = f"{task_uuid}.wiki"
|
||||
notes_file = os.path.join(notes_dir, notes_basename)
|
||||
logging.debug(f"Notes file is {notes_file}")
|
||||
|
||||
if not os.path.exists(notes_file):
|
||||
logging.info("Adding description to empty notes file")
|
||||
task_description = os.popen(f"task _get {task_id}.description").read()
|
||||
task_project = os.popen(f"task _get {task_id}.project").read().strip("\n").replace(".", ":")
|
||||
task_tags = os.popen(f"task _get {task_id}.tags").read().split(",")
|
||||
if len(task_tags):
|
||||
task_tags = ":".join(task_tags).strip("\n") + ":"
|
||||
time = datetime.datetime.now().strftime("%y-%m-%d %H:%M")
|
||||
|
||||
with open(notes_file, "w") as f:
|
||||
f.write(f"%title {task_description}")
|
||||
f.write(f":task:{task_project}:{task_tags if len(task_tags) else ''}\n")
|
||||
f.write(f"%date {time}\n\n")
|
||||
f.flush()
|
||||
|
||||
os.execlp(EDITOR, EDITOR, notes_file)
|
||||
|
||||
|
||||
def update_task(task_id: int):
|
||||
os.popen(f"task {task_id} modify +note")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Write Taskwarrior notes")
|
||||
parser.add_argument('task_id', metavar='ID', type=int, help="ID of the task to note")
|
||||
args = parser.parse_args()
|
||||
|
||||
write_note(args.task_id)
|
29
home/profiles/task/ca.cert
Normal file
29
home/profiles/task/ca.cert
Normal file
|
@ -0,0 +1,29 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIE/zCCAuegAwIBAgIUTLEuHYBh/sST/IrIhs+pWjDjW3UwDQYJKoZIhvcNAQEM
|
||||
BQAwFjEUMBIGA1UEAxMLMTkyLjE2OC4xLjYwIBcNMjEwMjEzMDUzODUxWhgPOTk5
|
||||
OTEyMzEyMzU5NTlaMBYxFDASBgNVBAMTCzE5Mi4xNjguMS42MIICIjANBgkqhkiG
|
||||
9w0BAQEFAAOCAg8AMIICCgKCAgEA8ZyNGBoudva5KAe1F281Fe3u91whLPB7SWv4
|
||||
zvN6n81NaMtl+rkfcO5GrYSbtemeQUz04N9dUIRABPyHGO+y0gQn/1p1KMdFzhH1
|
||||
wDR45h/Eo7+U+2Y/qjyvdjNU9aPe5yymuqSm0cTdFbRkXBoZDSDrwA0U078oYCBo
|
||||
yDxubKK7H7jWlSVyaBmsWDA72qdZhcOGKy6YoIEiT18V/57wTXBacBZvs3ORbOR6
|
||||
SMPjq0Pr32+kDriRbb9lQ9TAAGLE51hM8IBMnAZVvgS5GQ1y8elH4WJc7caom5B3
|
||||
l1MVQKEtgxU+QA4ZqGr9y7H4ey4Xf0V9pvrnsUTu1zCz+P4wd8jS6toxCnn8A8Tq
|
||||
c3ytA7t3o7BntLSWeQV5LKEiXqF3n3njqXk5Z0ZxDkI+FkhbnOytwGvUEpanTS1d
|
||||
z3EyZA8h1huoDdTmL1hVrg9pIaFJG5S9GuwcJiFPFo0QN6lcbhJmKrCOzPKb8Kwn
|
||||
zhymN7vtskSeqPZnQX+/tGupMzeITwcudoBg7zRUNKikIsTwFze+QV+puGFCjH+B
|
||||
BIe0NQ+rzpWOyI7FDYIMb5q+/PJKTkH2Bu5qYhgebzdCxKcJGBNoWsgzvl+tofQw
|
||||
XchzIqR35xbkmvLeuIIABd8BKaowrAUGrRxtp7IZqxcR3XxH1RIimkHzeRHTphU2
|
||||
oycB3eMCAwEAAaNDMEEwDwYDVR0TAQH/BAUwAwEB/zAPBgNVHQ8BAf8EBQMDBwQA
|
||||
MB0GA1UdDgQWBBQBl2OoCoAweUqsfVQNmL9H3jtl2DANBgkqhkiG9w0BAQwFAAOC
|
||||
AgEAypV1zutIu7an9tansll20LH2WMAHqi5JrALPBCO9yTqnCS3xZg8VZott/qxm
|
||||
/SsdlhKtekpvljiQhKqB4wROTf26GjxB9iAzdfxAZEcpYWkyXQ6qzDpjIHLLB3X2
|
||||
31KHbMc63GOI4wmpGY532tt3qDb+VhgfK25GyvUvvw5qvFsYeGHdSD/HIEJHKlOK
|
||||
8esaF2/r+wuOWABbbmSBaCtR8H8T4Z/B5l6PoVft9uu8IQbtuhiDn08mZHat8tUq
|
||||
nxm3O1JsV4ZNtvqh5st1Qn32f7buM6AFMhMy9bcXwR33TJBuv994zRjJQYk+FKzE
|
||||
UzrWl9mlglWV34P0+xMxpDFEgQvkJAFmdhcVsZlDwILWzEa/ZrS2EQGsEuzHbfFo
|
||||
oVQuXjzQkX504kAypwQBwbqPfwwYEev7EPVOj32/ke1TzBLaqqJ5AMABShOUJD3L
|
||||
pNOWMD3B23lRDll2f/Tkhqq4qriqWmtn7urC5ga6AlnAUueiORHTTcA9XBuAz68q
|
||||
dVfU3cIwwnGhDAYUB27yeb0mhPGnTz2Xr4tn8TLrL7c0tXZPjDCttr6hUnB+X/Yx
|
||||
tBxT1fJMZR7lzRMvnLJJQKC5rVKE4AAy+FJb3JvhQw01CF4odCmgWT3y+MG4RxnN
|
||||
sqTWkKoE6bRT9rnRAG8EntRycibGKH0b1PhpY8ngOgMbfCw=
|
||||
-----END CERTIFICATE-----
|
19
home/profiles/task/default.nix
Normal file
19
home/profiles/task/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
|
||||
{
|
||||
home.file = {
|
||||
# Because the below is inconsistent, I turn it off once I have a copy in place.
|
||||
".taskrc".enable = true;
|
||||
# WARN ugly hack
|
||||
# taskwarrior needs write access to this file for centexts
|
||||
# this way, we get a copy of the file, and we make sure it's writable
|
||||
".taskrc".source = ./taskrc;
|
||||
# ".taskrc".executable = true;
|
||||
# ".taskrc".onChange = "cp ~/.taskrc ~/.taskrc2;rm ~/.taskrc;mv ~/.taskrc2 ~/.taskrc;chmod +w ~/.taskrc";
|
||||
".task/keys/ca.cert".source = ./ca.cert;
|
||||
".task/keys/public.cert".source = ./public.cert;
|
||||
|
||||
".local/bin/task-note".source = ./bin/task-note.py;
|
||||
".local/bin/set-idea".source = ./bin/set-idea.sh;
|
||||
};
|
||||
}
|
31
home/profiles/task/public.cert
Normal file
31
home/profiles/task/public.cert
Normal file
|
@ -0,0 +1,31 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIFRDCCAyygAwIBAgIUCsfV17Ag4utaNHY9sv6x7g/Z3bgwDQYJKoZIhvcNAQEM
|
||||
BQAwFjEUMBIGA1UEAxMLMTkyLjE2OC4xLjYwIBcNMjEwMjEzMDUzODU0WhgPOTk5
|
||||
OTEyMzEyMzU5NTlaMCgxFDASBgNVBAMTCzE5Mi4xNjguMS42MRAwDgYDVQQKEwdt
|
||||
b3NzbmV0MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA23j6Xo+BlPpM
|
||||
APbncIztaYOfL02lvCOhbx5sxPk6TH5dIxzkBAc3T9X6uY+hTY36QT+SjN5z0EBi
|
||||
UghxwMM8r2G4ip3XLEFgyFDuDzVgRRuGBbSGtOEIqt49lvmBEWKaxDdYftdlDpKq
|
||||
qV8NlQJJnBJ9cNZlWzlheRALHMvCUsfnX60piWbQjYrq6j+lF9VjUKUClD92/jhS
|
||||
LaeaQ6vMlCabYNOf+vq8J3L2oRwHkLMPHBa/a5vNT3bL8Q/Sjuegi+zD68k/fobt
|
||||
Y7gYL/qyhrFfIvGyN0Jf92DTKdj+1ma3kIaG+REeAx5W8NtRdfnSlS+DA5O0mp0P
|
||||
oMZICs0Xbq474XYkhBoz7smWA4DLT86on7qcCo24CvII9YU0VDYHNtnDi8CaStea
|
||||
dvGFDiQS5X3Awwsgt5OWJSgBx+NL9piiZq9Eu5E3CGpoYNiTCANrRV21qmyf090h
|
||||
md01QUU/f1IMa+wBgryTW94OUhSMmknB9roFAmQaD9Xnj6ecGJkq2ZiytpJ37QiV
|
||||
8h2ZM9K1PUD4/QulCG/U4IG1II7ef1IUyEFpj6BB7CGCHq+qJ7QKT6Kc/quEewHB
|
||||
eUjG+FvSmCCgfVf/hqYvul7ybbiqMgCSTSziKF7tN8DuFfIZo9EGdckKXxBgQ7ua
|
||||
BRVnSZw2vh8nJ8jtGkrw/grKwHL/yA0CAwEAAaN2MHQwDAYDVR0TAQH/BAIwADAT
|
||||
BgNVHSUEDDAKBggrBgEFBQcDAjAPBgNVHQ8BAf8EBQMDB6AAMB0GA1UdDgQWBBQi
|
||||
MnF9Np64W1zshqQxe8Cgvm8hFDAfBgNVHSMEGDAWgBQBl2OoCoAweUqsfVQNmL9H
|
||||
3jtl2DANBgkqhkiG9w0BAQwFAAOCAgEAsNqR/SziOtCRS+n7FGxJ+3FpfACqV4Yl
|
||||
MDTbpRe0qUcbMDetWZALdPS5gNW/4rj2cpacd3eQI6qRLtUW/l8QGqZl8OjslA2X
|
||||
/N+9Alza8D+cv6Almx1TclcYJF/Z0NneJ4DgdFXJAPK3zf5eD73N/7EohNWy70Bj
|
||||
J/4cmYL3T1Pq/FhN/9DV9HoSaRxy9naRjZ3dZXC4CgFRExXw+sEHLDzOHrLDz2xN
|
||||
4qOjYUH3I1rGWXsSGRFztgNTnA02hPxG1VHzmTvwPjoBxn2/QGTMuXnk8xQGGtdy
|
||||
G8oav2RLBqvh0AD4fqd2fnMezJiRipXzYmWb1bySe48HRtHJrZ/aQQrUlPdNQwAe
|
||||
EeixS97JEdBqtag41VhRBFxF9nML8ozA6cgj+Jm2M6OGU+M3tVhioEiuKPm6jXgl
|
||||
3v8AA2CQrSJjhkTzinxE4FXa9O8INwziHSCE3GNIZaDCMYj7R8tTVcLaQWzUtdj/
|
||||
i+0fI61n3ZOabvhLXttsdrtqcfNbrxCBVezoweg2RrVFcJc2GojCwJWt6a0cO+69
|
||||
ggHZgpAwXsMmyMhhCbBXhnxBrsuGbN7f3YN2ty2veeFtp8uDvjCqmgJ5AG32w5E4
|
||||
Ck9Rup6lwgq3YTQ4pTxl2y26HinobPrMzsZiWkZhN7elnVZL00kSF2Qn6x6xuAap
|
||||
Z5oPkwZtYnM=
|
||||
-----END CERTIFICATE-----
|
116
home/profiles/task/taskrc
Normal file
116
home/profiles/task/taskrc
Normal file
|
@ -0,0 +1,116 @@
|
|||
# [Created by task 2.5.3 9/25/2021 00:53:42]
|
||||
# Taskwarrior program configuration file.
|
||||
# For more documentation, see http://taskwarrior.org or try 'man task', 'man task-color',
|
||||
# 'man task-sync' or 'man taskrc'
|
||||
|
||||
# Here is an example of entries that use the default, override and blank values
|
||||
# variable=foo -- By specifying a value, this overrides the default
|
||||
# variable= -- By specifying no value, this means no default
|
||||
# #variable=foo -- By commenting out the line, or deleting it, this uses the default
|
||||
|
||||
# Use the command 'task show' to see all defaults and overrides
|
||||
|
||||
# Files
|
||||
data.location=~/.task
|
||||
taskd.server=task.mossnet.lan:53589
|
||||
#taskd.server=10.0.69.4:53589
|
||||
taskd.ca=~/.task/keys/ca.cert
|
||||
taskd.key=/run/agenix/taskwarrior-private
|
||||
taskd.certificate=~/.task/keys/public.cert
|
||||
taskd.trust=ignore hostname
|
||||
taskd.credentials=mossnet\/anish\/1647259c-e340-405c-a38b-11ac18e34688
|
||||
|
||||
# Color theme (uncomment one to use)
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/light-16.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/light-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-16.theme
|
||||
#include /nix/store/nv663d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-red-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-green-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-blue-256.theme
|
||||
# TODO this needs to be not a hardlink but a nix link
|
||||
# include /nix/store/64nvv0ac2dr8rdz2414f53x97j3msiz0-taskwarrior-2.6.2/share/doc/task/rc/dark-violets-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-yellow-green.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-gray-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-gray-blue-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/solarized-dark-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/solarized-light-256.theme
|
||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/no-color.theme
|
||||
|
||||
uda.priority.values=H,M,,L
|
||||
news.version=2.6.0
|
||||
|
||||
## Contexts
|
||||
context.poor.read=-purchase
|
||||
context.dev.read=+dev or +ops -work
|
||||
context.home.read=-work
|
||||
context.work.read=+work
|
||||
context.work.write=+work
|
||||
context.bucket.read=+idea
|
||||
|
||||
## Reports
|
||||
|
||||
# List
|
||||
report.list.columns=id,priority,project,tags,recur.indicator,scheduled.countdown,due,until.remaining,description.count
|
||||
report.list.labels=ID,P,Project,Tags,R,Sch,Due,Until,Description
|
||||
|
||||
# In
|
||||
report.in.columns=id,project,tags,description
|
||||
report.in.labels=ID,Proj,Tags,Description
|
||||
report.in.description=Inbox
|
||||
report.in.filter=status:pending limit:page (+idea)
|
||||
|
||||
# Backlog
|
||||
report.backlog.columns=id,priority,project,tags,recur.indicator,scheduled.countdown,due,until.remaining,description.count
|
||||
report.backlog.labels=ID,P,Project,Tags,R,Sch,Due,Until,Description
|
||||
report.backlog.description=backlog
|
||||
report.backlog.filter=status:pending limit:page (+backlog)
|
||||
report.backlog.sort=start-,due+,project+/,urgency-
|
||||
|
||||
# Unblocked
|
||||
report.unblocked.labels=ID,Deps,Proj,Tags,Due,Active,Description
|
||||
report.unblocked.columns=id,depends,project,tags,due,start.active,description
|
||||
|
||||
# Next
|
||||
# It's not a good idea to filter this view, since modify depends on the next view
|
||||
report.next.filter=(status:pending limit:0) # pro.not:ideas -idea -backlog
|
||||
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
|
||||
|
||||
# Everything, including inbox
|
||||
report.every.filter=(status:pending limit:0)
|
||||
report.every.labels=ID,Active,Deps,P,Project,Tag,Recur,S,Due,Until,Description
|
||||
report.every.columns=id,start.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description
|
||||
|
||||
report.poms.filter=(status:pending -idea -backlog -BLOCKED)
|
||||
report.poms.labels=UUID,ID,Project,Tag,Description
|
||||
report.poms.columns=uuid,id,project,tags,description
|
||||
report.poms.sort=start+,urgency+
|
||||
|
||||
# Urgency
|
||||
urgency.user.project.wait.coefficient=-10.0
|
||||
urgency.user.project.craft.coefficient=1.9
|
||||
urgency.user.project.chores.coefficient=0.8
|
||||
urgency.user.tag.think.coefficient=-7.0
|
||||
urgency.user.tag.purchase.coefficient=-1.2
|
||||
urgency.user.project.curve.glam.coefficient=-1.3
|
||||
|
||||
# UDAs
|
||||
uda.taskwarrior-tui.shortcuts.1=~/.local/bin/task/set-focus.sh
|
||||
uda.taskwarrior-tui.shortcuts.2=~/.local/bin/task/set-backlog.sh
|
||||
uda.taskwarrior-tui.shortcuts.3=~/.local/bin/task/set-idea.sh
|
||||
|
||||
# Colors
|
||||
color.project.chores=blue
|
||||
color.tag.dev=cyan
|
||||
color.project.craft=green
|
||||
color.tag.purchase=rgb411
|
||||
color.tag.next=black on yellow
|
||||
color.sync.rejected=red
|
||||
color.blocked=color0
|
||||
color.tag.ops=rgb032
|
||||
color.blocking=white on black
|
||||
color.project.curve.glam=rgb525
|
||||
color.tag.glam=rgb525
|
||||
color.project.none=rgb553
|
||||
color.footnote=yellow
|
18
hosts/bootstrap.nix
Normal file
18
hosts/bootstrap.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ profiles, ... }:
|
||||
{
|
||||
# build with: `bud build bootstrap bootstrapIso`
|
||||
# reachable on the local link via ssh root@fe80::47%eno1
|
||||
# where 'eno1' is replaced by your own machine's network
|
||||
# interface that has the local link to the target machine
|
||||
imports = [
|
||||
# profiles.networking
|
||||
profiles.core
|
||||
profiles.users.root # make sure to configure ssh keys
|
||||
profiles.users.nixos
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# will be overridden by the bootstrapIso instrumentation
|
||||
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
|
||||
}
|
104
hosts/box/configuration.nix
Normal file
104
hosts/box/configuration.nix
Normal file
|
@ -0,0 +1,104 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# No systemd emergency mode (can't reliably be accessed over SSH)
|
||||
systemd.enableEmergencyMode = false;
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.efi.canTouchEfiVariables = false;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
enableCryptodisk = true;
|
||||
efiInstallAsRemovable = true;
|
||||
};
|
||||
|
||||
boot.initrd.secrets = {
|
||||
"/keyfile0.bin" = /etc/secrets/initrd/keyfile0.bin;
|
||||
"/keyfile1.bin" = /etc/secrets/initrd/keyfile1.bin;
|
||||
};
|
||||
|
||||
# Remote SSH unlock
|
||||
boot.initrd.network.enable = true;
|
||||
boot.initrd.network.ssh = {
|
||||
enable = true;
|
||||
port = 22;
|
||||
authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDM0Zvei46x/yZl/IeBCq6+IYQQ0avulzVyBysF9cPigZMCybWRV7IEU+E3k9t6JrbdbdGfJkcZIWmsWDdKS8W8mBnZpVoT0ffLynu8JQ/TKdGm4Qv6bgUeKNrGsNv0ZPs2CDaGSLj0oJfRF7Ko10tcLP0vW+yujrh+y6TH/vVzJioaV4TGvtCUpn+wEQah9ROwPQLUUofsSWdnRsDJ/gp37zXWs4l5wyjSKtP3O9RZUP7kBekbSqEgSXiTk0oUQSVqIWl9NDiP6onk/gSOjXsR/JPqsSN/XI/c/yj6gyY0f51Ru2D7iBxuMJIJcWV+rU6coIj+ULcQWLzt/7TI8jq5AOOzI/ll4zbL24Eo84Rz+TP9tvMMhDZ0VaMN22AJ8qQEjc5P09tWKsX7Jg39XelyV1jHXncE4yvIE9F4RSCHzWCeKeXakizQNuzSaxTxIExRFYHjNW5bR6+3MTGwVrEIXU+qML+0yFTR86MT+tdY5AreAJQLwbog79O1NupeXJE= anish@curve " ];
|
||||
hostKeys = [ "/etc/secrets/initrd/ssh_host_ed25519_key" ]; # create this file with `ssh-keygen -t ed25519 -N "" -f /etc/secrets/initrd/ssh_host_ed25519_key`
|
||||
};
|
||||
boot.initrd.availableKernelModules = [ "igc" "iwlwifi" ];
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
"root" = {
|
||||
#name = "root";
|
||||
device = "/dev/disk/by-uuid/f37f3222-47d7-42d8-b400-363320a31853"; # UUID for /dev/nvme01np2
|
||||
preLVM = true;
|
||||
allowDiscards = true;
|
||||
keyFile = "/keyfile0.bin";
|
||||
};
|
||||
};
|
||||
|
||||
# Data mount
|
||||
# fileSystems."/data" = {
|
||||
# device = "/dev/disk/by-uuid/3276a297-9ee4-4998-b262-1ed100366c06"; # UUID for /dev/mapper/crypted-data
|
||||
# encrypted = {
|
||||
# enable = true;
|
||||
# label = "crypted-data";
|
||||
# blkDev = "/dev/disk/by-uuid/8a317bf4-fe13-4334-a6df-5fe5a5048b5e"; # UUID for /dev/sda1
|
||||
# keyFile = "/keyfile1.bin";
|
||||
# };
|
||||
# };
|
||||
|
||||
networking.interfaces.enp2s0 = {
|
||||
ipv4.addresses = [{
|
||||
address = "192.168.1.240";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
|
||||
useDHCP = false;
|
||||
};
|
||||
#networking.nameservers = [ "172.16.11.240" ];
|
||||
networking.nameservers = [ "192.168.1.1" ];
|
||||
networking.defaultGateway = {
|
||||
address = "192.168.1.1";
|
||||
interface = "enp2s0";
|
||||
};
|
||||
|
||||
networking.hostName = "box"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.wlp3s0.useDHCP = true;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
sound.enable = false;
|
||||
|
||||
programs.gnupg.agent.enable = true;
|
||||
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
|
||||
programs.gnupg.agent.enableSSHSupport = true;
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "19.09"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
97
hosts/box/default.nix
Normal file
97
hosts/box/default.nix
Normal file
|
@ -0,0 +1,97 @@
|
|||
{ self, pkgs, ... }: {
|
||||
imports = [
|
||||
./configuration.nix
|
||||
../profiles/core
|
||||
../profiles/server
|
||||
../profiles/taskd
|
||||
../profiles/shaarli
|
||||
../profiles/dns
|
||||
# ../profiles/monitoring
|
||||
../profiles/nfs
|
||||
../profiles/gonic
|
||||
# ../profiles/headphones # TODO broken on 23.11, see: https://github.com/rembo10/headphones/issues/3320
|
||||
../profiles/radicale
|
||||
# ../profiles/seafile # waiting for https://github.com/NixOS/nixpkgs/pull/249523 to be merged
|
||||
../profiles/syncthing
|
||||
../profiles/dhyan
|
||||
../profiles/calibre
|
||||
../profiles/wallabag
|
||||
../profiles/finance
|
||||
../profiles/sync/website
|
||||
../profiles/grasp
|
||||
# ../profiles/archivebox
|
||||
# ../profiles/woodpecker-agent
|
||||
# ../profiles/jellyfin
|
||||
../profiles/ulogger-server
|
||||
../profiles/photoprism # Replace with immich
|
||||
../profiles/gpodder
|
||||
#../profiles/postgres_upgrade_script
|
||||
];
|
||||
|
||||
# Backups
|
||||
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
|
||||
services.postgresqlBackup = {
|
||||
enable = true;
|
||||
databases = [ "wallabag" "photoprism" "ulogger" ];
|
||||
location = "/var/backup/postgresql";
|
||||
};
|
||||
mossnet.backup = {
|
||||
enable = true;
|
||||
name = "mossnet";
|
||||
paths = [
|
||||
"/var/lib/taskserver" # taskwarrior
|
||||
"/var/www/shaarli-config" # sharli
|
||||
"/var/backup/postgresql" # wallabag
|
||||
"/var/lib/radicale" # radicale
|
||||
"/home/anish/usr/drawing" # syncthing
|
||||
"/data/books" # calibre-web
|
||||
# "/home/anish/usr/nonfiction" # syncthing
|
||||
"/home/anish/usr/finance" # beancount
|
||||
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
|
||||
];
|
||||
# seafile
|
||||
};
|
||||
|
||||
services.transmission = {
|
||||
enable = true;
|
||||
settings = {
|
||||
rpc.bind-address = "0.0.0.0";
|
||||
download-dir = "/mnt/two/new-music";
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."transmission.mossnet.lan" = {
|
||||
enableACME = false;
|
||||
forceSSL = false;
|
||||
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
proxy_pass http://localhost:9091/;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."mast.mossnet.lan" = {
|
||||
enableACME = false;
|
||||
forceSSL = false;
|
||||
|
||||
locations."/" = {
|
||||
extraConfig = ''
|
||||
proxy_pass http://localhost:5731/;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
|
||||
age.secrets.box-wg.owner = "anish";
|
||||
age.secrets.borg-key.file = "${self}/secrets/borg-key.age";
|
||||
mossnet.wg = {
|
||||
enable = true;
|
||||
ips = [ "10.0.69.4/24" ];
|
||||
privateKeyFile = "/run/agenix/box-wg";
|
||||
};
|
||||
services.syncthing.guiAddress = "0.0.0.0:8384"; # public syncthing
|
||||
|
||||
system.stateVersion = "19.09";
|
||||
}
|
68
hosts/box/hardware-configuration.nix
Normal file
68
hosts/box/hardware-configuration.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "thunderbolt" "uas" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/ade0752d-84d3-4e39-865b-9027ba2d5c67";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/1715-278E";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/one" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/0f857c6e-509d-436f-9e78-bc25f1b0d23b";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/two" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/5bc894bf-ed87-4c30-aab4-87e154e0cd08";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/three" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/0be3ded1-9c8b-40aa-94ca-dc2297d5988e";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"nofail"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/b790abb4-ba5f-4476-8f09-b0fc575414aa"; }];
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
}
|
32
hosts/cube/configuration.nix
Normal file
32
hosts/cube/configuration.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||
|
||||
networking.hostName = "cube"; # Define your hostname.
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.ens3.useDHCP = true;
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
gitAndTools.gitFull
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.11"; # Did you read the comment?
|
||||
}
|
||||
|
16
hosts/cube/default.nix
Normal file
16
hosts/cube/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ profiles, suites, ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
../profiles/core
|
||||
../profiles/server
|
||||
../profiles/site
|
||||
];
|
||||
|
||||
services.nginx.enable = true;
|
||||
services.nginx.virtualHosts."coaching.lakhwara.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = { root = "/var/lib/coaching"; index = "/index.html"; };
|
||||
};
|
||||
}
|
33
hosts/cube/hardware-configuration.nix
Normal file
33
hosts/cube/hardware-configuration.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/9233d8be-539f-43c8-9b83-84b5b4d72a93";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/E00D-9070";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
}
|
40
hosts/curve/configuration.nix
Normal file
40
hosts/curve/configuration.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
boot.loader.grub.enable = true;
|
||||
# Define on which hard drive you want to install Grub.
|
||||
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
||||
|
||||
# Minimal list of modules to use the EFI system partition and the YubiKey
|
||||
boot.initrd.kernelModules = [ "vfat" "nls_cp437" "nls_iso8859-1" "usbhid" ];
|
||||
|
||||
# Enable support for the YubiKey PBA
|
||||
boot.initrd.luks.yubikeySupport = true;
|
||||
|
||||
# Configuration to use your Luks device
|
||||
boot.initrd.luks.devices = {
|
||||
"crypthome" = {
|
||||
device = "/dev/sda2";
|
||||
preLVM = true; # You may want to set this to false if you need to start a network service first
|
||||
yubikey = {
|
||||
slot = 2;
|
||||
twoFactor = true; # Set to false if you did not set up a user password.
|
||||
storage = {
|
||||
device = "/dev/sda1";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.hostName = "curve";
|
||||
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
# console = {
|
||||
# font = "Lat2-Terminus16";
|
||||
# keyMap = "us";
|
||||
# };
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
services.libinput.enable = true;
|
||||
}
|
198
hosts/curve/default.nix
Normal file
198
hosts/curve/default.nix
Normal file
|
@ -0,0 +1,198 @@
|
|||
{ self, pkgs, ... }: {
|
||||
imports = [
|
||||
./configuration.nix
|
||||
../users/anish
|
||||
../profiles/core
|
||||
../profiles/bluetooth
|
||||
../profiles/music
|
||||
../profiles/sync/cal
|
||||
../profiles/wifi
|
||||
../profiles/desktop
|
||||
../profiles/mimetypes
|
||||
../profiles/syncthing
|
||||
../profiles/mossnet-hosts
|
||||
# ../profiles/fly-wg
|
||||
# ../profiles/kuberenetes
|
||||
# ../profiles/mount-mossnet
|
||||
];
|
||||
|
||||
# temporarily allow ssh access for work, to be able to do deploy new services
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings.PermitRootLogin = "no";
|
||||
};
|
||||
|
||||
# import profiling tools
|
||||
programs.systemtap.enable = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
environment.systemPackages = with pkgs; [ docker-compose ];
|
||||
|
||||
# Speed up boot by removing dependency on network
|
||||
systemd = {
|
||||
targets.network-online.wantedBy =
|
||||
pkgs.lib.mkForce [ ]; # Normally ["multi-user.target"]
|
||||
services.NetworkManager-wait-online.wantedBy =
|
||||
pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
|
||||
};
|
||||
|
||||
programs.gnupg.agent.enable = true;
|
||||
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||
|
||||
fileSystems."/mnt/ftp" = {
|
||||
device = "192.168.1.240:/home/ftp";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/tv" = {
|
||||
device = "192.168.1.240:/mnt/three/tv";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/movies" = {
|
||||
device = "192.168.1.240:/mnt/three/movies";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=600" ];
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
# https://github.com/NixOS/nixpkgs/issues/26722
|
||||
# boot.initrd.systemd.enable = true;
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
themePackages = [ pkgs.plymouth-themes ];
|
||||
theme = "motion";
|
||||
};
|
||||
|
||||
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 22 ]; # allow ssh
|
||||
allowedTCPPortRanges = [{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}];
|
||||
allowedUDPPortRanges = [{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}];
|
||||
};
|
||||
|
||||
age.secrets.curve-wg.file = "${self}/secrets/curve-wg.age";
|
||||
age.secrets.curve-wg.owner = "anish";
|
||||
mossnet.wg = {
|
||||
enable = true;
|
||||
ips = [ "10.0.69.2/24" ];
|
||||
privateKeyFile = "/run/agenix/curve-wg";
|
||||
};
|
||||
|
||||
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
|
||||
age.secrets.borg-key.file = "${self}/secrets/borg-key.age";
|
||||
mossnet.backup = {
|
||||
enable = true;
|
||||
name = "curve";
|
||||
paths = [ "/home/anish/usr" "/home/anish/.ssh" ];
|
||||
};
|
||||
|
||||
# enable adb
|
||||
# TODO move this (it's for KaiOS WebIDE devShell?)
|
||||
programs.adb.enable = true;
|
||||
#virtualisation.docker.enable = true;
|
||||
boot.blacklistedKernelModules = [ "qcserial" ];
|
||||
# Used for packer Capsul
|
||||
users.users.anish.extraGroups =
|
||||
[ "adbusers" "wheel" "plugdev" "libvertd" "docker" ];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
hardware.keyboard.zsa.enable = true;
|
||||
services.udev.extraRules = ''
|
||||
# Qualcomm EDL
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666", GROUP="plugdev"
|
||||
|
||||
# Qualcomm Memory Debug
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9006", MODE="0666", GROUP="plugdev"
|
||||
|
||||
# Atmel DFU
|
||||
### ATmega16U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess"
|
||||
### ATmega32U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess"
|
||||
### ATmega16U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess"
|
||||
### ATmega32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess"
|
||||
### AT90USB64
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess"
|
||||
### AT90USB162
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess"
|
||||
### AT90USB128
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess"
|
||||
|
||||
# Input Club
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess"
|
||||
|
||||
# STM32duino
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess"
|
||||
# STM32 DFU
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
|
||||
|
||||
# BootloadHID
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess"
|
||||
|
||||
# USBAspLoader
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess"
|
||||
|
||||
# ModemManager should ignore the following devices
|
||||
# Atmel SAM-BA (Massdrop)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
|
||||
# Caterina (Pro Micro)
|
||||
## pid.codes shared PID
|
||||
### Keyboardio Atreus 2 Bootloader
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Spark Fun Electronics
|
||||
### Pro Micro 3V3/8MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Pro Micro 5V/16MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### LilyPad 3V3/8MHz (and some Pro Micro clones)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Pololu Electronics
|
||||
### A-Star 32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Arduino SA
|
||||
### Leonardo
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Micro
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Adafruit Industries LLC
|
||||
### Feather 32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### ItsyBitsy 32U4 3V3/8MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### ItsyBitsy 32U4 5V/16MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## dog hunter AG
|
||||
### Leonardo
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Micro
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
|
||||
# hid_listen
|
||||
KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
|
||||
|
||||
# hid bootloaders
|
||||
## QMK HID
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess"
|
||||
## PJRC's HalfKay
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess"
|
||||
'';
|
||||
|
||||
# enable wireguard tunnel
|
||||
# privKey = "/run/secrets/curve-wg"; -> local config
|
||||
# publicKey = "..."; -> shipped to server config
|
||||
# IP = "10.0.69.2"; -> shipped to both configs
|
||||
system.stateVersion = "22.05";
|
||||
}
|
47
hosts/curve/hardware-configuration.nix
Normal file
47
hosts/curve/hardware-configuration.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/e1268753-4f18-4e6f-8edb-d4724ad8eb4a";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/e1268753-4f18-4e6f-8edb-d4724ad8eb4a";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/8244-A184";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/e220fea6-cf3b-4687-bfe1-9cf6d3ba57f7"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
38
hosts/curve/hardware.bak
Normal file
38
hosts/curve/hardware.bak
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/6ee9d430-1b1b-4e39-bced-606145570a78";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/6ee9d430-1b1b-4e39-bced-606145570a78";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/AD0C-92EF";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/5486bd9f-6826-4ac7-b09b-8768a35c331f"; }
|
||||
];
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
}
|
337
hosts/development/mirlo/docker-compose.nix
Normal file
337
hosts/development/mirlo/docker-compose.nix
Normal file
|
@ -0,0 +1,337 @@
|
|||
# Auto-generated using compose2nix v0.1.6.
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Runtime
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings = {
|
||||
# Required for container networking to be able to use names.
|
||||
dns_enabled = true;
|
||||
};
|
||||
};
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
# Containers
|
||||
virtualisation.oci-containers.containers."blackbird-api" = {
|
||||
image = "";
|
||||
environment = {
|
||||
API_DOMAIN = "http://localhost:3000";
|
||||
DATABASE_URL = "postgresql://nomads:nomads@pgsql:5432/nomads?schema=public";
|
||||
JWT_SECRET = "test1234";
|
||||
MEDIA_LOCATION = "./data/media/";
|
||||
MEDIA_LOCATION_DOWNLOAD_CACHE = "/data/media/downloadCache";
|
||||
MEDIA_LOCATION_INCOMING = "/data/media/incoming";
|
||||
MINIO_HOST = "minio";
|
||||
MINIO_PORT = "9000";
|
||||
MINIO_ROOT_PASSWORD = "password";
|
||||
MINIO_ROOT_USER = "blackbird";
|
||||
NODE_ENV = "development";
|
||||
PORT = "3000";
|
||||
POSTGRES_LOCAL_MACHINE_PORT = "5434";
|
||||
POSTGRES_PASSWORD = "nomads";
|
||||
POSTGRES_USER = "nomads";
|
||||
REACT_APP_API_DOMAIN = "http://localhost:3000";
|
||||
REDIS_HOST = "redis";
|
||||
REDIS_PASSWORD = "password";
|
||||
REDIS_PORT = "6379";
|
||||
REFRESH_TOKEN_SECRET = "test1234";
|
||||
STATIC_MEDIA_HOST = "http://localhost:3000";
|
||||
STRIPE_KEY = "";
|
||||
};
|
||||
volumes = [
|
||||
"/home/anish/.ssh:/root/.ssh:rw"
|
||||
"/home/anish/usr/mirlo:/var/www/api:rw"
|
||||
"/home/anish/usr/mirlo/data/media/downloadCache:/data/media/downloadCache:rw"
|
||||
"/home/anish/usr/mirlo/data/media/incoming:/data/media/incoming:rw"
|
||||
];
|
||||
ports = [
|
||||
"3000:3000/tcp"
|
||||
];
|
||||
cmd = [ "/bin/sh" "-c" "yarn && yarn migrate:deploy && yarn dev:api" ];
|
||||
dependsOn = [
|
||||
"blackbird-minio"
|
||||
"blackbird-pgsql"
|
||||
"blackbird-redis"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=api"
|
||||
"--network=mirlo-api-network"
|
||||
"--network=mirlo-redis-network"
|
||||
];
|
||||
};
|
||||
systemd.services."podman-blackbird-api" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
};
|
||||
after = [
|
||||
"podman-network-mirlo-api-network.service"
|
||||
"podman-network-mirlo-redis-network.service"
|
||||
];
|
||||
requires = [
|
||||
"podman-network-mirlo-api-network.service"
|
||||
"podman-network-mirlo-redis-network.service"
|
||||
];
|
||||
partOf = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
unitConfig.UpheldBy = [
|
||||
"podman-blackbird-minio.service"
|
||||
"podman-blackbird-pgsql.service"
|
||||
"podman-blackbird-redis.service"
|
||||
];
|
||||
wantedBy = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."blackbird-background" = {
|
||||
image = "";
|
||||
environment = {
|
||||
API_DOMAIN = "http://localhost:3000";
|
||||
DATABASE_URL = "postgresql://nomads:nomads@pgsql:5432/nomads?schema=public";
|
||||
JWT_SECRET = "test1234";
|
||||
MEDIA_LOCATION = "./data/media/";
|
||||
MEDIA_LOCATION_DOWNLOAD_CACHE = "/data/media/downloadCache";
|
||||
MEDIA_LOCATION_INCOMING = "/data/media/incoming";
|
||||
MINIO_HOST = "minio";
|
||||
MINIO_PORT = "9000";
|
||||
MINIO_ROOT_PASSWORD = "password";
|
||||
MINIO_ROOT_USER = "blackbird";
|
||||
NODE_ENV = "development";
|
||||
PORT = "3000";
|
||||
POSTGRES_LOCAL_MACHINE_PORT = "5434";
|
||||
POSTGRES_PASSWORD = "nomads";
|
||||
POSTGRES_USER = "nomads";
|
||||
REACT_APP_API_DOMAIN = "http://localhost:3000";
|
||||
REDIS_HOST = "redis";
|
||||
REDIS_PASSWORD = "password";
|
||||
REDIS_PORT = "6379";
|
||||
REFRESH_TOKEN_SECRET = "test1234";
|
||||
STATIC_MEDIA_HOST = "http://localhost:3000";
|
||||
STRIPE_KEY = "";
|
||||
};
|
||||
volumes = [
|
||||
"/home/anish/.ssh:/root/.ssh:rw"
|
||||
"/home/anish/usr/mirlo:/var/www/api:rw"
|
||||
"/home/anish/usr/mirlo/data/media/processing:/data/media/processing:rw"
|
||||
];
|
||||
dependsOn = [
|
||||
"blackbird-api"
|
||||
"blackbird-minio"
|
||||
"blackbird-pgsql"
|
||||
"blackbird-redis"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=background"
|
||||
"--network=mirlo-api-network"
|
||||
"--network=mirlo-redis-network"
|
||||
];
|
||||
};
|
||||
systemd.services."podman-blackbird-background" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
};
|
||||
after = [
|
||||
"podman-network-mirlo-api-network.service"
|
||||
"podman-network-mirlo-redis-network.service"
|
||||
];
|
||||
requires = [
|
||||
"podman-network-mirlo-api-network.service"
|
||||
"podman-network-mirlo-redis-network.service"
|
||||
];
|
||||
partOf = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
unitConfig.UpheldBy = [
|
||||
"podman-blackbird-api.service"
|
||||
"podman-blackbird-minio.service"
|
||||
"podman-blackbird-pgsql.service"
|
||||
"podman-blackbird-redis.service"
|
||||
];
|
||||
wantedBy = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."blackbird-minio" = {
|
||||
image = "minio/minio";
|
||||
environment = {
|
||||
API_DOMAIN = "http://localhost:3000";
|
||||
DATABASE_URL = "postgresql://nomads:nomads@pgsql:5432/nomads?schema=public";
|
||||
JWT_SECRET = "test1234";
|
||||
MEDIA_LOCATION = "./data/media/";
|
||||
MEDIA_LOCATION_DOWNLOAD_CACHE = "/data/media/downloadCache";
|
||||
MEDIA_LOCATION_INCOMING = "/data/media/incoming";
|
||||
MINIO_HOST = "minio";
|
||||
MINIO_PORT = "9000";
|
||||
MINIO_ROOT_PASSWORD = "password";
|
||||
MINIO_ROOT_USER = "blackbird";
|
||||
PORT = "3000";
|
||||
POSTGRES_LOCAL_MACHINE_PORT = "5434";
|
||||
POSTGRES_PASSWORD = "nomads";
|
||||
POSTGRES_USER = "nomads";
|
||||
REACT_APP_API_DOMAIN = "http://localhost:3000";
|
||||
REDIS_HOST = "redis";
|
||||
REDIS_PASSWORD = "password";
|
||||
REDIS_PORT = "6379";
|
||||
REFRESH_TOKEN_SECRET = "test1234";
|
||||
STATIC_MEDIA_HOST = "http://localhost:3000";
|
||||
STRIPE_KEY = "";
|
||||
};
|
||||
volumes = [
|
||||
"/home/anish/usr/mirlo/data/minio_storage:/data:rw"
|
||||
];
|
||||
ports = [
|
||||
"9000:9000/tcp"
|
||||
"9001:9001/tcp"
|
||||
];
|
||||
cmd = [ "server" "--console-address" ":9001" "/data" ];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=minio"
|
||||
"--network=mirlo-api-network:alias=minio"
|
||||
];
|
||||
};
|
||||
systemd.services."podman-blackbird-minio" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "no";
|
||||
};
|
||||
after = [
|
||||
"podman-network-mirlo-api-network.service"
|
||||
];
|
||||
requires = [
|
||||
"podman-network-mirlo-api-network.service"
|
||||
];
|
||||
partOf = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."blackbird-pgsql" = {
|
||||
image = "postgres:14-alpine";
|
||||
environment = {
|
||||
API_DOMAIN = "http://localhost:3000";
|
||||
DATABASE_URL = "postgresql://nomads:nomads@pgsql:5432/nomads?schema=public";
|
||||
JWT_SECRET = "test1234";
|
||||
MEDIA_LOCATION = "./data/media/";
|
||||
MEDIA_LOCATION_DOWNLOAD_CACHE = "/data/media/downloadCache";
|
||||
MEDIA_LOCATION_INCOMING = "/data/media/incoming";
|
||||
MINIO_HOST = "minio";
|
||||
MINIO_PORT = "9000";
|
||||
MINIO_ROOT_PASSWORD = "password";
|
||||
MINIO_ROOT_USER = "blackbird";
|
||||
PORT = "3000";
|
||||
POSTGRES_LOCAL_MACHINE_PORT = "5434";
|
||||
POSTGRES_PASSWORD = "nomads";
|
||||
POSTGRES_USER = "nomads";
|
||||
REACT_APP_API_DOMAIN = "http://localhost:3000";
|
||||
REDIS_HOST = "redis";
|
||||
REDIS_PASSWORD = "password";
|
||||
REDIS_PORT = "6379";
|
||||
REFRESH_TOKEN_SECRET = "test1234";
|
||||
STATIC_MEDIA_HOST = "http://localhost:3000";
|
||||
STRIPE_KEY = "";
|
||||
};
|
||||
volumes = [
|
||||
"/home/anish/usr/mirlo/data/pgsql:/var/lib/postgresql/data:rw"
|
||||
"/home/anish/usr/mirlo/data/pgsql_backups:/backups:rw"
|
||||
];
|
||||
ports = [
|
||||
"5432:5432/tcp"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=pgsql"
|
||||
"--network=mirlo-api-network:alias=pgsql"
|
||||
];
|
||||
};
|
||||
systemd.services."podman-blackbird-pgsql" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "no";
|
||||
};
|
||||
after = [
|
||||
"podman-network-mirlo-api-network.service"
|
||||
];
|
||||
requires = [
|
||||
"podman-network-mirlo-api-network.service"
|
||||
];
|
||||
partOf = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
};
|
||||
virtualisation.oci-containers.containers."blackbird-redis" = {
|
||||
image = "redis";
|
||||
ports = [
|
||||
"6379:6379/tcp"
|
||||
];
|
||||
cmd = [ "redis-server" "--appendonly" "yes" "--requirepass " ];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
"--network-alias=redis"
|
||||
"--network=mirlo-redis-network"
|
||||
];
|
||||
};
|
||||
systemd.services."podman-blackbird-redis" = {
|
||||
serviceConfig = {
|
||||
Restart = lib.mkOverride 500 "always";
|
||||
};
|
||||
after = [
|
||||
"podman-network-mirlo-redis-network.service"
|
||||
];
|
||||
requires = [
|
||||
"podman-network-mirlo-redis-network.service"
|
||||
];
|
||||
partOf = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
wantedBy = [
|
||||
"podman-compose-mirlo-root.target"
|
||||
];
|
||||
};
|
||||
|
||||
# Networks
|
||||
systemd.services."podman-network-mirlo-api-network" = {
|
||||
path = [ pkgs.podman ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStop = "${pkgs.podman}/bin/podman network rm -f mirlo-api-network";
|
||||
};
|
||||
script = ''
|
||||
podman network inspect mirlo-api-network || podman network create mirlo-api-network --opt isolate=true
|
||||
'';
|
||||
partOf = [ "podman-compose-mirlo-root.target" ];
|
||||
wantedBy = [ "podman-compose-mirlo-root.target" ];
|
||||
};
|
||||
systemd.services."podman-network-mirlo-redis-network" = {
|
||||
path = [ pkgs.podman ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStop = "${pkgs.podman}/bin/podman network rm -f mirlo-redis-network";
|
||||
};
|
||||
script = ''
|
||||
podman network inspect mirlo-redis-network || podman network create mirlo-redis-network --opt isolate=true
|
||||
'';
|
||||
partOf = [ "podman-compose-mirlo-root.target" ];
|
||||
wantedBy = [ "podman-compose-mirlo-root.target" ];
|
||||
};
|
||||
|
||||
# Root service
|
||||
# When started, this will automatically create all resources and start
|
||||
# the containers. When stopped, this will teardown all resources.
|
||||
systemd.targets."podman-compose-mirlo-root" = {
|
||||
unitConfig = {
|
||||
Description = "Root target generated by compose2nix.";
|
||||
};
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue