Compare commits
No commits in common. "main" and "migrate-off-digga" have entirely different histories.
main
...
migrate-of
|
@ -1,8 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +0,0 @@
|
||||||
.direnv/
|
|
||||||
.direnv/*
|
|
||||||
.direnv/**
|
|
||||||
.envrc
|
|
|
@ -4,27 +4,6 @@ var REG_NONE = NewRegistrar('none'); // No registrar.
|
||||||
var DNS_BIND = NewDnsProvider('bind'); // ISC BIND.
|
var DNS_BIND = NewDnsProvider('bind'); // ISC BIND.
|
||||||
var DNS_HEDNS = NewDnsProvider('hedns');
|
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),
|
D('sealight.xyz', REG_NONE, DnsProvider(DNS_HEDNS),
|
||||||
DefaultTTL(86400),
|
DefaultTTL(86400),
|
||||||
//SOA('@', 'ns1.he.net.', 'hostmaster.he.net.', 2022121008, 86400, 7200, 3600000, 172800, TTL(172800)),
|
//SOA('@', 'ns1.he.net.', 'hostmaster.he.net.', 2022121008, 86400, 7200, 3600000, 172800, TTL(172800)),
|
||||||
|
@ -34,14 +13,10 @@ D('sealight.xyz', REG_NONE, DnsProvider(DNS_HEDNS),
|
||||||
//NAMESERVER('ns4.he.net.'),
|
//NAMESERVER('ns4.he.net.'),
|
||||||
//NAMESERVER('ns5.he.net.'),
|
//NAMESERVER('ns5.he.net.'),
|
||||||
// capsul: helix
|
// capsul: helix
|
||||||
A('bridge', '69.61.2.203', TTL(300)),
|
A('bridge', '69.61.38.225', TTL(300)),
|
||||||
A('rss', '69.61.2.203', TTL(300)),
|
A('rss', '69.61.38.225', TTL(300)),
|
||||||
A('git', '69.61.2.203', TTL(300)),
|
A('git', '69.61.38.225', TTL(300)),
|
||||||
A('bin', '69.61.2.203', TTL(300)),
|
// vultr -> nulled: lituus
|
||||||
A('ci', '69.61.2.203', TTL(300)),
|
|
||||||
A('write', '69.61.2.203', TTL(300)),
|
|
||||||
A('photos', '69.61.2.203', TTL(300)),
|
|
||||||
// vultr: lituus
|
|
||||||
A('@', '45.77.48.108', TTL(300)),
|
A('@', '45.77.48.108', TTL(300)),
|
||||||
A('jitsi', '45.77.48.108', TTL(300)),
|
A('jitsi', '45.77.48.108', TTL(300)),
|
||||||
A('chat', '45.77.48.108', TTL(300)),
|
A('chat', '45.77.48.108', TTL(300)),
|
||||||
|
|
0
dns/test_nullhex.sh
Normal file → Executable file
0
dns/test_nullhex.sh
Normal file → Executable file
|
@ -1,22 +0,0 @@
|
||||||
; 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"
|
|
400
flake.lock
400
flake.lock
|
@ -2,19 +2,16 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"agenix": {
|
"agenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
|
||||||
"home-manager": "home-manager",
|
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
]
|
||||||
"systems": "systems"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723293904,
|
"lastModified": 1665870395,
|
||||||
"narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=",
|
"narHash": "sha256-Tsbqb27LDNxOoPLh0gw2hIb6L/6Ow/6lIBvqcHzEKBI=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41",
|
"rev": "a630400067c6d03c9b3e0455347dc8559db14288",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -34,11 +31,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682226636,
|
"lastModified": 1663665682,
|
||||||
"narHash": "sha256-fmETHfUtQ5zOVr/4MT5wE7eNALCSQCnEUYZYmV3UEwg=",
|
"narHash": "sha256-YB+vmQB3N9RyeshHAO4GjIFebA7NPY2jlkdvGGZtM64=",
|
||||||
"ref": "main",
|
"ref": "main",
|
||||||
"rev": "095d14ff2469c8f3de7cbf45d229c0f46a733aae",
|
"rev": "36bda6965ab2e1a206f8c2b7a74f3b022c873662",
|
||||||
"revCount": 77,
|
"revCount": 65,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@git.sealight.xyz/aynish/basant"
|
"url": "ssh://gitea@git.sealight.xyz/aynish/basant"
|
||||||
},
|
},
|
||||||
|
@ -48,28 +45,6 @@
|
||||||
"url": "ssh://gitea@git.sealight.xyz/aynish/basant"
|
"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": {
|
"deploy-rs": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
|
@ -79,11 +54,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1718194053,
|
"lastModified": 1668797197,
|
||||||
"narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=",
|
"narHash": "sha256-0w6iD3GSSQbIeSFVDzAAQZB+hDq670ZTms3d9XI+BtM=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "deploy-rs",
|
"repo": "deploy-rs",
|
||||||
"rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a",
|
"rev": "2a3c5f70eee04a465aa534d8bd4fcc9bb3c4a8ce",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -92,65 +67,55 @@
|
||||||
"type": "github"
|
"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": {
|
"dirt-samples-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698439458,
|
"lastModified": 1588278411,
|
||||||
"narHash": "sha256-Mp8qBpsOvW9Zguv95Kv7EU6S3ICaF2aO02Wz6xGURtE=",
|
"narHash": "sha256-h8vQxRym6QzNLOTZU7A43VCHuG0H77l+BFwXnC0L1CE=",
|
||||||
"owner": "tidalcycles",
|
"owner": "tidalcycles",
|
||||||
"repo": "dirt-samples",
|
"repo": "dirt-samples",
|
||||||
"rev": "9a6dff8f9ec3cd55b287290cf04e01afa6b8f532",
|
"rev": "66d432418c9a7d82cf049d9246adfa62f46df2a6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "tidalcycles",
|
"owner": "tidalcycles",
|
||||||
|
"ref": "master",
|
||||||
"repo": "dirt-samples",
|
"repo": "dirt-samples",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"disko": {
|
"eww": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-overlay": [
|
||||||
|
"rust-overlay"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724031427,
|
"lastModified": 1669643151,
|
||||||
"narHash": "sha256-o1HdAf+7IGv9M13R3c+zc/sJ0QgeEnhsvHBcodI4UpM=",
|
"narHash": "sha256-39/l57QusriyNr426kXNqtub0ciZna+t20VKPYUAgsM=",
|
||||||
"owner": "nix-community",
|
"owner": "elkowar",
|
||||||
"repo": "disko",
|
"repo": "eww",
|
||||||
"rev": "4e719b38fa7c85f4f65d0308ca7084c91e7bdd6d",
|
"rev": "ec4c2d1a4f12e9c3664e9f53ad99007b4a10a16a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "elkowar",
|
||||||
"repo": "disko",
|
"repo": "eww",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1648199409,
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
"narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
"rev": "64a525ee38886ab9028e6f61790de0832aa3ef03",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -162,11 +127,11 @@
|
||||||
"flake-compat_2": {
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1641205782,
|
"lastModified": 1650374568,
|
||||||
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
|
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
|
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -192,11 +157,26 @@
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1667395993,
|
"lastModified": 1652372896,
|
||||||
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
|
"narHash": "sha256-lURGussfF3mGrFPQT3zgW7+RC0pBhbHzco0C7I+ilow=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
|
"rev": "0d347c56f6f41de822a4f4c7ff5072f3382db121",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1659877975,
|
||||||
|
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -208,16 +188,17 @@
|
||||||
"grasp": {
|
"grasp": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
|
"grasp": "grasp_2",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1682644301,
|
"lastModified": 1652615971,
|
||||||
"narHash": "sha256-gMBFZLf41s3+cnhxgZVRvj2JSAFYv4jn2xBKwEESthE=",
|
"narHash": "sha256-e8fvTQCR/At2jgenuY71WXN13XawYRiMpKiHSGgGSkY=",
|
||||||
"ref": "main",
|
"ref": "main",
|
||||||
"rev": "a2d85675b930ffc26f6891b2e14491795907be4e",
|
"rev": "ef605857248ec1b60cece250f98d2964164d48db",
|
||||||
"revCount": 137,
|
"revCount": 19,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@git.sealight.xyz/aynish/grasp.git"
|
"url": "ssh://gitea@git.sealight.xyz/aynish/grasp.git"
|
||||||
},
|
},
|
||||||
|
@ -227,13 +208,29 @@
|
||||||
"url": "ssh://gitea@git.sealight.xyz/aynish/grasp.git"
|
"url": "ssh://gitea@git.sealight.xyz/aynish/grasp.git"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"grasp_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1586706168,
|
||||||
|
"narHash": "sha256-xLkxE24xtTghQpAfAqAsOvsGpz0coACXjNT8bHZhcxM=",
|
||||||
|
"owner": "karlicoss",
|
||||||
|
"repo": "grasp",
|
||||||
|
"rev": "4bc8f011227d1baa18b4e98543561534065490d8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "karlicoss",
|
||||||
|
"repo": "grasp",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hardware": {
|
"hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723310128,
|
"lastModified": 1670174919,
|
||||||
"narHash": "sha256-IiH8jG6PpR4h9TxSGMYh+2/gQiJW9MwehFvheSb5rPc=",
|
"narHash": "sha256-XdQr3BUnrvVLRFunLWrZORhwYHDG0+9jUUe0Jv1pths=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "c54cf53e022b0b3c1d3b8207aa0f9b194c24f0cf",
|
"rev": "9d87bc030a0bf3f00e953dbf095a7d8e852dab6b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -245,16 +242,16 @@
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"agenix",
|
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
],
|
||||||
|
"utils": "utils_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703113217,
|
"lastModified": 1670280307,
|
||||||
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
"narHash": "sha256-3x+0whP1nCz5adQMIsBA3L9fI/ABOpRUJdbw0AmxBnU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
"rev": "2af0d07678fc15612345e0dd55337550dcf6465f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -263,118 +260,44 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager_2": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1751810233,
|
|
||||||
"narHash": "sha256-kllkNbIqQi3VplgTMeGzuh1t8Gk8TauvkTRt93Km+tQ=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "9b0873b46c9f9e4b7aa01eb634952c206af53068",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "release-25.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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1662099760,
|
"lastModified": 1670193339,
|
||||||
"narHash": "sha256-MdZLCTJPeHi/9fg6R9fiunyDwP3XHJqDd51zWWz9px0=",
|
"narHash": "sha256-oHTAhX4p6+uxcabq0rKL4EyKWPbDLGKec88ocPIU/2Y=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "67e45078141102f45eff1589a831aeaa3182b41e",
|
"rev": "e169cf5b3b1e6cc4a25ff15087c2621605f83409",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixos-22.05",
|
"ref": "nixos-22.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755274400,
|
"lastModified": 1662446902,
|
||||||
"narHash": "sha256-rTInmnp/xYrfcMZyFMH3kc8oko5zYfxsowaLv1LVobY=",
|
"narHash": "sha256-Dmsd3jSG2ldZUlhFaIwunqgMf14EEK7ylXpw+OPDLxE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ad7196ae55c295f53a7d1ec39e4a06d922f3b899",
|
"rev": "3bfaf06b12253ddaafe64a67f4ed39b547d41667",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-25.05",
|
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724040334,
|
"lastModified": 1670315682,
|
||||||
"narHash": "sha256-Ia4gRRmhFn4oJ4SJKJPDNPomsRRFWU+bqCK7yuiLW4E=",
|
"narHash": "sha256-/v0RgZZIjvsFuJbJLUlzRbzSlYFXq3olgJTuJBNtcoY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "24471a48600e18669d13d24c9640b9859357d2cf",
|
"rev": "af814db16c89385c65e758608296440555f61ccc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -385,16 +308,15 @@
|
||||||
},
|
},
|
||||||
"poonam": {
|
"poonam": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs"
|
"vimwiki-cli": "vimwiki-cli"
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756350023,
|
"lastModified": 1671357603,
|
||||||
"narHash": "sha256-4S6EUvEFvOnwjSo/LqAVVuX2/JjAJ8gQFmQQ0DS4oXU=",
|
"narHash": "sha256-LIathTJK9ElWdjlT+zI+CJFB5adORTM9kYeWqEbKwiU=",
|
||||||
"ref": "main",
|
"ref": "main",
|
||||||
"rev": "a807111f9b20c501183516baf8082c4359aaaaa1",
|
"rev": "ea3d0f9a8146f1985dec0b0348a79e3a3038d9b7",
|
||||||
"revCount": 1594,
|
"revCount": 465,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
|
"url": "ssh://gitea@git.sealight.xyz/aynish/kitaab"
|
||||||
},
|
},
|
||||||
|
@ -409,33 +331,31 @@
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"basant": "basant",
|
"basant": "basant",
|
||||||
"deploy-rs": "deploy-rs",
|
"deploy-rs": "deploy-rs",
|
||||||
"disko": "disko",
|
"eww": "eww",
|
||||||
"grasp": "grasp",
|
"grasp": "grasp",
|
||||||
"hardware": "hardware",
|
"hardware": "hardware",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager",
|
||||||
"nix-matrix-appservices": "nix-matrix-appservices",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixos-hardware": "nixos-hardware",
|
|
||||||
"nixpkgs": "nixpkgs_2",
|
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"poonam": "poonam",
|
"poonam": "poonam",
|
||||||
"rust-overlay": "rust-overlay",
|
"rust-overlay": "rust-overlay",
|
||||||
"tidalcycles": "tidalcycles",
|
"tidalcycles": "tidalcycles",
|
||||||
"unstable": "unstable",
|
"unstable": "unstable"
|
||||||
"vimwikicli": "vimwikicli"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1724034091,
|
"lastModified": 1670293639,
|
||||||
"narHash": "sha256-b1g7w0sw+MDAhUAeCoX1vlTghsqcDZkxr+k9OZmxPa8=",
|
"narHash": "sha256-RkPLwza77YkFgxKHGzfYAYVKiD9SeIvsOA7+ihiySwI=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "c7d36e0947826e0751a5214ffe82533fbc909bc0",
|
"rev": "9767af967a0becaa3bb79eeda838dbf81295eb62",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -447,62 +367,33 @@
|
||||||
"superdirt-src": {
|
"superdirt-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1697377840,
|
"lastModified": 1611740180,
|
||||||
"narHash": "sha256-9qU9CHYAXbN1IE3xXDqGipuroifVaSVXj3c/cDfwM80=",
|
"narHash": "sha256-GtnqZeMFqFkVhgx2Exu0wY687cHa7mNnVCgjQd6fiIA=",
|
||||||
"owner": "musikinformatik",
|
"owner": "musikinformatik",
|
||||||
"repo": "superdirt",
|
"repo": "superdirt",
|
||||||
"rev": "c7f32998572984705d340e7c1b9ed9ad998a39b6",
|
"rev": "7abb62e89649daa1232b9cbd6427241868abd30e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "musikinformatik",
|
"owner": "musikinformatik",
|
||||||
|
"ref": "master",
|
||||||
"repo": "superdirt",
|
"repo": "superdirt",
|
||||||
"type": "github"
|
"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": {
|
"tidal-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712519522,
|
"lastModified": 1654350756,
|
||||||
"narHash": "sha256-LbvxQmVxHElidCgvt+w0g1k+QQbNLebK46vtRCgsLeQ=",
|
"narHash": "sha256-tONM5SYYBca0orTLH1EUOilSC1FCluWrFt8AetUx+YQ=",
|
||||||
"owner": "tidalcycles",
|
"owner": "tidalcycles",
|
||||||
"repo": "tidal",
|
"repo": "tidal",
|
||||||
"rev": "88f09edf6bef2228d5f530dea872b08a9d803066",
|
"rev": "fda9c1ecb3722698935245e5409ef8ccdfca16c8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "tidalcycles",
|
"owner": "tidalcycles",
|
||||||
"ref": "v1.9.5",
|
"ref": "main",
|
||||||
"repo": "tidal",
|
"repo": "tidal",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -515,15 +406,16 @@
|
||||||
],
|
],
|
||||||
"superdirt-src": "superdirt-src",
|
"superdirt-src": "superdirt-src",
|
||||||
"tidal-src": "tidal-src",
|
"tidal-src": "tidal-src",
|
||||||
|
"utils": "utils_3",
|
||||||
"vim-tidal-src": "vim-tidal-src",
|
"vim-tidal-src": "vim-tidal-src",
|
||||||
"vowel-src": "vowel-src"
|
"vowel-src": "vowel-src"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723223284,
|
"lastModified": 1664760044,
|
||||||
"narHash": "sha256-NAT+g5nsaJZkpR0sCZjerd1xx233ZUdRH3ZWwZhzq/c=",
|
"narHash": "sha256-e5LGk/tDnphory1mYhADgPnVtShofY2w/3xY09jEE2A=",
|
||||||
"owner": "mitchmindtree",
|
"owner": "mitchmindtree",
|
||||||
"repo": "tidalcycles.nix",
|
"repo": "tidalcycles.nix",
|
||||||
"rev": "82f3e8e8d02eb9f0c9dfe9ab3773b825c6bc1982",
|
"rev": "3f3a820cd43709077d15a24fa6062de7d623a6bf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -534,11 +426,11 @@
|
||||||
},
|
},
|
||||||
"unstable": {
|
"unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752687322,
|
"lastModified": 1670152712,
|
||||||
"narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=",
|
"narHash": "sha256-LJttwIvJqsZIj8u1LxVRv82vwUtkzVqQVi7Wb8gxPS4=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251",
|
"rev": "14ddeaebcbe9a25748221d1d7ecdf98e20e2325e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -549,15 +441,42 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701680307,
|
"lastModified": 1648297722,
|
||||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1653893745,
|
||||||
|
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -569,22 +488,24 @@
|
||||||
"vim-tidal-src": {
|
"vim-tidal-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1685703852,
|
"lastModified": 1664252474,
|
||||||
"narHash": "sha256-8gyk17YLeKpLpz3LRtxiwbpsIbZka9bb63nK5/9IUoA=",
|
"narHash": "sha256-hleiK2Q7xYndpB+tIbyyXIM2sk4NunUh9DPgMqmf/Wc=",
|
||||||
"owner": "tidalcycles",
|
"owner": "tidalcycles",
|
||||||
"repo": "vim-tidal",
|
"repo": "vim-tidal",
|
||||||
"rev": "e440fe5bdfe07f805e21e6872099685d38e8b761",
|
"rev": "b07f5c12986fb837e055d7fcf0acf3b7e248148f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "tidalcycles",
|
"owner": "tidalcycles",
|
||||||
|
"ref": "master",
|
||||||
"repo": "vim-tidal",
|
"repo": "vim-tidal",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"vimwikicli": {
|
"vimwiki-cli": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"poonam",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -615,6 +536,7 @@
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "supercollider-quarks",
|
"owner": "supercollider-quarks",
|
||||||
|
"ref": "master",
|
||||||
"repo": "vowel",
|
"repo": "vowel",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
158
flake.nix
158
flake.nix
|
@ -1,17 +1,13 @@
|
||||||
{
|
{
|
||||||
description = "Sealight NixOS Config";
|
description = "Your new nix config";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Nixpkgs
|
# Nixpkgs
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
||||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
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
|
||||||
home-manager.url = "github:nix-community/home-manager/release-25.05";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
hardware.url = "github:nixos/nixos-hardware";
|
hardware.url = "github:nixos/nixos-hardware";
|
||||||
|
|
||||||
|
@ -20,30 +16,25 @@
|
||||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
deploy-rs.url = "github:serokell/deploy-rs";
|
deploy-rs.url = "github:serokell/deploy-rs";
|
||||||
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
disko.url = "github:nix-community/disko";
|
|
||||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
|
|
||||||
# My Packages
|
# Packages
|
||||||
poonam.url = "git+ssh://gitea@git.sealight.xyz/aynish/kitaab?ref=main";
|
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";
|
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.nixpkgs.follows = "nixpkgs";
|
||||||
basant.inputs.poonam.follows = "poonam";
|
basant.inputs.poonam.follows = "poonam";
|
||||||
vimwikicli.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
grasp.url = "git+ssh://gitea@git.sealight.xyz/aynish/grasp.git?ref=main";
|
grasp.url = "git+ssh://gitea@git.sealight.xyz/aynish/grasp.git?ref=main";
|
||||||
grasp.inputs.nixpkgs.follows = "nixpkgs";
|
grasp.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Matrix
|
|
||||||
nix-matrix-appservices.url = "gitlab:coffeetables/nix-matrix-appservices";
|
|
||||||
|
|
||||||
# Others
|
# Others
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
rust-overlay = {
|
rust-overlay = {
|
||||||
url = "github:oxalica/rust-overlay";
|
url = "github:oxalica/rust-overlay";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
eww = {
|
||||||
|
url = "github:elkowar/eww";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.rust-overlay.follows = "rust-overlay";
|
||||||
|
};
|
||||||
tidalcycles.url = "github:mitchmindtree/tidalcycles.nix";
|
tidalcycles.url = "github:mitchmindtree/tidalcycles.nix";
|
||||||
tidalcycles.inputs.nixpkgs.follows = "unstable";
|
tidalcycles.inputs.nixpkgs.follows = "unstable";
|
||||||
# TODO hundred rabbits software
|
# TODO hundred rabbits software
|
||||||
|
@ -55,9 +46,21 @@
|
||||||
# muneem.inputs.nixpkgs.follows = "nixpkgs";
|
# muneem.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, unstable, nixos-hardware, home-manager, deploy-rs
|
outputs =
|
||||||
, agenix, disko, basant, grasp, nix-matrix-appservices, nur, tidalcycles
|
{ self
|
||||||
, rust-overlay, vimwikicli, ... }@inputs:
|
, nixpkgs
|
||||||
|
, unstable
|
||||||
|
, home-manager
|
||||||
|
, deploy-rs
|
||||||
|
, agenix
|
||||||
|
, basant
|
||||||
|
, grasp
|
||||||
|
, nur
|
||||||
|
, tidalcycles
|
||||||
|
, rust-overlay
|
||||||
|
, eww
|
||||||
|
, ...
|
||||||
|
}@inputs:
|
||||||
let
|
let
|
||||||
forAllSystems = nixpkgs.lib.genAttrs [
|
forAllSystems = nixpkgs.lib.genAttrs [
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
|
@ -71,64 +74,52 @@
|
||||||
unstable = unstable.legacyPackages.${prev.system};
|
unstable = unstable.legacyPackages.${prev.system};
|
||||||
deploy = deploy-rs.packages.${prev.system}.deploy-rs;
|
deploy = deploy-rs.packages.${prev.system}.deploy-rs;
|
||||||
};
|
};
|
||||||
vimwikiOverlay = final: prev: {
|
|
||||||
vimwiki-cli = vimwikicli.packages.${prev.system}.vimwiki-cli;
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgsFor = forAllSystems (system:
|
nixpkgsFor = forAllSystems (system: import nixpkgs {
|
||||||
import nixpkgs {
|
|
||||||
inherit system;
|
inherit system;
|
||||||
config = {
|
config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
|
||||||
permittedInsecurePackages = [
|
|
||||||
"olm-3.2.16"
|
|
||||||
];
|
|
||||||
allowUnfreePredicate = pkg:
|
|
||||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
|
||||||
"ripcord"
|
"ripcord"
|
||||||
"vcv-rack"
|
"VCV-Rack"
|
||||||
"SunVox"
|
"SunVox"
|
||||||
"renoise"
|
"renoise"
|
||||||
];
|
];
|
||||||
};
|
# config.permittedInsecurePackages = [
|
||||||
|
# "python3.10-django-3.1.14" # Needed for archivebox deployments on curve
|
||||||
|
# # Check when archive box updates it's dependeny
|
||||||
|
# ];
|
||||||
overlays = [
|
overlays = [
|
||||||
rust-overlay.overlays.default
|
rust-overlay.overlays.default
|
||||||
tidalcycles.overlays.default
|
tidalcycles.overlays.default
|
||||||
agenix.overlays.default
|
agenix.overlay
|
||||||
nur.overlay
|
nur.overlay
|
||||||
# nix-matrix-appservices.overlay # nixpkgs has these packages and newer ones at that
|
|
||||||
unstableOverlay
|
unstableOverlay
|
||||||
vimwikiOverlay
|
|
||||||
self.overlays.additions
|
self.overlays.additions
|
||||||
self.overlays.modifications
|
self.overlays.modifications
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
|
|
||||||
# for when space matters
|
# for when space matters
|
||||||
litePkgsFor = forAllSystems (system:
|
litePkgsFor = forAllSystems (system: import nixpkgs {
|
||||||
import nixpkgs {
|
|
||||||
inherit system;
|
inherit system;
|
||||||
# config.permittedInsecurePackages = [
|
|
||||||
# "forgejo-1.19.4-0" # Needed for archivebox deployments on curve
|
|
||||||
# # Check when archive box updates it's dependeny
|
|
||||||
# ];
|
|
||||||
overlays = [
|
overlays = [
|
||||||
agenix.overlays.default
|
agenix.overlay
|
||||||
self.overlays.additions
|
|
||||||
self.overlays.modifications
|
|
||||||
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
|
tidalcycles.overlays.default # needed for nvim which comes pre-installed lol
|
||||||
];
|
];
|
||||||
});
|
});
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Your custom packages
|
# Your custom packages
|
||||||
# Acessible through 'nix build', 'nix shell', etc
|
# Acessible through 'nix build', 'nix shell', etc
|
||||||
packages = forAllSystems (system:
|
packages = forAllSystems (system:
|
||||||
let pkgs = nixpkgsFor.${system};
|
let pkgs = nixpkgsFor.${system};
|
||||||
in import ./pkgs { pkgs = pkgs; });
|
in import ./pkgs { pkgs = pkgs; }
|
||||||
|
);
|
||||||
# Devshell for bootstrapping
|
# Devshell for bootstrapping
|
||||||
# Acessible through 'nix develop' or 'nix-shell' (legacy)
|
# Acessible through 'nix develop' or 'nix-shell' (legacy)
|
||||||
devShells = forAllSystems (system:
|
devShells = forAllSystems (system:
|
||||||
let pkgs = nixpkgsFor.${system};
|
let pkgs = nixpkgsFor.${system};
|
||||||
in import ./shell.nix { pkgs = pkgs; });
|
in import ./shell.nix { pkgs = pkgs; }
|
||||||
|
);
|
||||||
|
|
||||||
# Your custom packages and modifications, exported as overlays
|
# Your custom packages and modifications, exported as overlays
|
||||||
overlays = import ./overlays;
|
overlays = import ./overlays;
|
||||||
|
@ -150,12 +141,8 @@
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
self.nixosModules.backup
|
self.nixosModules.backup
|
||||||
self.nixosModules.wireguard
|
self.nixosModules.wireguard
|
||||||
self.nixosModules.wallabag
|
|
||||||
nixos-hardware.nixosModules.lenovo-thinkpad-x270
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
nix.registry.unstable.flake = unstable;
|
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.anish = import ./home/gui;
|
home-manager.users.anish = import ./home/gui;
|
||||||
|
@ -166,18 +153,17 @@
|
||||||
helix = nixpkgs.lib.nixosSystem rec {
|
helix = nixpkgs.lib.nixosSystem rec {
|
||||||
specialArgs = { inherit inputs self; };
|
specialArgs = { inherit inputs self; };
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = litePkgsFor.${system};
|
pkgs = nixpkgsFor.${system};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/helix
|
./hosts/helix
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
self.nixosModules.backup
|
self.nixosModules.backup
|
||||||
self.nixosModules.wireguard
|
self.nixosModules.wireguard
|
||||||
basant.nixosModule
|
home-manager.nixosModules.home-manager
|
||||||
# self.nixosModules.microbin
|
|
||||||
disko.nixosModules.disko
|
|
||||||
{
|
{
|
||||||
nixpkgs.flake.setNixPath = false;
|
home-manager.useGlobalPkgs = true;
|
||||||
nixpkgs.flake.setFlakeRegistry = false;
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.anish = import ./home/core;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -191,7 +177,6 @@
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
self.nixosModules.backup
|
self.nixosModules.backup
|
||||||
self.nixosModules.hesienbridge
|
self.nixosModules.hesienbridge
|
||||||
nix-matrix-appservices.nixosModule
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
@ -201,6 +186,19 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cube = nixpkgs.lib.nixosSystem rec {
|
||||||
|
specialArgs = { inherit inputs self; };
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = litePkgsFor.${system};
|
||||||
|
modules = [
|
||||||
|
./hosts/cube
|
||||||
|
agenix.nixosModules.age
|
||||||
|
self.nixosModules.backup
|
||||||
|
self.nixosModules.wireguard
|
||||||
|
basant.nixosModule
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
box = nixpkgs.lib.nixosSystem rec {
|
box = nixpkgs.lib.nixosSystem rec {
|
||||||
specialArgs = { inherit inputs self; };
|
specialArgs = { inherit inputs self; };
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
@ -210,17 +208,14 @@
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
self.nixosModules.backup
|
self.nixosModules.backup
|
||||||
self.nixosModules.wireguard
|
self.nixosModules.wireguard
|
||||||
self.nixosModules.gonic
|
|
||||||
self.nixosModules.gpodder2go
|
|
||||||
self.nixosModules.wallabag
|
self.nixosModules.wallabag
|
||||||
self.nixosModules.ulogger-server
|
self.nixosModules.gonic
|
||||||
grasp.nixosModule
|
grasp.nixosModule
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.anish = import ./home/dev;
|
home-manager.users.anish = import ./home/core;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -230,47 +225,46 @@
|
||||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
# Available through 'home-manager --flake .#your-username@your-hostname'
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"anish@work" = home-manager.lib.homeManagerConfiguration {
|
"anish@work" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs =
|
pkgs = nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
|
||||||
nixpkgsFor."x86_64-linux"; # Home-manager requires 'pkgs' instance
|
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
modules = [ ./home/core.nix ./home/profiles/firefox ];
|
modules = [
|
||||||
|
./home/core.nix
|
||||||
|
./home/profiles/firefox
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
deploy.nodes = {
|
deploy.nodes = {
|
||||||
box = {
|
box = {
|
||||||
hostname = "mossnet.lan";
|
hostname = "mossnet.lan";
|
||||||
autoRollback = false;
|
|
||||||
magicRollback = false;
|
|
||||||
remoteBuild = true;
|
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.box;
|
||||||
self.nixosConfigurations.box;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
lituus = {
|
lituus = {
|
||||||
hostname = "sealight.xyz";
|
hostname = "sealight.xyz";
|
||||||
autoRollback = false;
|
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.lituus;
|
||||||
self.nixosConfigurations.lituus;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
helix = {
|
helix = {
|
||||||
hostname = "git.sealight.xyz";
|
hostname = "git.sealight.xyz";
|
||||||
autoRollback = false;
|
|
||||||
magicRollback = false;
|
|
||||||
profiles.system = {
|
profiles.system = {
|
||||||
user = "root";
|
user = "root";
|
||||||
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.helix;
|
||||||
self.nixosConfigurations.helix;
|
};
|
||||||
|
};
|
||||||
|
cube = {
|
||||||
|
hostname = "lakhwara.com";
|
||||||
|
profiles.system = {
|
||||||
|
user = "root";
|
||||||
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.cube;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# checks = builtins.mapAttrs
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
||||||
# (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{ self, pkgs, ... }:
|
{ self, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../profiles/nvim
|
||||||
../profiles/cli
|
../profiles/cli
|
||||||
../profiles/direnv
|
../profiles/direnv
|
||||||
../profiles/git
|
../profiles/git
|
||||||
../profiles/tmux
|
../profiles/task
|
||||||
];
|
];
|
||||||
home.stateVersion = "22.05";
|
home.stateVersion = "22.05";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ self, pkgs, ... }: {
|
|
||||||
imports =
|
|
||||||
[ ../profiles/cli ../profiles/nvim ../profiles/direnv ../profiles/git ];
|
|
||||||
home.stateVersion = "22.05";
|
|
||||||
}
|
|
|
@ -2,31 +2,9 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../core
|
../core
|
||||||
../profiles/nvim
|
|
||||||
../profiles/firefox
|
../profiles/firefox
|
||||||
../profiles/desktop
|
../profiles/desktop
|
||||||
../profiles/email
|
../profiles/email
|
||||||
../profiles/cal
|
../profiles/cal
|
||||||
../profiles/sync/kitaab
|
|
||||||
../profiles/ssh
|
|
||||||
../profiles/task
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# GPG configuration for user session
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
pinentry.package = pkgs.pinentry-rofi; # Use rofi for consistency with desktop theme
|
|
||||||
enableSshSupport = true;
|
|
||||||
defaultCacheTtl = 28800; # 8 hours
|
|
||||||
maxCacheTtl = 86400; # 24 hours
|
|
||||||
extraConfig = ''
|
|
||||||
pinentry-program ${pkgs.writeShellScript "pinentry-rofi-themed" ''
|
|
||||||
exec ${pkgs.pinentry-rofi}/bin/pinentry-rofi -theme ~/.config/rofi/theme/passmenu.rasi "$@"
|
|
||||||
''}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.gpg = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
working_directory=$(pwd)
|
|
||||||
vim_directory="${working_directory//\//%}.vim"
|
|
||||||
trash "$HOME/.local/share/nvim/sessions/${vim_directory}"
|
|
|
@ -1,19 +0,0 @@
|
||||||
`dasht-docsets-intstall`
|
|
||||||
|
|
||||||
Bash
|
|
||||||
Clojure
|
|
||||||
Docker
|
|
||||||
Elixir
|
|
||||||
HTML
|
|
||||||
JavaScript
|
|
||||||
Jinja
|
|
||||||
Lua_5.4
|
|
||||||
Nginx
|
|
||||||
OpenGL_4
|
|
||||||
PostgreSQL
|
|
||||||
Processing
|
|
||||||
Python_3
|
|
||||||
React
|
|
||||||
Rust
|
|
||||||
TypeScript
|
|
||||||
Vim
|
|
|
@ -7,7 +7,6 @@
|
||||||
dasht
|
dasht
|
||||||
dosfstools
|
dosfstools
|
||||||
#git
|
#git
|
||||||
git-machete
|
|
||||||
bottom
|
bottom
|
||||||
gptfdisk
|
gptfdisk
|
||||||
starship
|
starship
|
||||||
|
@ -27,12 +26,10 @@
|
||||||
iftop
|
iftop
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
eza
|
exa
|
||||||
bat
|
bat
|
||||||
fd
|
fd
|
||||||
ncdu
|
ncdu
|
||||||
du-dust
|
|
||||||
# dia-cli
|
|
||||||
duf
|
duf
|
||||||
trash-cli
|
trash-cli
|
||||||
nix-index
|
nix-index
|
||||||
|
@ -53,20 +50,17 @@
|
||||||
less
|
less
|
||||||
gdb
|
gdb
|
||||||
xxd
|
xxd
|
||||||
taskwarrior2
|
taskwarrior
|
||||||
|
yt-dlp
|
||||||
gnupg
|
gnupg
|
||||||
syncthing
|
syncthing
|
||||||
dijo
|
dijo
|
||||||
#ssb-patchwork
|
#ssb-patchwork
|
||||||
fontconfig
|
fontconfig
|
||||||
pandoc
|
pandoc
|
||||||
taskwarrior-tui
|
|
||||||
# vimwiki-cli
|
|
||||||
zk
|
|
||||||
|
|
||||||
(pkgs.writeScriptBin "jq-repl" ''
|
(pkgs.writeScriptBin "jq-repl" ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [[ -z $1 ]] || [[ $1 == "-" ]]; then
|
if [[ -z $1 ]] || [[ $1 == "-" ]] then
|
||||||
input=$(mktemp)
|
input=$(mktemp)
|
||||||
trap "rm -f $input" EXIT
|
trap "rm -f $input" EXIT
|
||||||
cat /dev/stdin > $input
|
cat /dev/stdin > $input
|
||||||
|
@ -76,9 +70,16 @@
|
||||||
|
|
||||||
echo "" \ | fzf --phony --preview-window="up:90%" --print-query --preview "jq --color-output -r {q} $input"
|
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
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
enableAutosuggestions = true;
|
||||||
|
|
||||||
|
initExtra = ''
|
||||||
|
bindkey -v
|
||||||
|
flakify() {
|
||||||
if [ ! -e flake.nix ]; then
|
if [ ! -e flake.nix ]; then
|
||||||
nix flake new -t github:nix-community/nix-direnv .
|
nix flake new -t github:nix-community/nix-direnv .
|
||||||
elif [ ! -e .envrc ]; then
|
elif [ ! -e .envrc ]; then
|
||||||
|
@ -86,76 +87,10 @@
|
||||||
direnv allow
|
direnv allow
|
||||||
fi
|
fi
|
||||||
vim flake.nix
|
vim flake.nix
|
||||||
'')
|
}
|
||||||
(pkgs.writeScriptBin "mx" ''
|
mx() {
|
||||||
#!/usr/bin/env bash
|
|
||||||
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
|
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
|
||||||
'')
|
|
||||||
(pkgs.writeScriptBin "monitor" ''
|
|
||||||
connect() {
|
|
||||||
# Turn it on if it was off
|
|
||||||
xrandr --output HDMI-2 --auto
|
|
||||||
xrandr --output HDMI-2 --same-as eDP-1
|
|
||||||
xrandr --output eDP-1 --off
|
|
||||||
pkill -9 polybar
|
|
||||||
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
|
|
||||||
polybar mybar > $XDG_DATA_HOME/polybar.log 2>&1 &
|
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect() {
|
|
||||||
xrandr --output HDMI-2 --off
|
|
||||||
xrandr --output eDP-1 --auto
|
|
||||||
}
|
|
||||||
|
|
||||||
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
|
|
||||||
'')
|
|
||||||
(pkgs.writeScriptBin "big-monitor" ''
|
|
||||||
connect() {
|
|
||||||
# Turn it on if it was off
|
|
||||||
xrandr --output HDMI-2 --auto --primary
|
|
||||||
# Disable normal display
|
|
||||||
xrandr --output eDP-1 --off
|
|
||||||
# Use a nice background
|
|
||||||
feh --bg-scale ~/Downloads/stephen-walker-onIXxjH56AA-unsplash.jpg
|
|
||||||
# Reload Polybar
|
|
||||||
~/.config/bspwm/rc.d/polybar
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
initContent = ''
|
|
||||||
bindkey -v
|
|
||||||
autopair-init
|
autopair-init
|
||||||
'';
|
'';
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
|
@ -163,6 +98,15 @@
|
||||||
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo"; # Needed to run home-manager switch on non-nixOS
|
TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo"; # Needed to run home-manager switch on non-nixOS
|
||||||
};
|
};
|
||||||
plugins = [
|
plugins = [
|
||||||
|
# {
|
||||||
|
# name = "zsh-autocomplete";
|
||||||
|
# src = pkgs.fetchFromGitHub {
|
||||||
|
# owner = "marlonrichert";
|
||||||
|
# repo = "zsh-autocomplete";
|
||||||
|
# rev = "22.01.21";
|
||||||
|
# sha256 = "+UziTYsjgpiumSulrLojuqHtDrgvuG91+XNiaMD7wIs=";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
{
|
{
|
||||||
name = "zsh-autopair";
|
name = "zsh-autopair";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
@ -193,16 +137,16 @@
|
||||||
};
|
};
|
||||||
file = "zsh-autoquoter.zsh";
|
file = "zsh-autoquoter.zsh";
|
||||||
}
|
}
|
||||||
# {
|
{
|
||||||
# name = "zsh-nix-shell";
|
name = "zsh-nix-shell";
|
||||||
# file = "nix-shell.plugin.zsh";
|
file = "nix-shell.plugin.zsh";
|
||||||
# src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
# owner = "chisui";
|
owner = "chisui";
|
||||||
# repo = "zsh-nix-shell";
|
repo = "zsh-nix-shell";
|
||||||
# rev = "v0.5.0";
|
rev = "v0.5.0";
|
||||||
# sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
|
sha256 = "0za4aiwwrlawnia4f29msk822rj9bgcygw6a8a6iikiwzjjz0g91";
|
||||||
# };
|
};
|
||||||
# }
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -220,6 +164,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
|
# nix-direnv.enableFlakes = true; always enabled
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zoxide = {
|
programs.zoxide = {
|
||||||
|
@ -236,14 +181,13 @@
|
||||||
"...." = "cd ../../..";
|
"...." = "cd ../../..";
|
||||||
"....." = "cd ../../../..";
|
"....." = "cd ../../../..";
|
||||||
|
|
||||||
icat = "kitty +kitten icat";
|
# kitaab recents
|
||||||
yt = "ytfzf -T kitty -t ";
|
kr = "cd /home/anish/kitaab/vimwiki; ls --sort=modified --reverse | fzf --preview 'bat --style=numbers --color=always --terminal-width -1 {}'";
|
||||||
gen-secret = "< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c\${1:-32};echo;";
|
|
||||||
|
|
||||||
# modern cli tools
|
# modern cli tools
|
||||||
ls = "eza --icons";
|
ls = "exa --icons";
|
||||||
l = "esa -l --icons";
|
l = "exa -l --icons";
|
||||||
la = "eza -la --icons";
|
la = "exa -la --icons";
|
||||||
tree = "ls --tree --icons";
|
tree = "ls --tree --icons";
|
||||||
cat = "bat";
|
cat = "bat";
|
||||||
unzip = "aunpack";
|
unzip = "aunpack";
|
||||||
|
@ -254,25 +198,19 @@
|
||||||
make-secret = "< /dev/urandom \\tr -dc _A-Za-z0-9 | head -c \${1:-32};echo;";
|
make-secret = "< /dev/urandom \\tr -dc _A-Za-z0-9 | head -c \${1:-32};echo;";
|
||||||
|
|
||||||
# task warrior
|
# task warrior
|
||||||
t = "task -BLOCKED -idea -backlog";
|
# TODO: make blocked a context?
|
||||||
tw = "t rc.context:work";
|
t = "task -BLOCKED";
|
||||||
# TODO find a reasonable way to manage this from a non-nix managed file in ~/.task/context or something
|
tin = "task in";
|
||||||
# we can do something like task rc.context:$(cat ~/.task/context) to read context
|
tun = "task -BLOCKED -wait";
|
||||||
# and write a little script make-context = cat $@ > ~/.task/context or something
|
tb = "task list +backlog";
|
||||||
tt = "taskwarrior-tui -r list";
|
|
||||||
ti = "task +idea";
|
|
||||||
tb = "task +backlog list";
|
|
||||||
ttb = "taskwarrior-tui -r backlog";
|
|
||||||
tr = "task newest limit:page";
|
tr = "task newest limit:page";
|
||||||
twait = "task +wait";
|
tu = "task unblocked -wait";
|
||||||
|
tl = "task list";
|
||||||
ta = "task add";
|
ta = "task add";
|
||||||
tai = "task add +idea";
|
tai = "task add +in";
|
||||||
tn = "task-note";
|
tn = "task-note";
|
||||||
|
tp = "task limit:page";
|
||||||
ts = "task sync";
|
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>
|
# keeping for posterity but now sxhkbd handles screenshot with <Super+O>
|
||||||
# scrot = "flameshot screen -c -p ~/screenshots/";
|
# scrot = "flameshot screen -c -p ~/screenshots/";
|
||||||
|
@ -297,12 +235,12 @@
|
||||||
nf = "n flake";
|
nf = "n flake";
|
||||||
nfl = "nf lock";
|
nfl = "nf lock";
|
||||||
nepl = "n repl '<nixpkgs>'";
|
nepl = "n repl '<nixpkgs>'";
|
||||||
srch = "ns nixpkgs";
|
srch = "ns nixos";
|
||||||
orch = "ns override";
|
orch = "ns override";
|
||||||
nrb = "cd /tmp; sudo nixos-rebuild switch --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
nrb = "cd /tmp; sudo nixos-rebuild switch --flake '/etc/nixos/#curve'; cd $OLDPWD";
|
||||||
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/home/anish/usr/helm#curve'; cd $OLDPWD";
|
nrt = "cd /tmp; sudo nixos-rebuild test --flake '/etc/nixos/#curve'; cd $OLDPWD";
|
||||||
ned = "cd /home/anish/usr/helm; vim; cd $OLDPWD";
|
ned = "cd /etc/nixos; vim; cd $OLDPWD";
|
||||||
ncd = "cd /home/anish/usr/helm";
|
ncd = "cd /etc/nixos";
|
||||||
mn = ''
|
mn = ''
|
||||||
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
|
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
|
||||||
'';
|
'';
|
||||||
|
@ -327,11 +265,10 @@
|
||||||
jtl = "journalctl";
|
jtl = "journalctl";
|
||||||
|
|
||||||
# quick ssh
|
# quick ssh
|
||||||
kssh = "kitty +kitten ssh";
|
kssh = "kitten +kitty ssh";
|
||||||
smm = "ssh 10.0.69.4"; # box over wireguard
|
smm = "ssh 10.0.69.4"; # box over wireguard
|
||||||
sm = "ssh mossnet.lan"; # box regular
|
sm = "ssh mossnet.lan"; # box regular
|
||||||
sl = "ssh sealight.xyz"; # lituus
|
ss = "ssh sealight.xyz"; # helix
|
||||||
sh = "ssh git.sealight.xyz"; # helix
|
# sl = "ssh 69.61.38.225"; # lituus has become helix
|
||||||
sb = "ssh cyberian@69.61.38.246"; # bonfire for allwell
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
0
home/profiles/desktop/Xresources
Executable file → Normal file
0
home/profiles/desktop/Xresources
Executable file → Normal file
|
@ -1,71 +0,0 @@
|
||||||
#!/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
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/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}"
|
|
||||||
#
|
|
|
@ -1 +0,0 @@
|
||||||
curl -F "content=$(xclip -o)" -X POST https://bin.sealight.xyz/upload
|
|
|
@ -5,9 +5,9 @@ rofi_command="rofi -theme theme/powermenu.rasi"
|
||||||
### Options ###
|
### Options ###
|
||||||
power_off="\tShutdown"
|
power_off="\tShutdown"
|
||||||
reboot="\tReboot"
|
reboot="\tReboot"
|
||||||
lock="\tLock"
|
lock="\tLock"
|
||||||
suspend="\tSleep"
|
suspend="鈴\tSleep"
|
||||||
log_out="\tLogout"
|
log_out="\tLogout"
|
||||||
# Variable passed to rofi
|
# Variable passed to rofi
|
||||||
options="$power_off\n$reboot\n$lock\n$suspend\n$log_out"
|
options="$power_off\n$reboot\n$lock\n$suspend\n$log_out"
|
||||||
|
|
||||||
|
@ -18,14 +18,14 @@ case "$(echo -e "$options" | $rofi_command -dmenu)" in
|
||||||
" Reboot")
|
" Reboot")
|
||||||
systemctl reboot
|
systemctl reboot
|
||||||
;;
|
;;
|
||||||
" Lock")
|
" Lock")
|
||||||
dm-tool lock
|
dm-tool lock
|
||||||
;;
|
;;
|
||||||
" Sleep")
|
"鈴 Sleep")
|
||||||
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
|
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
|
||||||
systemctl suspend
|
systemctl suspend
|
||||||
;;
|
;;
|
||||||
" Logout")
|
" Logout")
|
||||||
bspc quit
|
bspc quit
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -3,12 +3,11 @@
|
||||||
timer=5
|
timer=5
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
select=" "
|
select="麗"
|
||||||
window=" "
|
window="类"
|
||||||
screen=" "
|
screen=""
|
||||||
record=" "
|
delay=""
|
||||||
delay=" "
|
cancel=""
|
||||||
cancel=" "
|
|
||||||
|
|
||||||
# Variable passed to rofi
|
# Variable passed to rofi
|
||||||
options="$select\n$window\n$screen\n$delay\n$cancel"
|
options="$select\n$window\n$screen\n$delay\n$cancel"
|
||||||
|
@ -51,6 +50,4 @@ case $chosen in
|
||||||
| tee $filepath | xclip -selection c -t image/png
|
| tee $filepath | xclip -selection c -t image/png
|
||||||
notify
|
notify
|
||||||
;;
|
;;
|
||||||
$record)
|
|
||||||
kooha
|
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -29,8 +29,8 @@ bspc config presel_feedback_color "#bd93f9"
|
||||||
bspc config split_ratio 0.71
|
bspc config split_ratio 0.71
|
||||||
|
|
||||||
# Extra padding for polybar
|
# Extra padding for polybar
|
||||||
bspc config top_padding 34
|
bspc config -m primary top_padding 34
|
||||||
bspc config bottom_padding 0
|
bspc config -m primary bottom_padding 0
|
||||||
|
|
||||||
# Rules
|
# Rules
|
||||||
bspc rule -r '*'
|
bspc rule -r '*'
|
||||||
|
@ -39,10 +39,7 @@ bspc rule -a Pinentry state=floating center=on
|
||||||
bspc rule -a Firefox state=fullscreen
|
bspc rule -a Firefox state=fullscreen
|
||||||
bspc rule -a feh state=fullscreen
|
bspc rule -a feh state=fullscreen
|
||||||
|
|
||||||
# bspswallow
|
|
||||||
pgrep bspswallow || bspswallow &
|
|
||||||
|
|
||||||
# polybar
|
# polybar
|
||||||
for file in "$XDG_CONFIG_HOME"/bspwm/rc.d/*; do
|
for file in $XDG_CONFIG_HOME/bspwm/rc.d/*; do
|
||||||
source "$file"
|
source "$file"
|
||||||
done
|
done
|
||||||
|
|
|
@ -22,112 +22,15 @@ in
|
||||||
paper-icon-theme
|
paper-icon-theme
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
libsForQt5.qtstyleplugin-kvantum
|
libsForQt5.qtstyleplugin-kvantum
|
||||||
libsForQt5.qt5ct
|
qt5ct
|
||||||
gtk-engine-murrine
|
gtk-engine-murrine
|
||||||
gtk_engines
|
gtk_engines
|
||||||
maim
|
maim
|
||||||
kitty
|
kitty
|
||||||
libreoffice
|
libreoffice
|
||||||
inotify-tools
|
inotify-tools
|
||||||
offpunk
|
|
||||||
termpdfpy
|
|
||||||
# libsForQt5.kontact
|
|
||||||
thunderbird
|
|
||||||
libsecret # For secret-tool to manage keyring
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# 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=true
|
|
||||||
'';
|
|
||||||
# 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
|
# set up env
|
||||||
xsession.enable = true;
|
xsession.enable = true;
|
||||||
|
|
||||||
|
@ -163,10 +66,67 @@ in
|
||||||
"*.colorBD" = "#e6e1cf";
|
"*.colorBD" = "#e6e1cf";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.autorandr.enable = true;
|
# Move required config files around
|
||||||
services.udiskie.automount = true;
|
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";
|
||||||
|
};
|
||||||
|
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;
|
||||||
|
# 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=true
|
||||||
|
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"
|
||||||
|
'';
|
||||||
|
# TODO hardcoded
|
||||||
|
".local/bin/passmenu".source = ./bin/passmenu;
|
||||||
|
".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;
|
||||||
|
".config/eww/eww.yuck".source = ./eww/eww.yuck;
|
||||||
|
".config/eww/eww.scss".source = ./eww/eww.scss;
|
||||||
|
".config/eww/widgets.yuck".source = ./eww/widgets.yuck;
|
||||||
|
# ".local/bin/hotplug-monitor.sh".source = ./bin/hotplug-monitor.sh;
|
||||||
|
};
|
||||||
|
|
||||||
services.mpris-proxy.enable = true; # bluetooth media control
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme = "gtk";
|
||||||
|
style = { name = "qt5ct-style"; };
|
||||||
|
};
|
||||||
|
|
||||||
# Compositor
|
# Compositor
|
||||||
# services.picom = {
|
# services.picom = {
|
||||||
|
@ -189,4 +149,9 @@ in
|
||||||
# corner-radius = 3
|
# corner-radius = 3
|
||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
programs.autorandr.enable = true;
|
||||||
|
services.udiskie.automount = true;
|
||||||
|
|
||||||
|
services.mpris-proxy.enable = true; # bluetooth media control
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
origin = top-right
|
origin = top-right
|
||||||
|
|
||||||
# Offset from the origin
|
# Offset from the origin
|
||||||
offset = 12x36
|
offset = 18x36
|
||||||
|
|
||||||
# Scale factor. It is auto-detected if value is 0.
|
# Scale factor. It is auto-detected if value is 0.
|
||||||
scale = 0
|
scale = 0
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
include ayu.conf
|
include ayu.conf
|
||||||
font_family Hermit
|
font_family Hermit
|
||||||
font_size 13
|
|
||||||
bold_font auto
|
bold_font auto
|
||||||
italic_font auto
|
italic_font auto
|
||||||
bold_italic_font auto
|
bold_italic_font auto
|
||||||
open_url_with default
|
open_url_with default
|
||||||
mouse_map left click ungrabbed mouse_click_url_or_select
|
mouse_map left click ungrabbed mouse_click_url_or_select
|
||||||
confirm_os_window_close 0
|
confirm_os_window_close 0
|
||||||
enable_audio_bell no
|
|
||||||
|
|
||||||
# Ctrl+V for paste
|
|
||||||
map ctrl+v paste_from_clipboard
|
|
||||||
|
|
||||||
-- Allows zen-mode.nvim to increase font size
|
-- Allows zen-mode.nvim to increase font size
|
||||||
-- allow_remote_control socket-only
|
allow_remote_control socket-only
|
||||||
-- listen_on unix:/tmp/kitty
|
listen_on unix:/tmp/kitty
|
||||||
|
|
|
@ -34,6 +34,9 @@ fixed-center = true
|
||||||
width = 100%
|
width = 100%
|
||||||
height = 34
|
height = 34
|
||||||
|
|
||||||
|
offset-x =
|
||||||
|
offset-y =
|
||||||
|
|
||||||
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
|
||||||
background = ${colors.bg}
|
background = ${colors.bg}
|
||||||
|
|
||||||
|
@ -55,15 +58,14 @@ padding-left = 0
|
||||||
module-margin = 0
|
module-margin = 0
|
||||||
margin-bottom = 34
|
margin-bottom = 34
|
||||||
|
|
||||||
font-0 = "Iosevka Nerd Font,Iosevka NF:pixelsize=10;1" ; Icon Size
|
font-0 = "Iosevka Term:pixelsize=13;4"
|
||||||
font-1 = "Iosevka Nerd Font,Iosevka NF:pixelsize=12;4" ; Large Text font
|
font-1 = "Iosevka Term:pixelsize=6;1"
|
||||||
font-2 = "FiraCode Nerd Font:pixelsize=12;2"
|
font-2 = "Fira Code:pixelsize=13;2"
|
||||||
font-3 = "Siji:pixelsize=10;2"
|
font-3 = "Siji:pixelsize=8;2"
|
||||||
font-4 = "Iosevka Nerd Font,Iosevka NF:pixelsize=8;1" ; Small Icon Size
|
|
||||||
|
|
||||||
; Add module mpd for artist - title info
|
; Add module mpd for artist - title info
|
||||||
modules-left = bspwm sps volume
|
modules-left = bspwm sps volume
|
||||||
; modules-center = title
|
modules-center = title
|
||||||
modules-right = wireless-network sps battery sps memory sps cpu sps date
|
modules-right = wireless-network sps battery sps memory sps cpu sps date
|
||||||
|
|
||||||
; The separator will be inserted between the output of each module
|
; The separator will be inserted between the output of each module
|
||||||
|
@ -114,11 +116,11 @@ type = internal/bspwm
|
||||||
pin-workspaces = true
|
pin-workspaces = true
|
||||||
enable-click = true
|
enable-click = true
|
||||||
|
|
||||||
ws-icon-0 = 1;%{T2} %{T-}
|
ws-icon-0 = 1;%{T1}%{T-}
|
||||||
ws-icon-1 = 2;%{T2} %{T-}
|
ws-icon-1 = 2;%{T1}%{T-}
|
||||||
ws-icon-2 = 3;%{T2} %{T-}
|
ws-icon-2 = 3;%{T1}%{T-}
|
||||||
ws-icon-3 = 4;%{T2} %{T-}
|
ws-icon-3 = 4;%{T1}%{T-}
|
||||||
ws-icon-4 = 5;%{T2} %{T-}
|
ws-icon-4 = 5;%{T1}%{T-}
|
||||||
ws-icon-default =
|
ws-icon-default =
|
||||||
; fuzzy-match = true
|
; fuzzy-match = true
|
||||||
|
|
||||||
|
@ -155,14 +157,14 @@ interval = 1.0
|
||||||
|
|
||||||
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
|
; 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 %%{...}
|
; NOTE: if you want to use syntax tags here you need to use %%{...}
|
||||||
date = %{T2} %{T-}%{T1} %d/%a%{T-}
|
date = %{T1}%{T-}%{T2} %d/%a%{T-}
|
||||||
|
|
||||||
; Optional time format
|
; Optional time format
|
||||||
time = %{T2} %H:%M%{T-}
|
time = %{T2} %H:%M%{T-}
|
||||||
|
|
||||||
; if `date-alt` or `time-alt` is defined, clicking
|
; if `date-alt` or `time-alt` is defined, clicking
|
||||||
; the module will toggle between formats
|
; the module will toggle between formats
|
||||||
date-alt = %{T2} %{T-} %{T1} %a, %d %b %y%{T-}
|
date-alt = %{T1}%{T-}%{T2} %a, %d %b %y%{T-}
|
||||||
time-alt = %{T2} %H:%M:%S%{T-}
|
time-alt = %{T2} %H:%M:%S%{T-}
|
||||||
|
|
||||||
label = %date%%time%
|
label = %date%%time%
|
||||||
|
@ -175,12 +177,11 @@ interface = wlp3s0
|
||||||
|
|
||||||
label-connected = %essid%
|
label-connected = %essid%
|
||||||
label-connected-font = 2
|
label-connected-font = 2
|
||||||
format-connected = <ramp-signal> <label-connected>
|
format-connected = <ramp-signal><label-connected>
|
||||||
label-connected-foreground = #82b414
|
label-connected-foreground = #82b414
|
||||||
|
|
||||||
|
|
||||||
format-disconnected = <label-disconnected>
|
format-disconnected = <label-disconnected>
|
||||||
label-disconnected = ""
|
label-disconnected = "睊"
|
||||||
label-disconnected-foreground = #f92672
|
label-disconnected-foreground = #f92672
|
||||||
|
|
||||||
ramp-signal-foreground = #82b414
|
ramp-signal-foreground = #82b414
|
||||||
|
@ -198,7 +199,7 @@ type = internal/cpu
|
||||||
; Default: 1
|
; Default: 1
|
||||||
interval = 0.5
|
interval = 0.5
|
||||||
|
|
||||||
label = %{T2} %{T-}%{T1} %percentage:2%%%{T-}
|
label = %{T1}%{T-}%{T2} %percentage:2%%%{T-}
|
||||||
|
|
||||||
label-foreground = ${colors.cyan}
|
label-foreground = ${colors.cyan}
|
||||||
|
|
||||||
|
@ -228,7 +229,7 @@ format = <label>
|
||||||
; %gb_swap_free%
|
; %gb_swap_free%
|
||||||
; %gb_swap_used%
|
; %gb_swap_used%
|
||||||
|
|
||||||
label = %{T2} %{T-}%{T1} %gb_used%%{T-}
|
label = %{T1}%{T-}%{T2} %gb_used%%{T-}
|
||||||
|
|
||||||
label-foreground = ${colors.cyan}
|
label-foreground = ${colors.cyan}
|
||||||
|
|
||||||
|
@ -276,6 +277,38 @@ type = custom/text
|
||||||
content = " "
|
content = " "
|
||||||
content-padding = 0
|
content-padding = 0
|
||||||
|
|
||||||
|
[module/network]
|
||||||
|
type = internal/network
|
||||||
|
interface = wlp3s0
|
||||||
|
;enp0s29u1u2
|
||||||
|
interval = 1.0
|
||||||
|
label-connected = "%{T1}龍%{T-}%{T2} %downspeed% | %upspeed%%{T-}"
|
||||||
|
label-disconnected = "%{T2}0/0%{T-}"
|
||||||
|
label-connected-background = ${colors.bg}
|
||||||
|
label-connected-foreground = ${colors.blue}
|
||||||
|
label-disconnected-foreground = ${colors.red}
|
||||||
|
|
||||||
|
[module/title]
|
||||||
|
type = internal/xwindow
|
||||||
|
; Available tags:
|
||||||
|
; <label> (default)
|
||||||
|
format = <label>
|
||||||
|
format-background = ${colors.bg}
|
||||||
|
format-foreground = ${colors.green}
|
||||||
|
format-padding = 4
|
||||||
|
|
||||||
|
; Available tokens:
|
||||||
|
; %title%
|
||||||
|
; Default: %title%
|
||||||
|
label = "%{T1}类%{T-}%{T2} %title%%{T-}"
|
||||||
|
label-maxlen = 65
|
||||||
|
|
||||||
|
; Used instead of label when there is no window title
|
||||||
|
; Available tokens:
|
||||||
|
; None
|
||||||
|
label-empty =%{T2}Empty%{T-}
|
||||||
|
label-empty-foreground = #707880
|
||||||
|
|
||||||
[module/volume]
|
[module/volume]
|
||||||
type = internal/pulseaudio
|
type = internal/pulseaudio
|
||||||
|
|
||||||
|
@ -283,7 +316,7 @@ use-ui-max = false
|
||||||
|
|
||||||
interval = 5
|
interval = 5
|
||||||
|
|
||||||
format-volume = <ramp-volume> <bar-volume>
|
format-volume = <ramp-volume><bar-volume>
|
||||||
|
|
||||||
format-muted = <label-muted>
|
format-muted = <label-muted>
|
||||||
format-muted-prefix = " "
|
format-muted-prefix = " "
|
||||||
|
@ -299,13 +332,13 @@ label-muted-foreground = ${colors.mauve}
|
||||||
bar-volume-width = 8
|
bar-volume-width = 8
|
||||||
bar-volume-gradient = false
|
bar-volume-gradient = false
|
||||||
bar-volume-indicator = |
|
bar-volume-indicator = |
|
||||||
bar-volume-indicator-font = 6
|
bar-volume-indicator-font = 2
|
||||||
bar-volume-indicator-foreground = ${colors.mauve}
|
bar-volume-indicator-foreground = ${colors.mauve}
|
||||||
bar-volume-fill = ─
|
bar-volume-fill = ─
|
||||||
bar-volume-fill-font = 6
|
bar-volume-fill-font = 2
|
||||||
bar-volume-fill-foreground = ${colors.mauve}
|
bar-volume-fill-foreground = ${colors.mauve}
|
||||||
bar-volume-empty = ─
|
bar-volume-empty = ─
|
||||||
bar-volume-empty-font = 6
|
bar-volume-empty-font = 2
|
||||||
bar-volume-empty-foreground = ${colors.fg-alt}
|
bar-volume-empty-foreground = ${colors.fg-alt}
|
||||||
|
|
||||||
ramp-volume-0 = " "
|
ramp-volume-0 = " "
|
||||||
|
@ -337,19 +370,19 @@ battery = BAT0
|
||||||
poll-interval = 2
|
poll-interval = 2
|
||||||
time-format = %H:%M
|
time-format = %H:%M
|
||||||
|
|
||||||
format-charging = <animation-charging> <label-charging>
|
format-charging = <animation-charging><label-charging>
|
||||||
format-charging-prefix =
|
format-charging-prefix =
|
||||||
|
|
||||||
format-discharging = <ramp-capacity> <label-discharging>
|
format-discharging = <ramp-capacity><label-discharging>
|
||||||
|
|
||||||
format-full = <label-full>
|
format-full = <label-full>
|
||||||
format-full-prefix = " "
|
format-full-prefix = " "
|
||||||
format-full-prefix-font = 2
|
format-full-prefix-font = 1
|
||||||
format-full-prefix-foreground = ${colors.sky}
|
format-full-prefix-foreground = ${colors.sky}
|
||||||
|
|
||||||
label-charging = "%percentage%% "
|
label-charging = "%percentage%% "
|
||||||
label-discharging = "%percentage%% "
|
label-discharging = "%percentage%% "
|
||||||
label-full = "%percentage%%"
|
label-full = "%percentage%% "
|
||||||
|
|
||||||
label-charging-foreground = ${colors.sky}
|
label-charging-foreground = ${colors.sky}
|
||||||
label-discharging-foreground = ${colors.sky}
|
label-discharging-foreground = ${colors.sky}
|
||||||
|
@ -376,4 +409,3 @@ animation-charging-foreground = ${colors.sky}
|
||||||
animation-charging-framerate = 750
|
animation-charging-framerate = 750
|
||||||
|
|
||||||
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||||
|
|
||||||
|
|
0
home/profiles/desktop/polybar/run.sh
Executable file → Normal file
0
home/profiles/desktop/polybar/run.sh
Executable file → Normal file
|
@ -2,7 +2,7 @@
|
||||||
@import "config.rasi"
|
@import "config.rasi"
|
||||||
|
|
||||||
textbox-icon {
|
textbox-icon {
|
||||||
str: " ";
|
str: " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt {
|
prompt {
|
||||||
|
|
|
@ -27,9 +27,6 @@ super + Tab
|
||||||
super + e
|
super + e
|
||||||
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy
|
rofimoji --selector-args "-theme theme/emojimenu.rasi" --skin-tone moderate --action copy
|
||||||
|
|
||||||
super + a
|
|
||||||
paste
|
|
||||||
|
|
||||||
super + p
|
super + p
|
||||||
passmenu
|
passmenu
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
programs.msmtp.enable = true;
|
programs.msmtp.enable = true;
|
||||||
programs.notmuch.enable = true;
|
programs.notmuch.enable = true;
|
||||||
home.file.".mailcap".text = ''
|
home.file.".mailcap".text = ''
|
||||||
text/html; firefox %s
|
text/html; browsh %s
|
||||||
application/pdf; zathura %s
|
application/pdf; zathura %s
|
||||||
image/png; feh %s
|
image/png; feh %s
|
||||||
image/jpeg; feh %s
|
image/jpeg; feh %s
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
bind editor ^T complete
|
bind editor ^T complete
|
||||||
|
|
||||||
# Press A to archive
|
# Press A to archive
|
||||||
macro index,pager A "<clear-flag><save-message>=/Archive" "mark message as Archived"
|
macro index,pager A "<clear-flag>N<save-message>=/Archive" "mark message as Archived"
|
||||||
# Press C to add contact to Khard address book
|
# Press C to add contact to Khard address book
|
||||||
macro index,pager C \
|
macro index,pager C \
|
||||||
"<pipe-message>khard add-email<return>" \
|
"<pipe-message>khard add-email<return>" \
|
||||||
|
|
|
@ -13,15 +13,10 @@
|
||||||
#env.XDG_DEXSTOP_DIR = "$HOME/";
|
#env.XDG_DEXSTOP_DIR = "$HOME/";
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles.anish = {
|
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||||
id = 0;
|
|
||||||
isDefault = true;
|
|
||||||
name = "anish";
|
|
||||||
userChrome = (builtins.readFile ./userChrome.css);
|
|
||||||
extensions.packages = 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
|
# Find extensions: https://github.com/nix-community/nur-combined/blob/master/repos/rycee/pkgs/firefox-addons/generated-firefox-addons.nix
|
||||||
ublock-origin
|
ublock-origin
|
||||||
# wallabagger
|
wallabagger
|
||||||
# tree-style-tab
|
# tree-style-tab
|
||||||
tridactyl
|
tridactyl
|
||||||
promnesia
|
promnesia
|
||||||
|
@ -43,10 +38,12 @@
|
||||||
meta = { };
|
meta = { };
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
profiles.anish = {
|
||||||
|
id = 0;
|
||||||
|
isDefault = true;
|
||||||
|
name = "anish";
|
||||||
|
userChrome = (builtins.readFile ./userChrome.css);
|
||||||
settings = {
|
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";
|
"devtools.theme" = "dark";
|
||||||
# Enable userContent.css and userChrome.css for our theme modules
|
# Enable userContent.css and userChrome.css for our theme modules
|
||||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||||
|
@ -54,7 +51,6 @@
|
||||||
"browser.download.dir" = "/home/anish/downloads"; # TODO Don't hardcode this!
|
"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
|
# Don't use the built-in password manager; a nixos user is more likely
|
||||||
# using an external one (you are using one, right?).
|
# 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;
|
#"signon.rememberSignons" = false;
|
||||||
# Do not check if Firefox is the default browser
|
# Do not check if Firefox is the default browser
|
||||||
"browser.shell.checkDefaultBrowser" = false;
|
"browser.shell.checkDefaultBrowser" = false;
|
||||||
|
|
|
@ -8,29 +8,13 @@
|
||||||
/*** NAV BAR ***/
|
/*** NAV BAR ***/
|
||||||
/* Hide urlbar */
|
/* Hide urlbar */
|
||||||
#nav-bar {
|
#nav-bar {
|
||||||
/* customize this value. */
|
position: relative !important;
|
||||||
--navbar-margin: -55px;
|
z-index: 2 !important;
|
||||||
|
height: 2px !important;
|
||||||
margin-top: var(--navbar-margin);
|
min-height: 2px !important;
|
||||||
margin-bottom: 0;
|
margin-bottom: -2px !important;
|
||||||
z-index: -100;
|
opacity: 0 !important;
|
||||||
transition: all 0.3s ease !important;
|
border: none !important;
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navigator-toolbox:focus-within > #nav-bar,
|
|
||||||
#navigator-toolbox:hover > #nav-bar
|
|
||||||
{
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: var(--navbar-margin);
|
|
||||||
z-index: 100;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main-window[chromehidden*="toolbar"] {
|
|
||||||
visibility: collapse;
|
|
||||||
height: -55px !important;
|
|
||||||
min-height: -55px !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* But unfocus it when we invoke it with ctrl+L */
|
/* But unfocus it when we invoke it with ctrl+L */
|
||||||
|
@ -53,11 +37,10 @@
|
||||||
height: 28px !important;
|
height: 28px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hides the sidebar header
|
/* hides the sidebar header */
|
||||||
#sidebar-header {
|
#sidebar-header {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
.tab[selected="true"] {
|
.tab[selected="true"] {
|
||||||
visibility: collapse;
|
visibility: collapse;
|
||||||
|
@ -70,153 +53,73 @@
|
||||||
.tabbrowser-tab[visuallyselected="true"] {
|
.tabbrowser-tab[visuallyselected="true"] {
|
||||||
visibility: collapse;
|
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
|
/* 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. */
|
See the above repository for updates as well as full license text. */
|
||||||
|
|
||||||
/* Show sidebar only when the cursor is over it.
|
/* Show sidebar only when the cursor is over it */
|
||||||
The border controlling sidebar width will be removed so you'll need to modify
|
/* The border controlling sidebar width will be removed so you'll need to modify these values to change width */
|
||||||
these values to change width.
|
|
||||||
By default the internal layout of sidebar changes when hovered, but this can
|
|
||||||
be changed by setting pref "userchrome.autohide-sidebar.static-layout.enabled" to true
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Note: If you want only *some* sidebar to be auto-hidden, then you can use [sidebarcommand] attribute selector.
|
|
||||||
For example, to only affect Sidebery's sidebar replace all instances of #sidebar-box with
|
|
||||||
#sidebar-box[sidebarcommand="_3c078156-979c-498b-8990-85f7987dd929_-sidebar-action"].
|
|
||||||
To find the sidebarcommand value for any other sidebar, open that sidebar and use Browser Toolbox to inspect it.
|
|
||||||
See: https://firefox-source-docs.mozilla.org/devtools-user/browser_toolbox/index.html
|
|
||||||
*/
|
|
||||||
/* The whole thing
|
|
||||||
:where(#main-window) #browser{
|
|
||||||
--uc-sidebar-width: 240px;
|
|
||||||
--uc-sidebar-hover-width: 210px;
|
|
||||||
}
|
|
||||||
#main-window[sizemode="fullscreen"] #browser{
|
|
||||||
--uc-sidebar-width: 1px;
|
|
||||||
}
|
|
||||||
#sidebar-box{
|
#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 */
|
--uc-autohide-sidebar-delay: 600ms; /* Wait 0.6s before hiding sidebar */
|
||||||
--uc-autohide-transition-duration: 115ms;
|
|
||||||
--uc-autohide-transition-type: linear;
|
|
||||||
--browser-area-z-index-sidebar: 3;
|
|
||||||
position: relative;
|
position: relative;
|
||||||
min-width: var(--uc-sidebar-width) !important;
|
min-width: var(--uc-sidebar-width) !important;
|
||||||
width: var(--uc-sidebar-width) !important;
|
width: var(--uc-sidebar-width) !important;
|
||||||
max-width: var(--uc-sidebar-width) !important;
|
max-width: var(--uc-sidebar-width) !important;
|
||||||
z-index: var(--browser-area-z-index-sidebar,3);
|
z-index:1;
|
||||||
background-color: inherit;
|
|
||||||
/* This directionality flipper is played so that sidebar "grows" into the right direction */
|
|
||||||
direction: ltr;
|
|
||||||
&:is([positionend],[sidebar-positionend]):not(:-moz-locale-dir(rtl)){
|
|
||||||
direction: rtl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.sidebar-browser-stack{
|
|
||||||
background: inherit;
|
#sidebar-box[positionend]{ direction: rtl }
|
||||||
}
|
#sidebar-box[positionend] > *{ direction: ltr }
|
||||||
#main-window[sizemode="fullscreen"] #browser{ --uc-sidebar-width: 1px; }
|
|
||||||
|
#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-splitter{ display: none }
|
||||||
|
|
||||||
#sidebar-header{
|
#sidebar-header{ overflow: hidden; /*color: var(--chrome-color, inherit) !important*/}
|
||||||
overflow: hidden;
|
|
||||||
color: var(--chrome-color, inherit) !important;
|
|
||||||
padding-inline: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar-header::before,
|
|
||||||
#sidebar-header::after{
|
|
||||||
content: "";
|
|
||||||
display: flex;
|
|
||||||
padding-left: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#sidebar-header,
|
|
||||||
#sidebar{
|
#sidebar{
|
||||||
transition: min-width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay) !important;
|
transition: min-width 115ms linear var(--uc-autohide-sidebar-delay) !important;
|
||||||
min-width: var(--uc-sidebar-width) !important;
|
min-width: var(--uc-sidebar-width) !important;
|
||||||
will-change: min-width;
|
will-change: min-width;
|
||||||
direction: ltr;
|
|
||||||
&:-moz-locale-dir(rtl){
|
|
||||||
direction: rtl;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#sidebar-box:hover > #sidebar-header,
|
|
||||||
#sidebar-box:hover > #sidebar,
|
|
||||||
#sidebar-box:hover > .sidebar-browser-stack > #sidebar{
|
|
||||||
min-width: var(--uc-sidebar-hover-width) !important;
|
|
||||||
transition-delay: 0ms !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#sidebar-box:hover > #sidebar{ min-width: var(--uc-sidebar-hover-width) !important; transition-delay: 0ms !important }
|
||||||
|
|
||||||
.sidebar-panel{
|
.sidebar-panel{
|
||||||
background-color: transparent !important;
|
/*background-color: transparent !important;
|
||||||
color: var(--newtab-text-primary-color) !important;
|
color: var(--newtab-text-primary-color) !important;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-panel #search-box{
|
.sidebar-panel #search-box{
|
||||||
-moz-appearance: none !important;
|
-moz-appearance: none !important;
|
||||||
background-color: rgba(249,249,250,0.1) !important;
|
/*background-color: rgba(249,249,250,0.1) !important;
|
||||||
color: inherit !important;
|
color: inherit !important;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add sidebar divider and give it background */
|
/* Add sidebar divider and give it background */
|
||||||
|
|
||||||
#sidebar,
|
#sidebar,
|
||||||
#sidebar-header{
|
#sidebar-header{
|
||||||
background-color: inherit !important;
|
/*background-color: inherit !important;*/
|
||||||
border-inline: 1px solid rgb(80,80,80);
|
border-inline: 1px solid rgb(80,80,80);
|
||||||
border-inline-width: 0px 1px;
|
border-inline-width: 0px 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sidebar-box:not([positionend],[sidebar-positionend]) > :-moz-locale-dir(rtl),
|
#sidebar-box:not([positionend]) > :-moz-locale-dir(rtl),
|
||||||
#sidebar-box:is([positionend],[sidebar-positionend]) > *{
|
#sidebar-box[positionend] > *{
|
||||||
border-inline-width: 1px 0px;
|
border-inline-width: 1px 0px;
|
||||||
}
|
}
|
||||||
@media -moz-pref("sidebar.revamp") {
|
|
||||||
#sidebar, #sidebar-header{ border-style: none }
|
|
||||||
#sidebar-box{ padding: 0 !important; }
|
|
||||||
}
|
|
||||||
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
|
/* Move statuspanel to the other side when sidebar is hovered so it doesn't get covered by sidebar */
|
||||||
|
|
||||||
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel{
|
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel{ inset-inline: auto 0px !important; }
|
||||||
inset-inline: auto 0px !important;
|
#sidebar-box:not([positionend]):hover ~ #appcontent #statuspanel-label{ margin-inline: 0px !important; border-left-style: solid !important; }
|
||||||
}
|
|
||||||
#sidebar-box:not([positionend],[sidebar-positionend]):hover ~ #appcontent #statuspanel-label{
|
|
||||||
margin-inline: 0px !important;
|
|
||||||
border-left-style: solid !important;
|
|
||||||
}
|
|
||||||
@media -moz-pref("userchrome.autohide-sidebar.static-layout.enabled"){
|
|
||||||
#sidebar-box{
|
|
||||||
min-width: var(--uc-sidebar-width) !important;
|
|
||||||
contain: size;
|
|
||||||
box-shadow: var(--content-area-shadow);
|
|
||||||
}
|
|
||||||
#sidebar{
|
|
||||||
min-width: var(--uc-sidebar-hover-width) !important;
|
|
||||||
}
|
|
||||||
.sidebar-browser-stack{
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%;
|
|
||||||
transition: width var(--uc-autohide-transition-duration) var(--uc-autohide-transition-type) var(--uc-autohide-sidebar-delay);
|
|
||||||
direction: ltr;
|
|
||||||
&:hover{
|
|
||||||
transition-delay: 0ms;
|
|
||||||
width: var(--uc-sidebar-hover-width);
|
|
||||||
}
|
|
||||||
&:-moz-locale-dir(rtl){
|
|
||||||
transition-property: transform,width !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#sidebar-box[sidebar-positionend]:hover :is(#sidebar-header,#sidebar):-moz-locale-dir(ltr){
|
|
||||||
transform: translateX(0);
|
|
||||||
transition-delay: 0ms !important;
|
|
||||||
}
|
|
||||||
#sidebar-box:not([sidebar-positionend]):hover .sidebar-browser-stack:-moz-locale-dir(rtl){
|
|
||||||
transform: translateX(calc(-1 * var(--uc-sidebar-hover-width) + var(--uc-sidebar-width)));
|
|
||||||
}
|
|
||||||
#sidebar-box[sidebar-positionend]:hover > .sidebar-browser-stack:-moz-locale-dir(rtl){
|
|
||||||
transform: translateX(calc(var(--uc-sidebar-hover-width) - var(--uc-sidebar-width)));
|
|
||||||
transition-delay: 0ms !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
".tmp"
|
".tmp"
|
||||||
".direnv"
|
".direnv"
|
||||||
"result"
|
"result"
|
||||||
"node_modules/"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
|
|
|
@ -10,17 +10,16 @@ let
|
||||||
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
|
sha256 = "1fzKmknfVlEYwqeXgbKITbb2/PJ023iJyMz6vak3qh4=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
lsp-format = pkgs.vimUtils.buildVimPlugin {
|
||||||
my-lspsaga = pkgs.vimUtils.buildVimPlugin {
|
name = "lsp-format";
|
||||||
name = "lspsaga.nvim";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "glepnir";
|
owner = "lukas-reineke";
|
||||||
repo = "lspsaga.nvim";
|
repo = "lsp-format.nvim";
|
||||||
rev = "b7b4777369b441341b2dcd45c738ea4167c11c9e";
|
rev = "84e117b99bb2bc0d0c8122e2b256046f046f8aff";
|
||||||
sha256 = "sciX/fMxzY1YOxXxjj1+ymrdMi451avcFFu+14R+/pk=";
|
sha256 = "rs3NTZwWdsmBGXnrgUeVxUiNjbN/ULxJHifPYJD9mT4=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nvim-luapad = pkgs.vimUtils.buildVimPlugin {
|
nvim-luapad = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
name = "nvim-luapad";
|
name = "nvim-luapad";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "rafcamlet";
|
owner = "rafcamlet";
|
||||||
|
@ -29,7 +28,7 @@ let
|
||||||
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
|
sha256 = "gMaS5YFi3+gmUIfkCMEt9vhm8XSgv54Cquv5+WCWeTo=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
leap = pkgs.vimUtils.buildVimPlugin {
|
leap = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
name = "leap";
|
name = "leap";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "ggandor";
|
owner = "ggandor";
|
||||||
|
@ -47,7 +46,7 @@ let
|
||||||
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
|
sha256 = "vX7ZVJxgatIicmijehtaRvyHxk1i4gFfXrbPM/+VoFc=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
my-which-key-nvim = pkgs.vimUtils.buildVimPlugin {
|
my-which-key-nvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
pname = "which-key.nvim";
|
pname = "which-key.nvim";
|
||||||
version = "2022-05-04";
|
version = "2022-05-04";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
@ -58,7 +57,27 @@ let
|
||||||
};
|
};
|
||||||
meta.homepage = "https://github.com/folke/which-key.nvim/";
|
meta.homepage = "https://github.com/folke/which-key.nvim/";
|
||||||
};
|
};
|
||||||
yuck-vim = pkgs.vimUtils.buildVimPlugin {
|
my-conjure = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "conjure";
|
||||||
|
version = "2022-05-04";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "olical";
|
||||||
|
repo = "conjure";
|
||||||
|
rev = "2e7f449d06753f2996e186954e96afc60edd5862";
|
||||||
|
sha256 = "ZV0vPYiZI5/3Isw2l7rrLuiO+kA9G0vrA6OxHFkLTFw=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
scnvim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "scnvim";
|
||||||
|
version = "2022-06-04";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "davidgranstrom";
|
||||||
|
repo = "scnvim";
|
||||||
|
rev = "746cc0db820d02a9c36b8f9ba2eac9725fa73107";
|
||||||
|
sha256 = "kvSwS6FNUY2Ue84NhWLLcm0ldLMSp4WqQ7s6TUoX6Cc=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
yuck-vim = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
pname = "yuck.vim";
|
pname = "yuck.vim";
|
||||||
version = "2021-08-09";
|
version = "2021-08-09";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
@ -68,7 +87,7 @@ let
|
||||||
sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE=";
|
sha256 = "lp7qJWkvelVfoLCyI0aAiajTC+0W1BzDhmtta7tnICE=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nvim-parinfer = pkgs.vimUtils.buildVimPlugin {
|
nvim-parinfer = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
pname = "nvim-parinfer";
|
pname = "nvim-parinfer";
|
||||||
version = "v1.2.0";
|
version = "v1.2.0";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
@ -78,7 +97,7 @@ let
|
||||||
sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc=";
|
sha256 = "Dlzfp3CZTzq8zQeHByWf3ER6/Em+KNGYNI4Z17ui8Lc=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
my-marks = pkgs.vimUtils.buildVimPlugin {
|
my-marks = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
pname = "marks";
|
pname = "marks";
|
||||||
version = "2022-08-31";
|
version = "2022-08-31";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
@ -88,7 +107,7 @@ let
|
||||||
sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk=";
|
sha256 = "XdbgIWuAHNdTfyKDrKmQVq5oSbBoi56DpwtgOqhScAk=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
my-fterm = pkgs.vimUtils.buildVimPlugin {
|
my-fterm = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
pname = "fterm";
|
pname = "fterm";
|
||||||
version = "2022-07-22";
|
version = "2022-07-22";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
@ -98,7 +117,7 @@ let
|
||||||
sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE=";
|
sha256 = "rR6KDwj58aYfyaSsoUy75536SdBhk394yspCUl/hzfE=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
my-nvim-peekup = pkgs.vimUtils.buildVimPlugin {
|
my-nvim-peekup = pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
pname = "nvim-peekup";
|
pname = "nvim-peekup";
|
||||||
version = "0.1.0";
|
version = "0.1.0";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
@ -114,6 +133,11 @@ let
|
||||||
tasklib
|
tasklib
|
||||||
pynvim
|
pynvim
|
||||||
six
|
six
|
||||||
|
pylsp-mypy
|
||||||
|
#pyls-isort
|
||||||
|
#pyls-black
|
||||||
|
black
|
||||||
|
isort
|
||||||
# other python packages you want
|
# other python packages you want
|
||||||
];
|
];
|
||||||
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
|
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
|
||||||
|
@ -122,21 +146,12 @@ in
|
||||||
home.sessionVariables.EDITOR = "nvim";
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
|
k = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex; cd $OLDPWD";
|
||||||
# kitaab zettel
|
|
||||||
kz = "cd ~/kitaab/vimwiki; vim -c :VimwikiIndex -c :ZettelNew; cd $OLDPWD";
|
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
|
# Add %update to the highlight clause for vimwiki files
|
||||||
home.file.".config/nvim/after/syntax/vimwiki.vim".text = ''
|
home.file.".config/nvim/after/syntax/vimwiki.vim".text = ''
|
||||||
" match with %update
|
" match with %update
|
||||||
syntax match VimwikiPlaceholder /^\s*%update\ze\%(\s.*\)\?$/ nextgroup=VimwikiPlaceholderParam skipwhite
|
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 ];
|
#environment.systemPackages = with customPlugins; [ tidal ];
|
||||||
|
@ -182,7 +197,7 @@ in
|
||||||
set nobackup
|
set nobackup
|
||||||
set nowritebackup
|
set nowritebackup
|
||||||
" Better display for messages
|
" Better display for messages
|
||||||
set cmdheight=0
|
set cmdheight=2
|
||||||
" You will have bad experience for diagnostic messages when it's default 4000.
|
" You will have bad experience for diagnostic messages when it's default 4000.
|
||||||
set updatetime=300
|
set updatetime=300
|
||||||
" don't give |ins-completion-menu| messages.
|
" don't give |ins-completion-menu| messages.
|
||||||
|
@ -191,7 +206,6 @@ in
|
||||||
set signcolumn=yes
|
set signcolumn=yes
|
||||||
" highlight row
|
" highlight row
|
||||||
set cursorline
|
set cursorline
|
||||||
set autoread
|
|
||||||
|
|
||||||
let mapleader = "\<Space>"
|
let mapleader = "\<Space>"
|
||||||
let maplocalleader = ","
|
let maplocalleader = ","
|
||||||
|
@ -206,7 +220,19 @@ in
|
||||||
nmap <leader>rt :retab!<CR>
|
nmap <leader>rt :retab!<CR>
|
||||||
vmap <leader>rt :retab!<CR>
|
vmap <leader>rt :retab!<CR>
|
||||||
|
|
||||||
" Alt+hjkl navigation now handled by Navigator.nvim plugin
|
" 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>
|
:nnoremap <F5> "=strftime("%Y-%m-%d %H:%M")<CR>
|
||||||
:inoremap <F5> <C-R>=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>
|
:inoremap <F4> <C-R>=strftime("%H:%M")<CR>
|
||||||
|
@ -235,20 +261,16 @@ in
|
||||||
" Sexp in Conjure (since it's fennel)
|
" Sexp in Conjure (since it's fennel)
|
||||||
let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck"
|
let g:sexp_filetypes = "clojure,scheme,lisp,janet,fennel,yuck"
|
||||||
let g:conjure#filetype#fennel = "conjure.client.fennel.stdio"
|
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
|
let g:rainbow_active = 0
|
||||||
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
|
autocmd BufReadPost,BufNewFile c,clj,cljs RainbowParenthesesToggleAll
|
||||||
|
|
||||||
" general commands
|
" general commands
|
||||||
map <leader>e :Neotree toggle<CR>
|
map <leader>t :NERDTreeToggle<CR>
|
||||||
map <leader>s :w<CR>
|
map <leader>s :w<CR>
|
||||||
map <leader>q :q<CR>
|
map <leader>q :q<CR>
|
||||||
map <leader>r :RainbowParenthesesToggleAll<CR>
|
map <leader>r :RainbowParenthesesToggleAll<CR>
|
||||||
nnoremap <Esc> :noh<CR>
|
nnoremap <BS> :noh<CR>
|
||||||
map Q <Nop>
|
map Q <Nop>
|
||||||
nnoremap Y y$
|
nnoremap Y y$
|
||||||
nnoremap <leader>n :vnew<CR>
|
nnoremap <leader>n :vnew<CR>
|
||||||
|
@ -279,11 +301,11 @@ in
|
||||||
:vmap <leader>sy "*y
|
:vmap <leader>sy "*y
|
||||||
:map <leader>sp :r!xclip -o<CR>
|
:map <leader>sp :r!xclip -o<CR>
|
||||||
|
|
||||||
" buffer navigation (using built-in commands)
|
" barbar
|
||||||
nnoremap <silent> gT :bprevious<CR>
|
nnoremap <silent> gT :BufferPrevious<CR>
|
||||||
nnoremap <silent> gt :bnext<CR>
|
nnoremap <silent> gt :BufferNext<CR>
|
||||||
nnoremap <silent> gj :buffers<CR>
|
nnoremap <silent> gj :BufferPick<CR>
|
||||||
nnoremap <silent> gq :bdelete<CR>
|
nnoremap <silent> gq :BufferClose<CR>
|
||||||
|
|
||||||
" git
|
" git
|
||||||
nnoremap <leader>ga :G fetch --all
|
nnoremap <leader>ga :G fetch --all
|
||||||
|
@ -296,14 +318,14 @@ in
|
||||||
nnoremap <leader>gc :G commit -v -q %:p<CR>
|
nnoremap <leader>gc :G commit -v -q %:p<CR>
|
||||||
|
|
||||||
" kitaab
|
" kitaab
|
||||||
"map <leader>cz :VimwikiIndex<CR>:ZettelNew
|
map <leader>cz :VimwikiIndex<CR>:ZettelNew
|
||||||
"map <leader>zs :ZettelSearch<CR>
|
map <leader>zs :ZettelSearch<CR>
|
||||||
map <leader>zn :ZettelNew<CR>
|
map <leader>zn :ZettelNew<CR>
|
||||||
"map <leader>zo :ZettelOpen<CR>
|
map <leader>zo :ZettelOpen<CR>
|
||||||
"map <leader>zf :Telescope oldfiles only_cwd=true<CR>
|
map <leader>zf :Telescope oldfiles only_cwd=true<CR>
|
||||||
"map <leader>wt :VimwikiMakeTomorrowDiaryNote
|
map <leader>wt :VimwikiMakeTomorrowDiaryNote
|
||||||
"map <leader>wd :VimwikiMakeYesterdayDiaryNote
|
map <leader>wd :VimwikiMakeYesterdayDiaryNote
|
||||||
"map <leader>zm :ZenMode<CR>:setlocal nospell<CR>
|
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:vimwiki_list = [{ 'path': '~/kitaab/vimwiki', 'auto_tags': 1, 'auto_diary_index': 1, 'auto_generate_links': 1 }]
|
||||||
let g:sync_taskwarrior = 0
|
let g:sync_taskwarrior = 0
|
||||||
let g:zettel_format = "%y%m%d-%H%M"
|
let g:zettel_format = "%y%m%d-%H%M"
|
||||||
|
@ -316,40 +338,23 @@ in
|
||||||
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
|
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.8 } }
|
||||||
|
|
||||||
" lsp commands
|
" lsp commands
|
||||||
nnoremap <leader>vgd :lua vim.lsp.buf.definition()<CR>
|
nnoremap <leader>vd :lua vim.lsp.buf.definition()<CR>
|
||||||
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
|
nnoremap <leader>vi :lua require('telescope.builtin').lsp_implementation()<CR>
|
||||||
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
|
nnoremap <leader>vsh :lua vim.lsp.buf.signature_help()<CR>
|
||||||
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
|
nnoremap <leader>vrr :lua require('telescope.builtin').lsp_references()<CR>
|
||||||
" nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
|
nnoremap <leader>vrn :lua vim.lsp.buf.rename()<CR>
|
||||||
" nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
|
nnoremap <leader>vh :lua vim.lsp.buf.hover()<CR>
|
||||||
" nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
|
nnoremap <leader>vca :lua vim.lsp.buf.code_action()<CR>
|
||||||
" nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
|
nnoremap <leader>vsd :lua vim.lsp.util.show_line_diagnostics()<CR>
|
||||||
" nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
|
nnoremap <leader>vn :lua vim.lsp.diagnostic.goto_next()<CR>
|
||||||
" nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
|
nnoremap <leader>va :lua require('telescope.builtin').lsp_code_actions(require('telescope.themes').get_cursor())<cr>
|
||||||
" lspsaga stuff doesn't work
|
" lspsaga stuff doesn't work
|
||||||
nnoremap <leader>vd :Lspsaga peek_definition<CR>
|
" nnoremap <leader>vd :call Lspsaga peek_definition<CR>
|
||||||
nnoremap <leader>vrn :Lspsaga rename<CR><CR>
|
" nnoremap <leader>vrn :call Lspsaga rename<CR><CR>
|
||||||
nnoremap <leader>vh :Lspsaga hover_doc<CR>
|
" nnoremap <leader>vh :call Lspsaga hover_doc<CR>
|
||||||
nnoremap <leader>vca :Lspsaga code_action<CR>
|
" nnoremap <leader>vca :call Lspsaga code_action<CR>
|
||||||
nnoremap <leader>vsd :Lspsaga show_line_diagnostics<CR>
|
" nnoremap <leader>vsd :call Lspsaga show_line_diagnostics<CR>
|
||||||
nnoremap <leader>vs :Dasht<Space>
|
" nnoremap <leader>vn :call Lspsaga diagnostic_jump_prev<CR>
|
||||||
nnoremap <leader>vn :Lspsaga diagnostic_jump_prev<CR>
|
|
||||||
nnoremap <leader>co :Outline<CR>
|
|
||||||
" Trouble keybindings
|
|
||||||
nnoremap <leader>xx :Trouble diagnostics<CR>
|
|
||||||
nnoremap <leader>xw :Trouble workspace_diagnostics<CR>
|
|
||||||
nnoremap <leader>xd :Trouble document_diagnostics<CR>
|
|
||||||
nnoremap <leader>xl :Trouble loclist<CR>
|
|
||||||
nnoremap <leader>xq :Trouble quickfix<CR>
|
|
||||||
nnoremap <leader>xr :Trouble lsp_references<CR>
|
|
||||||
|
|
||||||
" Yank to system clipboard (y operations only, not d)
|
|
||||||
nnoremap y "+y
|
|
||||||
vnoremap y "+y
|
|
||||||
nnoremap Y "+Y
|
|
||||||
|
|
||||||
" Note-taking keybindings
|
|
||||||
nnoremap <leader>zz :ZkNew { title = vim.fn.input('Title: ') }<CR>
|
|
||||||
|
|
||||||
" dashboard
|
" dashboard
|
||||||
let g:dashboard_custom_header = [
|
let g:dashboard_custom_header = [
|
||||||
|
@ -408,7 +413,7 @@ in
|
||||||
|
|
||||||
" lua config
|
" lua config
|
||||||
lua <<EOF
|
lua <<EOF
|
||||||
local signs = { Error = "⮾ ", Warn = "⚠ ", Hint = "💡", Info = " " }
|
local signs = { Error = " ", Warn = " ", Hint = " ", Info = " " }
|
||||||
for type, icon in pairs(signs) do
|
for type, icon in pairs(signs) do
|
||||||
local hl = "DiagnosticSign" .. type
|
local hl = "DiagnosticSign" .. type
|
||||||
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
|
||||||
|
@ -459,14 +464,6 @@ in
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
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})
|
vim.api.nvim_set_keymap('n', '<leader>vt', ':call v:lua.toggle_diagnostics()<CR>', {noremap = true, silent = true})
|
||||||
|
|
||||||
-- autopairs
|
-- autopairs
|
||||||
|
@ -497,6 +494,22 @@ in
|
||||||
format = lspkind.cmp_format({
|
format = lspkind.cmp_format({
|
||||||
mode = 'symbol_text',
|
mode = 'symbol_text',
|
||||||
maxwidth = 50,
|
maxwidth = 50,
|
||||||
|
-- old format
|
||||||
|
-- format = function(entry, vim_item)
|
||||||
|
-- -- fancy icons and a name of kind
|
||||||
|
-- vim_item.kind = require("lspkind").presets.default[vim_item.kind] ..
|
||||||
|
-- " " .. vim_item.kind
|
||||||
|
-- -- set a name for each source
|
||||||
|
-- vim_item.menu = ({
|
||||||
|
-- buffer = "[Buffer]",
|
||||||
|
-- nvim_lsp = "[LSP]",
|
||||||
|
-- look = "[Look]",
|
||||||
|
-- path = "[Path]",
|
||||||
|
-- spell = "[Spell]",
|
||||||
|
-- calc = "[Calc]",
|
||||||
|
-- })[entry.source.name]
|
||||||
|
-- return vim_item
|
||||||
|
-- end
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
|
@ -548,174 +561,61 @@ in
|
||||||
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
|
cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = ' ' } }))
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
-- lsp-format removed, using conform.nvim instead
|
-- null-ls
|
||||||
require("nvim-navic").setup {
|
-- being very janky
|
||||||
icons = {
|
local null_ls = require("null-ls")
|
||||||
Constant = "π ",
|
null_ls.setup({
|
||||||
Function = "ƒ "
|
sources = {
|
||||||
}
|
null_ls.builtins.diagnostics.shellcheck,
|
||||||
}
|
null_ls.builtins.diagnostics.proselint.with({ filetypes = { "vimwiki", "mail", }, }),
|
||||||
|
-- null_ls.builtins.code_actions.statix,
|
||||||
-- Setup neo-tree
|
-- null_ls.builtins.diagnostics.clj_kondo,
|
||||||
require("neo-tree").setup {}
|
-- null_ls.builtins.formatting.isort,
|
||||||
|
-- null_ls.builtins.formatting.black,
|
||||||
-- Setup outline
|
|
||||||
require("outline").setup {}
|
|
||||||
|
|
||||||
-- Setup trouble
|
|
||||||
require("trouble").setup {}
|
|
||||||
|
|
||||||
-- Setup noice for floating command palette and notifications
|
|
||||||
require("noice").setup({
|
|
||||||
cmdline = {
|
|
||||||
enabled = true,
|
|
||||||
view = "cmdline_popup",
|
|
||||||
},
|
|
||||||
messages = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
popupmenu = {
|
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
notify = {
|
|
||||||
enabled = true,
|
|
||||||
view = "notify",
|
|
||||||
},
|
|
||||||
lsp = {
|
|
||||||
progress = {
|
|
||||||
enabled = true,
|
|
||||||
format = "lsp_progress",
|
|
||||||
format_done = "lsp_progress_done",
|
|
||||||
throttle = 1000 / 30, -- frequency to update lsp progress message
|
|
||||||
view = "mini",
|
|
||||||
},
|
|
||||||
override = {
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
["cmp.entry.get_documentation"] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
presets = {
|
|
||||||
command_palette = true,
|
|
||||||
long_message_to_split = true,
|
|
||||||
inc_rename = false,
|
|
||||||
lsp_doc_border = false,
|
|
||||||
},
|
|
||||||
views = {
|
|
||||||
cmdline_popup = {
|
|
||||||
border = {
|
|
||||||
style = "rounded",
|
|
||||||
padding = { 0, 1 },
|
|
||||||
},
|
|
||||||
filter_options = {},
|
|
||||||
win_options = {
|
|
||||||
winhighlight = "NormalFloat:NormalFloat,FloatBorder:FloatBorder",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Setup barbar (tabline with icons)
|
-- Setup lspconfig
|
||||||
require'barbar'.setup {
|
require("lsp-format").setup {}
|
||||||
icons = {
|
require("nvim-navic").setup {}
|
||||||
filetype = {
|
local format = require("lsp-format")
|
||||||
enabled = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
local navic = require("nvim-navic")
|
local navic = require("nvim-navic")
|
||||||
|
|
||||||
-- Setup conform.nvim for formatting
|
|
||||||
require("conform").setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
javascript = { "prettier", "lsp" },
|
|
||||||
typescript = { "prettier", "lsp" },
|
|
||||||
javascriptreact = { "prettier", "lsp" },
|
|
||||||
typescriptreact = { "prettier", "lsp" },
|
|
||||||
json = { "prettier", "lsp" },
|
|
||||||
html = { "prettier", "lsp" },
|
|
||||||
css = { "prettier", "lsp" },
|
|
||||||
yaml = { "prettier", "lsp" },
|
|
||||||
rust = { "lsp" },
|
|
||||||
go = { "lsp" },
|
|
||||||
lua = { "lsp" },
|
|
||||||
nix = { "nixfmt-rfc-style" },
|
|
||||||
clojure = { "lsp" },
|
|
||||||
fennel = { "lsp" },
|
|
||||||
terraform = { "lsp" },
|
|
||||||
bash = { "shfmt" },
|
|
||||||
sh = { "shfmt" },
|
|
||||||
},
|
|
||||||
format_on_save = {
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_fallback = true,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- lspsaga, code_action lightbulb is annoying
|
-- lspsaga, code_action lightbulb is annoying
|
||||||
local saga = require('lspsaga')
|
-- local saga = require('lspsaga')
|
||||||
saga.init_lsp_saga({
|
-- saga.init_lsp_saga({
|
||||||
border_style = "rounded",
|
-- code_action_lightbulb = {
|
||||||
code_action_icon = "",
|
-- enable = true,
|
||||||
code_action_num_shortcut = true,
|
-- enable_in_insert = true,
|
||||||
code_action_lightbulb = {
|
-- cache_code_action = true,
|
||||||
enable = false,
|
-- sign = true,
|
||||||
enable_in_insert = false,
|
-- update_time = 150,
|
||||||
cache_code_action = true,
|
-- sign_priority = 4,
|
||||||
sign = true,
|
-- virtual_text = false,
|
||||||
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()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
-- fennel-ls is bleeding edge
|
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = require('lspconfig')
|
||||||
require("lspconfig.configs")["fennel-ls"] = {
|
local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver', 'sumneko_lua' }
|
||||||
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', 'ts_ls', 'lua_ls', 'nil_ls', 'gopls', 'bashls'}
|
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup {
|
lspconfig[lsp].setup {
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
|
format.on_attach(client)
|
||||||
navic.attach(client, bufnr)
|
navic.attach(client, bufnr)
|
||||||
end,
|
end,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
-- rnix doesn't support gps
|
||||||
-- fennel-ls doesn't support navic
|
require('lspconfig').rnix.setup {
|
||||||
lspconfig['fennel-ls'].setup {
|
|
||||||
on_attach = function(client, bufnr)
|
on_attach = function(client, bufnr)
|
||||||
-- fennel-ls setup without navic
|
format.on_attach(client)
|
||||||
end,
|
end,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- deprecated pylsp
|
-- deprecated pylsp
|
||||||
-- require('lspconfig').pylsp.setup {
|
-- require('lspconfig').pylsp.setup {
|
||||||
-- on_attach = function(client, bufnr)
|
-- on_attach = function(client, bufnr)
|
||||||
|
@ -745,8 +645,8 @@ in
|
||||||
|
|
||||||
-- treesitter
|
-- treesitter
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- parser_install_dir = "~/.local/share/nvim/site/parser/",
|
parser_install_dir = "~/.local/share/nvim/site/parser/",
|
||||||
-- ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider', 'beancount', 'janet'},
|
ensure_installed={'nix', 'clojure', 'python', 'fennel', 'lua', 'html', 'css', 'regex', 'supercollider', 'beancount'},
|
||||||
highlight = { enabled = true, additional_vim_regex_highting = true, },
|
highlight = { enabled = true, additional_vim_regex_highting = true, },
|
||||||
textobjects = { enabled = true },
|
textobjects = { enabled = true },
|
||||||
}
|
}
|
||||||
|
@ -764,7 +664,7 @@ in
|
||||||
function()
|
function()
|
||||||
local msg = 'No Active Lsp'
|
local msg = 'No Active Lsp'
|
||||||
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype')
|
||||||
local clients = vim.lsp.get_clients()
|
local clients = vim.lsp.get_active_clients()
|
||||||
if next(clients) == nil then
|
if next(clients) == nil then
|
||||||
return msg
|
return msg
|
||||||
end
|
end
|
||||||
|
@ -790,7 +690,7 @@ in
|
||||||
local map = vim.api.nvim_set_keymap
|
local map = vim.api.nvim_set_keymap
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
|
map('n', '<TAB>', '<CMD>lua require("FTerm").toggle()<CR>', opts)
|
||||||
map('t', '<TAB>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
|
map('t', '<A-i>', '<C-\\><C-n><CMD>lua require("FTerm").toggle()<CR>', opts)
|
||||||
|
|
||||||
-- Custom functions
|
-- Custom functions
|
||||||
function update_date()
|
function update_date()
|
||||||
|
@ -827,17 +727,11 @@ in
|
||||||
)
|
)
|
||||||
|
|
||||||
-- auto session
|
-- auto session
|
||||||
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
|
||||||
require('auto-session').setup {
|
require('auto-session').setup {
|
||||||
log_level = 'error',
|
log_level = 'info',
|
||||||
auto_session_suppress_dirs = {'~/', '/tmp', '/'},
|
auto_session_suppress_dirs = {'~/'}
|
||||||
auto_session_enable_last_session = false,
|
|
||||||
auto_session_root_dir = vim.fn.stdpath('data').."/sessions/",
|
|
||||||
auto_session_enabled = true,
|
|
||||||
auto_save_enabled = nil,
|
|
||||||
auto_restore_enabled = nil,
|
|
||||||
auto_session_create_enabled = nil,
|
|
||||||
}
|
}
|
||||||
|
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal"
|
||||||
|
|
||||||
require("which-key").setup{}
|
require("which-key").setup{}
|
||||||
require('leap').set_default_keymaps()
|
require('leap').set_default_keymaps()
|
||||||
|
@ -865,45 +759,8 @@ in
|
||||||
['<F2>'] = map_expr('s.meter'),
|
['<F2>'] = map_expr('s.meter'),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-- You gotta run :SCNvimGenerateAssets for this first
|
|
||||||
-- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
|
-- require("luasnip").add_snippets("supercollider", require("scnvim/utils").get_snippets())
|
||||||
|
|
||||||
-- zk
|
|
||||||
require("zk").setup()
|
|
||||||
-- vim.api.nvim_set_keymap("n", "<leader>zn", "<Cmd>ZkNew { title = vim.fn.input('Title: ') }<CR>", opts)
|
|
||||||
|
|
||||||
-- Open notes.
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>zo", "<Cmd>ZkNotes { sort = { 'modified' } }<CR>", opts)
|
|
||||||
-- Open notes associated with the selected tags.
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>zt", "<Cmd>ZkTags<CR>", opts)
|
|
||||||
|
|
||||||
local map = vim.api.nvim_set_keymap
|
|
||||||
-- Search for the notes matching a given query.
|
|
||||||
vim.api.nvim_set_keymap("n", "<leader>zf", "<Cmd>ZkNotes { sort = { 'modified' }, match = { vim.fn.input('Search: ') } }<CR>", opts)
|
|
||||||
-- Search for the notes matching the current visual selection.
|
|
||||||
vim.api.nvim_set_keymap("v", "<leader>zf", ":'<,'>ZkMatch<CR>", opts)
|
|
||||||
map("n", "<CR>", "<Cmd>lua vim.lsp.buf.definition()<CR>", opts)
|
|
||||||
|
|
||||||
-- Create a new note after asking for its title.
|
|
||||||
-- This overrides the global `<leader>zn` mapping to create the note in the same directory as the current buffer.
|
|
||||||
-- map("n", "<leader>zn", "<Cmd>ZkNew { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
|
|
||||||
-- Create a new note in the same directory as the current buffer, using the current selection for title.
|
|
||||||
-- map("v", "<leader>znt", ":'<,'>ZkNewFromTitleSelection { dir = vim.fn.expand('%:p:h') }<CR>", opts)
|
|
||||||
-- Create a new note in the same directory as the current buffer, using the current selection for note content and asking for its title.
|
|
||||||
map("v", "<leader>znc", ":'<,'>ZkNewFromContentSelection { dir = vim.fn.expand('%:p:h'), title = vim.fn.input('Title: ') }<CR>", opts)
|
|
||||||
|
|
||||||
-- Open notes linking to the current buffer.
|
|
||||||
map("n", "<leader>zb", "<Cmd>ZkBacklinks<CR>", opts)
|
|
||||||
-- Alternative for backlinks using pure LSP and showing the source context.
|
|
||||||
--map('n', '<leader>zb', '<Cmd>lua vim.lsp.buf.references()<CR>', opts)
|
|
||||||
-- Open notes linked by the current buffer.
|
|
||||||
map("n", "<leader>zl", "<Cmd>ZkLinks<CR>", opts)
|
|
||||||
|
|
||||||
-- Preview a linked note.
|
|
||||||
map("n", "K", "<Cmd>lua vim.lsp.buf.hover()<CR>", opts)
|
|
||||||
-- Open the code actions for a visual selection.
|
|
||||||
map("v", "<leader>za", ":'<,'>lua vim.lsp.buf.range_code_action()<CR>", opts)
|
|
||||||
|
|
||||||
-- zen mode
|
-- zen mode
|
||||||
require('zen-mode').setup{
|
require('zen-mode').setup{
|
||||||
window = {
|
window = {
|
||||||
|
@ -949,71 +806,36 @@ in
|
||||||
}
|
}
|
||||||
require('twilight').setup{}
|
require('twilight').setup{}
|
||||||
|
|
||||||
-- hologram
|
|
||||||
require('hologram').setup{
|
|
||||||
auto_display = false -- WIP automatic markdown image display, may be prone to breaking
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Setup Navigator.nvim
|
|
||||||
require('Navigator').setup {
|
|
||||||
disable_on_zoom = true,
|
|
||||||
mux = 'auto', -- auto-detect tmux
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Set up Navigator.nvim keybindings
|
|
||||||
vim.keymap.set({'n', 't'}, '<M-h>', '<CMD>NavigatorLeft<CR>')
|
|
||||||
vim.keymap.set({'n', 't'}, '<M-j>', '<CMD>NavigatorDown<CR>')
|
|
||||||
vim.keymap.set({'n', 't'}, '<M-k>', '<CMD>NavigatorUp<CR>')
|
|
||||||
vim.keymap.set({'n', 't'}, '<M-l>', '<CMD>NavigatorRight<CR>')
|
|
||||||
|
|
||||||
-- Disable Ctrl+V in nvim so Kitty can handle paste
|
|
||||||
vim.keymap.set({'n', 'v', 'i'}, '<C-v>', '<Nop>', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- Pane resizing with Alt+Shift+hjkl (to match tmux)
|
|
||||||
vim.keymap.set('n', '<M-S-h>', '<Cmd>vertical resize -2<CR>', {silent = true})
|
|
||||||
vim.keymap.set('n', '<M-S-j>', '<Cmd>resize -2<CR>', {silent = true})
|
|
||||||
vim.keymap.set('n', '<M-S-k>', '<Cmd>resize +2<CR>', {silent = true})
|
|
||||||
vim.keymap.set('n', '<M-S-l>', '<Cmd>vertical resize +2<CR>', {silent = true})
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
'';
|
'';
|
||||||
extraPackages = with pkgs // customPlugins; [
|
extraPackages = with pkgs // customPlugins; [
|
||||||
# used to compile tree-sitter grammar
|
# used to compile tree-sitter grammar
|
||||||
|
tree-sitter
|
||||||
python-with-my-packages
|
python-with-my-packages
|
||||||
nodejs
|
nodejs
|
||||||
clojure-lsp
|
clojure-lsp
|
||||||
clojure
|
clojure
|
||||||
nil
|
rnix-lsp
|
||||||
terraform-lsp
|
terraform-lsp
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
clj-kondo
|
clj-kondo
|
||||||
zls
|
zls
|
||||||
gopls
|
|
||||||
gcc
|
gcc
|
||||||
pyright
|
nodePackages_latest.pyright
|
||||||
shellcheck
|
shellcheck
|
||||||
proselint
|
proselint
|
||||||
statix
|
statix
|
||||||
nodePackages.typescript
|
nodePackages.typescript
|
||||||
nodePackages.typescript-language-server
|
nodePackages.typescript-language-server
|
||||||
nodePackages.bash-language-server
|
sumneko-lua-language-server
|
||||||
luajitPackages.lua-lsp
|
|
||||||
fennel-ls
|
|
||||||
nixfmt-rfc-style
|
|
||||||
shfmt
|
|
||||||
zk
|
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins // customPlugins; [
|
plugins = with pkgs.vimPlugins // customPlugins; [
|
||||||
# ui
|
# ui
|
||||||
lualine-nvim
|
lualine-nvim
|
||||||
fzf-vim
|
fzf-vim
|
||||||
neo-tree-nvim
|
nerdtree
|
||||||
outline-nvim
|
|
||||||
noice-nvim
|
|
||||||
nui-nvim
|
|
||||||
trouble-nvim
|
|
||||||
neovim-ayu
|
neovim-ayu
|
||||||
rainbow_parentheses-vim
|
rainbow_parentheses-vim
|
||||||
vim-surround
|
vim-surround
|
||||||
|
@ -1023,7 +845,7 @@ in
|
||||||
telescope-nvim
|
telescope-nvim
|
||||||
plenary-nvim
|
plenary-nvim
|
||||||
nvim-navic
|
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
|
||||||
nvim-treesitter-context
|
nvim-treesitter-context
|
||||||
my-fterm
|
my-fterm
|
||||||
barbar-nvim
|
barbar-nvim
|
||||||
|
@ -1033,8 +855,7 @@ in
|
||||||
nvim-peekup
|
nvim-peekup
|
||||||
zen-mode-nvim
|
zen-mode-nvim
|
||||||
twilight-nvim
|
twilight-nvim
|
||||||
my-lspsaga
|
lspsaga-nvim
|
||||||
vim-dasht
|
|
||||||
|
|
||||||
# language
|
# language
|
||||||
vim-nix
|
vim-nix
|
||||||
|
@ -1049,11 +870,10 @@ in
|
||||||
vimwiki
|
vimwiki
|
||||||
taskwiki
|
taskwiki
|
||||||
vim-zettel
|
vim-zettel
|
||||||
hologram-nvim
|
|
||||||
zk-nvim
|
|
||||||
|
|
||||||
# lsp stuff
|
# lsp stuff
|
||||||
# nvim-lint
|
# nvim-lint
|
||||||
|
null-ls-nvim
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
nvim-cmp
|
nvim-cmp
|
||||||
cmp-nvim-lsp
|
cmp-nvim-lsp
|
||||||
|
@ -1066,7 +886,7 @@ in
|
||||||
nvim-autopairs
|
nvim-autopairs
|
||||||
cmp_luasnip
|
cmp_luasnip
|
||||||
luasnip
|
luasnip
|
||||||
conform-nvim
|
lsp-format
|
||||||
friendly-snippets
|
friendly-snippets
|
||||||
lspkind-nvim
|
lspkind-nvim
|
||||||
|
|
||||||
|
@ -1086,7 +906,6 @@ in
|
||||||
nvim-luapad
|
nvim-luapad
|
||||||
scnvim
|
scnvim
|
||||||
leap
|
leap
|
||||||
Navigator-nvim
|
|
||||||
vim-beancount
|
vim-beancount
|
||||||
# vimtex
|
# vimtex
|
||||||
# custom
|
# custom
|
||||||
|
@ -1095,7 +914,7 @@ in
|
||||||
# vim-processing
|
# vim-processing
|
||||||
];
|
];
|
||||||
withPython3 = true;
|
withPython3 = true;
|
||||||
extraPython3Packages = pkgs: with pkgs; [ tasklib six packaging ];
|
extraPython3Packages = pkgs: with pkgs; [ tasklib six ];
|
||||||
vimAlias = true;
|
vimAlias = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
{
|
|
||||||
"console.log": {
|
|
||||||
"prefix": "clog",
|
|
||||||
"body": [
|
|
||||||
"console.log('$1')"
|
|
||||||
],
|
|
||||||
"description": "Log output to console"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
home.file.".ssh/config".text = ''
|
|
||||||
Host mossnet.lan
|
|
||||||
ForwardAgent Yes
|
|
||||||
Host sealight.xyz
|
|
||||||
ForwardAgent Yes
|
|
||||||
Host git.sealight.xyz
|
|
||||||
ForwardAgent Yes
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,39 +0,0 @@
|
||||||
{ 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" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
task rc.bulk=0 rc.confirmation=off rc.dependency.confirmation=off rc.recurrence.confirmation=off "$@" modify -idea +backlog
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
task rc.bulk=0 rc.confirmation=off rc.dependency.confirmation=off rc.recurrence.confirmation=off "$@" modify -idea -backlog
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
task rc.bulk=0 rc.confirmation=off rc.dependency.confirmation=off rc.recurrence.confirmation=off "$@" modify +idea -backlog
|
|
|
@ -34,16 +34,16 @@ def write_note(task_id: int):
|
||||||
if not os.path.exists(notes_file):
|
if not os.path.exists(notes_file):
|
||||||
logging.info("Adding description to empty notes file")
|
logging.info("Adding description to empty notes file")
|
||||||
task_description = os.popen(f"task _get {task_id}.description").read()
|
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_project = os.popen(f"task _get {task_id}.project").read().strip("\n")
|
||||||
task_tags = os.popen(f"task _get {task_id}.tags").read().split(",")
|
task_tags = os.popen(f"task _get {task_id}.tags").read().split(",")
|
||||||
if len(task_tags):
|
if len(task_tags):
|
||||||
task_tags = ":".join(task_tags).strip("\n") + ":"
|
task_tags = ":".join(task_tags).strip("\n") + ":"
|
||||||
time = datetime.datetime.now().strftime("%y-%m-%d %H:%M")
|
time = datetime.datetime.now().strftime("%y-%m-%d %H:%M")
|
||||||
|
|
||||||
with open(notes_file, "w") as f:
|
with open(notes_file, "w") as f:
|
||||||
f.write(f"%title {task_description}")
|
f.write(f"%title: {task_description}")
|
||||||
f.write(f":task:{task_project}:{task_tags if len(task_tags) else ''}\n")
|
f.write(f":task:{task_project}:{task_tags if len(task_tags) else ''}\n")
|
||||||
f.write(f"%date {time}\n\n")
|
f.write(f"%date: {time}\n\n")
|
||||||
f.flush()
|
f.flush()
|
||||||
|
|
||||||
os.execlp(EDITOR, EDITOR, notes_file)
|
os.execlp(EDITOR, EDITOR, notes_file)
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
-----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-----
|
|
|
@ -1,19 +1,9 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
# If you're setting up taskwarrior again, there's a task-setup.sh script in seafile
|
||||||
home.file = {
|
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".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/task-note".source = ./bin/task-note.py;
|
||||||
".local/bin/set-idea".source = ./bin/set-idea.sh;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
-----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-----
|
|
|
@ -15,7 +15,7 @@ data.location=~/.task
|
||||||
taskd.server=task.mossnet.lan:53589
|
taskd.server=task.mossnet.lan:53589
|
||||||
#taskd.server=10.0.69.4:53589
|
#taskd.server=10.0.69.4:53589
|
||||||
taskd.ca=~/.task/keys/ca.cert
|
taskd.ca=~/.task/keys/ca.cert
|
||||||
taskd.key=/run/agenix/taskwarrior-private
|
taskd.key=~/.task/keys/private.key
|
||||||
taskd.certificate=~/.task/keys/public.cert
|
taskd.certificate=~/.task/keys/public.cert
|
||||||
taskd.trust=ignore hostname
|
taskd.trust=ignore hostname
|
||||||
taskd.credentials=mossnet\/anish\/1647259c-e340-405c-a38b-11ac18e34688
|
taskd.credentials=mossnet\/anish\/1647259c-e340-405c-a38b-11ac18e34688
|
||||||
|
@ -29,7 +29,7 @@ taskd.credentials=mossnet\/anish\/1647259c-e340-405c-a38b-11ac18e34688
|
||||||
#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-green-256.theme
|
||||||
#include /nix/store/nv662d85k32kkpqidrj64qy1lnihac4c-taskwarrior-2.5.3/share/doc/task/rc/dark-blue-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
|
# 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/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-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-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/dark-gray-blue-256.theme
|
||||||
|
@ -42,11 +42,12 @@ news.version=2.6.0
|
||||||
|
|
||||||
## Contexts
|
## Contexts
|
||||||
context.poor.read=-purchase
|
context.poor.read=-purchase
|
||||||
context.dev.read=+dev or +ops -work
|
context.dev.read=+dev
|
||||||
context.home.read=-work
|
context.ops.read=+ops
|
||||||
context.work.read=+work
|
context.bucket.read=+in
|
||||||
context.work.write=+work
|
context.focused=(priority:H or priority:M) -idea -backlog -finances urgency > 5.0
|
||||||
context.bucket.read=+idea
|
# context.work=+Work -idea -personal
|
||||||
|
# context.offwork=-Work
|
||||||
|
|
||||||
## Reports
|
## Reports
|
||||||
|
|
||||||
|
@ -58,35 +59,17 @@ report.list.labels=ID,P,Project,Tags,R,Sch,Due,Until,Description
|
||||||
report.in.columns=id,project,tags,description
|
report.in.columns=id,project,tags,description
|
||||||
report.in.labels=ID,Proj,Tags,Description
|
report.in.labels=ID,Proj,Tags,Description
|
||||||
report.in.description=Inbox
|
report.in.description=Inbox
|
||||||
report.in.filter=status:pending limit:page (+idea)
|
report.in.filter=status:pending limit:page (+in)
|
||||||
|
|
||||||
# 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
|
# Unblocked
|
||||||
report.unblocked.labels=ID,Deps,Proj,Tags,Due,Active,Description
|
report.unblocked.labels=ID,Deps,Proj,Tags,Due,Active,Description
|
||||||
report.unblocked.columns=id,depends,project,tags,due,start.active,description
|
report.unblocked.columns=id,depends,project,tags,due,start.active,description
|
||||||
|
|
||||||
# Next
|
# Next
|
||||||
# It's not a good idea to filter this view, since modify depends on the next view
|
report.next.filter=(status:pending -in -backlog pro.not:ideas limit:0)
|
||||||
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.labels=ID,Active,Deps,P,Project,Tag,Recur,S,Due,Until,Description
|
||||||
report.next.columns=id,start.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description
|
report.next.columns=id,start.age,depends,priority,project,tags,recur,scheduled.countdown,due.relative,until.remaining,description
|
||||||
|
|
||||||
# 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
|
||||||
urgency.user.project.wait.coefficient=-10.0
|
urgency.user.project.wait.coefficient=-10.0
|
||||||
urgency.user.project.craft.coefficient=1.9
|
urgency.user.project.craft.coefficient=1.9
|
||||||
|
@ -95,11 +78,6 @@ urgency.user.tag.think.coefficient=-7.0
|
||||||
urgency.user.tag.purchase.coefficient=-1.2
|
urgency.user.tag.purchase.coefficient=-1.2
|
||||||
urgency.user.project.curve.glam.coefficient=-1.3
|
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
|
# Colors
|
||||||
color.project.chores=blue
|
color.project.chores=blue
|
||||||
color.tag.dev=cyan
|
color.tag.dev=cyan
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
home.file.".tmux.conf".source = ./tmux.conf;
|
|
||||||
}
|
|
|
@ -1,85 +0,0 @@
|
||||||
set -g base-index 1
|
|
||||||
setw -g pane-base-index 1
|
|
||||||
|
|
||||||
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
|
|
||||||
set -g default-terminal "xterm-256color"
|
|
||||||
set -ga terminal-overrides ",*256col*:Tc"
|
|
||||||
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
|
|
||||||
set-environment -g COLORTERM "truecolor"
|
|
||||||
|
|
||||||
# Mouse works as expected
|
|
||||||
set-option -g mouse on
|
|
||||||
# easy-to-remember split pane commands
|
|
||||||
bind | split-window -h -c "#{pane_current_path}"
|
|
||||||
bind - split-window -v -c "#{pane_current_path}"
|
|
||||||
|
|
||||||
# don't rename windows automatically
|
|
||||||
set-option -g allow-rename off
|
|
||||||
|
|
||||||
# DESIGN TWEAKS
|
|
||||||
|
|
||||||
# don't do anything when a 'bell' rings
|
|
||||||
set -g visual-activity off
|
|
||||||
set -g visual-bell off
|
|
||||||
set -g visual-silence off
|
|
||||||
setw -g monitor-activity off
|
|
||||||
set -g bell-action none
|
|
||||||
|
|
||||||
# clock mode
|
|
||||||
setw -g clock-mode-colour yellow
|
|
||||||
|
|
||||||
# copy mode
|
|
||||||
setw -g mode-style 'fg=black bg=green bold'
|
|
||||||
|
|
||||||
# panes
|
|
||||||
set -g pane-border-style 'fg=green'
|
|
||||||
set -g pane-active-border-style 'fg=yellow'
|
|
||||||
|
|
||||||
# statusbar
|
|
||||||
set -g status-position bottom
|
|
||||||
set -g status-justify left
|
|
||||||
set -g status-style 'fg=green'
|
|
||||||
|
|
||||||
set -g status-left ''
|
|
||||||
set -g status-left-length 10
|
|
||||||
|
|
||||||
set -g status-right-style 'fg=black bg=yellow'
|
|
||||||
set -g status-right '%Y-%m-%d %H:%M '
|
|
||||||
set -g status-right-length 50
|
|
||||||
|
|
||||||
setw -g window-status-current-style 'fg=black bg=green'
|
|
||||||
setw -g window-status-current-format ' #I #W #F '
|
|
||||||
|
|
||||||
setw -g window-status-style 'fg=green bg=black'
|
|
||||||
setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F '
|
|
||||||
|
|
||||||
setw -g window-status-bell-style 'fg=yellow bg=green bold'
|
|
||||||
|
|
||||||
# messages
|
|
||||||
set -g message-style 'fg=yellow bg=green bold'
|
|
||||||
|
|
||||||
# Unbind Ctrl+V so it passes through to Kitty for paste
|
|
||||||
unbind C-v
|
|
||||||
|
|
||||||
# Vim-aware pane navigation with Alt+hjkl
|
|
||||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
|
||||||
bind-key -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
|
|
||||||
bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
|
|
||||||
bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
|
|
||||||
bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
|
|
||||||
|
|
||||||
# Window navigation with Alt+n/p
|
|
||||||
bind-key -n M-n next-window
|
|
||||||
bind-key -n M-p previous-window
|
|
||||||
|
|
||||||
# Pane resizing with Alt+Shift+hjkl
|
|
||||||
bind-key -n M-S-h resize-pane -L 2
|
|
||||||
bind-key -n M-S-j resize-pane -D 2
|
|
||||||
bind-key -n M-S-k resize-pane -U 2
|
|
||||||
bind-key -n M-S-l resize-pane -R 2
|
|
||||||
|
|
||||||
# Copy mode setup
|
|
||||||
bind v copy-mode
|
|
||||||
setw -g mode-keys vi
|
|
||||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
||||||
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
|
|
|
@ -11,15 +11,13 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# No systemd emergency mode (can't reliably be accessed over SSH)
|
|
||||||
systemd.enableEmergencyMode = false;
|
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
boot.loader.efi.canTouchEfiVariables = false;
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
|
version = 2;
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
enableCryptodisk = true;
|
enableCryptodisk = true;
|
||||||
efiInstallAsRemovable = true;
|
efiInstallAsRemovable = true;
|
||||||
|
@ -30,16 +28,6 @@
|
||||||
"/keyfile1.bin" = /etc/secrets/initrd/keyfile1.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 = {
|
boot.initrd.luks.devices = {
|
||||||
"root" = {
|
"root" = {
|
||||||
#name = "root";
|
#name = "root";
|
||||||
|
@ -66,10 +54,6 @@
|
||||||
address = "192.168.1.240";
|
address = "192.168.1.240";
|
||||||
prefixLength = 24;
|
prefixLength = 24;
|
||||||
}];
|
}];
|
||||||
ipv6.addresses = [{
|
|
||||||
address = "fd7d:587a:4300:1::240";
|
|
||||||
prefixLength = 64;
|
|
||||||
}];
|
|
||||||
ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
|
ipv4.routes = [{ address = "192.168.1.0"; prefixLength = 24; via = "192.168.1.1"; }];
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
};
|
};
|
||||||
|
@ -89,12 +73,16 @@
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.interfaces.wlp3s0.useDHCP = true;
|
networking.interfaces.wlp3s0.useDHCP = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "Australia/Brisbane";
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||||
|
sound.enable = false;
|
||||||
|
|
||||||
programs.gnupg.agent.enable = true;
|
programs.gnupg.agent.enable = true;
|
||||||
programs.gnupg.agent.pinentryPackage = pkgs.pinentry-curses;
|
programs.gnupg.agent.pinentryFlavor = "curses";
|
||||||
programs.gnupg.agent.enableSSHSupport = true;
|
programs.gnupg.agent.enableSSHSupport = true;
|
||||||
|
|
||||||
# This value determines the NixOS release with which your system is to be
|
# This value determines the NixOS release with which your system is to be
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ self, pkgs, ... }: {
|
{ self, pkgs, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
../profiles/core
|
../profiles/core
|
||||||
|
@ -6,36 +7,31 @@
|
||||||
../profiles/taskd
|
../profiles/taskd
|
||||||
../profiles/shaarli
|
../profiles/shaarli
|
||||||
../profiles/dns
|
../profiles/dns
|
||||||
# ../profiles/monitoring
|
../profiles/monitoring
|
||||||
../profiles/nfs
|
../profiles/nfs
|
||||||
../profiles/gonic
|
../profiles/gonic
|
||||||
../profiles/headphones
|
../profiles/headphones
|
||||||
../profiles/radicale
|
../profiles/radicale
|
||||||
# ../profiles/seafile # waiting for https://github.com/NixOS/nixpkgs/pull/249523 to be merged
|
../profiles/seafile
|
||||||
../profiles/syncthing
|
../profiles/syncthing
|
||||||
../profiles/dhyan
|
../profiles/dhyan
|
||||||
../profiles/calibre
|
../profiles/calibre
|
||||||
../profiles/wallabag
|
../profiles/wallabag
|
||||||
../profiles/finance
|
../profiles/finance
|
||||||
../profiles/sync/website
|
|
||||||
../profiles/sync/music
|
|
||||||
../profiles/grasp
|
|
||||||
# ../profiles/archivebox
|
# ../profiles/archivebox
|
||||||
# ../profiles/woodpecker-agent
|
|
||||||
# ../profiles/jellyfin
|
|
||||||
../profiles/ulogger-server
|
|
||||||
../profiles/immich
|
|
||||||
../profiles/jacket
|
|
||||||
../profiles/gpodder
|
|
||||||
../profiles/transmission
|
|
||||||
#../profiles/postgres_upgrade_script
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# For some reason this doesn't work in the profile, but does over here??
|
||||||
|
# Something weird in the way I'm importing nixpkgs in the profile or something
|
||||||
|
services.grasp.enable = true;
|
||||||
|
services.grasp.path = "/home/anish/kitaab/grasp/grasp.wiki";
|
||||||
|
services.grasp.user = "anish";
|
||||||
|
|
||||||
# Backups
|
# Backups
|
||||||
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
|
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
|
||||||
services.postgresqlBackup = {
|
services.postgresqlBackup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
databases = [ "wallabag" "immich" "ulogger" ];
|
databases = [ "wallabag" ];
|
||||||
location = "/var/backup/postgresql";
|
location = "/var/backup/postgresql";
|
||||||
};
|
};
|
||||||
mossnet.backup = {
|
mossnet.backup = {
|
||||||
|
@ -51,21 +47,12 @@
|
||||||
# "/home/anish/usr/nonfiction" # syncthing
|
# "/home/anish/usr/nonfiction" # syncthing
|
||||||
"/home/anish/usr/finance" # beancount
|
"/home/anish/usr/finance" # beancount
|
||||||
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
|
"/mnt/two/postgres" # sealight postgres backups TODO remove once moved to capsul
|
||||||
"/mnt/two/photos"
|
|
||||||
"/mnt/two/music"
|
|
||||||
];
|
];
|
||||||
# seafile
|
# seafile
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ lm_sensors ];
|
|
||||||
hardware.fancontrol = {
|
|
||||||
enable = false;
|
|
||||||
config = '''';
|
|
||||||
};
|
|
||||||
|
|
||||||
age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
|
age.secrets.box-wg.file = "${self}/secrets/box-wg.age";
|
||||||
age.secrets.box-wg.owner = "anish";
|
age.secrets.box-wg.owner = "anish";
|
||||||
age.secrets.borg-key.file = "${self}/secrets/borg-key.age";
|
|
||||||
mossnet.wg = {
|
mossnet.wg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ips = [ "10.0.69.4/24" ];
|
ips = [ "10.0.69.4/24" ];
|
||||||
|
|
|
@ -30,33 +30,18 @@
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/0f857c6e-509d-436f-9e78-bc25f1b0d23b";
|
device = "/dev/disk/by-uuid/0f857c6e-509d-436f-9e78-bc25f1b0d23b";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = [
|
|
||||||
"noatime"
|
|
||||||
"nodiratime"
|
|
||||||
"nofail"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/two" =
|
fileSystems."/mnt/two" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/5bc894bf-ed87-4c30-aab4-87e154e0cd08";
|
device = "/dev/disk/by-uuid/5bc894bf-ed87-4c30-aab4-87e154e0cd08";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = [
|
|
||||||
"noatime"
|
|
||||||
"nodiratime"
|
|
||||||
"nofail"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/mnt/three" =
|
fileSystems."/mnt/three" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/0be3ded1-9c8b-40aa-94ca-dc2297d5988e";
|
device = "/dev/disk/by-uuid/0be3ded1-9c8b-40aa-94ca-dc2297d5988e";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
options = [
|
|
||||||
"noatime"
|
|
||||||
"nodiratime"
|
|
||||||
"nofail"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
|
|
|
@ -8,9 +8,11 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.version = 2;
|
||||||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||||
|
|
||||||
networking.hostName = "cube"; # Define your hostname.
|
networking.hostName = "cube"; # Define your hostname.
|
||||||
|
time.timeZone = "Australia/Brisbane";
|
||||||
|
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.interfaces.ens3.useDHCP = true;
|
networking.interfaces.ens3.useDHCP = true;
|
||||||
|
|
|
@ -6,11 +6,4 @@
|
||||||
../profiles/server
|
../profiles/server
|
||||||
../profiles/site
|
../profiles/site
|
||||||
];
|
];
|
||||||
|
|
||||||
services.nginx.enable = true;
|
|
||||||
services.nginx.virtualHosts."coaching.lakhwara.com" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = { root = "/var/lib/coaching"; index = "/index.html"; };
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [ ./hardware-configuration.nix ];
|
imports = [ ./hardware-configuration.nix ];
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.version = 2;
|
||||||
# Define on which hard drive you want to install Grub.
|
# Define on which hard drive you want to install Grub.
|
||||||
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
||||||
|
|
||||||
|
@ -27,6 +28,8 @@
|
||||||
networking.hostName = "curve";
|
networking.hostName = "curve";
|
||||||
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
time.timeZone = "Australia/Brisbane";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
# console = {
|
# console = {
|
||||||
|
@ -34,5 +37,7 @@
|
||||||
# keyMap = "us";
|
# keyMap = "us";
|
||||||
# };
|
# };
|
||||||
|
|
||||||
services.libinput.enable = true;
|
sound.enable = true;
|
||||||
|
|
||||||
|
services.xserver.libinput.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +1,31 @@
|
||||||
{ self, pkgs, ... }: {
|
{ self, pkgs, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
../users/anish
|
../users/anish
|
||||||
../profiles/core
|
../profiles/core
|
||||||
../profiles/bluetooth
|
../profiles/bluetooth
|
||||||
../profiles/music
|
../profiles/music
|
||||||
|
../profiles/sync/kitaab
|
||||||
|
../profiles/sync/website
|
||||||
../profiles/sync/cal
|
../profiles/sync/cal
|
||||||
../profiles/wifi
|
../profiles/wifi
|
||||||
../profiles/desktop
|
../profiles/desktop
|
||||||
../profiles/mimetypes
|
../profiles/mimetypes
|
||||||
../profiles/syncthing
|
../profiles/syncthing
|
||||||
../profiles/mossnet-hosts
|
../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
|
# home-manager.users.anish = import ../../home/gui;
|
||||||
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
|
# Speed up boot by removing dependency on network
|
||||||
systemd = {
|
systemd = {
|
||||||
targets.network-online.wantedBy =
|
targets.network-online.wantedBy = pkgs.lib.mkForce [ ]; # Normally ["multi-user.target"]
|
||||||
pkgs.lib.mkForce [ ]; # Normally ["multi-user.target"]
|
services.NetworkManager-wait-online.wantedBy = pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
|
||||||
services.NetworkManager-wait-online.wantedBy =
|
|
||||||
pkgs.lib.mkForce [ ]; # Normally ["network-online.target"]
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.gnupg.agent.enable = true;
|
||||||
|
programs.gnupg.agent.pinentryFlavor = "gnome3";
|
||||||
|
|
||||||
fileSystems."/mnt/ftp" = {
|
fileSystems."/mnt/ftp" = {
|
||||||
device = "192.168.1.240:/home/ftp";
|
device = "192.168.1.240:/home/ftp";
|
||||||
|
@ -69,15 +56,8 @@
|
||||||
|
|
||||||
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
|
# lazy enable of ports necessary for KDE connect which is installed via cli home profile (for some reason?)
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [ 22 4173 ]; # allow ssh
|
allowedTCPPortRanges = [{ from = 1714; to = 1764; }];
|
||||||
allowedTCPPortRanges = [{
|
allowedUDPPortRanges = [{ from = 1714; to = 1764; }];
|
||||||
from = 1714;
|
|
||||||
to = 1764;
|
|
||||||
}];
|
|
||||||
allowedUDPPortRanges = [{
|
|
||||||
from = 1714;
|
|
||||||
to = 1764;
|
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets.curve-wg.file = "${self}/secrets/curve-wg.age";
|
age.secrets.curve-wg.file = "${self}/secrets/curve-wg.age";
|
||||||
|
@ -89,11 +69,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
|
age.secrets.borg-password.file = "${self}/secrets/borg-password.age";
|
||||||
age.secrets.borg-key.file = "${self}/secrets/borg-key.age";
|
|
||||||
mossnet.backup = {
|
mossnet.backup = {
|
||||||
enable = true;
|
enable = true;
|
||||||
name = "curve";
|
name = "curve";
|
||||||
paths = [ "/home/anish/usr" "/home/anish/.ssh" "/home/anish/.password-store/" ];
|
paths = [ "/home/anish/usr" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# enable adb
|
# enable adb
|
||||||
|
@ -102,8 +81,7 @@
|
||||||
#virtualisation.docker.enable = true;
|
#virtualisation.docker.enable = true;
|
||||||
boot.blacklistedKernelModules = [ "qcserial" ];
|
boot.blacklistedKernelModules = [ "qcserial" ];
|
||||||
# Used for packer Capsul
|
# Used for packer Capsul
|
||||||
users.users.anish.extraGroups =
|
users.users.anish.extraGroups = [ "adbusers" "wheel" "plugdev" "libvertd" ];
|
||||||
[ "adbusers" "wheel" "plugdev" "libvertd" "docker" ];
|
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
hardware.keyboard.zsa.enable = true;
|
hardware.keyboard.zsa.enable = true;
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
|
|
|
@ -5,43 +5,47 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/e1268753-4f18-4e6f-8edb-d4724ad8eb4a";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/74ba39ee-35cd-4b87-9ee9-651384fa55bd";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=root" ];
|
options = [ "subvol=root" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" =
|
||||||
{ device = "/dev/disk/by-uuid/e1268753-4f18-4e6f-8edb-d4724ad8eb4a";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/74ba39ee-35cd-4b87-9ee9-651384fa55bd";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=home" ];
|
options = [ "subvol=home" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/8244-A184";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/87DA-98E7";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/e220fea6-cf3b-4687-bfe1-9cf6d3ba57f7"; }
|
[{ device = "/dev/disk/by-uuid/c36e3ba9-8eee-4fbf-837c-7e1cfda33f09"; }];
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (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
|
# 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`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
# networking.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,337 +0,0 @@
|
||||||
# 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" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.version = 2;
|
||||||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||||
|
|
||||||
networking.hostName = "helix"; # Define your hostname.
|
networking.hostName = "helix"; # Define your hostname.
|
||||||
|
@ -21,6 +22,9 @@
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
services.openssh.passwordAuthentication = false;
|
||||||
|
services.openssh.permitRootLogin = "no";
|
||||||
|
sound.enable = false;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
# This value determines the NixOS release with which your system is to be
|
# This value determines the NixOS release with which your system is to be
|
||||||
|
|
|
@ -1,19 +1,14 @@
|
||||||
{ self, profiles, suites, pkgs, ... }:
|
{ self, profiles, suites, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
../profiles/core
|
../profiles/core
|
||||||
../profiles/server
|
../profiles/server
|
||||||
# ../profiles/metrics
|
../profiles/metrics
|
||||||
../profiles/gitea
|
../profiles/gitea
|
||||||
# ../profiles/woodpecker-server
|
|
||||||
../profiles/rss-bridge
|
../profiles/rss-bridge
|
||||||
# ../profiles/mount-mossnet
|
../profiles/mount-mossnet
|
||||||
../profiles/freshrss
|
../profiles/freshrss
|
||||||
../profiles/microbin
|
|
||||||
../profiles/site
|
|
||||||
|
|
||||||
# ../profiles/postgres_upgrade_script
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Capsul specific
|
# Capsul specific
|
||||||
|
@ -22,47 +17,10 @@
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
age.secrets.helix-wg.file = "${self}/secrets/helix-wg.age";
|
|
||||||
age.secrets.helix-wg.owner = "anish";
|
|
||||||
mossnet.wg = {
|
mossnet.wg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ips = [ "10.0.69.5/24" ];
|
ips = [ "10.0.69.5/24" ];
|
||||||
privateKeyFile = "/run/agenix/helix-wg";
|
privateKeyFile = "/home/anish/wg/wg-priv";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Reverse proxy for immich
|
|
||||||
# services.nginx.virtualHosts."photos.sealight.xyz" = {
|
|
||||||
# enableACME = true;
|
|
||||||
# forceSSL = true;
|
|
||||||
|
|
||||||
# locations."/" = {
|
|
||||||
# extraConfig = ''
|
|
||||||
# proxy_pass http://10.0.69.4:8567;
|
|
||||||
# proxy_set_header Host $host;
|
|
||||||
# proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
|
|
||||||
services.postgresql.package = pkgs.postgresql_15;
|
|
||||||
services.postgresqlBackup = {
|
|
||||||
# TODO needs working wireguard to box
|
|
||||||
enable = false;
|
|
||||||
databases = [ "gitea" "freshrss" ]; # "woodpecker"
|
|
||||||
location = "/mnt/two/postgres";
|
|
||||||
};
|
|
||||||
|
|
||||||
mossnet.backup = {
|
|
||||||
enable = true;
|
|
||||||
name = "helix";
|
|
||||||
paths = [
|
|
||||||
"/var/lib/gitea"
|
|
||||||
"/var/lib/freshrss"
|
|
||||||
# "/var/lib/woodpecker"
|
|
||||||
"/var/lib/microbin"
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
{ disks ? [ "/dev/vdb" ], ... }: {
|
|
||||||
disko.devices = {
|
|
||||||
disk = {
|
|
||||||
vdb = {
|
|
||||||
type = "disk";
|
|
||||||
device = builtins.elemAt disks 0;
|
|
||||||
content = {
|
|
||||||
type = "table";
|
|
||||||
format = "gpt";
|
|
||||||
partitions = [
|
|
||||||
{
|
|
||||||
name = "ESP";
|
|
||||||
start = "1MiB";
|
|
||||||
end = "128MiB";
|
|
||||||
fs-type = "fat32";
|
|
||||||
bootable = true;
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "root";
|
|
||||||
start = "128MiB";
|
|
||||||
end = "100%";
|
|
||||||
content = {
|
|
||||||
type = "btrfs";
|
|
||||||
extraArgs = [ "-f" ]; # Override existing partition
|
|
||||||
subvolumes = {
|
|
||||||
# Subvolume name is different from mountpoint
|
|
||||||
"/rootfs" = {
|
|
||||||
mountpoint = "/";
|
|
||||||
};
|
|
||||||
# Mountpoints inferred from subvolume name
|
|
||||||
"/home" = {
|
|
||||||
mountOptions = [ "compress=zstd" ];
|
|
||||||
};
|
|
||||||
"/nix" = {
|
|
||||||
mountOptions = [ "compress=zstd" "noatime" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -5,27 +5,23 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
[
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "floppy" "sr_mod" "virtio_blk" ];
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/7c560634-d545-41cc-b375-42ce3037fd73";
|
{
|
||||||
fsType = "ext4";
|
device = "/dev/disk/by-uuid/3b8b2c4b-835e-4822-8ac8-0effdc8270d6";
|
||||||
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
nix.settings.max-jobs = lib.mkDefault 1;
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
# 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.ens3.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
# Use the GRUB 2 boot loader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.version = 2;
|
||||||
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
boot.loader.grub.device = "/dev/vda"; # or "nodev" for efi only
|
||||||
|
|
||||||
networking.hostName = "lituus"; # Define your hostname.
|
networking.hostName = "lituus"; # Define your hostname.
|
||||||
|
@ -19,6 +20,8 @@
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
sound.enable = false;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
# This value determines the NixOS release with which your system is to be
|
# This value determines the NixOS release with which your system is to be
|
||||||
# compatible, in order to avoid breaking some software such as database
|
# compatible, in order to avoid breaking some software such as database
|
||||||
|
|
|
@ -16,8 +16,8 @@
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/3b8b2c4b-835e-4822-8ac8-0effdc8270d6";
|
device = "/dev/disk/by-uuid/7c560634-d545-41cc-b375-42ce3037fd73";
|
||||||
fsType = "btrfs";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
proxy_pass http://localhost:8083/;
|
proxy_pass http://localhost:8083/;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
client_max_body_size 50M;
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,8 +4,9 @@ in
|
||||||
{
|
{
|
||||||
imports = [ ../../users/anish ];
|
imports = [ ../../users/anish ];
|
||||||
|
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
packages = with pkgs; [ powerline-fonts dejavu_fonts ];
|
fonts = with pkgs; [ powerline-fonts dejavu_fonts ];
|
||||||
fontconfig.defaultFonts = {
|
fontconfig.defaultFonts = {
|
||||||
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
monospace = [ "DejaVu Sans Mono for Powerline" ];
|
||||||
sansSerif = [ "DejaVu Sans" ];
|
sansSerif = [ "DejaVu Sans" ];
|
||||||
|
@ -32,9 +33,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
pinentry-rofi
|
pinentry_gnome
|
||||||
pinentry-gnome3
|
|
||||||
pinentry-gtk2
|
|
||||||
cached-nix-shell
|
cached-nix-shell
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -44,8 +43,6 @@ in
|
||||||
openFirewall = lib.mkDefault false;
|
openFirewall = lib.mkDefault false;
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = "Canada/Pacific";
|
|
||||||
|
|
||||||
# programs.gnupg.agent.enable = true;
|
# programs.gnupg.agent.enable = true;
|
||||||
# programs.gnupg.agent.pinentryFlavor = "curses";
|
# programs.gnupg.agent.pinentryFlavor = "curses";
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ self, config, pkgs, lib, ... }:
|
{ self, config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
tex = (pkgs.texlive.combine {
|
tex = (pkgs.texlive.combine {
|
||||||
inherit (pkgs.texlive)
|
inherit (pkgs.texlive) scheme-basic
|
||||||
scheme-basic dvisvgm dvipng # for preview and export as html
|
dvisvgm dvipng# for preview and export as html
|
||||||
wrapfig amsmath ulem hyperref capt-of;
|
wrapfig amsmath ulem hyperref capt-of;
|
||||||
#(setq org-latex-compiler "lualatex")
|
#(setq org-latex-compiler "lualatex")
|
||||||
#(setq org-preview-latex-default-process 'dvisvgm)
|
#(setq org-preview-latex-default-process 'dvisvgm)
|
||||||
|
@ -13,9 +13,13 @@ let
|
||||||
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
|
rev = "502f212d83bc67e8f0499574546b99ec6c8e16f9";
|
||||||
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
|
sha256 = "1wx9nzq7cqyvpaq4j60bs8g7gh4jk8qg4016yi4c331l4iw1ymsa";
|
||||||
};
|
};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# TODO modularize
|
# TODO modularize
|
||||||
imports = [ ./battery-low-timer.nix ./cal-alarms.nix ];
|
imports = [
|
||||||
|
./battery-low-timer.nix
|
||||||
|
./cal-alarms.nix
|
||||||
|
];
|
||||||
|
|
||||||
# Secrets used by home-manager modules
|
# Secrets used by home-manager modules
|
||||||
age.secrets.fastmail.file = "${self}/secrets/fastmail.age";
|
age.secrets.fastmail.file = "${self}/secrets/fastmail.age";
|
||||||
|
@ -24,11 +28,6 @@ in {
|
||||||
age.secrets.mossnet.file = "${self}/secrets/mossnet.age";
|
age.secrets.mossnet.file = "${self}/secrets/mossnet.age";
|
||||||
age.secrets.mossnet.owner = "anish";
|
age.secrets.mossnet.owner = "anish";
|
||||||
|
|
||||||
# Taskwarrior private key
|
|
||||||
age.secrets.taskwarrior-private.file =
|
|
||||||
"${self}/secrets/taskwarrior-private.age";
|
|
||||||
age.secrets.taskwarrior-private.owner = "anish";
|
|
||||||
|
|
||||||
# We don't plug USBs into servers
|
# We don't plug USBs into servers
|
||||||
services.devmon.enable = true;
|
services.devmon.enable = true;
|
||||||
|
|
||||||
|
@ -38,10 +37,9 @@ in {
|
||||||
|
|
||||||
dbus = {
|
dbus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
packages = [ pkgs.dconf pkgs.gcr ];
|
packages = [ pkgs.dconf ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
security.pam.services.Default.enableGnomeKeyring = true;
|
security.pam.services.Default.enableGnomeKeyring = true;
|
||||||
security.pam.services.Login.enableGnomeKeyring = true;
|
security.pam.services.Login.enableGnomeKeyring = true;
|
||||||
|
@ -53,30 +51,29 @@ in {
|
||||||
XDG_BIN_HOME = "\${HOME}/.local/bin";
|
XDG_BIN_HOME = "\${HOME}/.local/bin";
|
||||||
XDG_DATA_HOME = "\${HOME}/.local/share";
|
XDG_DATA_HOME = "\${HOME}/.local/share";
|
||||||
|
|
||||||
PATH = [ "\${XDG_BIN_HOME}" ];
|
PATH = [
|
||||||
|
"\${XDG_BIN_HOME}"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
#unstable.sublime-music
|
unstable.signal-desktop # bridge to sealight?
|
||||||
# olm-3.2.16 is now insecure
|
|
||||||
# some reason I can't set insecure packages that will be respected
|
|
||||||
nheko
|
|
||||||
unstable.signal-desktop
|
|
||||||
unstable.tuba
|
|
||||||
unstable.newsflash
|
|
||||||
unstable.liferea
|
|
||||||
unstable.gh
|
|
||||||
unstable.flyctl
|
|
||||||
unstable.sublime-music
|
unstable.sublime-music
|
||||||
|
unstable.nheko
|
||||||
|
unstable.tootle
|
||||||
|
newsflash
|
||||||
|
liferea
|
||||||
|
|
||||||
kooha
|
scrot
|
||||||
light
|
ripcord
|
||||||
xfce.orage
|
xfce.orage
|
||||||
feh
|
feh
|
||||||
sxiv
|
sxiv
|
||||||
xkblayout-state
|
xkblayout-state
|
||||||
|
vcv-rack
|
||||||
zathura
|
zathura
|
||||||
calibre
|
calibre
|
||||||
|
fractal
|
||||||
mpv
|
mpv
|
||||||
zeal
|
zeal
|
||||||
xclip
|
xclip
|
||||||
|
@ -84,6 +81,7 @@ in {
|
||||||
rofi
|
rofi
|
||||||
rofimoji
|
rofimoji
|
||||||
rofi-calc
|
rofi-calc
|
||||||
|
eww
|
||||||
obs-studio
|
obs-studio
|
||||||
lightdm
|
lightdm
|
||||||
dunst
|
dunst
|
||||||
|
@ -95,18 +93,10 @@ in {
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
calendar-cli
|
calendar-cli
|
||||||
wyrd
|
wyrd
|
||||||
# tic-80
|
tex
|
||||||
ytfzf
|
tic-80
|
||||||
yt-dlp
|
|
||||||
];
|
];
|
||||||
|
|
||||||
xdg.portal = {
|
|
||||||
# Breaks link clicking in nheko
|
|
||||||
# Portal doesn't seem to find Firefox as an acceptable app to open links?
|
|
||||||
enable = false;
|
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
|
||||||
xdgOpenUsePortal = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
location.provider = "geoclue2";
|
location.provider = "geoclue2";
|
||||||
services = {
|
services = {
|
||||||
|
@ -117,15 +107,12 @@ in {
|
||||||
night = 3700;
|
night = 3700;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
displayManager.defaultSession = "none+bspwm";
|
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# TODO should be xkb.layout
|
layout = "us,dvorak";
|
||||||
xkb.layout = "us";
|
|
||||||
# xkb.variant = "dvorak";
|
|
||||||
desktopManager.wallpaper.mode = "fill";
|
desktopManager.wallpaper.mode = "fill";
|
||||||
displayManager = {
|
displayManager = {
|
||||||
# startx.enable = true;
|
defaultSession = "none+bspwm";
|
||||||
sessionCommands = ''
|
sessionCommands = ''
|
||||||
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
|
${pkgs.xorg.xrdb}/bin/xrdb -merge <<EOF
|
||||||
#define blk #1F2430
|
#define blk #1F2430
|
||||||
|
@ -176,11 +163,10 @@ in {
|
||||||
*.color239: #565761
|
*.color239: #565761
|
||||||
*.color240: #6272a4
|
*.color240: #6272a4
|
||||||
*.color241: #b6b6b2
|
*.color241: #b6b6b2
|
||||||
|
EOF
|
||||||
|
|
||||||
# hotplug
|
# hotplug
|
||||||
connect() {
|
connect() {
|
||||||
# Turn it on if it was off
|
|
||||||
xrandr --output HDMI-2 --auto
|
|
||||||
xrandr --output HDMI-2 --same-as eDP-1
|
xrandr --output HDMI-2 --same-as eDP-1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +175,24 @@ in {
|
||||||
}
|
}
|
||||||
|
|
||||||
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
|
xrandr | grep "HDMI-2 connected" &>>/dev/null && connect || disconnect
|
||||||
EOF
|
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
|
||||||
|
disconnect_keyboard
|
||||||
'';
|
'';
|
||||||
lightdm = {
|
lightdm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -212,7 +215,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.fonts = with pkgs; [
|
||||||
fira-code
|
fira-code
|
||||||
fira-code-symbols
|
fira-code-symbols
|
||||||
hermit
|
hermit
|
||||||
|
@ -220,8 +223,6 @@ in {
|
||||||
siji
|
siji
|
||||||
font-awesome
|
font-awesome
|
||||||
proggyfonts
|
proggyfonts
|
||||||
nerd-fonts.fira-code
|
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" "Iosevka" ]; })
|
||||||
nerd-fonts.droid-sans-mono
|
|
||||||
nerd-fonts.iosevka
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +1,24 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
{
|
||||||
adblockLocalZones = pkgs.stdenv.mkDerivation {
|
services.dnsmasq.enable = true;
|
||||||
name = "unbound-zones-adblock";
|
services.dnsmasq.extraConfig = ''
|
||||||
|
domain-needed
|
||||||
src = (pkgs.fetchFromGitHub {
|
no-resolv
|
||||||
owner = "StevenBlack";
|
local=/lan/
|
||||||
repo = "hosts";
|
local=/moss/
|
||||||
rev = "3.12.21";
|
cache-size=5000
|
||||||
sha256 = "Yzr6PY/zqQE+AHH0J6ioHTsgkikM+dz4aelbGpQJa1s=";
|
addn-hosts=/etc/adblock.hosts
|
||||||
} + "/hosts");
|
''; # TODO find a way to make adblock hosts reproducible and updateable
|
||||||
|
services.dnsmasq.servers = [ "45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8" ];
|
||||||
phases = [ "installPhase" ];
|
# TODO use this list in mossnet-hosts
|
||||||
|
networking.hosts = {
|
||||||
installPhase = ''
|
"192.168.1.240" = [
|
||||||
${pkgs.gawk}/bin/awk '{sub(/\r$/,"")} {sub(/^127\.0\.0\.1/,"0.0.0.0")} BEGIN { OFS = "" } NF == 2 && $1 == "0.0.0.0" { print "local-zone: \"", $2, "\" static"}' $src | tr '[:upper:]' '[:lower:]' | sort -u > $out
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
mossnet = "192.168.1.240"; # The local lan-ip for box
|
|
||||||
wg-mossnet = "10.0.69.4"; # The wireguard ip for box
|
|
||||||
mossnet-hosts = [
|
|
||||||
"mossnet.lan"
|
"mossnet.lan"
|
||||||
"headphones.mossnet.lan"
|
|
||||||
"links.mossnet.lan"
|
"links.mossnet.lan"
|
||||||
"read.mossnet.lan"
|
"read.mossnet.lan"
|
||||||
"stats.mossnet.lan"
|
"stats.mossnet.lan"
|
||||||
"music.mossnet.lan"
|
"music.mossnet.lan"
|
||||||
|
"rss.mossnet.lan"
|
||||||
"tasks.mossnet.lan"
|
"tasks.mossnet.lan"
|
||||||
"file.mossnet.lan"
|
"file.mossnet.lan"
|
||||||
"books.mossnet.lan"
|
"books.mossnet.lan"
|
||||||
|
@ -33,57 +26,11 @@ let
|
||||||
"paper.mossnet.lan"
|
"paper.mossnet.lan"
|
||||||
"cal.mossnet.lan"
|
"cal.mossnet.lan"
|
||||||
"archive.mossnet.lan"
|
"archive.mossnet.lan"
|
||||||
"headphones.mossnet.lan"
|
|
||||||
"transmission.mossnet.lan"
|
|
||||||
"tracks.mossnet.lan"
|
|
||||||
"grasp.mossnet.lan"
|
|
||||||
"photos.mossnet.lan"
|
|
||||||
"pod.mossnet.lan"
|
|
||||||
"mast.mossnet.lan"
|
|
||||||
];
|
];
|
||||||
|
"192.168.1.226" = [
|
||||||
in {
|
"df-web.lan"
|
||||||
services.unbound = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
server = {
|
|
||||||
include = "${adblockLocalZones}";
|
|
||||||
prefetch = "yes";
|
|
||||||
# private-address = "10.0.69.0/8";
|
|
||||||
# private-address = "192.168.1.0/24";
|
|
||||||
cache-min-ttl = 0;
|
|
||||||
serve-expired = "yes";
|
|
||||||
interface = [ "0.0.0.0" "::" ];
|
|
||||||
access-control =
|
|
||||||
[ "127.0.0.0/8 allow" "192.168.1.0/24 allow" "10.0.69.0/24 allow" "::1 allow" "fd7d:587a:4300:1::/64 allow" ];
|
|
||||||
access-control-view = "10.0.69.0/24 wireguard";
|
|
||||||
# so-reuseport = "yes";
|
|
||||||
tls-upstream = "yes";
|
|
||||||
domain-insecure = "mossnet.lan";
|
|
||||||
local-zone = ''"mossnet.lan." redirect'';
|
|
||||||
local-data = ''"mossnet.lan. IN A ${mossnet}"'';
|
|
||||||
};
|
|
||||||
forward-zone = [{
|
|
||||||
name = ".";
|
|
||||||
forward-addr = [
|
|
||||||
"45.90.28.0#6939b9.dns.nextdns.io"
|
|
||||||
"1.1.1.1@853#cloudflare-dns.com"
|
|
||||||
];
|
];
|
||||||
# non-tls
|
|
||||||
# forward-addr = ["45.90.30.49" "45.90.28.49" "1.1.1.1" "8.8.8.8"]
|
|
||||||
}];
|
|
||||||
view = {
|
|
||||||
name = "wireguard";
|
|
||||||
local-zone = ''"mossnet.lan." redirect'';
|
|
||||||
local-data = ''"mossnet.lan. IN A ${wg-mossnet}"'';
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# With unbound we're doing wildcard redirects, so we don't need that anymore
|
|
||||||
# networking.hosts = {
|
|
||||||
# mossnet = mossnet-hosts;
|
|
||||||
# };
|
|
||||||
networking.firewall.allowedTCPPorts = [ 53 ];
|
networking.firewall.allowedTCPPorts = [ 53 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
services.paperless = {
|
services.paperless = {
|
||||||
enable = false;
|
enable = true;
|
||||||
consumptionDirIsPublic = true;
|
consumptionDirIsPublic = true;
|
||||||
settings.PAPERLESS_AUTO_LOGIN_USERNAME = "admin";
|
extraConfig.PAPERLESS_AUTO_LOGIN_USERNAME = "admin";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
@ -18,7 +18,6 @@
|
||||||
path = [
|
path = [
|
||||||
pkgs.fava
|
pkgs.fava
|
||||||
];
|
];
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
before = [ "nginx.service" ];
|
before = [ "nginx.service" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "anish";
|
User = "anish";
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{ pkgs, config, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
networking.wireguard.interfaces.fly-wg = "/home/anish/usr/fly-io-test/fly-wg.conf";
|
|
||||||
# ssh.startAgent = true;
|
|
||||||
}
|
|
|
@ -17,21 +17,17 @@
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true; # Ensure postgresql is enabled
|
enable = true; # Ensure postgresql is enabled
|
||||||
# authentication = ''
|
package = pkgs.postgresql_11;
|
||||||
# local freshrss all ident map=freshrss-users
|
authentication = ''
|
||||||
# '';
|
local freshrss all ident map=freshrss-users
|
||||||
# identMap = # Map the freshrss user to postgresql
|
'';
|
||||||
# ''
|
identMap = # Map the freshrss user to postgresql
|
||||||
# freshrss-users freshrss freshrss
|
''
|
||||||
# freshrss-users postgres freshrss
|
freshrss-users freshrss freshrss
|
||||||
# '';
|
'';
|
||||||
ensureDatabases = [ "freshrss" ];
|
ensureDatabases = [ "freshrss" ];
|
||||||
ensureUsers = [{
|
|
||||||
name = "freshrss";
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}];
|
|
||||||
# TODO
|
# TODO
|
||||||
# initialScript # set password for freshrss user
|
# initialScript # set password for gitea user
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."rss.sealight.xyz" = {
|
services.nginx.virtualHosts."rss.sealight.xyz" = {
|
||||||
|
|
|
@ -4,78 +4,56 @@
|
||||||
age.secrets.gitea-dbpass.file = "${self}/secrets/gitea-dbpass.age";
|
age.secrets.gitea-dbpass.file = "${self}/secrets/gitea-dbpass.age";
|
||||||
age.secrets.gitea-dbpass.owner = "gitea";
|
age.secrets.gitea-dbpass.owner = "gitea";
|
||||||
|
|
||||||
services.forgejo = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "gitea";
|
appName = "Sealight Git Forge";
|
||||||
group = "gitea";
|
domain = "git.sealight.xyz";
|
||||||
stateDir = "/var/lib/gitea";
|
rootUrl = "https://git.sealight.xyz";
|
||||||
|
httpPort = 3001;
|
||||||
database = {
|
database = {
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
user = "gitea";
|
|
||||||
name = "gitea";
|
|
||||||
passwordFile = "/run/agenix/gitea-dbpass";
|
passwordFile = "/run/agenix/gitea-dbpass";
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
DEFAULT.APP_NAME = "Sealight Git Forge";
|
|
||||||
server = {
|
|
||||||
DOMAIN = "git.sealight.xyz";
|
|
||||||
ROOT_URL = "https://git.sealight.xyz";
|
|
||||||
HTTP_PORT = 3001;
|
|
||||||
};
|
|
||||||
metrics = {
|
metrics = {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
};
|
};
|
||||||
repository = {
|
repository = {
|
||||||
DEFAULT_BRANCH = "main";
|
DEFAULT_BRANCH = "main";
|
||||||
};
|
};
|
||||||
service.DISABLE_REGISTRATION = true;
|
# TODO
|
||||||
"markup.restructuredtext" = {
|
"markup.restructuredtext" = {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
FILE_EXTENSIONS = ".rst";
|
FILE_EXTENSIONS = ".rst";
|
||||||
RENDER_COMMAND = "timeout 30s pandoc +RTS -RTS -f rst";
|
RENDER_COMMAND = "pandoc +RTS -M512M -RTS -f rst";
|
||||||
IS_INPUT_FILE = false;
|
IS_INPUT_FILE = false;
|
||||||
};
|
};
|
||||||
|
# TODO
|
||||||
mailer = {
|
mailer = {
|
||||||
ENABLED = true;
|
ENABLED = false;
|
||||||
MAILER_TYPE = "smtp";
|
MAILER_TYPE = "smtp";
|
||||||
FROM = "ops@sealight.xyz";
|
FROM = "ops@sealight.xyz";
|
||||||
SMTP_ADDR = "smtp.nullhex.com";
|
SENDMAIL_PATH = "${pkgs.system-sendmail}/bin/sendmail";
|
||||||
SMTP_PORT = "465";
|
|
||||||
USER = "ops@sealight.xyz";
|
|
||||||
PASSWD = "breed deputy fossil glory"; # TODO how do we pass this from agenix?
|
|
||||||
IS_TLS_ENABLED = "true";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.gitea = {
|
|
||||||
home = "/var/lib/gitea";
|
|
||||||
useDefaultShell = true;
|
|
||||||
group = "gitea";
|
|
||||||
isSystemUser = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.groups.gitea = {};
|
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.pandoc ];
|
environment.systemPackages = [ pkgs.pandoc ];
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true; # Ensure postgresql is enabled
|
enable = true; # Ensure postgresql is enabled
|
||||||
# authentication = ''
|
authentication = ''
|
||||||
# local gitea all ident map=gitea-users
|
local gitea all ident map=gitea-users
|
||||||
# '';
|
'';
|
||||||
# identMap = # Map the gitea user to postgresql
|
identMap = # Map the gitea user to postgresql
|
||||||
# ''
|
''
|
||||||
# gitea-users gitea gitea
|
gitea-users gitea gitea
|
||||||
# gitea-users postgres gitea
|
'';
|
||||||
# '';
|
# ensureDatabases = [ "gitea" ];
|
||||||
ensureDatabases = [ "gitea" ];
|
ensureUsers = [
|
||||||
ensureUsers = [{
|
{ name = "gitea"; ensurePermissions."DATABASE gitea" = "ALL PRIVILEGES"; }
|
||||||
name = "gitea";
|
];
|
||||||
ensureDBOwnership = true;
|
|
||||||
}];
|
|
||||||
# TODO
|
# TODO
|
||||||
# initialScript
|
# initialScript # set password for gitea user
|
||||||
# set password for gitea user
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
|
@ -92,4 +70,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 22 ];
|
networking.firewall.allowedTCPPorts = [ 80 443 22 ];
|
||||||
|
security.acme.defaults.email = "anish+acme@lakhwara.com";
|
||||||
|
security.acme.acceptTerms = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,12 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = [ pkgs.ffmpeg ];
|
services.gonic.enable = true;
|
||||||
mossnet.gonic.enable = true;
|
services.gonic.settings = ''
|
||||||
mossnet.gonic.settings = ''
|
|
||||||
music-path /mnt/two/music/
|
music-path /mnt/two/music/
|
||||||
podcast-path /data/podcasts
|
podcast-path /data/podcasts
|
||||||
cache-path /data/cache
|
cache-path /data/cache
|
||||||
playlists-path /data/playlists
|
|
||||||
transcode-cache-size 1000
|
|
||||||
transcode-eject-interval 1440
|
|
||||||
'';
|
'';
|
||||||
mossnet.gonic.user = "gonic";
|
services.gonic.group = "audio";
|
||||||
mossnet.gonic.group = "audio";
|
services.gonic.user = "headphones";
|
||||||
networking.firewall.allowedTCPPorts = [ 4747 ];
|
networking.firewall.allowedTCPPorts = [ 4747 ];
|
||||||
|
|
||||||
users.users.gonic = {
|
|
||||||
# uid = config.ids.uids.headphones;
|
|
||||||
# isSystemUser = true;
|
|
||||||
group = "audio";
|
|
||||||
# home = "/var/lib/headphones";
|
|
||||||
createHome = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,10 +68,14 @@ in
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
DevicePolicy = "closed";
|
DevicePolicy = "closed";
|
||||||
NoNewPrivileges = " yes";
|
NoNewPrivileges = " yes";
|
||||||
|
PrivateTmp = "yes";
|
||||||
|
PrivateUsers = "yes";
|
||||||
ProtectControlGroups = "yes";
|
ProtectControlGroups = "yes";
|
||||||
ProtectKernelModules = "yes";
|
ProtectKernelModules = "yes";
|
||||||
ProtectKernelTunables = "yes";
|
ProtectKernelTunables = "yes";
|
||||||
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
|
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6";
|
||||||
|
RestrictNamespaces = "yes";
|
||||||
|
RestrictRealtime = "yes";
|
||||||
SystemCallFilter = "~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap";
|
SystemCallFilter = "~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap";
|
||||||
ReadWritePaths = dataFolder;
|
ReadWritePaths = dataFolder;
|
||||||
StateDirectory = baseNameOf dataFolder;
|
StateDirectory = baseNameOf dataFolder;
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
services.gpodder.enable = true;
|
|
||||||
networking.firewall.allowedTCPPorts = [ 3005 ];
|
|
||||||
services.nginx.virtualHosts."pod.mossnet.lan" = {
|
|
||||||
extraConfig = "client_max_body_size 20M;";
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_pass http://localhost:3005/;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,12 +1,6 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
services.grasp = {
|
services."grasp".enable = true;
|
||||||
enable = true;
|
services."grasp".path = "/home/anish/kitaab/grasp";
|
||||||
path = "/home/anish/kitaab/grasp/notes.wiki";
|
services."grasp".user = "anish";
|
||||||
user = "anish";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."grasp.mossnet.lan" = {
|
|
||||||
locations."/".proxyPass = "http://localhost:12212";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,20 +2,11 @@
|
||||||
{
|
{
|
||||||
services.headphones = {
|
services.headphones = {
|
||||||
enable = true;
|
enable = true;
|
||||||
host = "0.0.0.0";
|
host = "192.168.1.240";
|
||||||
port = 8181;
|
port = 8181;
|
||||||
user = "headphones";
|
user = "headphones";
|
||||||
group = "audio";
|
group = "audio";
|
||||||
dataDir = "/data/music";
|
dataDir = "/data/music";
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."headphones.mossnet.lan" = {
|
networking.firewall.allowedTCPPorts = [ 8181 ];
|
||||||
enableACME = false;
|
|
||||||
forceSSL = false;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_pass http://127.0.0.1:8181/;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
{ pkgs, config, ... }:
|
|
||||||
{
|
|
||||||
services.immich = {
|
|
||||||
enable = true;
|
|
||||||
database = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
host = "0.0.0.0";
|
|
||||||
port = 8567;
|
|
||||||
mediaLocation = "/mnt/two/photos";
|
|
||||||
openFirewall = true;
|
|
||||||
settings.server.externalDomain = "https://photos.sealight.xyz";
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts."photos.mossnet.lan" = {
|
|
||||||
enableACME = false;
|
|
||||||
forceSSL = false;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.immich.port}";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
extraConfig = ''
|
|
||||||
client_max_body_size 50000M;
|
|
||||||
proxy_read_timeout 600s;
|
|
||||||
proxy_send_timeout 600s;
|
|
||||||
send_timeout 600s;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,35 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.jackett = {
|
|
||||||
enable = true;
|
|
||||||
port = 8011;
|
|
||||||
user = "jackett";
|
|
||||||
group = "transmission";
|
|
||||||
package = pkgs.unstable.jackett;
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts."jackett.mossnet.lan" = {
|
|
||||||
enableACME = false;
|
|
||||||
forceSSL = false;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_pass http://127.0.0.1:8011/;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services.lidarr = {
|
|
||||||
enable = true;
|
|
||||||
user = "headphones";
|
|
||||||
group = "audio";
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts."lidarr.mossnet.lan" = {
|
|
||||||
enableACME = false;
|
|
||||||
forceSSL = false;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_pass http://127.0.0.1:8686/;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,27 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
# Enable Hardware Acceleration for transcoding
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
|
||||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
|
||||||
};
|
|
||||||
hardware.opengl = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
intel-media-driver
|
|
||||||
vaapiIntel
|
|
||||||
vaapiVdpau
|
|
||||||
libvdpau-va-gl
|
|
||||||
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
services.jellyfin = {
|
|
||||||
enable = true;
|
|
||||||
user = "jellyfin";
|
|
||||||
group = "video";
|
|
||||||
openFirewall = true; # only for defaults
|
|
||||||
};
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8181 ];
|
|
||||||
users.users.jellyfin = {
|
|
||||||
extraGroups = [ "video" "audio" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# k3s
|
|
||||||
networking.firewall.allowedTCPPorts = [ 6443 ];
|
|
||||||
services.k3s.enable = true;
|
|
||||||
services.k3s.role = "server";
|
|
||||||
services.k3s.clusterInit = false;
|
|
||||||
# services.k3s.extraFlags = toString [
|
|
||||||
# "--kubelet-arg=v=4" # Optionally add additional args to k3s
|
|
||||||
# ];
|
|
||||||
environment.systemPackages = [ pkgs.k3s pkgs.kubernetes-helm pkgs.kubectl ];
|
|
||||||
|
|
||||||
# minikube on docker
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
virtualisation.docker.storageDriver = "btrfs";
|
|
||||||
# or use kvm
|
|
||||||
# virtualisation.libvirtd.enable = true;
|
|
||||||
users.users.anish.extraGroups = [ "docker" "libvert" ]; #
|
|
||||||
}
|
|
|
@ -3,7 +3,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./mautrix-telegram.nix
|
./mautrix-telegram.nix
|
||||||
./mautrix-services.nix
|
|
||||||
# ./mautrix-discord.nix
|
# ./mautrix-discord.nix
|
||||||
# ./mautrix-whatsapp.nix
|
# ./mautrix-whatsapp.nix
|
||||||
# ./mautrix-slack.nix
|
# ./mautrix-slack.nix
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
services.matrix-synapse = {
|
services.matrix-synapse = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
max_upload_size = "100M";
|
|
||||||
server_name = "sealight.xyz";
|
server_name = "sealight.xyz";
|
||||||
listeners = [
|
listeners = [
|
||||||
{
|
{
|
||||||
|
@ -42,15 +40,11 @@
|
||||||
tls = false;
|
tls = false;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
app_service_config_files = [
|
app_service_config_files = [
|
||||||
# The registration file is automatically generated after starting the appservice for the first time.
|
# The registration file is automatically generated after starting the appservice for the first time.
|
||||||
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/
|
# cp /var/lib/matrix-appservice-discord/discord-registration.yaml /var/lib/matrix-synapse/
|
||||||
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml
|
# chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/discord-registration.yaml
|
||||||
# "/var/lib/matrix-synapse/telegram-registration.yaml"
|
"/var/lib/matrix-synapse/telegram-registration.yaml"
|
||||||
"/var/lib/matrix-synapse/signal-registration.yaml"
|
|
||||||
#"/var/lib/matrix-as-whatsapp/whatsapp-registration.yaml"
|
|
||||||
"/var/lib/matrix-as-discord/discord-registration.yaml"
|
|
||||||
# "/var/lib/matrix-synapse/slack-registration.yaml"
|
# "/var/lib/matrix-synapse/slack-registration.yaml"
|
||||||
# "/var/lib/matrix-synapse/discord-registration.yaml"
|
# "/var/lib/matrix-synapse/discord-registration.yaml"
|
||||||
# "/var/lib/matrix-synapse/whatsapp-registration.yaml"
|
# "/var/lib/matrix-synapse/whatsapp-registration.yaml"
|
||||||
|
|
|
@ -1,52 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# Mautrix-signal settings
|
|
||||||
# services.signald.enable = true;
|
|
||||||
# systemd.services.matrix-as-signal = {
|
|
||||||
# requires = [ "signald.service" ];
|
|
||||||
# after = [ "signald.service" ];
|
|
||||||
# unitConfig = {
|
|
||||||
# JoinsNamespaceOf = "signald.service";
|
|
||||||
# };
|
|
||||||
# path = [
|
|
||||||
# pkgs.ffmpeg # voice messages need `ffmpeg`
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
|
|
||||||
services.matrix-appservices = {
|
|
||||||
addRegistrationFiles = false;
|
|
||||||
homeserverURL = "https://sealight.xyz/";
|
|
||||||
homeserverDomain = "sealight.xyz";
|
|
||||||
services = {
|
|
||||||
# whatsapp = {
|
|
||||||
# port = 29183;
|
|
||||||
# format = "mautrix-go";
|
|
||||||
# package = pkgs.mautrix-whatsapp;
|
|
||||||
# };
|
|
||||||
|
|
||||||
discord = {
|
|
||||||
port = 29188;
|
|
||||||
format = "mautrix-go";
|
|
||||||
package = pkgs.mautrix-discord;
|
|
||||||
};
|
|
||||||
|
|
||||||
# signal = {
|
|
||||||
# port = 29184;
|
|
||||||
# format = "mautrix-python";
|
|
||||||
# package = pkgs.mautrix-signal;
|
|
||||||
# serviceConfig = {
|
|
||||||
# # StateDirectory = [ "matrix-as-signal" "signald" ];
|
|
||||||
# # SupplementaryGroups = [ "signald" ];
|
|
||||||
# TimeoutStopSec = 1; # work around the service ignoring SIGTERM, see https://gitlab.com/coffeetables/nix-matrix-appservices/-/issues/12
|
|
||||||
# # User = lib.mkForce config.services.signald.user;
|
|
||||||
# # Group = lib.mkForce config.services.signald.group;
|
|
||||||
# };
|
|
||||||
# # settings.signal = {
|
|
||||||
# # socket_path = config.services.signald.socketPath;
|
|
||||||
# # outgoing_attachment_dir = "/var/lib/signald/tmp";
|
|
||||||
# # };
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,9 +1,9 @@
|
||||||
{ self, pkgs, lib, config, ... }:
|
{ self, pkgs, lib, config, ... }:
|
||||||
{
|
{
|
||||||
# age.secrets.sealight-mod-password.file = "${self}/secrets/sealight-mod-password.age";
|
age.secrets.sealight-mod-password.file = "${self}/secrets/sealight-mod-password.age";
|
||||||
# age.secrets.sealight-mod-password.owner = "mjolnir";
|
age.secrets.sealight-mod-password.owner = "mjolnir";
|
||||||
services.mjolnir = {
|
services.mjolnir = {
|
||||||
enable = false;
|
enable = true;
|
||||||
protectedRooms = [
|
protectedRooms = [
|
||||||
"https://matrix.to/#/#public:sealight.xyz"
|
"https://matrix.to/#/#public:sealight.xyz"
|
||||||
"https://matrix.to/#/#theFeed:sealight.xyz"
|
"https://matrix.to/#/#theFeed:sealight.xyz"
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
services.microbin.enable = true;
|
|
||||||
services.microbin.settings.PUBLIC_PATH = "bin.sealight.xyz";
|
|
||||||
services.microbin.settings.MICROBIN_PORT = 4949;
|
|
||||||
networking.firewall.allowedTCPPorts = [ 4949 ];
|
|
||||||
services.nginx.virtualHosts."bin.sealight.xyz" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
extraConfig = "client_max_body_size 20M;";
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_pass http://localhost:4949/;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
xdg.mime.defaultApplications = {
|
xdg.mime.defaultApplications = {
|
||||||
"application/pdf" = "zathura.desktop";
|
"application/pdf" = "firefox.desktop";
|
||||||
"image/png" = [
|
"image/png" = [
|
||||||
"sxiv.desktop"
|
"sxiv.desktop"
|
||||||
"feh.desktop"
|
"feh.desktop"
|
||||||
|
|
|
@ -1,54 +1,25 @@
|
||||||
{ self, config, pkgs, ... }: {
|
{ self, config, pkgs, ... }: {
|
||||||
age.secrets.nullhex-smtp.file = "${self}/secrets/nullhex-smtp.age";
|
|
||||||
age.secrets.nullhex-smtp.owner = "grafana";
|
|
||||||
|
|
||||||
# grafana configuration
|
# grafana configuration
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings.server = {
|
||||||
smtp = {
|
|
||||||
enabled = true;
|
|
||||||
password = "$__file{/run/agenix/nullhex-smtp}";
|
|
||||||
host = "smtp.nullhex.com";
|
|
||||||
user = "ops@sealight.xyz";
|
|
||||||
from_address = "ops@sealight.xyz";
|
|
||||||
};
|
|
||||||
server = {
|
|
||||||
domain = "stats.mossnet.lan";
|
domain = "stats.mossnet.lan";
|
||||||
http_addr = "127.0.0.1";
|
|
||||||
http_port = 2342;
|
http_port = 2342;
|
||||||
root_url = "http://stats.mossnet.lan/";
|
http_addr = "127.0.0.1";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
# TODO enable
|
# TODO enable
|
||||||
# provision.alerting.rules.path = "${self}/hosts/profiles/monitoring/alert-rules.yaml";
|
# provision.alerting.rules.path = "${self}/hosts/profiles/monitoring/alert-rules.yaml";
|
||||||
};
|
};
|
||||||
|
|
||||||
# nginx reverse proxy
|
# nginx reverse proxy
|
||||||
# services.nginx.recommendedProxySettings = true; # Needed for new grafana versions
|
services.nginx.recommendedProxySettings = true; # Needed for new grafana versions
|
||||||
services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = {
|
services.nginx.virtualHosts.${config.services.grafana.domain} = {
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:2342";
|
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.postgresql = {
|
|
||||||
ensureUsers = [{
|
|
||||||
name = "grafana";
|
|
||||||
# TODO this is deprecated
|
|
||||||
# Need to translate this to
|
|
||||||
# systemd.services.postgresql.postStart
|
|
||||||
# or initialScript
|
|
||||||
ensurePermissions = {
|
|
||||||
"ALL TABLES IN SCHEMA public" = "SELECT";
|
|
||||||
"DATABASE wallabag" = "CONNECT";
|
|
||||||
"DATABASE ulogger" = "CONNECT";
|
|
||||||
"DATABASE photoprism" = "CONNECT";
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 9001;
|
port = 9001;
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
192.168.1.240 mossnet.lan
|
192.168.1.240 mossnet.lan
|
||||||
192.168.1.240 links.mossnet.lan
|
192.168.1.240 links.mossnet.lan
|
||||||
192.168.1.240 read.mossnet.lan
|
192.168.1.240 read.mossnet.lan
|
||||||
192.168.1.240 headphones.mossnet.lan
|
|
||||||
192.168.1.240 transmission.mossnet.lan
|
|
||||||
192.168.1.240 music.mossnet.lan
|
192.168.1.240 music.mossnet.lan
|
||||||
192.168.1.240 stats.mossnet.lan
|
192.168.1.240 stats.mossnet.lan
|
||||||
192.168.1.240 file.mossnet.lan
|
192.168.1.240 file.mossnet.lan
|
||||||
|
@ -13,16 +11,10 @@
|
||||||
192.168.1.240 fin.mossnet.lan
|
192.168.1.240 fin.mossnet.lan
|
||||||
192.168.1.240 paper.mossnet.lan
|
192.168.1.240 paper.mossnet.lan
|
||||||
192.168.1.240 books.mossnet.lan
|
192.168.1.240 books.mossnet.lan
|
||||||
192.168.1.240 archive.mossnet.lan
|
192.f.1.240 archive.mossnet.lan
|
||||||
192.168.1.240 music.mossnet.lan
|
|
||||||
192.168.1.240 tracks.mossnet.lan
|
|
||||||
192.168.1.240 grasp.mossnet.lan
|
|
||||||
192.168.1.240 photos.mossnet.lan
|
|
||||||
192.168.1.240 pod.mossnet.lan
|
|
||||||
'';
|
'';
|
||||||
# 10.0.69.4 mossnet.lan
|
# 10.0.69.4 mossnet.lan
|
||||||
# 10.0.69.4 links.mossnet.lan
|
# 10.0.69.4 links.mossnet.lan
|
||||||
# 10.0.69.4 read.mossnet.lan
|
# 10.0.69.4 read.mossnet.lan
|
||||||
# 10.0.69.4 stats.mossnet.lan
|
# 10.0.69.4 stats.mossnet.lan
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,18 +12,17 @@
|
||||||
# Plugins
|
# Plugins
|
||||||
helm
|
helm
|
||||||
# surge
|
# surge
|
||||||
# distrho
|
distrho
|
||||||
orca-c
|
orca-c
|
||||||
supercollider
|
supercollider
|
||||||
dirt
|
dirt
|
||||||
# sunvox
|
sunvox
|
||||||
vcv-rack
|
vcv-rack
|
||||||
lmms
|
lmms
|
||||||
bespokesynth
|
bespokesynth
|
||||||
lsp-plugins
|
lsp-plugins
|
||||||
helio-workstation
|
helio-workstation
|
||||||
# projectm # milkdrop visualizer
|
projectm # milkdrop visualizer
|
||||||
# i think it's projectm-sdl-cpp now
|
|
||||||
|
|
||||||
# DAWs
|
# DAWs
|
||||||
# ardour
|
# ardour
|
||||||
|
@ -31,23 +30,22 @@
|
||||||
# renoise
|
# renoise
|
||||||
];
|
];
|
||||||
|
|
||||||
services.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = lib.mkForce false;
|
||||||
security.rtkit.enable = false;
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = false;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
# Deprecated as of 23.05
|
config = {
|
||||||
# config = {
|
pipewire."context.properties"."default.clock.rate" = "48000";
|
||||||
# pipewire."context.properties"."default.clock.rate" = "48000";
|
pipewire-pulse."stream.properties"."resample.quality" = 15;
|
||||||
# pipewire-pulse."stream.properties"."resample.quality" = 15;
|
client."stream.properties"."resample.quality" = 15;
|
||||||
# client."stream.properties"."resample.quality" = 15;
|
client-rt."stream.properties"."resample.quality" = 15;
|
||||||
# client-rt."stream.properties"."resample.quality" = 15;
|
#jack."context.modules" = [];
|
||||||
# #jack."context.modules" = [];
|
};
|
||||||
# };
|
|
||||||
#media-session.config.bluez-monitor.properties = {
|
#media-session.config.bluez-monitor.properties = {
|
||||||
# "bluez5.headset-roles" = [ "hsp_hs" "hsp_ag" ];
|
# "bluez5.headset-roles" = [ "hsp_hs" "hsp_ag" ];
|
||||||
# "bluez5.codecs" = [ "aac" "ldac" "aptx_hd" ];
|
# "bluez5.codecs" = [ "aac" "ldac" "aptx_hd" ];
|
||||||
|
@ -59,6 +57,6 @@
|
||||||
# "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd --noplugin=sap"
|
# "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd --noplugin=sap"
|
||||||
#];
|
#];
|
||||||
boot.kernelModules = [ "snd-seq" "snd-rawmidi" ]; # midi sequence kernel mods
|
boot.kernelModules = [ "snd-seq" "snd-rawmidi" ]; # midi sequence kernel mods
|
||||||
# hardware.pulseaudio.package = pkgs.pulseaudio.override { jackaudioSupport = true; };
|
hardware.pulseaudio.package = pkgs.pulseaudio.override { jackaudioSupport = true; };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
{ self, pkgs, config, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.postgresql = {
|
|
||||||
enable = true;
|
|
||||||
ensureDatabases = [ "photoprism" ];
|
|
||||||
ensureUsers = [{
|
|
||||||
name = "photoprism";
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.photoprism = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.unstable.photoprism;
|
|
||||||
port = 5152;
|
|
||||||
originalsPath = "/var/lib/private/photoprism/originals";
|
|
||||||
address = "0.0.0.0";
|
|
||||||
settings = {
|
|
||||||
PHOTOPRISM_ADMIN_USER = "admin";
|
|
||||||
PHOTOPRISM_ADMIN_PASSWORD = "photoprism"; # initial password, do change it!
|
|
||||||
PHOTOPRISM_DEFAULT_LOCALE = "en";
|
|
||||||
PHOTOPRISM_DATABASE_DRIVER = "postgres";
|
|
||||||
PHOTOPRISM_DATABASE_NAME = "photoprism";
|
|
||||||
PHOTOPRISM_DATABASE_SERVER = "/run/postgresql/";
|
|
||||||
PHOTOPRISM_DATABASE_USER = "photoprism";
|
|
||||||
PHOTOPRISM_SITE_URL = "http://photos.mossnet.lan/";
|
|
||||||
PHOTOPRISM_SITE_TITLE = "mossnet photos";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.clientMaxBodySize = "500m";
|
|
||||||
services.nginx.recommendedProxySettings = true;
|
|
||||||
services.nginx.virtualHosts."photos.mossnet.lan" = {
|
|
||||||
enableACME = false;
|
|
||||||
forceSSL = false;
|
|
||||||
locations."/" = {
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_pass http://localhost:5152/;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -6,12 +6,13 @@
|
||||||
# TODO it's perhaps advisable to stop all services that depend on postgresql
|
# TODO it's perhaps advisable to stop all services that depend on postgresql
|
||||||
systemctl stop postgresql
|
systemctl stop postgresql
|
||||||
|
|
||||||
|
# TODO replace `<new version>` with the psqlSchema here
|
||||||
# The schema can be found by running:
|
# The schema can be found by running:
|
||||||
# nix eval --raw nixpkgs#postgresql_15.psqlSchema
|
# nix-instantiate '<nixpkgs>' --eval -A postgresql_14.psqlSchema
|
||||||
export NEWDATA="/var/lib/postgresql/15"
|
export NEWDATA="/var/lib/postgresql/<new version>"
|
||||||
|
|
||||||
# TODO specify the postgresql package you'd like to upgrade to
|
# TODO specify the postgresql package you'd like to upgrade to
|
||||||
export NEWBIN="${pkgs.postgresql_15}/bin"
|
export NEWBIN="${pkgs.postgresql_14}/bin"
|
||||||
|
|
||||||
export OLDDATA="${config.services.postgresql.dataDir}"
|
export OLDDATA="${config.services.postgresql.dataDir}"
|
||||||
export OLDBIN="${config.services.postgresql.package}/bin"
|
export OLDBIN="${config.services.postgresql.package}/bin"
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
package = pkgs.radicale;
|
package = pkgs.radicale;
|
||||||
settings = {
|
settings = {
|
||||||
server.hosts = [ "0.0.0.0:5252" ];
|
server.hosts = [ "0.0.0.0:5252" ];
|
||||||
auth.type = "none";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
services.rss-bridge = {
|
services.rss-bridge = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHost = "bridge.sealight.xyz";
|
virtualHost = "bridge.sealight.xyz";
|
||||||
config.system.enabled_bridges = [ "Facebook" "Bandcamp" "Twitter" "Telegram" "Instagram" "Reddit" ];
|
whitelist = [ "Facebook" "Bandcamp" "Twitter" "Telegram" "Instagram" "Reddit" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."bridge.sealight.xyz".forceSSL = true;
|
services.nginx.virtualHosts."bridge.sealight.xyz".forceSSL = true;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
{
|
{
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PasswordAuthentication = false;
|
passwordAuthentication = false;
|
||||||
settings.PermitRootLogin = "no";
|
permitRootLogin = "no";
|
||||||
};
|
};
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 22 ]; # ssh and website
|
networking.firewall.allowedTCPPorts = [ 80 443 22 ]; # ssh and website
|
||||||
security.sudo.wheelNeedsPassword = false; # needed for deploy-rs
|
security.sudo.wheelNeedsPassword = false; # needed for deploy-rs
|
||||||
|
|
27
hosts/profiles/sync/kitaab/default.nix
Normal file
27
hosts/profiles/sync/kitaab/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
systemd.services.kitaab-sync = {
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
path = [
|
||||||
|
pkgs.git
|
||||||
|
pkgs.openssh
|
||||||
|
pkgs.coreutils
|
||||||
|
];
|
||||||
|
script = ''
|
||||||
|
cd /home/anish/kitaab
|
||||||
|
git add -A
|
||||||
|
git diff-index --quiet HEAD || git commit -m 'syncing kitaab' # if nothing, don't exit 1
|
||||||
|
git push
|
||||||
|
exit 0
|
||||||
|
'';
|
||||||
|
serviceConfig = {
|
||||||
|
User = "anish";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.timers.kitaab-sync = {
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
partOf = [ "kitaab-sync.service" ];
|
||||||
|
timerConfig.OnCalendar = [ "hourly" ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -5,19 +5,16 @@
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
path = [
|
path = [
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
pkgs.openssh
|
|
||||||
pkgs.gawk
|
|
||||||
pkgs.rsync
|
pkgs.rsync
|
||||||
pkgs.beets
|
|
||||||
];
|
];
|
||||||
script = builtins.readFile ./get-music.sh;
|
script = builtins.readFile ./get-music.sh;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "anish";
|
User = "anish";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.timers.get-music-sync = {
|
systemd.timers.get-music-timer = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
partOf = [ "get-music-sync.service" ];
|
partOf = [ "get-music-sync.service" ];
|
||||||
timerConfig.OnCalendar = [ "hourly" ];
|
timerConfig.OnCalendar = [ "daily" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,61 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
rsync -r --ignore-existing --log-file=/data/incoming/download-log hypercube@talos.feralhosting.com:private/transmission/data/* /data/incoming
|
||||||
|
|
||||||
set -euo pipefail
|
# you need to set defaults for beets
|
||||||
|
# if already imported -> Skip
|
||||||
|
# Auto accept changes
|
||||||
|
# also install it lmao
|
||||||
|
#beet import /data/incoming
|
||||||
|
|
||||||
REMOTE_HOST="aynish@talos.feralhosting.com"
|
|
||||||
REMOTE_PATH="private/transmission/data/"
|
|
||||||
LOCAL_PATH="/mnt/two/incoming"
|
|
||||||
TRACKING_FILE="/mnt/two/incoming/.downloaded_albums"
|
|
||||||
LOG_FILE="/mnt/two/incoming/download-log"
|
|
||||||
|
|
||||||
# Create tracking file if it doesn't exist
|
|
||||||
touch "$TRACKING_FILE"
|
|
||||||
|
|
||||||
# Get list of albums on remote server
|
|
||||||
echo "$(date): Checking for new albums on seedbox..." >>"$LOG_FILE"
|
|
||||||
REMOTE_ALBUMS=$(rsync --dry-run --list-only "$REMOTE_HOST:$REMOTE_PATH" | grep '^d' | awk '{$1=$2=$3=$4=""; sub(/^ +/, ""); print}' | grep -v '^\.') || true
|
|
||||||
|
|
||||||
if [ -z "$REMOTE_ALBUMS" ]; then
|
|
||||||
echo "$(date): No albums found on remote server" >>"$LOG_FILE"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check each album against tracking file
|
|
||||||
NEW_ALBUMS=""
|
|
||||||
while IFS= read -r album; do
|
|
||||||
if [ -n "$album" ] && ! grep -qF "$album" "$TRACKING_FILE"; then
|
|
||||||
NEW_ALBUMS="$NEW_ALBUMS$album\n"
|
|
||||||
echo "$(date): Found new album: $album" >>"$LOG_FILE"
|
|
||||||
fi
|
|
||||||
done <<<"$REMOTE_ALBUMS"
|
|
||||||
|
|
||||||
if [ -z "$NEW_ALBUMS" ]; then
|
|
||||||
echo "$(date): No new albums to download" >>"$LOG_FILE"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Download new albums only
|
|
||||||
echo "$(date): Starting download of new albums..." >>"$LOG_FILE"
|
|
||||||
while IFS= read -r album; do
|
|
||||||
if [ -n "$album" ]; then
|
|
||||||
echo "$(date): Downloading $album" >>"$LOG_FILE"
|
|
||||||
if rsync -r --log-file="$LOG_FILE" "$REMOTE_HOST:$REMOTE_PATH$album/" "$LOCAL_PATH/$album/"; then
|
|
||||||
echo "$album" >>"$TRACKING_FILE"
|
|
||||||
echo "$(date): Successfully downloaded $album" >>"$LOG_FILE"
|
|
||||||
|
|
||||||
# Import to beets
|
|
||||||
echo "$(date): Importing $album to beets..." >>"$LOG_FILE"
|
|
||||||
# Set umask to allow group read/write access
|
|
||||||
umask 002
|
|
||||||
if beet -p fetchart import -m -l /home/anish/music.log -q -g "$LOCAL_PATH/$album"; then
|
|
||||||
echo "$(date): Successfully imported $album to beets" >>"$LOG_FILE"
|
|
||||||
else
|
|
||||||
echo "$(date): Failed to import $album to beets" >>"$LOG_FILE"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "$(date): Failed to download $album" >>"$LOG_FILE"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done <<<"$(echo -e "$NEW_ALBUMS")"
|
|
||||||
|
|
||||||
echo "$(date): Music sync completed" >>"$LOG_FILE"
|
|
||||||
|
|
|
@ -6,19 +6,19 @@
|
||||||
path = [
|
path = [
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
pkgs.nixVersions.latest
|
pkgs.nixUnstable
|
||||||
pkgs.openssh
|
pkgs.openssh
|
||||||
pkgs.deploy
|
pkgs.deploy
|
||||||
];
|
];
|
||||||
script = ''
|
script = ''
|
||||||
cd /home/anish/usr/helm/
|
cd /etc/nixos/ # TODO make variable
|
||||||
git pull
|
|
||||||
nix flake lock --update-input poonam
|
nix flake lock --update-input poonam
|
||||||
nix flake lock --update-input basant
|
nix flake lock --update-input basant
|
||||||
git add flake.lock
|
# TODO
|
||||||
git diff-index --quiet HEAD || git commit -m 'updating website' # if nothing, don't exit 1
|
# git add flake.lock
|
||||||
git push
|
# git commit -m "update website"
|
||||||
deploy .#helix
|
# git push
|
||||||
|
deploy .#cube
|
||||||
exit 0
|
exit 0
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
beet import -ql "$TR_TORRENT_DIR"
|
|
|
@ -1,33 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = [ pkgs.beets ];
|
|
||||||
services.transmission = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
rpc-enabled = true;
|
|
||||||
rpc-bind-address = "0.0.0.0";
|
|
||||||
rpc-whitelist-enabled = false;
|
|
||||||
script-torrent-done-enabled = true;
|
|
||||||
# Normally, I would write this into the homedir with home-manager
|
|
||||||
# And explictly set the dir to be the output of the home-manager location
|
|
||||||
script-torrent-done-filename = pkgs.writeShellScript "beet-import.sh" ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
beet -p fetchart import -l /home/anish/music.log -q -g "$TR_TORRENT_DIR"
|
|
||||||
'';
|
|
||||||
rpc-url = "/transmission/rpc/";
|
|
||||||
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;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,61 +0,0 @@
|
||||||
{ self, pkgs, config, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.postgresql = {
|
|
||||||
enable = true;
|
|
||||||
ensureDatabases = [ "ulogger" ];
|
|
||||||
ensureUsers = [{
|
|
||||||
name = "ulogger";
|
|
||||||
ensureDBOwnership = true;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
services.ulogger = {
|
|
||||||
enable = true;
|
|
||||||
hostName = "tracks.mossnet.lan";
|
|
||||||
user = "ulogger";
|
|
||||||
conf = ''
|
|
||||||
<?php
|
|
||||||
/* μlogger
|
|
||||||
*
|
|
||||||
* Copyright(C) 2017 Bartek Fabiszewski (www.fabiszewski.net)
|
|
||||||
*
|
|
||||||
* This is free software; you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This is default configuration file.
|
|
||||||
// Copy it to config.php and customize
|
|
||||||
|
|
||||||
// Database config
|
|
||||||
|
|
||||||
// PDO data source name, eg.:
|
|
||||||
// mysql:host=localhost;port=3307;dbname=ulogger;charset=utf8
|
|
||||||
// mysql:unix_socket=/path/to/mysql.sock;dbname=ulogger;charset=utf8
|
|
||||||
// pgsql:host=localhost;port=5432;dbname=ulogger
|
|
||||||
// sqlite:/path/to/ulogger.db
|
|
||||||
$dbdsn = "pgsql:host=/run/postgresql/;port=5432;dbname=ulogger";
|
|
||||||
|
|
||||||
// Database user name
|
|
||||||
$dbuser = "ulogger";
|
|
||||||
|
|
||||||
// Database user password
|
|
||||||
$dbpass = "";
|
|
||||||
|
|
||||||
// Optional table names prefix, eg. "ulogger_"
|
|
||||||
$dbprefix = "";
|
|
||||||
|
|
||||||
?>
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,37 +1,94 @@
|
||||||
{ self, pkgs, config, lib, ... }:
|
{ self, pkgs, config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
age.secrets.wallabag-password.file = "${self}/secrets/wallabag-password.age";
|
# age.secrets.wallabag-password.file = "${self}/secrets/wallabag-password.age";
|
||||||
age.secrets.wallabag-secret.file = "${self}/secrets/wallabag-secret.age";
|
# age.secrets.wallabag-secret.file = "${self}/secrets/wallabag-secret.age";
|
||||||
age.secrets.wallabag-password.owner = "wallabag";
|
# age.secrets.wallabag-password.owner = "wallabag";
|
||||||
age.secrets.wallabag-secret.owner = "wallabag";
|
# age.secrets.wallabag-secret.owner = "wallabag";
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.postgresql_15;
|
package = pkgs.postgresql_11;
|
||||||
|
|
||||||
# Ensure the database, user, and permissions always exist
|
# Ensure the database, user, and permissions always exist
|
||||||
ensureDatabases = [ "wallabag" ];
|
ensureDatabases = [ "wallabag" ];
|
||||||
ensureUsers = [
|
ensureUsers = [
|
||||||
{
|
{
|
||||||
name = "wallabag";
|
name = "wallabag";
|
||||||
# ensureDBOwnership = true;
|
ensurePermissions."DATABASE wallabag" = "ALL PRIVILEGES";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
authentication = ''
|
|
||||||
local wallabag all peer
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.wallabag = {
|
services.wallabag = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "read.mossnet.lan";
|
hostName = "read.mossnet.lan";
|
||||||
virtualHost.enable = true;
|
package = pkgs.wallabag;
|
||||||
package = pkgs.my-wallabag;
|
conf = ''
|
||||||
# Systemd now defaults to /var/lib?
|
# This file is a "template" of what your parameters.yml file should look like
|
||||||
# dataDir = "/var/lib/wallabag";
|
parameters:
|
||||||
parameters = {
|
database_driver: pdo_pgsql
|
||||||
"env(SECRET_FILE)" = config.age.secrets.wallabag-secret.path;
|
database_host: localhost
|
||||||
secret = "%env(file:resolve:SECRET_FILE)%";
|
database_port: ~
|
||||||
};
|
database_name: wallabag
|
||||||
|
database_user: wallabag
|
||||||
|
database_password: wallabag
|
||||||
|
# For SQLite, database_path should be "%kernel.project_dir%/data/db/wallabag.sqlite"
|
||||||
|
database_path: ~
|
||||||
|
database_table_prefix: wallabag_
|
||||||
|
database_socket: null
|
||||||
|
# with PostgreSQL and SQLite, you must set "utf8"
|
||||||
|
database_charset: utf8
|
||||||
|
|
||||||
|
domain_name: http://read.mossnet.lan
|
||||||
|
server_name: "mossnet wallabag instance"
|
||||||
|
|
||||||
|
mailer_transport: smtp
|
||||||
|
mailer_user: ~
|
||||||
|
mailer_password: ~
|
||||||
|
mailer_host: 127.0.0.1
|
||||||
|
mailer_port: false
|
||||||
|
mailer_encryption: ~
|
||||||
|
mailer_auth_mode: ~
|
||||||
|
|
||||||
|
locale: en
|
||||||
|
|
||||||
|
# A secret key that's used to generate certain security-related tokens
|
||||||
|
secret: SAFGOECRIlfal89oe6u0(*^dsaaih961
|
||||||
|
|
||||||
|
# two factor stuff
|
||||||
|
twofactor_auth: true
|
||||||
|
twofactor_sender: no-reply@wallabag.org
|
||||||
|
|
||||||
|
# fosuser stuff
|
||||||
|
fosuser_registration: true
|
||||||
|
fosuser_confirmation: true
|
||||||
|
|
||||||
|
# how long the access token should live in seconds for the API
|
||||||
|
fos_oauth_server_access_token_lifetime: 3600
|
||||||
|
# how long the refresh token should life in seconds for the API
|
||||||
|
fos_oauth_server_refresh_token_lifetime: 1209600
|
||||||
|
|
||||||
|
from_email: ops@sealight.xyz
|
||||||
|
|
||||||
|
rss_limit: 50
|
||||||
|
|
||||||
|
# RabbitMQ processing
|
||||||
|
rabbitmq_host: localhost
|
||||||
|
rabbitmq_port: 5672
|
||||||
|
rabbitmq_user: guest
|
||||||
|
rabbitmq_password: guest
|
||||||
|
rabbitmq_prefetch_count: 10
|
||||||
|
|
||||||
|
# Redis processing
|
||||||
|
redis_scheme: tcp
|
||||||
|
redis_host: localhost
|
||||||
|
redis_port: 6379
|
||||||
|
redis_path: null
|
||||||
|
redis_password: null
|
||||||
|
|
||||||
|
# sentry logging
|
||||||
|
sentry_dsn: ~
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
# networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue