mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-07 07:50:13 +00:00
Compare commits
122 Commits
4b0d68089a
...
keyd-2.4.3
Author | SHA1 | Date | |
---|---|---|---|
1c9bd21ced | |||
14d2cbfdfb | |||
b4c08adea4 | |||
13972b1d66 | |||
352f515798 | |||
d84be966fc | |||
c9aa20c703 | |||
771d41254f | |||
90092c48ec | |||
159a6efe09 | |||
0008de7434 | |||
9826178c0e | |||
d2b1d95281 | |||
4c71797818 | |||
dba975fe86 | |||
1a9ab975d1 | |||
67251a6d8d | |||
967175df70 | |||
5561c85b43 | |||
05a8f4a49b | |||
a1f651010b | |||
3cecb8810c | |||
af753153f1 | |||
d2afdd56ae | |||
18fec1d058 | |||
6a0e70568a | |||
9b44d8f171 | |||
1cf3405103 | |||
7439d4bf39 | |||
316c33e66c | |||
c845ae2fd4 | |||
5bc10bef87 | |||
f0e1fc740f | |||
5826877ad2 | |||
d3b0f21313 | |||
b7d1921c4d | |||
de1337bf58 | |||
3cff7e090c | |||
21794891e7 | |||
20e5d7fef5 | |||
b6a6c761e9 | |||
fc4bd9e4a8 | |||
25e3de5058 | |||
9694467ba0 | |||
71e6780439 | |||
e6d0852be0 | |||
00564c0c40 | |||
57b38a417e | |||
7f9ce5925e | |||
5ce9a26441 | |||
73680961a0 | |||
c59e914430 | |||
e194003f8d | |||
3d6f57c324 | |||
ef2ee7b871 | |||
fc867d60cd | |||
d395347a29 | |||
080f7395e0 | |||
1475172bdb | |||
5d6dab3cab | |||
3e6232cbee | |||
8d72216f13 | |||
dd36a3bd82 | |||
0ed3633404 | |||
95e04de763 | |||
b1ebca57d2 | |||
939d17ada1 | |||
dfd52e2cd5 | |||
b589ba5d8a | |||
200f790ea1 | |||
9f561c822c | |||
1f0b04b89b | |||
38892b1135 | |||
9c2e004c8b | |||
bbb210ec4f | |||
984fca2021 | |||
b284b333c5 | |||
3aef23b746 | |||
5f36508d2b | |||
3387bea109 | |||
6f59ea9f22 | |||
8d09544663 | |||
cb15cc209b | |||
b390fff749 | |||
20456b444b | |||
cce6f6573f | |||
52b86efbb1 | |||
f41774f641 | |||
22cba9acac | |||
9e8bac6834 | |||
b07a8f5e20 | |||
8eb7ef0be7 | |||
22ab2acf66 | |||
d85e4b1593 | |||
6ea99eca5d | |||
60e779085e | |||
6abcdfa3bd | |||
0f0a64b5c4 | |||
edb4ec77ca | |||
3cc264a857 | |||
76a7480a1d | |||
9d4bf082c7 | |||
e86b2f184f | |||
d14054ab17 | |||
9b3d2e39c9 | |||
5a1a843ecd | |||
2ddd980436 | |||
febf1071af | |||
05adc8a221 | |||
a463212023 | |||
2457ade6eb | |||
88d52614a9 | |||
2c663347ee | |||
02fc29c482 | |||
21cbe29bd8 | |||
c0da8391ef | |||
d4e203a04c | |||
38480e0c0c | |||
ee58f7a4ee | |||
4c4e250fa1 | |||
ffe867e6a8 | |||
b599162090 |
20
.github/workflows/check.yml
vendored
Normal file
20
.github/workflows/check.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Check Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # allows manual triggering
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
name: Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@v4
|
||||||
|
- name: Check Nixpkgs Inputs
|
||||||
|
uses: DeterminateSystems/flake-checker-action@v5
|
||||||
|
- name: Add Nix Cache
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||||
|
- name: Check the Flake
|
||||||
|
run: nix flake check
|
52
.github/workflows/update.yml
vendored
Normal file
52
.github/workflows/update.yml
vendored
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
name: Update Flake
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # allows manual triggering
|
||||||
|
schedule:
|
||||||
|
- cron: '33 3 * * 0' # runs weekly on Sunday at 03:33
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lockfile:
|
||||||
|
name: Lockfile
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@v4
|
||||||
|
- name: Check Nixpkgs Inputs
|
||||||
|
uses: DeterminateSystems/flake-checker-action@v5
|
||||||
|
- name: Add Nix Cache
|
||||||
|
uses: DeterminateSystems/magic-nix-cache-action@v2
|
||||||
|
- name: Update flake.lock
|
||||||
|
uses: DeterminateSystems/update-flake-lock@v19
|
||||||
|
id: update
|
||||||
|
with:
|
||||||
|
pr-title: "Update flake.lock" # Title of PR to be created
|
||||||
|
pr-labels: | # Labels to be set on the PR
|
||||||
|
dependencies
|
||||||
|
automated
|
||||||
|
- name: Check the Flake
|
||||||
|
run: nix flake check
|
||||||
|
- name: Enable Pull Request Automerge
|
||||||
|
if: success()
|
||||||
|
run: |
|
||||||
|
gh pr merge \
|
||||||
|
--rebase \
|
||||||
|
--auto \
|
||||||
|
${{ steps.update.outputs.pull-request-number }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
- name: Close Pull Request If Failed
|
||||||
|
if: failure()
|
||||||
|
run: |
|
||||||
|
gh pr close \
|
||||||
|
--comment "Auto-closing pull request" \
|
||||||
|
--delete-branch \
|
||||||
|
${{ steps.update.outputs.pull-request-number }}
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,7 +3,6 @@
|
|||||||
*.db
|
*.db
|
||||||
**/.direnv/**
|
**/.direnv/**
|
||||||
result
|
result
|
||||||
.luarc.json
|
|
||||||
private/**
|
private/**
|
||||||
|
templates/**/flake.lock
|
||||||
!private/**.age
|
!private/**.age
|
||||||
!private/**.sha512
|
|
||||||
|
9
apps/README.md
Normal file
9
apps/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Apps
|
||||||
|
|
||||||
|
These are all my miscellaneous utilies and scripts to accompany this project.
|
||||||
|
|
||||||
|
They can be run with:
|
||||||
|
|
||||||
|
```
|
||||||
|
nix run github:nmasur/dotfiles#appname
|
||||||
|
```
|
@ -11,7 +11,7 @@
|
|||||||
tmpfile=$(mktemp)
|
tmpfile=$(mktemp)
|
||||||
echo "''${secret}" > ''${tmpfile}
|
echo "''${secret}" > ''${tmpfile}
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||||
builtins.toString ../public-keys
|
builtins.toString ../misc/public-keys
|
||||||
} $tmpfile
|
} $tmpfile
|
||||||
rm $tmpfile
|
rm $tmpfile
|
||||||
'');
|
'');
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
--foreground "#fb4934" \
|
--foreground "#fb4934" \
|
||||||
"Missing required parameter." \
|
"Missing required parameter." \
|
||||||
"Usage: installer -- <disk> <host>" \
|
"Usage: installer -- <disk> <host>" \
|
||||||
"Example: installer -- nvme0n1 desktop" \
|
"Example: installer -- nvme0n1 tempest" \
|
||||||
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 desktop"
|
"Flake example: nix run github:nmasur/dotfiles#installer -- nvme0n1 tempest"
|
||||||
echo "(exiting)"
|
echo "(exiting)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
program = "${
|
program = "${
|
||||||
(import ../modules/common/neovim/package {
|
(import ../modules/common/neovim/package {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
colors = (import ../colorscheme/gruvbox).dark;
|
colors = (import ../colorscheme/nord).dark;
|
||||||
})
|
})
|
||||||
}/bin/nvim";
|
}/bin/nvim";
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
--identity ~/.ssh/id_ed25519 $encryptedfile > $tmpfile
|
||||||
echo "Encrypting ''${encryptedfile}..."
|
echo "Encrypting ''${encryptedfile}..."
|
||||||
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
${pkgs.age}/bin/age --encrypt --armor --recipients-file ${
|
||||||
builtins.toString ../public-keys
|
builtins.toString ../misc/public-keys
|
||||||
} $tmpfile > $encryptedfile
|
} $tmpfile > $encryptedfile
|
||||||
rm $tmpfile
|
rm $tmpfile
|
||||||
done
|
done
|
||||||
|
5
colorscheme/README.md
Normal file
5
colorscheme/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Colorschemes
|
||||||
|
|
||||||
|
Color information for different themes is found here. The colors are sourced
|
||||||
|
and used with [base16](https://github.com/chriskempson/base16) format
|
||||||
|
consistently across the system.
|
@ -1,20 +1,24 @@
|
|||||||
{
|
{
|
||||||
name = "everforest"; # dark, hard
|
name = "everforest"; # dark, hard
|
||||||
author = "Sainnhe Park";
|
author = "Sainnhe Park";
|
||||||
base00 = "#2b3339"; # Default Background
|
dark = {
|
||||||
base01 = "#323c41"; # Lighter Background
|
base00 = "#2b3339"; # Default Background
|
||||||
base02 = "#503946"; # Selection Background
|
base01 = "#323c41"; # Lighter Background
|
||||||
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
base02 = "#503946"; # Selection Background
|
||||||
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
base03 = "#868d80"; # Comments, Invisibles, Line Highlighting
|
||||||
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
base04 = "#d3c6aa"; # Dark Foreground (Used for status bars)
|
||||||
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
base05 = "#d3c6aa"; # Default Foreground, Caret, Delimiters, Operators
|
||||||
base07 = "#fff9e8"; # Light Background (Not often used)
|
base06 = "#e9e8d2"; # Light Foreground (Not often used)
|
||||||
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
base07 = "#fff9e8"; # Light Background (Not often used)
|
||||||
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
base08 = "#7fbbb3"; # Variables, XML Tags, Markup Link Text, ...
|
||||||
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
base09 = "#d699b6"; # Integers, Boolean, Constants, ...
|
||||||
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
base0A = "#83c092"; # Classes, Markup Bold, Search Text Background
|
||||||
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
base0B = "#dbbc7f"; # Strings, Inherited Class, Markup Code, Diff Inserted
|
||||||
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
base0C = "#e69875"; # Support, Regular Expressions, Escape Characters, ...
|
||||||
base0E = "#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
base0D = "#a7c080"; # Functions, Methods, Attribute IDs, Headings
|
||||||
base0F = "#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
base0E =
|
||||||
|
"#e67e80"; # Keywords, Storage, Selector, Markup Italic, Diff Changed
|
||||||
|
base0F =
|
||||||
|
"#d699b6"; # Deprecated, Opening/Closing Embedded Language Tags, ...
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
|
name = "nord";
|
||||||
|
author = "arcticicestudio";
|
||||||
dark = {
|
dark = {
|
||||||
name = "nord";
|
|
||||||
author = "arcticicestudio";
|
|
||||||
base00 = "#2E3440";
|
base00 = "#2E3440";
|
||||||
base01 = "#3B4252";
|
base01 = "#3B4252";
|
||||||
base02 = "#434C5E";
|
base02 = "#434C5E";
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
local M = {}
|
|
||||||
|
|
||||||
M.packer = function(use)
|
|
||||||
use({
|
|
||||||
"shaunsingh/nord.nvim",
|
|
||||||
config = function()
|
|
||||||
vim.g.nord_italic = true
|
|
||||||
vim.cmd("colorscheme nord")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
|
5
disks/README.md
Normal file
5
disks/README.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Disks
|
||||||
|
|
||||||
|
These are my [disko](https://github.com/nix-community/disko) configurations,
|
||||||
|
which allow me to save desired disk formatting layouts as a declarative file so
|
||||||
|
I don't have to remember how to format my disks later on.
|
4
docs/README.md
Normal file
4
docs/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Documentation
|
||||||
|
|
||||||
|
Reference documents for some of the more complicated services and maintenance
|
||||||
|
tasks.
|
65
docs/repair-nextcloud.md
Normal file
65
docs/repair-nextcloud.md
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# Repairing Nextcloud
|
||||||
|
|
||||||
|
You can run the maintenance commands like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:mode --on
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:repair
|
||||||
|
sudo -u nextcloud nextcloud-occ maintenance:mode --off
|
||||||
|
```
|
||||||
|
|
||||||
|
## Rescan Files
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ files:scan --all
|
||||||
|
```
|
||||||
|
|
||||||
|
## Converting from SQLite to MySQL (mariadb)
|
||||||
|
|
||||||
|
First: keep Nextcloud set to SQLite as its dbtype, and separately launch MySQL
|
||||||
|
as a service by copying the configuration found
|
||||||
|
[here](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/web-apps/nextcloud.nix).
|
||||||
|
|
||||||
|
No password is necessary, since the user-based auth works with UNIX sockets.
|
||||||
|
|
||||||
|
You can connect to the MySQL instance like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud mysql -S /run/mysqld/mysqld.sock
|
||||||
|
```
|
||||||
|
|
||||||
|
Create a blank database for Nextcloud:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
create database nextcloud;
|
||||||
|
```
|
||||||
|
|
||||||
|
Now setup the [conversion](https://docs.nextcloud.com/server/17/admin_manual/configuration_database/db_conversion.html):
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud nextcloud-occ db:convert-type mysql nextcloud localhost nextcloud
|
||||||
|
```
|
||||||
|
|
||||||
|
Ignore the password prompt. Proceed with the conversion.
|
||||||
|
|
||||||
|
Now `config.php` will be updated but the override config from NixOS will not
|
||||||
|
be. Now update your NixOS configuration:
|
||||||
|
|
||||||
|
- Remove the `mysql` service you created.
|
||||||
|
- Set `dbtype` to `mysql`.
|
||||||
|
- Set `database.createLocally` to `true`.
|
||||||
|
|
||||||
|
Rebuild your configuration.
|
||||||
|
|
||||||
|
Now, make sure to enable [4-byte
|
||||||
|
support](https://docs.nextcloud.com/server/latest/admin_manual/configuration_database/mysql_4byte_support.html)
|
||||||
|
in the database.
|
||||||
|
|
||||||
|
## Backing Up MySQL Database
|
||||||
|
|
||||||
|
Use this mysqldump command:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo -u nextcloud mysqldump -S /run/mysqld/mysqld.sock --default-character-set=utf8mb4 nextcloud > backup.sql
|
||||||
|
```
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
# Restoring Nextcloud From Backup
|
|
||||||
|
|
||||||
Install the `litestream` package.
|
|
||||||
|
|
||||||
```
|
|
||||||
nix-shell --run fish -p litestream
|
|
||||||
```
|
|
||||||
|
|
||||||
Set the S3 credentials:
|
|
||||||
|
|
||||||
```
|
|
||||||
set -x AWS_ACCESS_KEY_ID (read)
|
|
||||||
set -x AWS_SECRET_ACCESS_KEY (read)
|
|
||||||
```
|
|
||||||
|
|
||||||
Restore from S3:
|
|
||||||
|
|
||||||
```
|
|
||||||
litestream restore -o nextcloud.db s3://noahmasur-backup.s3.us-west-002.backblazeb2.com/nextcloud
|
|
||||||
```
|
|
||||||
|
|
||||||
Install Nextcloud. Then copy DB:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo rm /data/nextcloud/data/nextcloud.db*
|
|
||||||
sudo mv nextcloud.db /data/nextcloud/data/
|
|
||||||
sudo chown nextcloud:nextcloud /data/nextcloud/data/nextcloud.db
|
|
||||||
sudo chmod 770 /data/nextcloud/data/nextcloud.db
|
|
||||||
```
|
|
||||||
|
|
||||||
Restart Nextcloud:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo systemctl restart phpfpm-nextcloud.service
|
|
||||||
```
|
|
||||||
|
|
||||||
Adjust Permissions and Directories:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo mkdir /data/nextcloud/data/noah/files
|
|
||||||
sudo chown nextcloud:nextcloud /data/nextcloud/data/noah/files
|
|
||||||
```
|
|
||||||
|
|
45
docs/zfs.md
Normal file
45
docs/zfs.md
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# ZFS
|
||||||
|
|
||||||
|
Swan runs its root on ext4. The ZFS drives are managed imperatively (this
|
||||||
|
[disko configuration](../disks/zfs.nix) is an unused work-in-progress).
|
||||||
|
|
||||||
|
The basic ZFS settings are managed [here](../modules/nixos/hardware/zfs.nix).
|
||||||
|
|
||||||
|
## Creating a New Dataset
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zfs create tank/mydataset
|
||||||
|
sudo zfs set compression=zstd tank/myzstddataset
|
||||||
|
sudo zfs set mountpoint=/data/mydataset tank/mydataset
|
||||||
|
```
|
||||||
|
|
||||||
|
## Maintenance
|
||||||
|
|
||||||
|
### Get Status
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zpool status
|
||||||
|
```
|
||||||
|
|
||||||
|
### Replace Disk
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zdb
|
||||||
|
sudo zpool status -g # Show by GUID
|
||||||
|
sudo zpool offline tank <GUID>
|
||||||
|
sudo zpool status
|
||||||
|
# Remove old disk, insert new disk
|
||||||
|
sudo zdb
|
||||||
|
sudo zpool replace tank <OLD GUID> /dev/disk/by-id/<NEW PATH>
|
||||||
|
sudo zpool status
|
||||||
|
```
|
||||||
|
|
||||||
|
## Initial Setup
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo zpool create tank raidz1 sda sdb sdc
|
||||||
|
sudo zpool set ashift=12 tank
|
||||||
|
sudo zpool set autoexpand=on tank
|
||||||
|
sudo zpool set compression=on tank
|
||||||
|
```
|
||||||
|
|
464
flake.lock
generated
464
flake.lock
generated
@ -17,6 +17,39 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"age": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1672087018,
|
||||||
|
"narHash": "sha256-LRxxJQLQkzoCNYGS/XBixVmYXoZ1mPHKvFicPGXYLcw=",
|
||||||
|
"owner": "FiloSottile",
|
||||||
|
"repo": "age",
|
||||||
|
"rev": "c6dcfa1efcaa27879762a934d5bea0d1b83a894c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "FiloSottile",
|
||||||
|
"ref": "v1.1.1",
|
||||||
|
"repo": "age",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"baleia-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681806450,
|
||||||
|
"narHash": "sha256-jxRlIzWbnSj89032msc5w+2TVt7zVyzlxdXxiH1dQqY=",
|
||||||
|
"owner": "m00qek",
|
||||||
|
"repo": "baleia.nvim",
|
||||||
|
"rev": "00bb4af31c8c3865b735d40ebefa6c3f07b2dd16",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "m00qek",
|
||||||
|
"repo": "baleia.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"bufferline-nvim-src": {
|
"bufferline-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -57,11 +90,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687517837,
|
"lastModified": 1696043447,
|
||||||
"narHash": "sha256-Ea+JTy6NSf+wWIFrgC8gnOnyt01xwmtDEn2KecvaBkg=",
|
"narHash": "sha256-VbJ1dY5pVH2fX1bS+cT2+4+BYEk4lMHRP0+udu9G6tk=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "6460468e7a3e1290f132fee4170ebeaa127f6f32",
|
"rev": "792c2e01347cb1b2e7ec84a1ef73453ca86537d8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -78,11 +111,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687598357,
|
"lastModified": 1695864092,
|
||||||
"narHash": "sha256-70ciIe8415oQnQypawaqocEaLJcI1XtkqRNmle8vsrg=",
|
"narHash": "sha256-Hu1SkFPqO7ND95AOzBkZE2jGXSYhfZ965C03O72Kbu8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "1e7098ee0448dc5d33df394d040f454cd42a809c",
|
"rev": "19b62324663b6b9859caf7f335d232cf4f1f6a32",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -93,14 +126,16 @@
|
|||||||
},
|
},
|
||||||
"firefox-darwin": {
|
"firefox-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687568341,
|
"lastModified": 1696034364,
|
||||||
"narHash": "sha256-5mnjEy1tPfWjlFq/3UB/AyoqkDOJeVu/y/C6Yw2MW9k=",
|
"narHash": "sha256-7giewUYqKhhfhKRxe2EPHCpSM0oMLuByW4RTRZl6Jfc=",
|
||||||
"owner": "bandithedoge",
|
"owner": "bandithedoge",
|
||||||
"repo": "nixpkgs-firefox-darwin",
|
"repo": "nixpkgs-firefox-darwin",
|
||||||
"rev": "0bb6fa671d1f1964b2cab7a3774cba1e071aa26e",
|
"rev": "b1e4d451a15c34d45bfefb05137a20469399a2df",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -126,12 +161,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678901627,
|
"lastModified": 1687709756,
|
||||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
"narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
"rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -141,24 +179,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1685518550,
|
|
||||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_3": {
|
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
@ -176,6 +196,40 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_3": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694529238,
|
||||||
|
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hmts-nvim-src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1693226725,
|
||||||
|
"narHash": "sha256-jUuztOqNBltC3axa7s3CPJz9Cmukfwkf846+Z/gAxCU=",
|
||||||
|
"owner": "calops",
|
||||||
|
"repo": "hmts.nvim",
|
||||||
|
"rev": "14fd941d7ec2bb98314a1aacaa2573d97f1629ab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "calops",
|
||||||
|
"repo": "hmts.nvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -183,11 +237,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687627695,
|
"lastModified": 1696063111,
|
||||||
"narHash": "sha256-6Pu7nWb52PRtUmihwuDNShDmsZiXgtXR0OARtH4DSik=",
|
"narHash": "sha256-F2IJEbyH3xG0eqyAYn9JoV+niqNz+xb4HICYNkkviNI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "172d46d4b2677b32277d903bdf4cff77c2cc6477",
|
"rev": "ae896c810f501bf0c3a2fd7fc2de094dd0addf01",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -197,23 +251,61 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nextcloud-cookbook": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nextcloud-external": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-X7eC8T8wSZGVwCQp6U/WxjMC7aIj39osgHotaUoRNSQ=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nextcloud-news": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-cfJkKRNSz15L4E3w1tnEb+t4MrVwVzb8lb6vCOA4cK4=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nil": {
|
"nil": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1680544266,
|
"lastModified": 1691372739,
|
||||||
"narHash": "sha256-d/TusDXmIo8IT5DNRA21lN+nOVSER8atIx9TJteR6LQ=",
|
"narHash": "sha256-fZ8KfBMcIFO/R7xaWtB85SFeuUjb9SCH8fxYBnY8068=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "nil",
|
"repo": "nil",
|
||||||
"rev": "56a1fa87b98a9508920f4b0ab8fe36d5b54b2362",
|
"rev": "97abe7d3d48721d4e0fcc1876eea83bb4247825b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"ref": "2023-04-03",
|
"ref": "2023-08-09",
|
||||||
"repo": "nil",
|
"repo": "nil",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -241,11 +333,11 @@
|
|||||||
},
|
},
|
||||||
"nixlib": {
|
"nixlib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687049841,
|
"lastModified": 1693701915,
|
||||||
"narHash": "sha256-FBNZQfWtA7bb/rwk92mfiWc85x4hXta2OAouDqO5W8w=",
|
"narHash": "sha256-waHPLdDYUOHSEtMKKabcKIMhlUOHPOOPQ9UyFeEoovs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "908af6d1fa3643c5818ea45aa92b21d6385fbbe5",
|
"rev": "f5af57d3ef9947a70ac86e42695231ac1ad00c25",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -262,11 +354,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687398392,
|
"lastModified": 1696058303,
|
||||||
"narHash": "sha256-T6kc3NMTpGJk1/dve8PGupeVcxboEb78xtTKhe3LL/A=",
|
"narHash": "sha256-eNqKWpF5zG0SrgbbtljFOrRgFgRzCc4++TMFADBMLnc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "649171f56a45af13ba693c156207eafbbbf7edfe",
|
"rev": "150f38bd1e09e20987feacb1b0d5991357532fb5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -277,43 +369,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1639237670,
|
"lastModified": 1695830400,
|
||||||
"narHash": "sha256-RTdL4rEQcgaZGpvtDgkp3oK/V+1LM3I53n0ACPSroAQ=",
|
"narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=",
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "edfb969386ebe6c3cf8f878775a7975cd88f926d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1680487167,
|
|
||||||
"narHash": "sha256-9FNIqrxDZgSliGGN2XJJSvcDYmQbgOANaZA4UWnTdg4=",
|
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "53dad94e874c9586e71decf82d972dfb640ef044",
|
"rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2",
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1687502512,
|
|
||||||
"narHash": "sha256-dBL/01TayOSZYxtY4cMXuNCBk8UMLoqRZA+94xiFpJA=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "3ae20aa58a6c0d1ca95c9b11f59a2d12eebc511f",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -323,18 +383,34 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs-keyd": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686929285,
|
"lastModified": 1690363189,
|
||||||
"narHash": "sha256-WGtVzn+vGMPTXDO0DMNKVFtf+zUSqeW+KKk4Y/Ae99I=",
|
"narHash": "sha256-Zs0VkngOtQz7nIEO7Wi8AwGB4TBSex2KZAw784aOm2M=",
|
||||||
|
"owner": "JohnAZoidberg",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6591d332f93422e388ef6337f6b362b4ff8d0724",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "JohnAZoidberg",
|
||||||
|
"ref": "keyd-2.4.3",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1695825837,
|
||||||
|
"narHash": "sha256-4Ne11kNRnQsmSJCRSSNkFRSnHC4Y5gPDBIQGjjPfJiU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "93fddcf640ceca0be331210ba3101cee9d91c13d",
|
"rev": "5cfafa12d57374f48bcc36fda3274ada276cf69e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-22.11",
|
"ref": "nixos-23.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -342,11 +418,11 @@
|
|||||||
"null-ls-nvim-src": {
|
"null-ls-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1686871437,
|
"lastModified": 1691810493,
|
||||||
"narHash": "sha256-MxIZqyRW8jStiDNXt7Bsw8peDLKpqxKEaUuIJsXkGMI=",
|
"narHash": "sha256-cWA0rzkOp/ekVKaFee7iea1lhnqKtWUIU+fW5M950wI=",
|
||||||
"owner": "jose-elias-alvarez",
|
"owner": "jose-elias-alvarez",
|
||||||
"repo": "null-ls.nvim",
|
"repo": "null-ls.nvim",
|
||||||
"rev": "bbaf5a96913aa92281f154b08732be2f57021c45",
|
"rev": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -357,11 +433,11 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687625402,
|
"lastModified": 1696080597,
|
||||||
"narHash": "sha256-V+vSWypmm/tGbwNXGhqzmiV7vTjV2gNCEh9N7OhNnyA=",
|
"narHash": "sha256-fhf7+NT/xMwPZ/sRT30lnI04AHgf7tLPU4ClMux1nWA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "aeaf37c7538965e45700d39e6b5dc9c9a0e0749c",
|
"rev": "8783c360abc69f58d46a2929534ddd91eb41f3c6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -390,11 +466,11 @@
|
|||||||
"nvim-tree-lua-src": {
|
"nvim-tree-lua-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687132855,
|
"lastModified": 1695716495,
|
||||||
"narHash": "sha256-ZRUoCDBv8rO8ZUBUMLgo33EBbqD9+ZOSET9rkFsA++E=",
|
"narHash": "sha256-Fkchn7UuIHPmVFFrx1kzsE2lviJrAFAe9tHu73HnS/w=",
|
||||||
"owner": "kyazdani42",
|
"owner": "kyazdani42",
|
||||||
"repo": "nvim-tree.lua",
|
"repo": "nvim-tree.lua",
|
||||||
"rev": "c3c6544ee00333b0f1d6a13735d0dd302dba4f70",
|
"rev": "934469b9b6df369e198fb3016969e56393b0dc07",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -406,43 +482,71 @@
|
|||||||
"nvim-treesitter-src": {
|
"nvim-treesitter-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681121236,
|
"lastModified": 1696061053,
|
||||||
"narHash": "sha256-iPsPDLhVKJ14iP1/2cCgcY9SCKK/DQz9Y0mQB1DqNiM=",
|
"narHash": "sha256-KR+VMYTVM2qsLPx412gySAKiGObhs+awbDJhWX72/wY=",
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"rev": "cc360a9beb1b30d172438f640e2c3450358c4086",
|
"rev": "dd4e2dbc002dfce109d621e8bdcd9d89438b0a32",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nvim-treesitter",
|
"owner": "nvim-treesitter",
|
||||||
"ref": "v0.9.0",
|
"ref": "master",
|
||||||
"repo": "nvim-treesitter",
|
"repo": "nvim-treesitter",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"proton-ge": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-75A0VCVdYkiMQ1duE9r2+DLBJzV02vUozoVLeo/TIWQ=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"Comment-nvim-src": "Comment-nvim-src",
|
"Comment-nvim-src": "Comment-nvim-src",
|
||||||
|
"age": "age",
|
||||||
|
"baleia-nvim-src": "baleia-nvim-src",
|
||||||
"bufferline-nvim-src": "bufferline-nvim-src",
|
"bufferline-nvim-src": "bufferline-nvim-src",
|
||||||
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
"cmp-nvim-lsp-src": "cmp-nvim-lsp-src",
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"firefox-darwin": "firefox-darwin",
|
"firefox-darwin": "firefox-darwin",
|
||||||
|
"hmts-nvim-src": "hmts-nvim-src",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nextcloud-cookbook": "nextcloud-cookbook",
|
||||||
|
"nextcloud-external": "nextcloud-external",
|
||||||
|
"nextcloud-news": "nextcloud-news",
|
||||||
"nil": "nil",
|
"nil": "nil",
|
||||||
"nix2vim": "nix2vim",
|
"nix2vim": "nix2vim",
|
||||||
"nixos-generators": "nixos-generators",
|
"nixos-generators": "nixos-generators",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-keyd": "nixpkgs-keyd",
|
||||||
"null-ls-nvim-src": "null-ls-nvim-src",
|
"null-ls-nvim-src": "null-ls-nvim-src",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
"nvim-lspconfig-src": "nvim-lspconfig-src",
|
||||||
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
"nvim-tree-lua-src": "nvim-tree-lua-src",
|
||||||
"nvim-treesitter-src": "nvim-treesitter-src",
|
"nvim-treesitter-src": "nvim-treesitter-src",
|
||||||
|
"proton-ge": "proton-ge",
|
||||||
"telescope-nvim-src": "telescope-nvim-src",
|
"telescope-nvim-src": "telescope-nvim-src",
|
||||||
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
"telescope-project-nvim-src": "telescope-project-nvim-src",
|
||||||
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
"toggleterm-nvim-src": "toggleterm-nvim-src",
|
||||||
|
"tree-sitter-bash": "tree-sitter-bash",
|
||||||
|
"tree-sitter-ini": "tree-sitter-ini",
|
||||||
|
"tree-sitter-lua": "tree-sitter-lua",
|
||||||
|
"tree-sitter-puppet": "tree-sitter-puppet",
|
||||||
|
"tree-sitter-python": "tree-sitter-python",
|
||||||
|
"tree-sitter-rasi": "tree-sitter-rasi",
|
||||||
|
"vscode-terraform-snippets": "vscode-terraform-snippets",
|
||||||
"wallpapers": "wallpapers",
|
"wallpapers": "wallpapers",
|
||||||
"wsl": "wsl"
|
"wsl": "wsl",
|
||||||
|
"zenyd-mpv-scripts": "zenyd-mpv-scripts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rust-overlay": {
|
"rust-overlay": {
|
||||||
@ -457,11 +561,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1680488274,
|
"lastModified": 1688783586,
|
||||||
"narHash": "sha256-0vYMrZDdokVmPQQXtFpnqA2wEgCCUXf5a3dDuDVshn0=",
|
"narHash": "sha256-HHaM2hk2azslv1kH8zmQxXo2e7i5cKgzNIuK4yftzB0=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "7ec2ff598a172c6e8584457167575b3a1a5d80d8",
|
"rev": "7a29283cc242c2486fc67f60b431ef708046d176",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -500,6 +604,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"telescope-nvim-src": {
|
"telescope-nvim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -550,6 +669,121 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tree-sitter-bash": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1695263734,
|
||||||
|
"narHash": "sha256-dJUJGrpBWBLjcqiqxCnJ/MENwa2+uxAmQD71aYloxsw=",
|
||||||
|
"owner": "tree-sitter",
|
||||||
|
"repo": "tree-sitter-bash",
|
||||||
|
"rev": "fd4e40dab883d6456da4d847de8321aee9c80805",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tree-sitter",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "tree-sitter-bash",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-ini": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690815608,
|
||||||
|
"narHash": "sha256-IIpKzpA4q1jpYVZ75VZaxWHaqNt8TA427eMOui2s71M=",
|
||||||
|
"owner": "justinmk",
|
||||||
|
"repo": "tree-sitter-ini",
|
||||||
|
"rev": "7f11a02fb8891482068e0fe419965d7bade81a68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "justinmk",
|
||||||
|
"repo": "tree-sitter-ini",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-lua": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1694072484,
|
||||||
|
"narHash": "sha256-5t5w8KqbefInNbA12/jpNzmky/uOUhsLjKdEqpl1GEc=",
|
||||||
|
"owner": "MunifTanjim",
|
||||||
|
"repo": "tree-sitter-lua",
|
||||||
|
"rev": "9668709211b2e683f27f414454a8b51bf0a6bda1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "MunifTanjim",
|
||||||
|
"ref": "main",
|
||||||
|
"repo": "tree-sitter-lua",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-puppet": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1690231696,
|
||||||
|
"narHash": "sha256-YEjjy9WLwITERYqoeSVrRYnwVBIAwdc4o0lvAK9wizw=",
|
||||||
|
"owner": "amaanq",
|
||||||
|
"repo": "tree-sitter-puppet",
|
||||||
|
"rev": "9ce9a5f7d64528572aaa8d59459ba869e634086b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "amaanq",
|
||||||
|
"repo": "tree-sitter-puppet",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-python": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1695282953,
|
||||||
|
"narHash": "sha256-gRhD3M1DkmwYQDDnyRq6QMTWUJUY0vbetGnN+pBTd84=",
|
||||||
|
"owner": "tree-sitter",
|
||||||
|
"repo": "tree-sitter-python",
|
||||||
|
"rev": "a901729099257aac932d79c60adb5e8a53fa7e6c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tree-sitter",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "tree-sitter-python",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tree-sitter-rasi": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1678701563,
|
||||||
|
"narHash": "sha256-2nYZoLcrxxxiOJEySwHUm93lzMg8mU+V7LIP63ntFdA=",
|
||||||
|
"owner": "Fymyte",
|
||||||
|
"repo": "tree-sitter-rasi",
|
||||||
|
"rev": "371dac6bcce0df5566c1cfebde69d90ecbeefd2d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Fymyte",
|
||||||
|
"repo": "tree-sitter-rasi",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vscode-terraform-snippets": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1614849738,
|
||||||
|
"narHash": "sha256-v392tyzXV+zyBNt5OCB2NBCK7JcByrTa5Ne/nFtSCJI=",
|
||||||
|
"owner": "run-at-scale",
|
||||||
|
"repo": "vscode-terraform-doc-snippets",
|
||||||
|
"rev": "6ab3e44b566e660f38922cf908e6e547eaa5d4b4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "run-at-scale",
|
||||||
|
"repo": "vscode-terraform-doc-snippets",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"wallpapers": {
|
"wallpapers": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -570,14 +804,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils_3",
|
"flake-utils": "flake-utils_3",
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1687279045,
|
"lastModified": 1696053802,
|
||||||
"narHash": "sha256-LR0dsXd/A07M61jclyBUW0wRojEQteWReKM35zoJXp0=",
|
"narHash": "sha256-8TTbJbtGDz1MstExrVQe56eXZpovvZv6G6L6q/4NOKg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "a8486b5d191f11d571f15d80b6e265d1712d01cf",
|
"rev": "cadde47d123d1a534c272b04a7582f1d11474c48",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -585,6 +819,22 @@
|
|||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"zenyd-mpv-scripts": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1650625438,
|
||||||
|
"narHash": "sha256-OBCuzCtgfSwj0i/rBNranuu4LRc47jObwQIJgQQoerg=",
|
||||||
|
"owner": "zenyd",
|
||||||
|
"repo": "mpv-scripts",
|
||||||
|
"rev": "19ea069abcb794d1bf8fac2f59b50d71ab992130",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zenyd",
|
||||||
|
"repo": "mpv-scripts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
147
flake.nix
147
flake.nix
@ -7,6 +7,10 @@
|
|||||||
# Used for system packages
|
# Used for system packages
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
# Update to keyd 2.4.3 not yet in nixpkgs-unstable
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/245327
|
||||||
|
nixpkgs-keyd.url = "github:JohnAZoidberg/nixpkgs/keyd-2.4.3";
|
||||||
|
|
||||||
# Used for MacOS system config
|
# Used for MacOS system config
|
||||||
darwin = {
|
darwin = {
|
||||||
url = "github:/lnl7/nix-darwin/master";
|
url = "github:/lnl7/nix-darwin/master";
|
||||||
@ -20,14 +24,17 @@
|
|||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows =
|
inputs.nixpkgs.follows =
|
||||||
"nixpkgs"; # Use system packages list where available
|
"nixpkgs"; # Use system packages list for their inputs
|
||||||
};
|
};
|
||||||
|
|
||||||
# Community packages; used for Firefox extensions
|
# Community packages; used for Firefox extensions
|
||||||
nur.url = "github:nix-community/nur";
|
nur.url = "github:nix-community/nur";
|
||||||
|
|
||||||
# Use official Firefox binary for macOS
|
# Use official Firefox binary for macOS
|
||||||
firefox-darwin.url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
firefox-darwin = {
|
||||||
|
url = "github:bandithedoge/nixpkgs-firefox-darwin";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# Manage disk format and partitioning
|
# Manage disk format and partitioning
|
||||||
disko = {
|
disko = {
|
||||||
@ -54,10 +61,14 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Nix language server
|
# Nix language server
|
||||||
nil.url = "github:oxalica/nil/2023-04-03";
|
nil = {
|
||||||
|
url = "github:oxalica/nil/2023-08-09";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# Neovim plugins
|
# Neovim plugins
|
||||||
nvim-lspconfig-src = {
|
nvim-lspconfig-src = {
|
||||||
|
# https://github.com/neovim/nvim-lspconfig/tags
|
||||||
url = "github:neovim/nvim-lspconfig/v0.1.6";
|
url = "github:neovim/nvim-lspconfig/v0.1.6";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
@ -69,12 +80,17 @@
|
|||||||
url = "github:jose-elias-alvarez/null-ls.nvim";
|
url = "github:jose-elias-alvarez/null-ls.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
baleia-nvim-src = {
|
||||||
|
url = "github:m00qek/baleia.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
Comment-nvim-src = {
|
Comment-nvim-src = {
|
||||||
url = "github:numToStr/Comment.nvim/v0.8.0";
|
url = "github:numToStr/Comment.nvim/v0.8.0";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nvim-treesitter-src = {
|
nvim-treesitter-src = {
|
||||||
url = "github:nvim-treesitter/nvim-treesitter/v0.9.0";
|
# https://github.com/nvim-treesitter/nvim-treesitter/tags
|
||||||
|
url = "github:nvim-treesitter/nvim-treesitter/master";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
telescope-nvim-src = {
|
telescope-nvim-src = {
|
||||||
@ -97,6 +113,81 @@
|
|||||||
url = "github:kyazdani42/nvim-tree.lua";
|
url = "github:kyazdani42/nvim-tree.lua";
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
vscode-terraform-snippets = {
|
||||||
|
url = "github:run-at-scale/vscode-terraform-doc-snippets";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
hmts-nvim-src = {
|
||||||
|
url = "github:calops/hmts.nvim";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Tree-Sitter Grammars
|
||||||
|
tree-sitter-bash = {
|
||||||
|
url = "github:tree-sitter/tree-sitter-bash/master";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-python = {
|
||||||
|
url = "github:tree-sitter/tree-sitter-python/master";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-lua = {
|
||||||
|
url = "github:MunifTanjim/tree-sitter-lua/main";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-ini = {
|
||||||
|
url = "github:justinmk/tree-sitter-ini";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-puppet = {
|
||||||
|
url = "github:amaanq/tree-sitter-puppet";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
tree-sitter-rasi = {
|
||||||
|
url = "github:Fymyte/tree-sitter-rasi";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# MPV Scripts
|
||||||
|
zenyd-mpv-scripts = {
|
||||||
|
url = "github:zenyd/mpv-scripts";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Age encryption (pin because of failed builds)
|
||||||
|
age = {
|
||||||
|
url = "github:FiloSottile/age/v1.1.1";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# GE version of Proton for game compatibility
|
||||||
|
# Alternatively, could consider using https://github.com/fufexan/nix-gaming
|
||||||
|
proton-ge = {
|
||||||
|
# https://github.com/GloriousEggroll/proton-ge-custom/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton8-16/GE-Proton8-16.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Nextcloud Apps
|
||||||
|
nextcloud-news = {
|
||||||
|
# https://github.com/nextcloud/news/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/nextcloud/news/releases/download/24.0.0/news.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-external = {
|
||||||
|
# https://github.com/nextcloud-releases/external/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/nextcloud-releases/external/releases/download/v5.2.1/external-v5.2.1.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
nextcloud-cookbook = {
|
||||||
|
# https://github.com/nextcloud/cookbook/releases
|
||||||
|
url =
|
||||||
|
"https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -114,15 +205,17 @@
|
|||||||
mail.server = "noahmasur.com";
|
mail.server = "noahmasur.com";
|
||||||
mail.imapHost = "imap.purelymail.com";
|
mail.imapHost = "imap.purelymail.com";
|
||||||
mail.smtpHost = "smtp.purelymail.com";
|
mail.smtpHost = "smtp.purelymail.com";
|
||||||
dotfilesRepo = "git@github.com:nmasur/dotfiles";
|
dotfilesRepo = "https://github.com/nmasur/dotfiles";
|
||||||
gitServer = "git.${baseName}";
|
hostnames = {
|
||||||
metricsServer = "metrics.${baseName}";
|
git = "git.${baseName}";
|
||||||
prometheusServer = "prom.${baseName}";
|
metrics = "metrics.${baseName}";
|
||||||
secretsServer = "vault.${baseName}";
|
prometheus = "prom.${baseName}";
|
||||||
streamServer = "stream.${baseName}";
|
secrets = "vault.${baseName}";
|
||||||
contentServer = "cloud.${baseName}";
|
stream = "stream.${baseName}";
|
||||||
bookServer = "books.${baseName}";
|
content = "cloud.${baseName}";
|
||||||
downloadServer = "download.${baseName}";
|
books = "books.${baseName}";
|
||||||
|
download = "download.${baseName}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Common overlays to always use
|
# Common overlays to always use
|
||||||
@ -132,6 +225,14 @@
|
|||||||
(import ./overlays/neovim-plugins.nix inputs)
|
(import ./overlays/neovim-plugins.nix inputs)
|
||||||
(import ./overlays/calibre-web.nix)
|
(import ./overlays/calibre-web.nix)
|
||||||
(import ./overlays/disko.nix inputs)
|
(import ./overlays/disko.nix inputs)
|
||||||
|
(import ./overlays/tree-sitter.nix inputs)
|
||||||
|
(import ./overlays/caddy.nix inputs)
|
||||||
|
(import ./overlays/mpv-scripts.nix inputs)
|
||||||
|
(import ./overlays/nextcloud-apps.nix inputs)
|
||||||
|
(import ./overlays/betterlockscreen.nix)
|
||||||
|
(import ./overlays/age.nix inputs)
|
||||||
|
(import ./overlays/proton-ge.nix inputs)
|
||||||
|
(import ./overlays/keyd.nix inputs)
|
||||||
];
|
];
|
||||||
|
|
||||||
# System types to support.
|
# System types to support.
|
||||||
@ -159,7 +260,7 @@
|
|||||||
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
import ./hosts/lookingglass { inherit inputs globals overlays; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# For quickly applying local settings with:
|
# For quickly applying home-manager settings with:
|
||||||
# home-manager switch --flake .#tempest
|
# home-manager switch --flake .#tempest
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
tempest =
|
tempest =
|
||||||
@ -210,6 +311,24 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
checks = forAllSystems (system:
|
||||||
|
let pkgs = import nixpkgs { inherit system overlays; };
|
||||||
|
in {
|
||||||
|
neovim = pkgs.runCommand "neovim-check-health" {
|
||||||
|
buildInputs = [ inputs.self.packages.${system}.neovim ];
|
||||||
|
} ''
|
||||||
|
mkdir -p $out
|
||||||
|
export HOME=$TMPDIR
|
||||||
|
nvim -c "checkhealth" -c "write $out/health.log" -c "quitall"
|
||||||
|
|
||||||
|
# Check for errors inside the health log
|
||||||
|
if $(grep "ERROR" $out/health.log); then
|
||||||
|
cat $out/health.log
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
# Templates for starting other projects quickly
|
# Templates for starting other projects quickly
|
||||||
templates = rec {
|
templates = rec {
|
||||||
default = basic;
|
default = basic;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# Hosts
|
# Hosts
|
||||||
|
|
||||||
|
These are the individual machines managed by this flake.
|
||||||
|
|
||||||
| Host | Purpose |
|
| Host | Purpose |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| [aws](./aws/default.nix) | AWS AMI |
|
| [aws](./aws/default.nix) | AWS AMI |
|
||||||
|
@ -4,14 +4,10 @@ inputs.nixos-generators.nixosGenerate {
|
|||||||
inherit system;
|
inherit system;
|
||||||
format = "amazon";
|
format = "amazon";
|
||||||
modules = [
|
modules = [
|
||||||
|
globals
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = overlays;
|
nixpkgs.overlays = overlays;
|
||||||
user = globals.user;
|
|
||||||
fullName = globals.fullName;
|
|
||||||
dotfilesRepo = globals.dotfilesRepo;
|
|
||||||
gitName = globals.gitName;
|
|
||||||
gitEmail = globals.gitEmail;
|
|
||||||
networking.hostName = "sheep";
|
networking.hostName = "sheep";
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
theme.colors = (import ../../colorscheme/gruvbox).dark;
|
theme.colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
# How to install:
|
# How to install:
|
||||||
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
# https://blog.korfuri.fr/posts/2022/08/nixos-on-an-oracle-free-tier-ampere-machine/
|
||||||
|
# These days, probably use nixos-anywhere instead.
|
||||||
|
|
||||||
{ inputs, globals, overlays, ... }:
|
{ inputs, globals, overlays, ... }:
|
||||||
|
|
||||||
@ -21,39 +22,47 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
server = true;
|
server = true;
|
||||||
networking.hostName = "flame";
|
networking.hostName = "flame";
|
||||||
|
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
imports = [ (inputs.nixpkgs + "/nixos/modules/profiles/qemu-guest.nix") ];
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_pci" "usbhid" ];
|
||||||
|
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
|
# I forgot to set a clean label for it
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
device = "/dev/disk/by-uuid/e1b6bd50-306d-429a-9f45-78f57bc597c3";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for systemd-boot
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/D5CA-237A";
|
device = "/dev/disk/by-uuid/D5CA-237A";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Theming
|
# Theming
|
||||||
gui.enable = false;
|
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
|
||||||
|
|
||||||
# Disable passwords, only use SSH key
|
# Server doesn't require GUI
|
||||||
publicKey =
|
gui.enable = false;
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
|
||||||
|
# Still require colors for programs like Neovim, K9S
|
||||||
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
|
|
||||||
# Programs and services
|
# Programs and services
|
||||||
cloudflare.enable = true; # Proxy traffic with Cloudflare
|
cloudflare.enable = true; # Proxy traffic with Cloudflare
|
||||||
dotfiles.enable = true; # Clone dotfiles
|
dotfiles.enable = true; # Clone dotfiles
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
giteaRunner.enable = true;
|
||||||
services.caddy.enable = true;
|
services.caddy.enable = true;
|
||||||
services.grafana.enable = true;
|
services.grafana.enable = true;
|
||||||
services.prometheus.enable = true;
|
services.openssh.enable = true;
|
||||||
|
services.victoriametrics.enable = true;
|
||||||
services.gitea.enable = true;
|
services.gitea.enable = true;
|
||||||
services.vaultwarden.enable = true;
|
services.vaultwarden.enable = true;
|
||||||
services.minecraft-server.enable = true; # Setup Minecraft server
|
services.minecraft-server.enable = true; # Setup Minecraft server
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
cloudflareTunnel = {
|
cloudflareTunnel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
id = "bd250ee1-ed2e-42d2-b627-039f1eb5a4d2";
|
||||||
@ -69,8 +78,9 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||||
};
|
};
|
||||||
|
|
||||||
# # Grant access to Jellyfin directories from Nextcloud
|
# Disable passwords, only use SSH key
|
||||||
# users.users.nextcloud.extraGroups = [ "jellyfin" ];
|
publicKey =
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
||||||
|
|
||||||
# # Wireguard config for Transmission
|
# # Wireguard config for Transmission
|
||||||
# wireguard.enable = true;
|
# wireguard.enable = true;
|
||||||
@ -101,9 +111,6 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
# # VPN port forwarding
|
# # VPN port forwarding
|
||||||
# services.transmission.settings.peer-port = 57599;
|
# services.transmission.settings.peer-port = 57599;
|
||||||
|
|
||||||
# # Grant access to Transmission directories from Jellyfin
|
|
||||||
# users.users.jellyfin.extraGroups = [ "transmission" ];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../password.sha512;
|
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
||||||
wsl = {
|
wsl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wslConf.automount.root = "/mnt";
|
wslConf.automount.root = "/mnt";
|
||||||
|
@ -21,7 +21,7 @@ inputs.darwin.lib.darwinSystem {
|
|||||||
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
identityFile = "/Users/Noah.Masur/.ssh/id_ed25519";
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../colorscheme/gruvbox).dark;
|
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
};
|
};
|
||||||
mail.user = globals.user;
|
mail.user = globals.user;
|
||||||
|
@ -13,10 +13,14 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
../../modules/common
|
../../modules/common
|
||||||
../../modules/nixos
|
../../modules/nixos
|
||||||
{
|
{
|
||||||
|
nixpkgs.overlays = overlays;
|
||||||
|
|
||||||
# Hardware
|
# Hardware
|
||||||
server = true;
|
server = true;
|
||||||
|
physical = true;
|
||||||
networking.hostName = "swan";
|
networking.hostName = "swan";
|
||||||
|
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules =
|
||||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
[ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
|
||||||
|
|
||||||
@ -29,36 +33,54 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
"amdgpu.cik_support=1"
|
"amdgpu.cik_support=1"
|
||||||
"amdgpu.dc=1"
|
"amdgpu.dc=1"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Required binary blobs to boot on this machine
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Prioritize efficiency over performance
|
||||||
powerManagement.cpuFreqGovernor = "powersave";
|
powerManagement.cpuFreqGovernor = "powersave";
|
||||||
|
|
||||||
|
# Allow firmware updates
|
||||||
hardware.cpu.intel.updateMicrocode = true;
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
# ZFS
|
# ZFS
|
||||||
zfs.enable = true;
|
zfs.enable = true;
|
||||||
# Generated with: head -c 8 /etc/machine-id
|
# Generated with: head -c 8 /etc/machine-id
|
||||||
networking.hostId = "600279f4"; # Random ID required for ZFS
|
networking.hostId = "600279f4"; # Random ID required for ZFS
|
||||||
|
|
||||||
|
# Sets root ext4 filesystem instead of declaring it manually
|
||||||
disko = {
|
disko = {
|
||||||
enableConfig = true;
|
enableConfig = true;
|
||||||
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Automatically load the ZFS pool on boot
|
||||||
boot.zfs.extraPools = [ "tank" ];
|
boot.zfs.extraPools = [ "tank" ];
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
|
||||||
|
# Server doesn't require GUI
|
||||||
gui.enable = false;
|
gui.enable = false;
|
||||||
|
|
||||||
|
# Still require colors for programs like Neovim, K9S
|
||||||
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
||||||
nixpkgs.overlays = overlays;
|
|
||||||
|
# Programs and services
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
cloudflare.enable = true;
|
cloudflare.enable = true;
|
||||||
dotfiles.enable = true;
|
dotfiles.enable = true;
|
||||||
arrs.enable = true;
|
arrs.enable = true;
|
||||||
|
services.bind.enable = true;
|
||||||
services.caddy.enable = true;
|
services.caddy.enable = true;
|
||||||
services.jellyfin.enable = true;
|
services.jellyfin.enable = true;
|
||||||
services.nextcloud.enable = true;
|
services.nextcloud.enable = true;
|
||||||
services.calibre-web.enable = true;
|
services.calibre-web.enable = true;
|
||||||
services.prometheus.enable = true;
|
services.openssh.enable = true;
|
||||||
|
services.prometheus.enable = false;
|
||||||
|
services.vmagent.enable = true;
|
||||||
services.samba.enable = true;
|
services.samba.enable = true;
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
cloudflareTunnel = {
|
cloudflareTunnel = {
|
||||||
enable = true;
|
enable = true;
|
||||||
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
id = "646754ac-2149-4a58-b51a-e1d0a1f3ade2";
|
||||||
@ -67,6 +89,7 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCHF/UMtJqPFrf6f6GRY0ZFnkCW7b6sYgUTjTtNfRj1RdmNic1NoJZql7y6BrqQinZvy7nsr1UFDNWoHn6ah3tg= open-ssh-ca@cloudflareaccess.org";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Send regular backups and litestream for DBs to an S3-like bucket
|
||||||
backup.s3 = {
|
backup.s3 = {
|
||||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||||
bucket = "noahmasur-backup";
|
bucket = "noahmasur-backup";
|
||||||
|
@ -17,14 +17,25 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
physical = true;
|
physical = true;
|
||||||
networking.hostName = "tempest";
|
networking.hostName = "tempest";
|
||||||
|
|
||||||
|
# Not sure what's necessary but too afraid to remove anything
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules =
|
||||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||||
|
|
||||||
|
# Graphics and VMs
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
|
# Required binary blobs to boot on this machine
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
||||||
|
# Prioritize performance over efficiency
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
||||||
|
# Allow firmware updates
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
|
# Helps reduce GPU fan noise under idle loads
|
||||||
hardware.fancontrol.enable = true;
|
hardware.fancontrol.enable = true;
|
||||||
hardware.fancontrol.config = ''
|
hardware.fancontrol.config = ''
|
||||||
# Configuration file generated by pwmconfig, changes will be lost
|
# Configuration file generated by pwmconfig, changes will be lost
|
||||||
@ -41,22 +52,29 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
MAXPWM=hwmon0/pwm1=240
|
MAXPWM=hwmon0/pwm1=240
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "/dev/disk/by-label/nixos";
|
device = "/dev/disk/by-label/nixos";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for Grub
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-label/boot";
|
device = "/dev/disk/by-label/boot";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Must be prepared ahead
|
# Secrets must be prepared ahead before deploying
|
||||||
identityFile = "/home/${globals.user}/.ssh/id_ed25519";
|
passwordHash = inputs.nixpkgs.lib.fileContents ../../misc/password.sha512;
|
||||||
passwordHash = inputs.nixpkgs.lib.fileContents ../../password.sha512;
|
|
||||||
|
|
||||||
# Theming
|
# Theming
|
||||||
|
|
||||||
|
# Turn on all features related to desktop and graphical applications
|
||||||
gui.enable = true;
|
gui.enable = true;
|
||||||
|
|
||||||
|
# Set the system-wide theme, also used for non-graphical programs
|
||||||
theme = {
|
theme = {
|
||||||
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
colors = (import ../../colorscheme/gruvbox-dark).dark;
|
||||||
dark = true;
|
dark = true;
|
||||||
@ -91,6 +109,23 @@ inputs.nixpkgs.lib.nixosSystem {
|
|||||||
leagueoflegends.enable = true;
|
leagueoflegends.enable = true;
|
||||||
ryujinx.enable = true;
|
ryujinx.enable = true;
|
||||||
};
|
};
|
||||||
|
services.vmagent.enable = true; # Enables Prometheus metrics
|
||||||
|
services.openssh.enable =
|
||||||
|
true; # Required for Cloudflare tunnel and identity file
|
||||||
|
|
||||||
|
# Allows private remote access over the internet
|
||||||
|
cloudflareTunnel = {
|
||||||
|
enable = true;
|
||||||
|
id = "ac133a82-31fb-480c-942a-cdbcd4c58173";
|
||||||
|
credentialsFile = ../../private/cloudflared-tempest.age;
|
||||||
|
ca =
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPY6C0HmdFCaxYtJxFr3qV4/1X4Q8KrYQ1hlme3u1hJXK+xW+lc9Y9glWHrhiTKilB7carYTB80US0O47gI5yU4= open-ssh-ca@cloudflareaccess.org";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Allows requests to force machine to wake up
|
||||||
|
# This network interface might change, needs to be set specifically for each machine.
|
||||||
|
# Or set usePredictableInterfaceNames = false
|
||||||
|
networking.interfaces.enp5s0.wakeOnLan.enable = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
21
misc/README.md
Normal file
21
misc/README.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Miscellaneous
|
||||||
|
|
||||||
|
These files contain important data sourced by the configuration, or simply
|
||||||
|
information to store for safekeeping later.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Creating hashed password for [password.sha512](./password.sha512):
|
||||||
|
|
||||||
|
```
|
||||||
|
mkpasswd -m sha-512
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Getting key for [public-keys](./public-keys):
|
||||||
|
|
||||||
|
```
|
||||||
|
ssh-keyscan -t ed25519 <hostname>
|
||||||
|
```
|
||||||
|
|
23
misc/libratbag-profile
Normal file
23
misc/libratbag-profile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Profile 1: (active)
|
||||||
|
Name: n/a
|
||||||
|
Report Rate: 1000Hz
|
||||||
|
Resolutions:
|
||||||
|
0: 400dpi (active) (default)
|
||||||
|
1: 800dpi
|
||||||
|
2: 1600dpi
|
||||||
|
3: 2400dpi
|
||||||
|
4: 0dpi
|
||||||
|
Button: 0 is mapped to 'button 1'
|
||||||
|
Button: 1 is mapped to 'button 2'
|
||||||
|
Button: 2 is mapped to 'button 3'
|
||||||
|
Button: 3 is mapped to 'button 4'
|
||||||
|
Button: 4 is mapped to 'button 5'
|
||||||
|
Button: 5 is mapped to macro '↕F11'
|
||||||
|
Button: 6 is mapped to macro '↕VOLUMEDOWN'
|
||||||
|
Button: 7 is mapped to macro '↕VOLUMEUP'
|
||||||
|
Button: 8 is mapped to 'unknown'
|
||||||
|
Button: 9 is mapped to 'wheel-right'
|
||||||
|
Button: 10 is mapped to 'wheel-left'
|
||||||
|
LED: 0, depth: monochrome, mode: on, color: 000000
|
||||||
|
LED: 1, depth: monochrome, mode: on, color: 000000
|
||||||
|
LED: 2, depth: monochrome, mode: on, color: 000000
|
@ -1,5 +1,6 @@
|
|||||||
# Scan hosts: ssh-keyscan -t ed25519 <hostnames>
|
# Scan hosts: ssh-keyscan -t ed25519 <hostnames>
|
||||||
|
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s tempest
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s personal
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHVknmPi7sG6ES0G0jcsvebzKGWWaMfJTYgvOue6EULI flame
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ9mwXlZnIALt9SnH3FOZvdgHLM5ZqwYUERXBbM7Rwh6 swan
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3yHivgEXr2ecwe58h9bkhwTYivf3GwL8xenQKMeiUb tempest
|
@ -5,4 +5,5 @@
|
|||||||
| [common](./common/default.nix) | User programs and OS-agnostic configuration |
|
| [common](./common/default.nix) | User programs and OS-agnostic configuration |
|
||||||
| [darwin](./darwin/default.nix) | macOS-specific configuration |
|
| [darwin](./darwin/default.nix) | macOS-specific configuration |
|
||||||
| [nixos](./nixos/default.nix) | NixOS-specific configuration |
|
| [nixos](./nixos/default.nix) | NixOS-specific configuration |
|
||||||
|
| [wsl](./wsl/default.nix) | WSL-specific configuration |
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
unfreePackages = [
|
unfreePackages = [
|
||||||
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
(lib.mkIf config._1password.enable "onepassword-password-manager")
|
||||||
"okta-browser-plugin"
|
"okta-browser-plugin"
|
||||||
|
"wappalyzer"
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
@ -73,6 +74,7 @@
|
|||||||
"media.ffmpeg.vaapi.enabled" =
|
"media.ffmpeg.vaapi.enabled" =
|
||||||
true; # Enable hardware video acceleration
|
true; # Enable hardware video acceleration
|
||||||
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
"cookiebanners.ui.desktop.enabled" = true; # Reject cookie popups
|
||||||
|
"svg.context-properties.content.enabled" = true; # Sidebery styling
|
||||||
};
|
};
|
||||||
userChrome = ''
|
userChrome = ''
|
||||||
:root {
|
:root {
|
||||||
|
@ -28,13 +28,22 @@
|
|||||||
programs.rofi.terminal =
|
programs.rofi.terminal =
|
||||||
lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
|
lib.mkIf pkgs.stdenv.isLinux "${pkgs.kitty}/bin/kitty";
|
||||||
|
|
||||||
|
# Display images in the terminal
|
||||||
|
programs.fish.shellAliases = {
|
||||||
|
icat = "kitty +kitten icat";
|
||||||
|
ssh = "kitty +kitten ssh";
|
||||||
|
};
|
||||||
|
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
environment = { };
|
environment = { };
|
||||||
extraConfig = "";
|
extraConfig = "";
|
||||||
font.size = 14;
|
font.size = 14;
|
||||||
keybindings = {
|
keybindings = {
|
||||||
|
# Use shift+enter to complete text suggestions in fish
|
||||||
"shift+enter" = "send_text all \\x1F";
|
"shift+enter" = "send_text all \\x1F";
|
||||||
|
|
||||||
|
# Easy fullscreen toggle (for macOS)
|
||||||
"super+f" = "toggle_fullscreen";
|
"super+f" = "toggle_fullscreen";
|
||||||
};
|
};
|
||||||
settings = {
|
settings = {
|
||||||
@ -85,7 +94,6 @@
|
|||||||
# Scrollback
|
# Scrollback
|
||||||
scrolling_lines = 10000;
|
scrolling_lines = 10000;
|
||||||
scrollback_pager_history_size = 10; # MB
|
scrollback_pager_history_size = 10; # MB
|
||||||
scrollback_pager = "${pkgs.neovim}/bin/nvim -c 'normal G'";
|
|
||||||
|
|
||||||
# Window
|
# Window
|
||||||
window_padding_width = 6;
|
window_padding_width = 6;
|
||||||
@ -93,7 +101,7 @@
|
|||||||
tab_bar_edge = "top";
|
tab_bar_edge = "top";
|
||||||
tab_bar_style = "slant";
|
tab_bar_style = "slant";
|
||||||
|
|
||||||
# Audio
|
# Disable audio
|
||||||
enable_audio_bell = false;
|
enable_audio_bell = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
bindings = { };
|
bindings = { };
|
||||||
config = {
|
config = {
|
||||||
image-display-duration = 2;
|
image-display-duration = 2; # For cycling through images
|
||||||
hwdec = "auto-safe";
|
hwdec = "auto-safe"; # Attempt to use GPU decoding for video
|
||||||
};
|
};
|
||||||
scripts = [
|
scripts = [
|
||||||
|
|
||||||
@ -31,25 +31,11 @@
|
|||||||
pkgs.mpvScripts.autoload
|
pkgs.mpvScripts.autoload
|
||||||
|
|
||||||
# Delete current file after quitting
|
# Delete current file after quitting
|
||||||
(pkgs.stdenv.mkDerivation rec {
|
pkgs.mpvScripts.mpv-delete-file
|
||||||
pname = "mpv-delete-file";
|
|
||||||
version = "0.1"; # made-up
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "zenyd";
|
|
||||||
repo = "mpv-scripts";
|
|
||||||
rev = "19ea069abcb794d1bf8fac2f59b50d71ab992130";
|
|
||||||
sha256 = "sha256-OBCuzCtgfSwj0i/rBNranuu4LRc47jObwQIJgQQoerg=";
|
|
||||||
} + "/delete_file.lua";
|
|
||||||
dontBuild = true;
|
|
||||||
dontUnpack = true;
|
|
||||||
installPhase =
|
|
||||||
"install -Dm644 ${src} $out/share/mpv/scripts/delete_file.lua";
|
|
||||||
passthru.scriptName = "delete_file.lua";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set default for opening PDFs
|
# Set default programs for opening PDFs and other media
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
associations.added = {
|
associations.added = {
|
||||||
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
"application/pdf" = [ "pwmt.zathura-cb.desktop" ];
|
||||||
|
@ -59,13 +59,47 @@
|
|||||||
};
|
};
|
||||||
dotfilesRepo = lib.mkOption {
|
dotfilesRepo = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Link to dotfiles repository.";
|
description = "Link to dotfiles repository HTTPS URL.";
|
||||||
};
|
};
|
||||||
unfreePackages = lib.mkOption {
|
unfreePackages = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
description = "List of unfree packages to allow.";
|
description = "List of unfree packages to allow.";
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
hostnames = {
|
||||||
|
git = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for git server (Gitea).";
|
||||||
|
};
|
||||||
|
metrics = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for metrics server.";
|
||||||
|
};
|
||||||
|
prometheus = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for Prometheus server.";
|
||||||
|
};
|
||||||
|
secrets = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for passwords and secrets (Vaultwarden).";
|
||||||
|
};
|
||||||
|
stream = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for video/media library (Jellyfin).";
|
||||||
|
};
|
||||||
|
content = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for personal content system (Nextcloud).";
|
||||||
|
};
|
||||||
|
books = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for books library (Calibre-Web).";
|
||||||
|
};
|
||||||
|
download = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Hostname for download services.";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let stateVersion = "23.05";
|
config = let stateVersion = "23.05";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
imports = [ ./himalaya.nix ./aerc.nix ];
|
imports = [ ./himalaya.nix ./aerc.nix ./system.nix ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
mail.enable = lib.mkEnableOption "Mail service.";
|
mail.enable = lib.mkEnableOption "Mail service.";
|
||||||
@ -27,15 +27,32 @@
|
|||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
programs.mbsync = { enable = true; };
|
programs.mbsync = { enable = true; };
|
||||||
|
|
||||||
|
# Automatically check for mail and keep files synced locally
|
||||||
services.mbsync = lib.mkIf pkgs.stdenv.isLinux {
|
services.mbsync = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
enable = true;
|
enable = true;
|
||||||
frequency = "*:0/5";
|
frequency = "*:0/5";
|
||||||
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
postExec = "${pkgs.notmuch}/bin/notmuch new";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Used to watch for new mail and trigger sync
|
||||||
services.imapnotify.enable = pkgs.stdenv.isLinux;
|
services.imapnotify.enable = pkgs.stdenv.isLinux;
|
||||||
programs.notmuch.enable = true;
|
|
||||||
|
# Allows sending email from CLI/sendmail
|
||||||
|
programs.msmtp.enable = true;
|
||||||
|
|
||||||
|
# Better local mail search
|
||||||
|
programs.notmuch = {
|
||||||
|
enable = true;
|
||||||
|
new.ignore =
|
||||||
|
[ ".mbsyncstate.lock" ".mbsyncstate.journal" ".mbsyncstate.new" ];
|
||||||
|
};
|
||||||
|
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
|
|
||||||
|
# Where email files are stored
|
||||||
maildirBasePath = "${config.homePath}/mail";
|
maildirBasePath = "${config.homePath}/mail";
|
||||||
|
|
||||||
accounts = {
|
accounts = {
|
||||||
home = let address = "${config.mail.user}@${config.mail.server}";
|
home = let address = "${config.mail.user}@${config.mail.server}";
|
||||||
in {
|
in {
|
||||||
@ -48,13 +65,17 @@
|
|||||||
"hey"
|
"hey"
|
||||||
"admin"
|
"admin"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Options for contact completion
|
||||||
alot = { };
|
alot = { };
|
||||||
flavor = "plain";
|
|
||||||
imap = {
|
imap = {
|
||||||
host = config.mail.imapHost;
|
host = config.mail.imapHost;
|
||||||
port = 993;
|
port = 993;
|
||||||
tls.enable = true;
|
tls.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Watch for mail and run notifications or sync
|
||||||
imapnotify = {
|
imapnotify = {
|
||||||
enable = true;
|
enable = true;
|
||||||
boxes = [ "Inbox" ];
|
boxes = [ "Inbox" ];
|
||||||
@ -63,7 +84,11 @@
|
|||||||
config.home-manager.users.${config.user}.services.dunst.enable
|
config.home-manager.users.${config.user}.services.dunst.enable
|
||||||
"${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
|
"${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Name of the directory in maildir for this account
|
||||||
maildir = { path = "main"; };
|
maildir = { path = "main"; };
|
||||||
|
|
||||||
|
# Bi-directional syncing options for local files
|
||||||
mbsync = {
|
mbsync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
create = "both";
|
create = "both";
|
||||||
@ -74,12 +99,17 @@
|
|||||||
CopyArrivalDate = "yes"; # Sync time of original message
|
CopyArrivalDate = "yes"; # Sync time of original message
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable indexing
|
||||||
notmuch.enable = true;
|
notmuch.enable = true;
|
||||||
|
|
||||||
|
# Used to login and send and receive emails
|
||||||
passwordCommand =
|
passwordCommand =
|
||||||
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
"${pkgs.age}/bin/age --decrypt --identity ~/.ssh/id_ed25519 ${
|
||||||
pkgs.writeText "mailpass.age"
|
pkgs.writeText "mailpass.age"
|
||||||
(builtins.readFile ../../../private/mailpass.age)
|
(builtins.readFile ../../../private/mailpass.age)
|
||||||
}";
|
}";
|
||||||
|
|
||||||
smtp = {
|
smtp = {
|
||||||
host = config.mail.smtpHost;
|
host = config.mail.smtpHost;
|
||||||
port = 465;
|
port = 465;
|
||||||
|
34
modules/common/mail/system.nix
Normal file
34
modules/common/mail/system.nix
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
config = lib.mkIf (config.mail.enable || config.server) {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
programs.msmtp.enable = true;
|
||||||
|
|
||||||
|
# The system user for sending automatic notifications
|
||||||
|
accounts.email.accounts.system =
|
||||||
|
let address = "system@${config.mail.server}";
|
||||||
|
in {
|
||||||
|
userName = address;
|
||||||
|
realName = "NixOS System";
|
||||||
|
primary = !config.mail.enable; # Only primary if mail not enabled
|
||||||
|
inherit address;
|
||||||
|
passwordCommand =
|
||||||
|
"${pkgs.age}/bin/age --decrypt --identity ${config.identityFile} ${
|
||||||
|
pkgs.writeText "mailpass-system.age"
|
||||||
|
(builtins.readFile ../../../private/mailpass-system.age)
|
||||||
|
}";
|
||||||
|
msmtp.enable = true;
|
||||||
|
smtp = {
|
||||||
|
host = config.mail.smtpHost;
|
||||||
|
port = 465;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,7 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
# Plugin for aligning text programmatically
|
||||||
|
|
||||||
plugins = [ pkgs.vimPlugins.tabular ];
|
plugins = [ pkgs.vimPlugins.tabular ];
|
||||||
lua = ''
|
lua = ''
|
||||||
-- Align
|
-- Align
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
# Shows buffers in a VSCode-style tab layout
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.vimPlugins.bufferline-nvim
|
pkgs.vimPlugins.bufferline-nvim
|
||||||
pkgs.vimPlugins.vim-bbye # Better closing of buffers
|
pkgs.vimPlugins.vim-bbye # Better closing of buffers
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ pkgs, lib, config, ... }: {
|
{ pkgs, lib, config, ... }: {
|
||||||
|
|
||||||
|
# Sets Neovim colors based on Nix colorscheme
|
||||||
|
|
||||||
options.colors = lib.mkOption {
|
options.colors = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.str;
|
type = lib.types.attrsOf lib.types.str;
|
||||||
description = "Attrset of base16 colorscheme key value pairs.";
|
description = "Attrset of base16 colorscheme key value pairs.";
|
||||||
|
@ -24,12 +24,14 @@
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Enable Luasnip snippet completion
|
||||||
snippet.expand = dsl.rawLua ''
|
snippet.expand = dsl.rawLua ''
|
||||||
function(args)
|
function(args)
|
||||||
require("luasnip").lsp_expand(args.body)
|
require("luasnip").lsp_expand(args.body)
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Basic completion keybinds
|
||||||
mapping = {
|
mapping = {
|
||||||
"['<C-n>']" = dsl.rawLua
|
"['<C-n>']" = dsl.rawLua
|
||||||
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
"require('cmp').mapping.select_next_item({ behavior = require('cmp').SelectBehavior.Insert })";
|
||||||
@ -64,24 +66,26 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# These are where the completion engine gets its suggestions
|
||||||
sources = [
|
sources = [
|
||||||
{ name = "nvim_lua"; }
|
{ name = "nvim_lua"; } # Fills in common Neovim lua functions
|
||||||
{ name = "nvim_lsp"; }
|
{ name = "nvim_lsp"; } # LSP results
|
||||||
{ name = "luasnip"; }
|
{ name = "luasnip"; } # Snippets
|
||||||
{ name = "path"; }
|
{ name = "path"; } # Shell completion from current PATH
|
||||||
{
|
{
|
||||||
name = "buffer";
|
name = "buffer"; # Grep for text from the current text buffer
|
||||||
keyword_length = 3;
|
keyword_length = 3;
|
||||||
max_item_count = 10;
|
max_item_count = 10;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
name = "rg";
|
name = "rg"; # Grep for text from the current directory
|
||||||
keyword_length = 6;
|
keyword_length = 6;
|
||||||
max_item_count = 10;
|
max_item_count = 10;
|
||||||
option = { additional_arguments = "--ignore-case"; };
|
option = { additional_arguments = "--ignore-case"; };
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Styling of the completion menu
|
||||||
formatting = {
|
formatting = {
|
||||||
fields = [ "kind" "abbr" "menu" ];
|
fields = [ "kind" "abbr" "menu" ];
|
||||||
format = dsl.rawLua ''
|
format = dsl.rawLua ''
|
||||||
@ -135,6 +139,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
lua = ''
|
lua = ''
|
||||||
|
-- Load snippets
|
||||||
|
-- Check status: :lua require("luasnip").log.open()
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load({ paths = { "${
|
||||||
|
builtins.toString pkgs.vscode-terraform-snippets
|
||||||
|
}" } })
|
||||||
|
|
||||||
-- Use buffer source for `/`
|
-- Use buffer source for `/`
|
||||||
require('cmp').setup.cmdline("/", {
|
require('cmp').setup.cmdline("/", {
|
||||||
sources = {
|
sources = {
|
||||||
|
@ -29,6 +29,9 @@
|
|||||||
lua = ''
|
lua = ''
|
||||||
${builtins.readFile ./lsp.lua}
|
${builtins.readFile ./lsp.lua}
|
||||||
|
|
||||||
|
-- Prevent infinite log size (change this when debugging)
|
||||||
|
vim.lsp.set_log_level("off")
|
||||||
|
|
||||||
require("null-ls").setup({
|
require("null-ls").setup({
|
||||||
sources = {
|
sources = {
|
||||||
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
|
||||||
|
@ -7,10 +7,14 @@
|
|||||||
pkgs.vimPlugins.comment-nvim # Smart comment commands
|
pkgs.vimPlugins.comment-nvim # Smart comment commands
|
||||||
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
pkgs.vimPlugins.glow-nvim # Markdown preview popup
|
||||||
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
pkgs.vimPlugins.nvim-colorizer-lua # Hex color previews
|
||||||
|
pkgs.vimPlugins.which-key-nvim # Keybind helper
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Initialize some plugins
|
||||||
setup.Comment = { };
|
setup.Comment = { };
|
||||||
setup.colorizer = { };
|
setup.colorizer = { };
|
||||||
|
setup.glow = { };
|
||||||
|
setup.which-key = { };
|
||||||
|
|
||||||
vim.o = {
|
vim.o = {
|
||||||
termguicolors = true; # Set to truecolor
|
termguicolors = true; # Set to truecolor
|
||||||
@ -40,11 +44,17 @@
|
|||||||
relativenumber = true; # Relative numbers instead of absolute
|
relativenumber = true; # Relative numbers instead of absolute
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# For which-key-nvim
|
||||||
|
vim.o.timeout = true;
|
||||||
|
vim.o.timeoutlen = 300;
|
||||||
|
|
||||||
# Better backup, swap and undo storage
|
# Better backup, swap and undo storage
|
||||||
vim.o.backup = true; # Easier to recover and more secure
|
vim.o.backup = true; # Easier to recover and more secure
|
||||||
vim.bo.swapfile = false; # Instead of swaps, create backups
|
vim.bo.swapfile = false; # Instead of swaps, create backups
|
||||||
vim.bo.undofile = true; # Keeps undos after quit
|
vim.bo.undofile = true; # Keeps undos after quit
|
||||||
vim.o.backupdir = dsl.rawLua ''vim.fn.stdpath("cache") .. "/backup"'';
|
vim.o.backupdir =
|
||||||
|
dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/backup//")'';
|
||||||
|
vim.o.undodir = dsl.rawLua ''vim.fn.expand("~/.local/state/nvim/undo//")'';
|
||||||
|
|
||||||
# Required for nvim-cmp completion
|
# Required for nvim-cmp completion
|
||||||
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
vim.opt.completeopt = [ "menu" "menuone" "noselect" ];
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
plugins = [ pkgs.vimPlugins.lualine-nvim ];
|
plugins = [ pkgs.vimPlugins.lualine-nvim ];
|
||||||
setup.lualine = {
|
setup.lualine = {
|
||||||
options = {
|
options = {
|
||||||
theme = "gruvbox";
|
theme = "base16";
|
||||||
icons_enabled = true;
|
icons_enabled = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,26 +1,40 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, lib, ... }: {
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
|
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
|
||||||
with pkgs.tree-sitter-grammars; [
|
with pkgs.tree-sitter-grammars; [
|
||||||
tree-sitter-hcl
|
tree-sitter-bash
|
||||||
tree-sitter-python
|
|
||||||
tree-sitter-lua
|
|
||||||
tree-sitter-nix
|
|
||||||
tree-sitter-fish
|
tree-sitter-fish
|
||||||
|
tree-sitter-hcl
|
||||||
|
tree-sitter-ini
|
||||||
|
tree-sitter-json
|
||||||
|
tree-sitter-lua
|
||||||
|
tree-sitter-markdown
|
||||||
|
tree-sitter-markdown-inline
|
||||||
|
tree-sitter-nix
|
||||||
|
tree-sitter-puppet
|
||||||
|
tree-sitter-python
|
||||||
|
tree-sitter-rasi
|
||||||
tree-sitter-toml
|
tree-sitter-toml
|
||||||
tree-sitter-yaml
|
tree-sitter-yaml
|
||||||
tree-sitter-json
|
|
||||||
]))
|
]))
|
||||||
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
|
||||||
|
pkgs.vimPlugins.playground # Tree-sitter experimenting
|
||||||
pkgs.vimPlugins.nginx-vim
|
pkgs.vimPlugins.nginx-vim
|
||||||
pkgs.vimPlugins.vim-helm
|
pkgs.vimPlugins.vim-helm
|
||||||
pkgs.vimPlugins.vim-puppet
|
pkgs.baleia-nvim # Clean ANSI from kitty scrollback
|
||||||
|
# pkgs.hmts-nvim # Tree-sitter injections for home-manager
|
||||||
|
(pkgs.vimUtils.buildVimPluginFrom2Nix {
|
||||||
|
pname = "nmasur";
|
||||||
|
version = "0.1";
|
||||||
|
src = ../plugin;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
setup."nvim-treesitter.configs" = {
|
setup."nvim-treesitter.configs" = {
|
||||||
highlight = { enable = true; };
|
highlight = { enable = true; };
|
||||||
indent = { enable = true; };
|
indent = { enable = true; };
|
||||||
|
matchup = { enable = true; }; # Uses vim-matchup
|
||||||
|
|
||||||
textobjects = {
|
textobjects = {
|
||||||
select = {
|
select = {
|
||||||
@ -49,4 +63,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Use mkAfter to ensure tree-sitter is already loaded
|
||||||
|
lua = lib.mkAfter ''
|
||||||
|
-- Use HCL parser with .tf files
|
||||||
|
vim.treesitter.language.register('hcl', 'terraform')
|
||||||
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
# Telescope is a fuzzy finder that can work with different sub-plugins
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
pkgs.vimPlugins.telescope-nvim
|
pkgs.vimPlugins.telescope-nvim
|
||||||
pkgs.vimPlugins.project-nvim
|
pkgs.vimPlugins.project-nvim
|
||||||
|
@ -12,6 +12,8 @@ vim.api.nvim_create_autocmd("TermOpen", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- These are all the different types of terminals we can trigger
|
||||||
|
|
||||||
local terminal = require("toggleterm.terminal").Terminal
|
local terminal = require("toggleterm.terminal").Terminal
|
||||||
|
|
||||||
local basicterminal = terminal:new()
|
local basicterminal = terminal:new()
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
# Toggleterm provides a floating terminal inside the editor for quick access
|
||||||
|
|
||||||
plugins = [ pkgs.vimPlugins.toggleterm-nvim ];
|
plugins = [ pkgs.vimPlugins.toggleterm-nvim ];
|
||||||
|
|
||||||
use.toggleterm.setup = dsl.callWith {
|
use.toggleterm.setup = dsl.callWith {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ pkgs, dsl, ... }: {
|
{ pkgs, dsl, ... }: {
|
||||||
|
|
||||||
|
# This plugin creates a side drawer for navigating the current project
|
||||||
|
|
||||||
plugins = [ pkgs.vimPlugins.nvim-tree-lua pkgs.vimPlugins.nvim-web-devicons ];
|
plugins = [ pkgs.vimPlugins.nvim-tree-lua pkgs.vimPlugins.nvim-web-devicons ];
|
||||||
|
|
||||||
# Disable netrw eagerly
|
# Disable netrw eagerly
|
||||||
@ -10,16 +12,16 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
setup.nvim-tree = {
|
setup.nvim-tree = {
|
||||||
disable_netrw = true;
|
disable_netrw = true; # Disable the built-in file manager
|
||||||
hijack_netrw = true;
|
hijack_netrw = true; # Works as the file manager
|
||||||
sync_root_with_cwd = true;
|
sync_root_with_cwd = true; # Change project whenever currend dir changes
|
||||||
respect_buf_cwd = true;
|
respect_buf_cwd = true; # Change to exact location of focused buffer
|
||||||
update_focused_file = {
|
update_focused_file = { # Change project based on the focused buffer
|
||||||
enable = true;
|
enable = true;
|
||||||
update_root = true;
|
update_root = true;
|
||||||
ignore_list = { };
|
ignore_list = { };
|
||||||
};
|
};
|
||||||
diagnostics = {
|
diagnostics = { # Enable LSP and linter integration
|
||||||
enable = true;
|
enable = true;
|
||||||
icons = {
|
icons = {
|
||||||
hint = "";
|
hint = "";
|
||||||
@ -28,7 +30,7 @@
|
|||||||
error = "";
|
error = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
renderer = {
|
renderer = { # Show files with changes vs. current commit
|
||||||
icons = {
|
icons = {
|
||||||
glyphs = {
|
glyphs = {
|
||||||
git = {
|
git = {
|
||||||
@ -43,6 +45,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# Set keybinds and initialize program
|
||||||
on_attach = dsl.rawLua ''
|
on_attach = dsl.rawLua ''
|
||||||
function (bufnr)
|
function (bufnr)
|
||||||
local api = require('nvim-tree.api')
|
local api = require('nvim-tree.api')
|
||||||
@ -58,7 +61,7 @@
|
|||||||
vim.keymap.set('n', 'v', api.node.open.vertical, opts('Open: Vertical Split'))
|
vim.keymap.set('n', 'v', api.node.open.vertical, opts('Open: Vertical Split'))
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
view = {
|
view = { # Set look and feel
|
||||||
width = 30;
|
width = 30;
|
||||||
hide_root_folder = false;
|
hide_root_folder = false;
|
||||||
side = "left";
|
side = "left";
|
||||||
@ -67,6 +70,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Toggle the sidebar
|
||||||
lua = ''
|
lua = ''
|
||||||
vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
|
vim.keymap.set("n", "<Leader>e", ":NvimTreeFindFileToggle<CR>", { silent = true })
|
||||||
'';
|
'';
|
||||||
|
@ -18,11 +18,17 @@ in {
|
|||||||
|
|
||||||
home.packages = [ neovim ];
|
home.packages = [ neovim ];
|
||||||
|
|
||||||
|
# Use Neovim as the editor for git commit messages
|
||||||
programs.git.extraConfig.core.editor = "nvim";
|
programs.git.extraConfig.core.editor = "nvim";
|
||||||
|
programs.jujutsu.settings.ui.editor = "nvim";
|
||||||
|
|
||||||
|
# Set Neovim as the default app for text editing and manual pages
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
MANPAGER = "nvim +Man!";
|
MANPAGER = "nvim +Man!";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Create quick aliases for launching Neovim
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
shellAliases = { vim = "nvim"; };
|
shellAliases = { vim = "nvim"; };
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
@ -31,12 +37,20 @@ in {
|
|||||||
vll = "nvim -c 'Telescope oldfiles'";
|
vll = "nvim -c 'Telescope oldfiles'";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs.kitty.settings.scrollback_pager = lib.mkForce ''
|
|
||||||
${neovim}/bin/nvim -c 'setlocal nonumber nolist showtabline=0 foldcolumn=0|Man!' -c "autocmd VimEnter * normal G" -'';
|
|
||||||
|
|
||||||
|
# Set Neovim as the kitty terminal "scrollback" (vi mode) option.
|
||||||
|
# Requires removing some of the ANSI escape codes that are sent to the
|
||||||
|
# scrollback using sed and baleia, as well as removing several
|
||||||
|
# unnecessary features.
|
||||||
|
programs.kitty.settings.scrollback_pager = ''
|
||||||
|
$SHELL -c 'sed -r "s/[[:cntrl:]]\]133;[AC]..//g" | ${neovim}/bin/nvim -c "setlocal nonumber norelativenumber nolist laststatus=0" -c "lua baleia = require(\"baleia\").setup({}); baleia.once(0)" -c "map <silent> q :qa!<CR>" -c "autocmd VimEnter * normal G"' '';
|
||||||
|
|
||||||
|
# Create a desktop option for launching Neovim from a file manager
|
||||||
|
# (Requires launching the terminal and then executing Neovim)
|
||||||
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
|
xdg.desktopEntries.nvim = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
name = "Neovim wrapper";
|
name = "Neovim wrapper";
|
||||||
exec = "kitty nvim %F";
|
exec = "kitty nvim %F";
|
||||||
|
mimeType = [ "text/plain" "text/markdown" ];
|
||||||
};
|
};
|
||||||
xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux {
|
xdg.mimeApps.defaultApplications = lib.mkIf pkgs.stdenv.isLinux {
|
||||||
"text/plain" = [ "nvim.desktop" ];
|
"text/plain" = [ "nvim.desktop" ];
|
||||||
@ -45,9 +59,6 @@ in {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# # Used for icons in Vim
|
|
||||||
# fonts.fonts = with pkgs; [ nerdfonts ];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ key("n", "<Leader>fs", ":write<CR>")
|
|||||||
key("n", "<Leader>fd", ":lcd %:p:h<CR>", { silent = true })
|
key("n", "<Leader>fd", ":lcd %:p:h<CR>", { silent = true })
|
||||||
key("n", "<Leader>fu", ":lcd ..<CR>", { silent = true })
|
key("n", "<Leader>fu", ":lcd ..<CR>", { silent = true })
|
||||||
key("n", "<Leader><Tab>", ":b#<CR>", { silent = true })
|
key("n", "<Leader><Tab>", ":b#<CR>", { silent = true })
|
||||||
key("n", "<Leader>gr", ":!gh repo view -w<CR><CR>", { silent = true })
|
key("n", "<Leader>gr", ":!gh browse %<CR><CR>", { silent = true })
|
||||||
key("n", "<Leader>tt", [[<Cmd>exe 'edit $NOTES_PATH/journal/'.strftime("%Y-%m-%d_%a").'.md'<CR>]])
|
key("n", "<Leader>tt", [[<Cmd>exe 'edit $NOTES_PATH/journal/'.strftime("%Y-%m-%d_%a").'.md'<CR>]])
|
||||||
key("n", "<Leader>jj", ":!journal<CR>:e<CR>")
|
key("n", "<Leader>jj", ":!journal<CR>:e<CR>")
|
||||||
|
|
||||||
@ -65,6 +65,12 @@ key("n", "<C-Down>", ":resize -2<CR>", { silent = true })
|
|||||||
key("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true })
|
key("n", "<C-Left>", ":vertical resize -2<CR>", { silent = true })
|
||||||
key("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
|
key("n", "<C-Right>", ":vertical resize +2<CR>", { silent = true })
|
||||||
|
|
||||||
|
-- Quickfix
|
||||||
|
key("n", "]q", ":cnext<CR>")
|
||||||
|
key("n", "[q", ":cprevious<CR>")
|
||||||
|
key("n", "co", ":copen<CR>")
|
||||||
|
key("n", "cq", ":cclose<CR>")
|
||||||
|
|
||||||
-- Other
|
-- Other
|
||||||
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
key("n", "<A-CR>", ":noh<CR>", { silent = true }) --- Clear search in VimWiki
|
||||||
key("n", "Y", "y$") --- Copy to end of line
|
key("n", "Y", "y$") --- Copy to end of line
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
|
|
||||||
vim.filetype.add({
|
vim.filetype.add({
|
||||||
pattern = {
|
pattern = {
|
||||||
[".*%.tfvars"] = "hcl",
|
[".*%.tfvars"] = "terraform",
|
||||||
[".*%.tf"] = "hcl",
|
[".*%.tf"] = "terraform",
|
||||||
[".*%.rasi"] = "css",
|
[".*%.rasi"] = "rasi",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
{ pkgs, colors, ... }:
|
{ pkgs, colors, ... }:
|
||||||
|
|
||||||
|
# Comes from nix2vim overlay:
|
||||||
|
# https://github.com/gytis-ivaskevicius/nix2vim/blob/master/lib/neovim-builder.nix
|
||||||
pkgs.neovimBuilder {
|
pkgs.neovimBuilder {
|
||||||
package = pkgs.neovim-unwrapped;
|
package = pkgs.neovim-unwrapped;
|
||||||
inherit colors;
|
inherit colors;
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
expression: (apply_expression
|
||||||
|
function: (apply_expression
|
||||||
|
function: (select_expression
|
||||||
|
attrpath: (attrpath) @writeshell (#match? @writeshell "^writeShell.*$")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(indented_string_expression) @bash
|
||||||
|
)
|
@ -1,5 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
# Allows me to make sure I can work on my dotfiles locally
|
||||||
|
|
||||||
options.dotfiles.enable = lib.mkEnableOption "Clone dotfiles.";
|
options.dotfiles.enable = lib.mkEnableOption "Clone dotfiles.";
|
||||||
|
|
||||||
config = lib.mkIf config.dotfiles.enable {
|
config = lib.mkIf config.dotfiles.enable {
|
||||||
@ -14,13 +16,8 @@
|
|||||||
[ "writeBoundary" ] ''
|
[ "writeBoundary" ] ''
|
||||||
if [ ! -d "${config.dotfilesPath}" ]; then
|
if [ ! -d "${config.dotfilesPath}" ]; then
|
||||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}")
|
||||||
|
$DRY_RUN_CMD ${pkgs.git}/bin/git \
|
||||||
# Force HTTPS because anonymous SSH doesn't work
|
clone ${config.dotfilesRepo} "${config.dotfilesPath}"
|
||||||
GIT_CONFIG_COUNT=1 \
|
|
||||||
GIT_CONFIG_KEY_0="url.https://github.com/.insteadOf" \
|
|
||||||
GIT_CONFIG_VALUE_0="git@github.com:" \
|
|
||||||
$DRY_RUN_CMD \
|
|
||||||
${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}"
|
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
{ config, ... }: {
|
{ config, ... }: {
|
||||||
|
|
||||||
|
# This is just a placeholder as I expect to interact with my notes in a
|
||||||
|
# certain location
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
|
26
modules/common/shell/bash/scripts/docker-cleanup.sh
Executable file
26
modules/common/shell/bash/scripts/docker-cleanup.sh
Executable file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Stop all containers
|
||||||
|
if [ "$(docker ps -a -q)" ]; then
|
||||||
|
echo "Stopping docker containers..."
|
||||||
|
docker stop "$(docker ps -a -q)"
|
||||||
|
else
|
||||||
|
echo "No running docker containers."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove all stopped containers
|
||||||
|
if [ "$(docker ps -a -q)" ]; then
|
||||||
|
echo "Removing docker containers..."
|
||||||
|
docker rm "$(docker ps -a -q)"
|
||||||
|
else
|
||||||
|
echo "No stopped docker containers."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Remove all untagged images
|
||||||
|
if docker images | grep -q "^<none>"; then
|
||||||
|
docker rmi "$(docker images | grep "^<none>" | awk '{print $3}')"
|
||||||
|
else
|
||||||
|
echo "No untagged docker images."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Cleaned up docker."
|
@ -1,5 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
# Convenience utilities from charm.sh
|
||||||
|
|
||||||
options.charm.enable = lib.mkEnableOption "Charm utilities.";
|
options.charm.enable = lib.mkEnableOption "Charm utilities.";
|
||||||
|
|
||||||
config.home-manager.users.${config.user} = lib.mkIf config.charm.enable {
|
config.home-manager.users.${config.user} = lib.mkIf config.charm.enable {
|
||||||
@ -8,6 +10,7 @@
|
|||||||
glow # Markdown previews
|
glow # Markdown previews
|
||||||
skate # Key-value store
|
skate # Key-value store
|
||||||
charm # Manage account and filesystem
|
charm # Manage account and filesystem
|
||||||
|
pop # Send emails from a TUI
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
./fzf.nix
|
./fzf.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./github.nix
|
./github.nix
|
||||||
|
./jujutsu.nix
|
||||||
./nixpkgs.nix
|
./nixpkgs.nix
|
||||||
./starship.nix
|
./starship.nix
|
||||||
./utilities.nix
|
./utilities.nix
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{ config, ... }: {
|
{ config, ... }: {
|
||||||
|
|
||||||
|
# Enables quickly entering Nix shells when changing directories
|
||||||
home-manager.users.${config.user}.programs.direnv = {
|
home-manager.users.${config.user}.programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
|
@ -1,19 +1,24 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
users.users.${config.user}.shell = pkgs.fish;
|
users.users.${config.user}.shell = pkgs.fish;
|
||||||
programs.fish.enable =
|
programs.fish.enable = true; # Needed for LightDM to remember username
|
||||||
true; # Needed for LightDM to remember username (TODO: fix)
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
# Packages used in abbreviations and aliases
|
# Packages used in abbreviations and aliases
|
||||||
home.packages = with pkgs; [ curl exa ];
|
home.packages = with pkgs; [ curl ];
|
||||||
|
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
|
||||||
|
# Version of bash which works much better on the terminal
|
||||||
bash = "${pkgs.bashInteractive}/bin/bash";
|
bash = "${pkgs.bashInteractive}/bin/bash";
|
||||||
ls = "exa";
|
|
||||||
|
# Use eza (exa) instead of ls for fancier output
|
||||||
|
ls = "${pkgs.eza}/bin/eza --group";
|
||||||
|
|
||||||
|
# Move files to XDG trash on the commandline
|
||||||
trash = lib.mkIf pkgs.stdenv.isLinux "${pkgs.trash-cli}/bin/trash-put";
|
trash = lib.mkIf pkgs.stdenv.isLinux "${pkgs.trash-cli}/bin/trash-put";
|
||||||
};
|
};
|
||||||
functions = {
|
functions = {
|
||||||
|
@ -14,7 +14,7 @@ bind -M insert \cp projects
|
|||||||
bind -M default \cp projects
|
bind -M default \cp projects
|
||||||
bind -M insert \x1F accept-autosuggestion
|
bind -M insert \x1F accept-autosuggestion
|
||||||
bind -M default \x1F accept-autosuggestion
|
bind -M default \x1F accept-autosuggestion
|
||||||
bind -M insert \cn 'commandline -r "nix run nixpkgs#"'
|
bind -M insert \cn 'commandline -r "nix shell nixpkgs#"'
|
||||||
bind -M default \cn 'commandline -r "nix run nixpkgs#"'
|
bind -M default \cn 'commandline -r "nix shell nixpkgs#"'
|
||||||
bind -M insert \x11F nix-fzf
|
bind -M insert \x11F nix-fzf
|
||||||
bind -M default \x11F nix-fzf
|
bind -M default \x11F nix-fzf
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ config, ... }: {
|
{ config, ... }: {
|
||||||
|
|
||||||
|
# FZF is a fuzzy-finder for the terminal
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
programs.fzf.enable = true;
|
programs.fzf.enable = true;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
programs.gh =
|
programs.gh =
|
||||||
lib.mkIf config.home-manager.users.${config.user}.programs.git.enable {
|
lib.mkIf config.home-manager.users.${config.user}.programs.git.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableGitCredentialHelper = true;
|
gitCredentialHelper.enable = true;
|
||||||
settings.git_protocol = "https";
|
settings.git_protocol = "https";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
21
modules/common/shell/jujutsu.nix
Normal file
21
modules/common/shell/jujutsu.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
home-manager.users.${config.user}.programs.jujutsu = {
|
||||||
|
enable = true;
|
||||||
|
enableFishIntegration = true;
|
||||||
|
|
||||||
|
# https://github.com/martinvonz/jj/blob/main/docs/config.md
|
||||||
|
settings = {
|
||||||
|
user = {
|
||||||
|
name = config.home-manager.users.${config.user}.programs.git.userName;
|
||||||
|
email =
|
||||||
|
config.home-manager.users.${config.user}.programs.git.userEmail;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -73,6 +73,9 @@
|
|||||||
path = builtins.toString pkgs.path;
|
path = builtins.toString pkgs.path;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# For security, only allow specific users
|
||||||
|
settings.allowed-users = [ "@wheel" config.user ];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ in {
|
|||||||
dig # DNS lookup
|
dig # DNS lookup
|
||||||
fd # find
|
fd # find
|
||||||
htop # Show system processes
|
htop # Show system processes
|
||||||
|
killall # Force quit
|
||||||
inetutils # Includes telnet, whois
|
inetutils # Includes telnet, whois
|
||||||
jq # JSON manipulation
|
jq # JSON manipulation
|
||||||
lf # File viewer
|
lf # File viewer
|
||||||
@ -34,6 +35,9 @@ in {
|
|||||||
tree # View directory hierarchy
|
tree # View directory hierarchy
|
||||||
vimv-rs # Batch rename files
|
vimv-rs # Batch rename files
|
||||||
unzip # Extract zips
|
unzip # Extract zips
|
||||||
|
dua # File sizes (du)
|
||||||
|
du-dust # Disk usage tree (ncdu)
|
||||||
|
duf # Basic disk information (df)
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.zoxide.enable = true; # Shortcut jump command
|
programs.zoxide.enable = true; # Shortcut jump command
|
||||||
@ -52,10 +56,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish.shellAbbrs = {
|
|
||||||
cat = "bat"; # Swap cat with bat
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fish.functions = {
|
programs.fish.functions = {
|
||||||
ping = {
|
ping = {
|
||||||
description = "Improved ping";
|
description = "Improved ping";
|
||||||
|
@ -20,12 +20,22 @@
|
|||||||
};
|
};
|
||||||
xdg.configFile."hammerspoon/Spoons/MoveWindow.spoon".source =
|
xdg.configFile."hammerspoon/Spoons/MoveWindow.spoon".source =
|
||||||
./hammerspoon/Spoons/MoveWindow.spoon;
|
./hammerspoon/Spoons/MoveWindow.spoon;
|
||||||
|
|
||||||
|
home.activation.reloadHammerspoon =
|
||||||
|
config.home-manager.users.${config.user}.lib.dag.entryAfter
|
||||||
|
[ "writeBoundary" ] ''
|
||||||
|
$DRY_RUN_CMD /usr/local/bin/hs -c "hs.reload()"
|
||||||
|
$DRY_RUN_CMD sleep 1
|
||||||
|
$DRY_RUN_CMD /usr/local/bin/hs -c "hs.console.clearConsole()"
|
||||||
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homebrew.casks = [ "hammerspoon" ];
|
homebrew.casks = [ "hammerspoon" ];
|
||||||
|
|
||||||
system.activationScripts.postUserActivation.text = ''
|
system.activationScripts.postUserActivation.text = ''
|
||||||
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"
|
defaults write org.hammerspoon.Hammerspoon MJConfigFile "~/.config/hammerspoon/init.lua"
|
||||||
|
sudo killall Dock
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -55,6 +55,15 @@ local function worklayout()
|
|||||||
local layout = concat(left, right, laptop)
|
local layout = concat(left, right, laptop)
|
||||||
hs.layout.apply(layout)
|
hs.layout.apply(layout)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- Reload Hammerspoon whenever layout changes
|
||||||
|
hs.screen.watcher.new(function()
|
||||||
|
-- Pause for 5 seconds to give time for layout to change
|
||||||
|
hs.timer.doAfter(5, function()
|
||||||
|
-- Perform the actual reload
|
||||||
|
hs.reload()
|
||||||
|
end)
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
return worklayout
|
return worklayout
|
||||||
|
@ -2,3 +2,4 @@ hs.loadSpoon("ControlEscape"):start() -- Load Hammerspoon bits from https://gith
|
|||||||
hs.loadSpoon("Launcher"):init()
|
hs.loadSpoon("Launcher"):init()
|
||||||
hs.loadSpoon("DismissAlerts"):init()
|
hs.loadSpoon("DismissAlerts"):init()
|
||||||
hs.loadSpoon("MoveWindow"):init()
|
hs.loadSpoon("MoveWindow"):init()
|
||||||
|
hs.ipc.cliInstall() -- Install Hammerspoon CLI program
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
"obsidian" # Obsidian packaging on Nix is not available for macOS
|
"obsidian" # Obsidian packaging on Nix is not available for macOS
|
||||||
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
"scroll-reverser" # Different scroll style for mouse vs. trackpad
|
||||||
"steam" # Not packaged for Nix
|
"steam" # Not packaged for Nix
|
||||||
|
"epic-games" # Not packaged for Nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
home.packages = with pkgs; [ calibre ];
|
home.packages = with pkgs; [ calibre ];
|
||||||
# home.sessionVariables = { CALIBRE_USE_DARK_PALETTE = 1; };
|
# home.sessionVariables = { CALIBRE_USE_DARK_PALETTE = 1; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Forces Calibre to use dark mode
|
||||||
environment.sessionVariables = { CALIBRE_USE_DARK_PALETTE = "1"; };
|
environment.sessionVariables = { CALIBRE_USE_DARK_PALETTE = "1"; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -18,12 +18,14 @@
|
|||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
# Quick button for launching nautilus
|
||||||
xsession.windowManager.i3.config.keybindings = {
|
xsession.windowManager.i3.config.keybindings = {
|
||||||
"${
|
"${
|
||||||
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
config.home-manager.users.${config.user}.xsession.windowManager.i3.config.modifier
|
||||||
}+n" = "exec --no-startup-id ${pkgs.gnome.nautilus}/bin/nautilus";
|
}+n" = "exec --no-startup-id ${pkgs.gnome.nautilus}/bin/nautilus";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Generates a QR code and previews it with sushi
|
||||||
programs.fish.functions = {
|
programs.fish.functions = {
|
||||||
qr = {
|
qr = {
|
||||||
body =
|
body =
|
||||||
@ -31,7 +33,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set default for opening directories
|
# Set Nautilus as default for opening directories
|
||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
associations.added."inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
associations.added."inode/directory" = [ "org.gnome.Nautilus.desktop" ];
|
||||||
# associations.removed = {
|
# associations.removed = {
|
||||||
@ -40,6 +42,7 @@
|
|||||||
defaultApplications."inode/directory" =
|
defaultApplications."inode/directory" =
|
||||||
lib.mkBefore [ "org.gnome.Nautilus.desktop" ];
|
lib.mkBefore [ "org.gnome.Nautilus.desktop" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# # Set default for opening directories
|
# # Set default for opening directories
|
||||||
@ -50,6 +53,13 @@
|
|||||||
# lib.mkForce [ "org.gnome.Nautilus.desktop" ];
|
# lib.mkForce [ "org.gnome.Nautilus.desktop" ];
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
# Delete Trash files older than 1 week
|
||||||
|
systemd.user.services.empty-trash = {
|
||||||
|
description = "Empty Trash on a regular basis";
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
|
script = "${pkgs.trash-cli}/bin/trash-empty 7";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,15 @@
|
|||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Adapted in part from: https://github.com/Shawn8901/nix-configuration/blob/1c48be94238a9f463cf0bbd1e1842a4454286514/modules/nixos/steam-compat-tools/default.nix
|
||||||
|
# Based on: https://github.com/NixOS/nixpkgs/issues/73323
|
||||||
|
environment.sessionVariables.STEAM_EXTRA_COMPAT_TOOLS_PATHS =
|
||||||
|
lib.makeBinPath [ pkgs.proton-ge-custom ];
|
||||||
|
|
||||||
|
# Seems like NetworkManager can help speed up Steam launch
|
||||||
|
# https://www.reddit.com/r/archlinux/comments/qguhco/steam_startup_time_arch_1451_seconds_fedora_34/hi8opet/
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
./gtk.nix
|
||||||
./i3.nix
|
./i3.nix
|
||||||
./picom.nix
|
./picom.nix
|
||||||
./polybar.nix
|
./polybar.nix
|
||||||
|
@ -6,7 +6,7 @@ in {
|
|||||||
|
|
||||||
config = lib.mkIf (config.gui.enable && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.gui.enable && pkgs.stdenv.isLinux) {
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
victor-mono # Used for Vim and Terminal
|
victor-mono # Used for Vim and Terminal
|
||||||
(nerdfonts.override { fonts = [ "Hack" ]; }) # For Polybar, Rofi
|
(nerdfonts.override { fonts = [ "Hack" ]; }) # For Polybar, Rofi
|
||||||
];
|
];
|
||||||
|
51
modules/nixos/graphical/gtk.nix
Normal file
51
modules/nixos/graphical/gtk.nix
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
|
options = {
|
||||||
|
gtk.theme = {
|
||||||
|
name = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Theme name for GTK applications";
|
||||||
|
};
|
||||||
|
package = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
description = "Theme package for GTK applications";
|
||||||
|
default = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.gui.enable {
|
||||||
|
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
|
gtk = let
|
||||||
|
gtkExtraConfig = {
|
||||||
|
gtk-application-prefer-dark-theme = config.theme.dark;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = config.gtk.theme.name;
|
||||||
|
package = config.gtk.theme.package;
|
||||||
|
};
|
||||||
|
gtk3.extraConfig = gtkExtraConfig;
|
||||||
|
gtk4.extraConfig = gtkExtraConfig;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
# Required for setting GTK theme (for preferred-color-scheme in browser)
|
||||||
|
services.dbus.packages = [ pkgs.dconf ];
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
# Make the login screen dark
|
||||||
|
services.xserver.displayManager.lightdm.greeters.gtk.theme = {
|
||||||
|
name = config.gtk.theme.name;
|
||||||
|
package = config.gtk.theme.package;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = { GTK_THEME = config.gtk.theme.name; };
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -45,7 +45,7 @@ in {
|
|||||||
{ class = "obsidian"; }
|
{ class = "obsidian"; }
|
||||||
];
|
];
|
||||||
"${ws3}" = [{ class = "discord"; }];
|
"${ws3}" = [{ class = "discord"; }];
|
||||||
"${ws4}" = [{ class = "Steam"; }];
|
"${ws4}" = [ { class = "steam"; } { class = "Steam"; } ];
|
||||||
};
|
};
|
||||||
bars = [{ command = "echo"; }]; # Disable i3bar
|
bars = [{ command = "echo"; }]; # Disable i3bar
|
||||||
colors = let
|
colors = let
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
module-margin = 1;
|
module-margin = 1;
|
||||||
modules-left = "i3";
|
modules-left = "i3";
|
||||||
modules-center = "xwindow";
|
modules-center = "xwindow";
|
||||||
modules-right = "mailcount pulseaudio date power";
|
modules-right = "mailcount network pulseaudio date power";
|
||||||
cursor-click = "pointer";
|
cursor-click = "pointer";
|
||||||
cursor-scroll = "ns-resize";
|
cursor-scroll = "ns-resize";
|
||||||
enable-ipc = true;
|
enable-ipc = true;
|
||||||
@ -106,8 +106,14 @@
|
|||||||
interval = 10;
|
interval = 10;
|
||||||
format = "<label>";
|
format = "<label>";
|
||||||
exec = builtins.toString (pkgs.writeShellScript "mailcount.sh" ''
|
exec = builtins.toString (pkgs.writeShellScript "mailcount.sh" ''
|
||||||
${pkgs.notmuch}/bin/notmuch new > /dev/null
|
${pkgs.notmuch}/bin/notmuch new --quiet 2>&1>/dev/null
|
||||||
UNREAD=$(${pkgs.notmuch}/bin/notmuch count is:inbox and is:unread and folder:main/Inbox)
|
UNREAD=$(
|
||||||
|
${pkgs.notmuch}/bin/notmuch count \
|
||||||
|
is:inbox and \
|
||||||
|
is:unread and \
|
||||||
|
folder:main/Inbox \
|
||||||
|
2>/dev/null
|
||||||
|
)
|
||||||
if [ $UNREAD = "0" ]; then
|
if [ $UNREAD = "0" ]; then
|
||||||
echo ""
|
echo ""
|
||||||
else
|
else
|
||||||
@ -118,6 +124,16 @@
|
|||||||
"i3-msg 'exec --no-startup-id kitty --class aerc aerc'; sleep 0.15; i3-msg '[class=aerc] focus'";
|
"i3-msg 'exec --no-startup-id kitty --class aerc aerc'; sleep 0.15; i3-msg '[class=aerc] focus'";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
"module/network" = {
|
||||||
|
type = "internal/network";
|
||||||
|
interface-type = "wired";
|
||||||
|
interval = 3;
|
||||||
|
accumulate-stats = true;
|
||||||
|
format-connected = "<label-connected>";
|
||||||
|
format-disconnected = "<label-disconnected>";
|
||||||
|
label-connected = "";
|
||||||
|
label-disconnected = "";
|
||||||
|
};
|
||||||
"module/pulseaudio" = {
|
"module/pulseaudio" = {
|
||||||
type = "internal/pulseaudio";
|
type = "internal/pulseaudio";
|
||||||
# format-volume-prefix = "VOL ";
|
# format-volume-prefix = "VOL ";
|
||||||
@ -127,10 +143,10 @@
|
|||||||
# label-volume-background = colors.background;
|
# label-volume-background = colors.background;
|
||||||
format-volume-foreground = config.theme.colors.base0B;
|
format-volume-foreground = config.theme.colors.base0B;
|
||||||
label-volume = "%percentage%%";
|
label-volume = "%percentage%%";
|
||||||
label-muted = "ﱝ ---";
|
label-muted = " ---";
|
||||||
label-muted-foreground = config.theme.colors.base03;
|
label-muted-foreground = config.theme.colors.base03;
|
||||||
ramp-volume-0 = "";
|
ramp-volume-0 = "";
|
||||||
ramp-volume-1 = "墳";
|
ramp-volume-1 = "";
|
||||||
ramp-volume-2 = "";
|
ramp-volume-2 = "";
|
||||||
click-right = config.audioSwitchCommand;
|
click-right = config.audioSwitchCommand;
|
||||||
};
|
};
|
||||||
|
@ -59,7 +59,7 @@ in {
|
|||||||
border = mkLiteral "0px";
|
border = mkLiteral "0px";
|
||||||
border-radius = mkLiteral "0px";
|
border-radius = mkLiteral "0px";
|
||||||
border-color = mkLiteral config.theme.colors.base04;
|
border-color = mkLiteral config.theme.colors.base04;
|
||||||
children = map mkLiteral [ "inputbar" "listview" ];
|
children = map mkLiteral [ "inputbar" "message" "listview" ];
|
||||||
spacing = mkLiteral "10px";
|
spacing = mkLiteral "10px";
|
||||||
padding = mkLiteral "10px";
|
padding = mkLiteral "10px";
|
||||||
};
|
};
|
||||||
|
@ -25,7 +25,7 @@ in {
|
|||||||
| ${rofi}/bin/rofi \
|
| ${rofi}/bin/rofi \
|
||||||
-theme-str '@import "power.rasi"' \
|
-theme-str '@import "power.rasi"' \
|
||||||
-hover-select \
|
-hover-select \
|
||||||
-me-select-entry ''' \
|
-me-select-entry "" \
|
||||||
-me-accept-entry MousePrimary \
|
-me-accept-entry MousePrimary \
|
||||||
-dmenu \
|
-dmenu \
|
||||||
-sep ';' \
|
-sep ';' \
|
||||||
|
@ -32,7 +32,7 @@ done
|
|||||||
chosen=$(printf '%s;%s\n' "$yes" "$no" |
|
chosen=$(printf '%s;%s\n' "$yes" "$no" |
|
||||||
rofi -theme-str '@import "prompt.rasi"' \
|
rofi -theme-str '@import "prompt.rasi"' \
|
||||||
-hover-select \
|
-hover-select \
|
||||||
-me-select-entry '' \
|
-me-select-entry "" \
|
||||||
-me-accept-entry MousePrimary \
|
-me-accept-entry MousePrimary \
|
||||||
-p "$query" \
|
-p "$query" \
|
||||||
-dmenu \
|
-dmenu \
|
||||||
|
@ -4,14 +4,13 @@
|
|||||||
*/
|
*/
|
||||||
@import "common.rasi"
|
@import "common.rasi"
|
||||||
* {
|
* {
|
||||||
font: @text-font;
|
font: @prompt-text-font;
|
||||||
}
|
}
|
||||||
#window {
|
#window {
|
||||||
height: @prompt-window-height;
|
height: @prompt-window-height;
|
||||||
width: @prompt-window-width;
|
width: @prompt-window-width;
|
||||||
children: [ inputbar, horibox ];
|
children: [ inputbar, horibox ];
|
||||||
border: @prompt-window-border;
|
border: @prompt-window-border;
|
||||||
border-color: @accent;
|
|
||||||
}
|
}
|
||||||
#inputbar {
|
#inputbar {
|
||||||
enabled: false;
|
enabled: false;
|
||||||
@ -19,8 +18,6 @@
|
|||||||
#prompt {
|
#prompt {
|
||||||
padding: @prompt-prompt-padding;
|
padding: @prompt-prompt-padding;
|
||||||
margin: @prompt-prompt-margin;
|
margin: @prompt-prompt-margin;
|
||||||
background-color: @accent;
|
|
||||||
text-color: @background-light;
|
|
||||||
}
|
}
|
||||||
#listview {
|
#listview {
|
||||||
padding: @prompt-listview-padding;
|
padding: @prompt-listview-padding;
|
||||||
@ -31,19 +28,3 @@
|
|||||||
font: @prompt-text-font;
|
font: @prompt-text-font;
|
||||||
padding: @prompt-element-padding;
|
padding: @prompt-element-padding;
|
||||||
}
|
}
|
||||||
element.alternate.active,
|
|
||||||
element.normal.active,
|
|
||||||
element.alternate.urgent,
|
|
||||||
element.normal.urgent {
|
|
||||||
background-color: @background-light;
|
|
||||||
text-color: @foreground;
|
|
||||||
}
|
|
||||||
element.selected.urgent {
|
|
||||||
background-color: @off;
|
|
||||||
text-color: @background;
|
|
||||||
}
|
|
||||||
element.selected.active {
|
|
||||||
background-color: @on;
|
|
||||||
text-color: @background;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -1,27 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
config = lib.mkIf config.gui.enable {
|
||||||
gtk.theme = {
|
|
||||||
name = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Theme name for GTK applications";
|
|
||||||
};
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
description = "Theme package name for GTK applications";
|
|
||||||
default = "gnome-themes-extra";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = let
|
|
||||||
|
|
||||||
gtkTheme = {
|
|
||||||
name = config.gtk.theme.name;
|
|
||||||
package = pkgs."${config.gtk.theme.package}";
|
|
||||||
};
|
|
||||||
|
|
||||||
in lib.mkIf config.gui.enable {
|
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
@ -36,10 +15,8 @@
|
|||||||
enable = config.services.xserver.enable;
|
enable = config.services.xserver.enable;
|
||||||
background = config.wallpaper;
|
background = config.wallpaper;
|
||||||
|
|
||||||
# Make the login screen dark
|
|
||||||
greeters.gtk.theme = gtkTheme;
|
|
||||||
|
|
||||||
# Show default user
|
# Show default user
|
||||||
|
# Also make sure /var/lib/AccountsService/users/<user> has SystemAccount=false
|
||||||
extraSeatDefaults = ''
|
extraSeatDefaults = ''
|
||||||
greeter-hide-users = false
|
greeter-hide-users = false
|
||||||
'';
|
'';
|
||||||
@ -54,12 +31,6 @@
|
|||||||
xclip # Clipboard
|
xclip # Clipboard
|
||||||
];
|
];
|
||||||
|
|
||||||
# Required for setting GTK theme (for preferred-color-scheme in browser)
|
|
||||||
services.dbus.packages = [ pkgs.dconf ];
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
|
|
||||||
environment.sessionVariables = { GTK_THEME = config.gtk.theme.name; };
|
|
||||||
|
|
||||||
home-manager.users.${config.user} = {
|
home-manager.users.${config.user} = {
|
||||||
|
|
||||||
programs.fish.shellAliases = {
|
programs.fish.shellAliases = {
|
||||||
@ -67,17 +38,6 @@
|
|||||||
pbpaste = "xclip -selection clipboard -out";
|
pbpaste = "xclip -selection clipboard -out";
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk = let
|
|
||||||
gtkExtraConfig = {
|
|
||||||
gtk-application-prefer-dark-theme = config.theme.dark;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
enable = true;
|
|
||||||
theme = gtkTheme;
|
|
||||||
gtk3.extraConfig = gtkExtraConfig;
|
|
||||||
gtk4.extraConfig = gtkExtraConfig;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
boot.loader = lib.mkIf config.physical {
|
boot.loader = lib.mkIf (config.physical && !config.server) {
|
||||||
grub = {
|
grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ config, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
@ -15,9 +15,25 @@
|
|||||||
# Use capslock as escape and/or control
|
# Use capslock as escape and/or control
|
||||||
services.keyd = {
|
services.keyd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = { main = { capslock = "overload(control, esc)"; }; };
|
keyboards = {
|
||||||
|
default = {
|
||||||
|
ids = [ "*" ];
|
||||||
|
settings = {
|
||||||
|
main = { capslock = "overload(control, esc)"; };
|
||||||
|
|
||||||
|
# Fix: ctrl-click sends escape afterwards
|
||||||
|
# Suppresses escape if held for more than 500ms
|
||||||
|
# https://github.com/rvaiya/keyd/issues/424
|
||||||
|
global = { overload_tap_timeout = 500; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# For some reason, keyd doesn't restart properly when updating
|
||||||
|
system.activationScripts.keyd.text =
|
||||||
|
"${pkgs.systemd}/bin/systemctl restart keyd.service";
|
||||||
|
|
||||||
# Enable num lock on login
|
# Enable num lock on login
|
||||||
home-manager.users.${config.user}.xsession.numlock.enable = true;
|
home-manager.users.${config.user}.xsession.numlock.enable = true;
|
||||||
|
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
{ config, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.physical {
|
config = lib.mkIf config.physical {
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
networking.useDHCP = !config.networking.networkmanager.enable;
|
||||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
|
||||||
# replicates the default behaviour.
|
|
||||||
networking.useDHCP = false;
|
|
||||||
networking.interfaces.enp5s0.useDHCP = true;
|
|
||||||
networking.interfaces.wlp4s0.useDHCP = true;
|
|
||||||
|
|
||||||
networking.firewall.allowPing = lib.mkIf config.server true;
|
networking.firewall.allowPing = lib.mkIf config.server true;
|
||||||
|
|
||||||
@ -15,6 +10,9 @@
|
|||||||
services.avahi = {
|
services.avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domainName = "local";
|
domainName = "local";
|
||||||
|
ipv6 = false; # Should work either way
|
||||||
|
# Resolve local hostnames using Avahi DNS
|
||||||
|
nssmdns = true;
|
||||||
publish = {
|
publish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
addresses = true;
|
addresses = true;
|
||||||
@ -23,8 +21,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Resolve local hostnames using Avahi DNS
|
environment.systemPackages = [
|
||||||
services.avahi.nssmdns = true;
|
(pkgs.writeShellScriptBin "wake-tempest"
|
||||||
|
"${pkgs.wakeonlan}/bin/wakeonlan --ip=192.168.1.255 74:56:3C:40:37:5D")
|
||||||
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf (pkgs.stdenv.isLinux && config.server) {
|
config = lib.mkIf config.server {
|
||||||
|
|
||||||
# Servers need a bootloader or they won't start
|
# Servers need a bootloader or they won't start
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
config = lib.mkIf config.physical {
|
config = lib.mkIf (config.physical && !config.server) {
|
||||||
|
|
||||||
# Prevent wake from keyboard
|
# Prevent wake from keyboard
|
||||||
powerManagement.powerDownCommands = ''
|
powerManagement.powerDownCommands = ''
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.physical && pkgs.stdenv.isLinux) {
|
||||||
|
|
||||||
# Enables wireless support via wpa_supplicant.
|
# Enables wireless support via wpa_supplicant.
|
||||||
networking.wireless.enable = true;
|
networking.wireless.enable = !config.networking.networkmanager.enable;
|
||||||
|
|
||||||
# Allows the user to control the WiFi settings.
|
# Allows the user to control the WiFi settings.
|
||||||
networking.wireless.userControlled.enable = true;
|
networking.wireless.userControlled.enable = true;
|
||||||
|
@ -1,16 +1,21 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, lib, ... }: {
|
||||||
|
|
||||||
options = { zfs.enable = lib.mkEnableOption "ZFS file system."; };
|
options = { zfs.enable = lib.mkEnableOption "ZFS file system."; };
|
||||||
|
|
||||||
config =
|
config = lib.mkIf (config.server && config.zfs.enable) {
|
||||||
lib.mkIf (pkgs.stdenv.isLinux && config.server && config.zfs.enable) {
|
|
||||||
|
|
||||||
# Only use compatible Linux kernel, since ZFS can be behind
|
# Only use compatible Linux kernel, since ZFS can be behind
|
||||||
boot.kernelPackages =
|
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
config.boot.zfs.package.latestCompatibleLinuxPackages;
|
boot.kernelParams = [ "nohibernate" ];
|
||||||
boot.kernelParams = [ "nohibernate" ];
|
boot.supportedFilesystems = [ "zfs" ];
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
services.prometheus.exporters.zfs.enable =
|
||||||
|
config.prometheus.exporters.enable;
|
||||||
|
prometheus.scrapeTargets = [
|
||||||
|
"127.0.0.1:${
|
||||||
|
builtins.toString config.services.prometheus.exporters.zfs.port
|
||||||
|
}"
|
||||||
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,34 @@
|
|||||||
{ config, lib, ... }: {
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
options = {
|
let
|
||||||
arrs.enable = lib.mkEnableOption "Arr services";
|
|
||||||
downloadServer = lib.mkOption {
|
arrConfig = {
|
||||||
type = lib.types.nullOr lib.types.str;
|
radarr = {
|
||||||
description = "Hostname for download services";
|
exportarrPort = "9707";
|
||||||
default = null;
|
url = "localhost:7878";
|
||||||
|
apiKey = config.secrets.radarrApiKey.dest;
|
||||||
|
};
|
||||||
|
sonarr = {
|
||||||
|
exportarrPort = "9708";
|
||||||
|
url = "localhost:8989";
|
||||||
|
apiKey = config.secrets.sonarrApiKey.dest;
|
||||||
|
};
|
||||||
|
prowlarr = {
|
||||||
|
exportarrPort = "9709";
|
||||||
|
url = "localhost:9696";
|
||||||
|
apiKey = config.secrets.prowlarrApiKey.dest;
|
||||||
|
};
|
||||||
|
sabnzbd = {
|
||||||
|
exportarrPort = "9710";
|
||||||
|
url = "localhost:8085";
|
||||||
|
apiKey = config.secrets.sabnzbdApiKey.dest;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
options = { arrs.enable = lib.mkEnableOption "Arr services"; };
|
||||||
|
|
||||||
config = lib.mkIf config.arrs.enable {
|
config = lib.mkIf config.arrs.enable {
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
@ -45,29 +65,29 @@
|
|||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/sonarr*" ];
|
path = [ "/sonarr*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:8989"; }];
|
upstreams = [{ dial = arrConfig.sonarr.url; }];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/radarr*" ];
|
path = [ "/radarr*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:7878"; }];
|
upstreams = [{ dial = arrConfig.radarr.url; }];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/prowlarr*" ];
|
path = [ "/prowlarr*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
@ -78,35 +98,111 @@
|
|||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/bazarr*" ];
|
path = [ "/bazarr*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:6767"; }];
|
upstreams = [{
|
||||||
|
dial = "localhost:${
|
||||||
|
builtins.toString config.services.bazarr.listenPort
|
||||||
|
}";
|
||||||
|
}];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{
|
match = [{
|
||||||
host = [ config.arrServer ];
|
host = [ config.hostnames.download ];
|
||||||
path = [ "/sabnzbd*" ];
|
path = [ "/sabnzbd*" ];
|
||||||
}];
|
}];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:8085"; }];
|
upstreams = [{ dial = arrConfig.sabnzbd.url; }];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
group = "download";
|
group = "download";
|
||||||
match = [{ host = [ config.arrServer ]; }];
|
match = [{ host = [ config.hostnames.download ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:5055"; }];
|
upstreams = [{
|
||||||
|
dial =
|
||||||
|
"localhost:${builtins.toString config.services.jellyseerr.port}";
|
||||||
|
}];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Enable Prometheus exporters
|
||||||
|
systemd.services = lib.mapAttrs' (name: attrs: {
|
||||||
|
name = "prometheus-${name}-exporter";
|
||||||
|
value = {
|
||||||
|
description = "Export Prometheus metrics for ${name}";
|
||||||
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "${name}.service" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
DynamicUser = true;
|
||||||
|
ExecStart = let
|
||||||
|
url = if name != "sabnzbd" then
|
||||||
|
"http://${attrs.url}/${name}"
|
||||||
|
else
|
||||||
|
"http://${attrs.url}";
|
||||||
|
in ''
|
||||||
|
${pkgs.exportarr}/bin/exportarr ${name} \
|
||||||
|
--url ${url} \
|
||||||
|
--port ${attrs.exportarrPort}'';
|
||||||
|
EnvironmentFile =
|
||||||
|
lib.mkIf (builtins.hasAttr "apiKey" attrs) attrs.apiKey;
|
||||||
|
Restart = "on-failure";
|
||||||
|
ProtectHome = true;
|
||||||
|
ProtectSystem = "strict";
|
||||||
|
PrivateTmp = true;
|
||||||
|
PrivateDevices = true;
|
||||||
|
ProtectHostname = true;
|
||||||
|
ProtectClock = true;
|
||||||
|
ProtectKernelTunables = true;
|
||||||
|
ProtectKernelModules = true;
|
||||||
|
ProtectKernelLogs = true;
|
||||||
|
ProtectControlGroups = true;
|
||||||
|
NoNewPrivileges = true;
|
||||||
|
RestrictRealtime = true;
|
||||||
|
RestrictSUIDSGID = true;
|
||||||
|
RemoveIPC = true;
|
||||||
|
PrivateMounts = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}) arrConfig;
|
||||||
|
|
||||||
|
# Secrets for Prometheus exporters
|
||||||
|
secrets.radarrApiKey = {
|
||||||
|
source = ../../../private/radarr-api-key.age;
|
||||||
|
dest = "/var/private/radarr-api";
|
||||||
|
prefix = "API_KEY=";
|
||||||
|
};
|
||||||
|
secrets.sonarrApiKey = {
|
||||||
|
source = ../../../private/sonarr-api-key.age;
|
||||||
|
dest = "/var/private/sonarr-api";
|
||||||
|
prefix = "API_KEY=";
|
||||||
|
};
|
||||||
|
secrets.prowlarrApiKey = {
|
||||||
|
source = ../../../private/prowlarr-api-key.age;
|
||||||
|
dest = "/var/private/prowlarr-api";
|
||||||
|
prefix = "API_KEY=";
|
||||||
|
};
|
||||||
|
secrets.sabnzbdApiKey = {
|
||||||
|
source = ../../../private/sabnzbd-api-key.age;
|
||||||
|
dest = "/var/private/sabnzbd-api";
|
||||||
|
prefix = "API_KEY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Prometheus scrape targets
|
||||||
|
prometheus.scrapeTargets = map (key:
|
||||||
|
"127.0.0.1:${
|
||||||
|
lib.attrsets.getAttrFromPath [ key "exportarrPort" ] arrConfig
|
||||||
|
}") (builtins.attrNames arrConfig);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
55
modules/nixos/services/bind.nix
Normal file
55
modules/nixos/services/bind.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
localIp = "192.168.1.218";
|
||||||
|
localServices = [
|
||||||
|
config.hostnames.stream
|
||||||
|
config.hostnames.content
|
||||||
|
config.hostnames.books
|
||||||
|
config.hostnames.download
|
||||||
|
];
|
||||||
|
mkRecord = service: "${service} A ${localIp}";
|
||||||
|
localRecords = lib.concatLines (map mkRecord localServices);
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
|
config = lib.mkIf config.services.bind.enable {
|
||||||
|
|
||||||
|
caddy.cidrAllowlist = [ "192.168.0.0/16" ];
|
||||||
|
|
||||||
|
services.bind = {
|
||||||
|
cacheNetworks = [ "127.0.0.0/24" "192.168.0.0/16" ];
|
||||||
|
forwarders = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
|
ipv4Only = true;
|
||||||
|
|
||||||
|
# Use rpz zone as an override
|
||||||
|
extraOptions = ''response-policy { zone "rpz"; };'';
|
||||||
|
|
||||||
|
zones = {
|
||||||
|
rpz = {
|
||||||
|
master = true;
|
||||||
|
file = pkgs.writeText "db.rpz" ''
|
||||||
|
$TTL 60 ; 1 minute
|
||||||
|
@ IN SOA localhost. root.localhost. (
|
||||||
|
2023071800 ; serial
|
||||||
|
1h ; refresh
|
||||||
|
30m ; retry
|
||||||
|
1w ; expire
|
||||||
|
30m ; minimum ttl
|
||||||
|
)
|
||||||
|
IN NS localhost.
|
||||||
|
localhost A 127.0.0.1
|
||||||
|
${localRecords}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 53 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,52 +1,72 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
caddy.tlsPolicies = lib.mkOption {
|
caddy = {
|
||||||
type = lib.types.listOf lib.types.attrs;
|
tlsPolicies = lib.mkOption {
|
||||||
description = "Caddy JSON TLS policies";
|
type = lib.types.listOf lib.types.attrs;
|
||||||
default = [ ];
|
description = "Caddy JSON TLS policies";
|
||||||
};
|
default = [ ];
|
||||||
caddy.routes = lib.mkOption {
|
};
|
||||||
type = lib.types.listOf lib.types.attrs;
|
routes = lib.mkOption {
|
||||||
description = "Caddy JSON routes for http servers";
|
type = lib.types.listOf lib.types.attrs;
|
||||||
default = [ ];
|
description = "Caddy JSON routes for http servers";
|
||||||
};
|
default = [ ];
|
||||||
caddy.blocks = lib.mkOption {
|
};
|
||||||
type = lib.types.listOf lib.types.attrs;
|
blocks = lib.mkOption {
|
||||||
description = "Caddy JSON error blocks for http servers";
|
type = lib.types.listOf lib.types.attrs;
|
||||||
default = [ ];
|
description = "Caddy JSON error blocks for http servers";
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
|
cidrAllowlist = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.str;
|
||||||
|
description = "CIDR blocks to allow for requests";
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config =
|
config = lib.mkIf config.services.caddy.enable {
|
||||||
lib.mkIf (config.services.caddy.enable && config.caddy.routes != [ ]) {
|
|
||||||
|
|
||||||
services.caddy = {
|
# Force Caddy to 403 if not coming from allowlisted source
|
||||||
adapter = "''"; # Required to enable JSON
|
caddy.cidrAllowlist = [ "127.0.0.1/32" ];
|
||||||
configFile = pkgs.writeText "Caddyfile" (builtins.toJSON {
|
caddy.routes = [{
|
||||||
apps.http.servers.main = {
|
match = [{ not = [{ remote_ip.ranges = config.caddy.cidrAllowlist; }]; }];
|
||||||
listen = [ ":443" ];
|
handle = [{
|
||||||
routes = config.caddy.routes;
|
handler = "static_response";
|
||||||
errors.routes = config.caddy.blocks;
|
status_code = "403";
|
||||||
# logs = { }; # Uncomment to collect access logs
|
}];
|
||||||
|
}];
|
||||||
|
|
||||||
|
services.caddy = {
|
||||||
|
adapter = "''"; # Required to enable JSON
|
||||||
|
configFile = pkgs.writeText "Caddyfile" (builtins.toJSON {
|
||||||
|
apps.http.servers.main = {
|
||||||
|
listen = [ ":443" ];
|
||||||
|
routes = config.caddy.routes;
|
||||||
|
errors.routes = config.caddy.blocks;
|
||||||
|
logs = { }; # Uncomment to collect access logs
|
||||||
|
};
|
||||||
|
apps.http.servers.metrics = { }; # Enables Prometheus metrics
|
||||||
|
apps.tls.automation.policies = config.caddy.tlsPolicies;
|
||||||
|
logging.logs.main = {
|
||||||
|
encoder = { format = "console"; };
|
||||||
|
writer = {
|
||||||
|
output = "file";
|
||||||
|
filename = "${config.services.caddy.logDir}/caddy.log";
|
||||||
|
roll = true;
|
||||||
|
roll_size_mb = 1;
|
||||||
};
|
};
|
||||||
apps.tls.automation.policies = config.caddy.tlsPolicies;
|
level = "INFO";
|
||||||
logging.logs.main = {
|
};
|
||||||
encoder = { format = "console"; };
|
});
|
||||||
writer = {
|
|
||||||
output = "file";
|
|
||||||
filename = "${config.services.caddy.logDir}/caddy.log";
|
|
||||||
roll = true;
|
|
||||||
};
|
|
||||||
level = "INFO";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
networking.firewall.allowedUDPPorts = [ 443 ];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 443 ];
|
||||||
|
|
||||||
|
prometheus.scrapeTargets = [ "127.0.0.1:2019" ];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,6 @@ let
|
|||||||
in {
|
in {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
bookServer = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
description = "Hostname for Calibre library";
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
backups.calibre = lib.mkOption {
|
backups.calibre = lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
description = "Whether to backup Calibre library";
|
description = "Whether to backup Calibre library";
|
||||||
@ -32,10 +27,14 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
caddy.routes = [{
|
caddy.routes = [{
|
||||||
match = [{ host = [ config.bookServer ]; }];
|
match = [{ host = [ config.hostnames.books ]; }];
|
||||||
handle = [{
|
handle = [{
|
||||||
handler = "reverse_proxy";
|
handler = "reverse_proxy";
|
||||||
upstreams = [{ dial = "localhost:8083"; }];
|
upstreams = [{
|
||||||
|
dial = "localhost:${
|
||||||
|
builtins.toString config.services.calibre-web.listen.port
|
||||||
|
}";
|
||||||
|
}];
|
||||||
headers.request.add."X-Script-Name" = [ "/calibre-web" ];
|
headers.request.add."X-Script-Name" = [ "/calibre-web" ];
|
||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
|
@ -41,19 +41,10 @@ in {
|
|||||||
config = lib.mkIf config.cloudflare.enable {
|
config = lib.mkIf config.cloudflare.enable {
|
||||||
|
|
||||||
# Forces Caddy to error if coming from a non-Cloudflare IP
|
# Forces Caddy to error if coming from a non-Cloudflare IP
|
||||||
caddy.blocks = [{
|
caddy.cidrAllowlist = cloudflareIpRanges;
|
||||||
match = [{ not = [{ remote_ip.ranges = cloudflareIpRanges; }]; }];
|
|
||||||
handle = [{
|
|
||||||
handler = "static_response";
|
|
||||||
abort = true;
|
|
||||||
}];
|
|
||||||
}];
|
|
||||||
|
|
||||||
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
||||||
services.caddy.package = (pkgs.callPackage ../../../overlays/caddy.nix {
|
services.caddy.package = pkgs.caddy-cloudflare; # Patched overlay
|
||||||
plugins = [ "github.com/caddy-dns/cloudflare" ];
|
|
||||||
# vendorSha256 = "sha256-K9HPZnr+hMcK5aEd1H4gEg6PXAaNrNWFvaHYm5m62JY=";
|
|
||||||
});
|
|
||||||
caddy.tlsPolicies = [{
|
caddy.tlsPolicies = [{
|
||||||
issuers = [{
|
issuers = [{
|
||||||
module = "acme";
|
module = "acme";
|
||||||
|
@ -3,10 +3,12 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./arr.nix
|
./arr.nix
|
||||||
./backups.nix
|
./backups.nix
|
||||||
|
./bind.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
./calibre.nix
|
./calibre.nix
|
||||||
./cloudflare-tunnel.nix
|
./cloudflare-tunnel.nix
|
||||||
./cloudflare.nix
|
./cloudflare.nix
|
||||||
|
./gitea-runner.nix
|
||||||
./gitea.nix
|
./gitea.nix
|
||||||
./gnupg.nix
|
./gnupg.nix
|
||||||
./grafana.nix
|
./grafana.nix
|
||||||
@ -23,6 +25,7 @@
|
|||||||
./sshd.nix
|
./sshd.nix
|
||||||
./transmission.nix
|
./transmission.nix
|
||||||
./vaultwarden.nix
|
./vaultwarden.nix
|
||||||
|
./victoriametrics.nix
|
||||||
./wireguard.nix
|
./wireguard.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
58
modules/nixos/services/gitea-runner.nix
Normal file
58
modules/nixos/services/gitea-runner.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
options.giteaRunner.enable =
|
||||||
|
lib.mkEnableOption "Enable Gitea Actions runner.";
|
||||||
|
|
||||||
|
config = lib.mkIf config.giteaRunner.enable {
|
||||||
|
|
||||||
|
services.gitea-actions-runner.instances.${config.networking.hostName} = {
|
||||||
|
enable = true;
|
||||||
|
labels = [
|
||||||
|
# Provide a Debian base with NodeJS for actions
|
||||||
|
# "debian-latest:docker://node:18-bullseye"
|
||||||
|
# Fake the Ubuntu name, because Node provides no Ubuntu builds
|
||||||
|
# "ubuntu-latest:docker://node:18-bullseye"
|
||||||
|
# Provide native execution on the host using below packages
|
||||||
|
"native:host"
|
||||||
|
];
|
||||||
|
hostPackages = with pkgs; [
|
||||||
|
bash
|
||||||
|
coreutils
|
||||||
|
curl
|
||||||
|
gawk
|
||||||
|
gitMinimal
|
||||||
|
gnused
|
||||||
|
nodejs
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
name = config.networking.hostName;
|
||||||
|
url = "https://${config.hostnames.git}";
|
||||||
|
tokenFile = config.secrets.giteaRunnerToken.dest;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Make sure the runner doesn't start until after Gitea
|
||||||
|
systemd.services."gitea-runner-${config.networking.hostName}".after =
|
||||||
|
[ "gitea.service" ];
|
||||||
|
|
||||||
|
# API key needed to connect to Gitea
|
||||||
|
secrets.giteaRunnerToken = {
|
||||||
|
source = ../../../private/gitea-runner-token.age; # TOKEN=xyz
|
||||||
|
dest = "${config.secretsDirectory}/gitea-runner-token";
|
||||||
|
};
|
||||||
|
systemd.services.giteaRunnerToken-secret = {
|
||||||
|
requiredBy = [
|
||||||
|
"gitea-runner-${
|
||||||
|
config.services.gitea-actions-runner.instances.${config.networking.hostName}.name
|
||||||
|
}.service"
|
||||||
|
];
|
||||||
|
before = [
|
||||||
|
"gitea-runner-${
|
||||||
|
config.services.gitea-actions-runner.instances.${config.networking.hostName}.name
|
||||||
|
}.service"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -1,27 +1,19 @@
|
|||||||
{ config, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let giteaPath = "/var/lib/gitea"; # Default service directory
|
let giteaPath = "/var/lib/gitea"; # Default service directory
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
options = {
|
|
||||||
|
|
||||||
gitServer = lib.mkOption {
|
|
||||||
description = "Hostname for git server (Gitea).";
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.services.gitea.enable {
|
config = lib.mkIf config.services.gitea.enable {
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
database.type = "sqlite3";
|
database.type = "sqlite3";
|
||||||
settings = {
|
settings = {
|
||||||
|
actions.ENABLED = true;
|
||||||
|
metrics.ENABLED = true;
|
||||||
repository = {
|
repository = {
|
||||||
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
DEFAULT_PUSH_CREATE_PRIVATE = true;
|
||||||
DISABLE_HTTP_GIT = false;
|
DISABLE_HTTP_GIT = false;
|
||||||
ACCESS_CONTROL_ALLOW_ORIGIN = config.gitServer;
|
ACCESS_CONTROL_ALLOW_ORIGIN = config.hostnames.git;
|
||||||
ENABLE_PUSH_CREATE_USER = true;
|
ENABLE_PUSH_CREATE_USER = true;
|
||||||
ENABLE_PUSH_CREATE_ORG = true;
|
ENABLE_PUSH_CREATE_ORG = true;
|
||||||
DEFAULT_BRANCH = "main";
|
DEFAULT_BRANCH = "main";
|
||||||
@ -29,7 +21,7 @@ in {
|
|||||||
server = {
|
server = {
|
||||||
HTTP_PORT = 3001;
|
HTTP_PORT = 3001;
|
||||||
HTTP_ADDRESS = "127.0.0.1";
|
HTTP_ADDRESS = "127.0.0.1";
|
||||||
ROOT_URL = "https://${config.gitServer}/";
|
ROOT_URL = "https://${config.hostnames.git}/";
|
||||||
SSH_PORT = 22;
|
SSH_PORT = 22;
|
||||||
START_SSH_SERVER = false; # Use sshd instead
|
START_SSH_SERVER = false; # Use sshd instead
|
||||||
DISABLE_SSH = false;
|
DISABLE_SSH = false;
|
||||||
@ -44,14 +36,38 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 122 ];
|
networking.firewall.allowedTCPPorts = [ 122 ];
|
||||||
|
users.users.${config.user}.extraGroups = [ "gitea" ];
|
||||||
|
|
||||||
caddy.routes = [{
|
caddy.routes = [
|
||||||
match = [{ host = [ config.gitServer ]; }];
|
{
|
||||||
handle = [{
|
match = [{
|
||||||
handler = "reverse_proxy";
|
host = [ config.hostnames.git ];
|
||||||
upstreams = [{ dial = "localhost:3001"; }];
|
path = [ "/metrics*" ];
|
||||||
}];
|
}];
|
||||||
}];
|
handle = [{
|
||||||
|
handler = "static_response";
|
||||||
|
status_code = "403";
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
match = [{ host = [ config.hostnames.git ]; }];
|
||||||
|
handle = [{
|
||||||
|
handler = "reverse_proxy";
|
||||||
|
upstreams = [{
|
||||||
|
dial = "localhost:${
|
||||||
|
builtins.toString
|
||||||
|
config.services.gitea.settings.server.HTTP_PORT
|
||||||
|
}";
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
prometheus.scrapeTargets = [
|
||||||
|
"127.0.0.1:${
|
||||||
|
builtins.toString config.services.gitea.settings.server.HTTP_PORT
|
||||||
|
}"
|
||||||
|
];
|
||||||
|
|
||||||
## Backup config
|
## Backup config
|
||||||
|
|
||||||
@ -84,6 +100,34 @@ in {
|
|||||||
requires = [ "gitea.service" ];
|
requires = [ "gitea.service" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Run a repository file backup on a schedule
|
||||||
|
systemd.timers.gitea-backup = lib.mkIf (config.backup.s3.endpoint != null) {
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "*-*-* 00:00:00"; # Once per day
|
||||||
|
Unit = "gitea-backup.service";
|
||||||
|
};
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Backup Gitea repos to object storage
|
||||||
|
systemd.services.gitea-backup =
|
||||||
|
lib.mkIf (config.backup.s3.endpoint != null) {
|
||||||
|
description = "Backup Gitea data";
|
||||||
|
environment.AWS_ACCESS_KEY_ID = config.backup.s3.accessKeyId;
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
User = "gitea";
|
||||||
|
Group = "backup";
|
||||||
|
EnvironmentFile = config.secrets.backup.dest;
|
||||||
|
};
|
||||||
|
script = ''
|
||||||
|
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
|
||||||
|
${giteaPath}/ \
|
||||||
|
s3://${config.backup.s3.bucket}/gitea-data/ \
|
||||||
|
--endpoint-url=https://${config.backup.s3.endpoint}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user