Compare commits
3 Commits
0b1649033c
...
lunarvim
Author | SHA1 | Date | |
---|---|---|---|
a1d4948bb3
|
|||
5d21d262fa
|
|||
1926dda49d
|
39
README.md
39
README.md
@@ -9,47 +9,16 @@ System and user configuration for NixOS-based systems.
|
|||||||
| **Theme:** | adwaita |
|
| **Theme:** | adwaita |
|
||||||
| **Terminal:** | Console |
|
| **Terminal:** | Console |
|
||||||
|
|
||||||
## Provisioning a new host
|
## Provisioning
|
||||||
> [nixos-anywhere](https://github.com/nix-community/nixos-anywhere) is the module used
|
> [nixos-anywhere](https://github.com/nix-community/nixos-anywhere) is the module used for provisioning
|
||||||
> for provisioning
|
|
||||||
|
|
||||||
Generate a new SSH host key in "$temp/etc/ssh" as per [this guide](https://nix-community.github.io/nixos-anywhere/howtos/secrets.html#example-decrypting-an-openssh-host-key-with-pass).
|
Generate a new SSH host key in "$temp/etc/ssh" as per [this guide](https://nix-community.github.io/nixos-anywhere/howtos/secrets.html#example-decrypting-an-openssh-host-key-with-pass).
|
||||||
```
|
|
||||||
ssh-keygen -t ed25519 -f /tmp/ssh_host_ed25519_key
|
|
||||||
```
|
|
||||||
|
|
||||||
Update [nix-secrets](/jordan/nix-secrets) with the new host key to enable the system to decrypt
|
Then run;
|
||||||
any relevant secrets.
|
|
||||||
|
|
||||||
In order to use the borgmatic module for backups, go to [borgbase.com](https://borgbase.com).
|
|
||||||
Add the generated SSH host key and create a new repository for the system.
|
|
||||||
|
|
||||||
Create a new directory under `hosts/` with a system configuration and disk layout.
|
|
||||||
|
|
||||||
Boot the NixOS installer (or any Linux distribution) on the target.
|
|
||||||
|
|
||||||
Then run:
|
|
||||||
```
|
```
|
||||||
nix run github:nix-community/nixos-anywhere -- \
|
nix run github:nix-community/nixos-anywhere -- \
|
||||||
--disk-encryption-keys /tmp/secret.key /tmp/secret.key \
|
--disk-encryption-keys /tmp/secret.key /tmp/secret.key \
|
||||||
--extra-files "$temp" \
|
--extra-files "$temp" \
|
||||||
--flake .#<hostname> \
|
--flake .#<hostname> \
|
||||||
root@<target-ip>
|
root@<ip>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Post install
|
|
||||||
|
|
||||||
If backups are configured, you'll need to run:
|
|
||||||
```
|
|
||||||
borgmatic init --encryption repokey-blake2
|
|
||||||
```
|
|
||||||
then restart `borgmatic`.
|
|
||||||
|
|
||||||
To join the Tailscale network, run:
|
|
||||||
```
|
|
||||||
tailscale up --login-server https://headscale.vimium.net
|
|
||||||
```
|
|
||||||
then visit the URL, SSH onto `vps1` and run `headscale --user mesh nodes register --key <key>`.
|
|
||||||
|
|
||||||
The new node can optionally be given a friendly name with `headscale node rename -i <index> <hostname>`.
|
|
||||||
|
|
||||||
|
401
flake.lock
generated
401
flake.lock
generated
@@ -8,11 +8,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712079060,
|
"lastModified": 1707830867,
|
||||||
"narHash": "sha256-/JdiT9t+zzjChc5qQiF+jhrVhRt8figYH29rZO7pFe4=",
|
"narHash": "sha256-PAdwm5QqdlwIqGrfzzvzZubM+FXtilekQ/FA0cI49/o=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "1381a759b205dff7a6818733118d02253340fd5e",
|
"rev": "8cb01a0e717311680e0cbca06a76cbceba6f3ed6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -21,45 +21,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"beautysh": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixvim",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"poetry2nix": "poetry2nix",
|
|
||||||
"utils": "utils_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1680308980,
|
|
||||||
"narHash": "sha256-aUEHV0jk2qIFP3jlsWYWhBbm+w/N9gzH3e4I5DcdB5s=",
|
|
||||||
"owner": "lovesegfault",
|
|
||||||
"repo": "beautysh",
|
|
||||||
"rev": "9845efc3ea3e86cc0d41465d720a47f521b2799c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "lovesegfault",
|
|
||||||
"repo": "beautysh",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"blobs": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1604995301,
|
|
||||||
"narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
|
|
||||||
"owner": "simple-nixos-mailserver",
|
|
||||||
"repo": "blobs",
|
|
||||||
"rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
|
|
||||||
"type": "gitlab"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "simple-nixos-mailserver",
|
|
||||||
"repo": "blobs",
|
|
||||||
"type": "gitlab"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"darwin": {
|
"darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -89,11 +50,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711973905,
|
"lastModified": 1708091384,
|
||||||
"narHash": "sha256-UFKME/N1pbUtn+2Aqnk+agUt8CekbpuqwzljivfIme8=",
|
"narHash": "sha256-dTGGw2y8wvfjr+J9CjQbfdulOq72hUG17HXVNxpH1yE=",
|
||||||
"owner": "serokell",
|
"owner": "serokell",
|
||||||
"repo": "deploy-rs",
|
"repo": "deploy-rs",
|
||||||
"rev": "88b3059b020da69cbe16526b8d639bd5e0b51c8b",
|
"rev": "0a0187794ac7f7a1e62cda3dabf8dc041f868790",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -109,11 +70,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713406758,
|
"lastModified": 1709439398,
|
||||||
"narHash": "sha256-kwZvhmx+hSZvjzemKxsAqzEqWmXZS47VVwQhNrINORQ=",
|
"narHash": "sha256-MW0zp3ta7SvdpjvhVCbtP20ewRwQZX2vRFn14gTc4Kg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "1efd500e9805a9efbce401ed5999006d397b9f11",
|
"rev": "1f76b318aa11170c8ca8c225a9b4c458a5fcbb57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -125,11 +86,11 @@
|
|||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713458745,
|
"lastModified": 1708965002,
|
||||||
"narHash": "sha256-6K95wxghPBS1sJMnuKJ4JD3jLd/5bAEmx7rnffqf29I=",
|
"narHash": "sha256-gIBZCPB0sA8Gagrxd8w4+y9uUkWBnXJBmq9Ur5BYTQU=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "firefox-gnome-theme",
|
"repo": "firefox-gnome-theme",
|
||||||
"rev": "5501717d3e98fcc418a2ca40de1c5ad1b66939bb",
|
"rev": "4e966509c180f93ba8665cd73cad8456bf44baab",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -154,96 +115,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat_2": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1668681692,
|
|
||||||
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat_3": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1673956053,
|
|
||||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "flake-compat",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1701680307,
|
|
||||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_2": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_4"
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gitignore": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixvim",
|
|
||||||
"pre-commit-hooks",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1660459072,
|
|
||||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -272,11 +143,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712386041,
|
"lastModified": 1706981411,
|
||||||
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
|
"narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
|
"rev": "652fda4ca6dafeb090943422c34ae9145787af37",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -288,11 +159,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713521961,
|
"lastModified": 1709410583,
|
||||||
"narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=",
|
"narHash": "sha256-esOSUoQ7mblwcsSea0K17McZuwAIjoS6dq/4b83+lvw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2",
|
"rev": "59e37017b9ed31dee303dbbd4531c594df95cfbc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -301,32 +172,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-mailserver": {
|
|
||||||
"inputs": {
|
|
||||||
"blobs": "blobs",
|
|
||||||
"flake-compat": "flake-compat_2",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-23_05": "nixpkgs-23_05",
|
|
||||||
"nixpkgs-23_11": "nixpkgs-23_11",
|
|
||||||
"utils": "utils_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1706219574,
|
|
||||||
"narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=",
|
|
||||||
"owner": "simple-nixos-mailserver",
|
|
||||||
"repo": "nixos-mailserver",
|
|
||||||
"rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf",
|
|
||||||
"type": "gitlab"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "simple-nixos-mailserver",
|
|
||||||
"ref": "nixos-23.11",
|
|
||||||
"repo": "nixos-mailserver",
|
|
||||||
"type": "gitlab"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1703013332,
|
"lastModified": 1703013332,
|
||||||
@@ -343,59 +188,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-23_05": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1704290814,
|
|
||||||
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-23.05",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-23_11": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1706098335,
|
|
||||||
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"id": "nixpkgs",
|
|
||||||
"ref": "nixos-23.11",
|
|
||||||
"type": "indirect"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1685801374,
|
|
||||||
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixos-23.05",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713537308,
|
"lastModified": 1709237383,
|
||||||
"narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=",
|
"narHash": "sha256-cy6ArO4k5qTx+l5o+0mL9f5fa86tYUX3ozE1S+Txlds=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f",
|
"rev": "1536926ef5621b09bba54035ae2bb6d806d72ac8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -422,11 +221,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713564160,
|
"lastModified": 1709309926,
|
||||||
"narHash": "sha256-YguPZpiejgzLEcO36/SZULjJQ55iWcjAmf3lYiyV1Fo=",
|
"narHash": "sha256-VZFBtXGVD9LWTecGi6eXrE0hJ/mVB3zGUlHImUs2Qak=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bc194f70731cc5d2b046a6c1b3b15f170f05999c",
|
"rev": "79baff8812a0d68e24a836df0a364c678089e2c7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -435,82 +234,6 @@
|
|||||||
"type": "indirect"
|
"type": "indirect"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixvim": {
|
|
||||||
"inputs": {
|
|
||||||
"beautysh": "beautysh",
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1704297403,
|
|
||||||
"narHash": "sha256-g7+4SiXDGzIlWIfANyH1J5CeEaY+Alah6KOm6IO4nIk=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixvim",
|
|
||||||
"rev": "b3ea5256e07ee9105060cffa075028402946bd63",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "nixos-23.11",
|
|
||||||
"repo": "nixvim",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"poetry2nix": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": [
|
|
||||||
"nixvim",
|
|
||||||
"beautysh",
|
|
||||||
"utils"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixvim",
|
|
||||||
"beautysh",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1658665240,
|
|
||||||
"narHash": "sha256-/wkx7D7enyBPRjIkK0w7QxLQhzEkb3UxNQnjyc3FTUI=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "poetry2nix",
|
|
||||||
"rev": "8b8edc85d24661d5a6d0d71d6a7011f3e699780f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "poetry2nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"pre-commit-hooks": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-compat": "flake-compat_3",
|
|
||||||
"flake-utils": "flake-utils_2",
|
|
||||||
"gitignore": "gitignore",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixvim",
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1703939133,
|
|
||||||
"narHash": "sha256-Gxe+mfOT6bL7wLC/tuT2F+V+Sb44jNr8YsJ3cyIl4Mo=",
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"rev": "9d3d7e18c6bc4473d7520200d4ddab12f8402d38",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "cachix",
|
|
||||||
"repo": "pre-commit-hooks.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
@@ -519,10 +242,8 @@
|
|||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixos-mailserver": "nixos-mailserver",
|
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nixvim": "nixvim",
|
|
||||||
"secrets": "secrets",
|
"secrets": "secrets",
|
||||||
"thunderbird-gnome-theme": "thunderbird-gnome-theme"
|
"thunderbird-gnome-theme": "thunderbird-gnome-theme"
|
||||||
}
|
}
|
||||||
@@ -530,11 +251,11 @@
|
|||||||
"secrets": {
|
"secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712006510,
|
"lastModified": 1709495020,
|
||||||
"narHash": "sha256-JQ3ZcSwIB6d3gDcx/nZCUlSfZGwaI55WNmD9mK2uTPA=",
|
"narHash": "sha256-eiz0qUjUbdeb6m28XPY7OVnrGMZ45JiT2dZZ0Bmq2X0=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "f350d35d7651c415fa4c0d6a7cff378ba5650f93",
|
"rev": "d135b4d6d5f0079999188895f8b5f35e821b0d4b",
|
||||||
"revCount": 17,
|
"revCount": 14,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||||
},
|
},
|
||||||
@@ -573,44 +294,14 @@
|
|||||||
"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"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_4": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"thunderbird-gnome-theme": {
|
"thunderbird-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710774977,
|
"lastModified": 1701889124,
|
||||||
"narHash": "sha256-nQBz2PW3YF3+RTflPzDoAcs6vH1PTozESIYUGAwvSdA=",
|
"narHash": "sha256-K+6oh7+J6RDBFkxphY/pzf0B+q5+IY54ZMKZrFSKXlc=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "thunderbird-gnome-theme",
|
"repo": "thunderbird-gnome-theme",
|
||||||
"rev": "65d5c03fc9172d549a3ea72fd366d544981a002b",
|
"rev": "966e9dd54bd2ce9d36d51cd6af8c3bac7a764a68",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -636,36 +327,6 @@
|
|||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"utils_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1605370193,
|
|
||||||
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"utils_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1678901627,
|
|
||||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
20
flake.nix
20
flake.nix
@@ -20,14 +20,6 @@
|
|||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
nixos-mailserver = {
|
|
||||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
nixvim = {
|
|
||||||
url = "github:nix-community/nixvim/nixos-23.11";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
secrets = {
|
secrets = {
|
||||||
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
|
url = "git+ssh://git@git.vimium.com/jordan/nix-secrets.git";
|
||||||
flake = false;
|
flake = false;
|
||||||
@@ -38,7 +30,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, agenix, deploy-rs, disko, home-manager, nixos-hardware, nixos-mailserver, secrets, ... }:
|
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, agenix, deploy-rs, disko, home-manager, nixos-hardware, secrets, ... }:
|
||||||
let
|
let
|
||||||
mkPkgsForSystem = system: inputs.nixpkgs;
|
mkPkgsForSystem = system: inputs.nixpkgs;
|
||||||
overlays = [
|
overlays = [
|
||||||
@@ -54,7 +46,6 @@
|
|||||||
commonModules = [
|
commonModules = [
|
||||||
agenix.nixosModules.age
|
agenix.nixosModules.age
|
||||||
disko.nixosModules.disko
|
disko.nixosModules.disko
|
||||||
nixos-mailserver.nixosModule
|
|
||||||
home-manager.nixosModule
|
home-manager.nixosModule
|
||||||
./modules
|
./modules
|
||||||
];
|
];
|
||||||
@@ -87,7 +78,6 @@
|
|||||||
helios = mkNixosSystem { system = "x86_64-linux"; name = "helios"; };
|
helios = mkNixosSystem { system = "x86_64-linux"; name = "helios"; };
|
||||||
hypnos = mkNixosSystem { system = "x86_64-linux"; name = "hypnos"; };
|
hypnos = mkNixosSystem { system = "x86_64-linux"; name = "hypnos"; };
|
||||||
library = mkNixosSystem { system = "x86_64-linux"; name = "library"; };
|
library = mkNixosSystem { system = "x86_64-linux"; name = "library"; };
|
||||||
mail = mkNixosSystem { system = "x86_64-linux"; name = "mail"; };
|
|
||||||
odyssey = mkNixosSystem { system = "x86_64-linux"; name = "odyssey"; };
|
odyssey = mkNixosSystem { system = "x86_64-linux"; name = "odyssey"; };
|
||||||
pi = mkNixosSystem { system = "aarch64-linux"; name = "pi"; extraModules = [ nixos-hardware.nixosModules.raspberry-pi-4 ]; };
|
pi = mkNixosSystem { system = "aarch64-linux"; name = "pi"; extraModules = [ nixos-hardware.nixosModules.raspberry-pi-4 ]; };
|
||||||
vps1 = mkNixosSystem { system = "x86_64-linux"; name = "vps1"; };
|
vps1 = mkNixosSystem { system = "x86_64-linux"; name = "vps1"; };
|
||||||
@@ -104,14 +94,6 @@
|
|||||||
autoRollback = true;
|
autoRollback = true;
|
||||||
sshUser = "root";
|
sshUser = "root";
|
||||||
nodes = {
|
nodes = {
|
||||||
mail = {
|
|
||||||
hostname = "mail.mesh.vimium.net";
|
|
||||||
|
|
||||||
profiles.system = {
|
|
||||||
user = "root";
|
|
||||||
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mail;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
vps1 = {
|
vps1 = {
|
||||||
hostname = "vps1.mesh.vimium.net";
|
hostname = "vps1.mesh.vimium.net";
|
||||||
|
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
};
|
};
|
||||||
editors = {
|
editors = {
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
vscode.enable = true;
|
||||||
};
|
};
|
||||||
security = {
|
security = {
|
||||||
gpg.enable = true;
|
gpg.enable = true;
|
||||||
|
@@ -49,7 +49,6 @@
|
|||||||
max-free = 1000000000;
|
max-free = 1000000000;
|
||||||
fallback = true;
|
fallback = true;
|
||||||
allowed-users = [ "@wheel" ];
|
allowed-users = [ "@wheel" ];
|
||||||
trusted-users = [ "@wheel" ];
|
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
substituters = [
|
substituters = [
|
||||||
"http://odyssey.mesh.vimium.net"
|
"http://odyssey.mesh.vimium.net"
|
||||||
|
@@ -30,30 +30,8 @@
|
|||||||
randomizedDelaySec = "10min";
|
randomizedDelaySec = "10min";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
noto-fonts
|
|
||||||
(nerdfonts.override { fonts = [ "BigBlueTerminal" "ComicShannsMono" "Terminus" "UbuntuMono" ]; })
|
|
||||||
];
|
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
desktop.gnome.enable = true;
|
desktop.gnome.enable = true;
|
||||||
networking.tailscale.enable = true;
|
networking.tailscale.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
bind
|
|
||||||
bmon
|
|
||||||
fd
|
|
||||||
ffmpeg
|
|
||||||
iotop
|
|
||||||
unstable.nix-tree
|
|
||||||
ripgrep
|
|
||||||
rsync
|
|
||||||
tcpdump
|
|
||||||
tokei
|
|
||||||
tree
|
|
||||||
wl-clipboard
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@@ -1,18 +0,0 @@
|
|||||||
# Mail server
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
Mail server hosted in OVH.
|
|
||||||
|
|
||||||
## Specs
|
|
||||||
* CPU - ??
|
|
||||||
* Memory - ??
|
|
||||||
|
|
||||||
### Disks
|
|
||||||
Device | Partitions _(filesystem, usage)_
|
|
||||||
--- | ---
|
|
||||||
NVMe | `/dev/sda1` (ext4, NixOS Root)
|
|
||||||
|
|
||||||
### Networks
|
|
||||||
- DHCP on `10.0.1.0/24` subnet.
|
|
||||||
- Tailscale on `100.64.0.0/10` subnet. FQDN: `mail.mesh.vimium.net`.
|
|
||||||
|
|
@@ -1,55 +0,0 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./disko-config.nix
|
|
||||||
../server.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostId = "08ac2f14";
|
|
||||||
domain = "mesh.vimium.net";
|
|
||||||
firewall = {
|
|
||||||
enable = true;
|
|
||||||
allowedTCPPorts = [
|
|
||||||
22 # SSH
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
|
||||||
users = {
|
|
||||||
root = {
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS jordan@vimium.com"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password";
|
|
||||||
|
|
||||||
security.acme.defaults = {
|
|
||||||
email = "hostmaster@vimium.com";
|
|
||||||
group = "nginx";
|
|
||||||
webroot = "/var/lib/acme/acme-challenge";
|
|
||||||
};
|
|
||||||
|
|
||||||
modules = {
|
|
||||||
services = {
|
|
||||||
borgmatic = {
|
|
||||||
enable = true;
|
|
||||||
directories = [
|
|
||||||
"/var/dkim"
|
|
||||||
"/var/lib"
|
|
||||||
"/var/vmail"
|
|
||||||
];
|
|
||||||
repoPath = "ssh://kg2mpt28@kg2mpt28.repo.borgbase.com/./repo";
|
|
||||||
};
|
|
||||||
mail.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
|
||||||
}
|
|
@@ -1,55 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
disko.devices = {
|
|
||||||
disk.disk1 = {
|
|
||||||
device = lib.mkDefault "/dev/sda";
|
|
||||||
type = "disk";
|
|
||||||
content = {
|
|
||||||
type = "gpt";
|
|
||||||
partitions = {
|
|
||||||
boot = {
|
|
||||||
name = "boot";
|
|
||||||
size = "2M";
|
|
||||||
type = "EF02";
|
|
||||||
};
|
|
||||||
esp = {
|
|
||||||
name = "ESP";
|
|
||||||
size = "300M";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
root = {
|
|
||||||
name = "root";
|
|
||||||
size = "100%";
|
|
||||||
content = {
|
|
||||||
type = "lvm_pv";
|
|
||||||
vg = "pool";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
lvm_vg = {
|
|
||||||
pool = {
|
|
||||||
type = "lvm_vg";
|
|
||||||
lvs = {
|
|
||||||
root = {
|
|
||||||
size = "100%FREE";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "ext4";
|
|
||||||
mountpoint = "/";
|
|
||||||
mountOptions = [
|
|
||||||
"defaults"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,22 +0,0 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
initrd = {
|
|
||||||
availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
|
||||||
kernelModules = [ "nvme" ];
|
|
||||||
};
|
|
||||||
loader.grub = {
|
|
||||||
efiSupport = true;
|
|
||||||
efiInstallAsRemovable = true;
|
|
||||||
};
|
|
||||||
tmp.cleanOnBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
zramSwap.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@@ -47,8 +47,7 @@
|
|||||||
browsers = {
|
browsers = {
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
};
|
};
|
||||||
gaming = {
|
gaming.emulators = {
|
||||||
emulators = {
|
|
||||||
gamecube.enable = true;
|
gamecube.enable = true;
|
||||||
ps2.enable = true;
|
ps2.enable = true;
|
||||||
ps3.enable = true;
|
ps3.enable = true;
|
||||||
@@ -56,8 +55,6 @@
|
|||||||
wii.enable = true;
|
wii.enable = true;
|
||||||
xbox.enable = true;
|
xbox.enable = true;
|
||||||
};
|
};
|
||||||
lutris.enable = true;
|
|
||||||
};
|
|
||||||
media.graphics = {
|
media.graphics = {
|
||||||
modeling.enable = true;
|
modeling.enable = true;
|
||||||
raster.enable = true;
|
raster.enable = true;
|
||||||
@@ -73,6 +70,7 @@
|
|||||||
};
|
};
|
||||||
editors = {
|
editors = {
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
vscode.enable = true;
|
||||||
};
|
};
|
||||||
hardware.presonus-studio.enable = true;
|
hardware.presonus-studio.enable = true;
|
||||||
security = {
|
security = {
|
||||||
@@ -84,12 +82,6 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
directories = [
|
directories = [
|
||||||
"/home/jordan/Documents"
|
"/home/jordan/Documents"
|
||||||
"/home/jordan/Downloads"
|
|
||||||
"/home/jordan/Music"
|
|
||||||
"/home/jordan/Pictures"
|
|
||||||
"/home/jordan/projects"
|
|
||||||
"/home/jordan/Videos"
|
|
||||||
"/home/jordan/.mozilla"
|
|
||||||
];
|
];
|
||||||
repoPath = "ssh://iqwu22oq@iqwu22oq.repo.borgbase.com/./repo";
|
repoPath = "ssh://iqwu22oq@iqwu22oq.repo.borgbase.com/./repo";
|
||||||
};
|
};
|
||||||
|
@@ -62,7 +62,6 @@
|
|||||||
headscale.enable = true;
|
headscale.enable = true;
|
||||||
matrix-synapse.enable = true;
|
matrix-synapse.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
photoprism.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -2,7 +2,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./options.nix
|
./options.nix
|
||||||
./desktop/gnome.nix
|
./desktop/gnome.nix
|
||||||
./desktop/kde.nix
|
|
||||||
./desktop/mimeapps.nix
|
./desktop/mimeapps.nix
|
||||||
./desktop/apps/qbittorrent.nix
|
./desktop/apps/qbittorrent.nix
|
||||||
./desktop/apps/slack.nix
|
./desktop/apps/slack.nix
|
||||||
@@ -35,10 +34,8 @@
|
|||||||
./services/coturn
|
./services/coturn
|
||||||
./services/gitea
|
./services/gitea
|
||||||
./services/headscale
|
./services/headscale
|
||||||
./services/mail
|
|
||||||
./services/matrix-synapse
|
./services/matrix-synapse
|
||||||
./services/nginx
|
./services/nginx
|
||||||
./services/photoprism
|
|
||||||
./shell/git
|
./shell/git
|
||||||
./shell/zsh
|
./shell/zsh
|
||||||
];
|
];
|
||||||
|
@@ -54,11 +54,11 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs.unstable; [
|
||||||
(lib.mkIf cfg.ps1.enable duckstation)
|
(lib.mkIf cfg.ps1.enable duckstation)
|
||||||
(lib.mkIf cfg.ps2.enable unstable.pcsx2)
|
(lib.mkIf cfg.ps2.enable pcsx2)
|
||||||
(lib.mkIf cfg.ps3.enable rpcs3)
|
(lib.mkIf cfg.ps3.enable rpcs3)
|
||||||
(lib.mkIf cfg.psp.enable unstable.ppsspp)
|
(lib.mkIf cfg.psp.enable ppsspp)
|
||||||
(lib.mkIf cfg.ds.enable desmume)
|
(lib.mkIf cfg.ds.enable desmume)
|
||||||
(lib.mkIf (cfg.gba.enable ||
|
(lib.mkIf (cfg.gba.enable ||
|
||||||
cfg.gb.enable ||
|
cfg.gb.enable ||
|
||||||
@@ -68,7 +68,7 @@ in {
|
|||||||
(lib.mkIf (cfg.wii.enable ||
|
(lib.mkIf (cfg.wii.enable ||
|
||||||
cfg.gamecube.enable)
|
cfg.gamecube.enable)
|
||||||
dolphin-emu)
|
dolphin-emu)
|
||||||
(lib.mkIf cfg.xbox.enable unstable.xemu)
|
(lib.mkIf cfg.xbox.enable xemu)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -10,13 +10,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
(lutris.override {
|
lutris
|
||||||
extraPkgs = pkgs: [
|
|
||||||
winePackages.staging
|
|
||||||
wine64Packages.staging
|
|
||||||
];
|
|
||||||
})
|
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
vulkan-tools
|
vulkan-tools
|
||||||
];
|
];
|
||||||
|
@@ -135,8 +135,6 @@ in {
|
|||||||
};
|
};
|
||||||
"org/gnome/Console" = {
|
"org/gnome/Console" = {
|
||||||
font-scale = 1.4;
|
font-scale = 1.4;
|
||||||
use-system-font = false;
|
|
||||||
custom-font = "ComicShannsMono Nerd Font 10";
|
|
||||||
};
|
};
|
||||||
"org/gnome/mutter" = {
|
"org/gnome/mutter" = {
|
||||||
center-new-windows = true;
|
center-new-windows = true;
|
||||||
@@ -144,8 +142,8 @@ in {
|
|||||||
experimental-features = [ "scale-monitor-framebuffer" ];
|
experimental-features = [ "scale-monitor-framebuffer" ];
|
||||||
};
|
};
|
||||||
"org/gnome/desktop/interface" = {
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme = "prefer-dark";
|
||||||
enable-hot-corners = false;
|
enable-hot-corners = false;
|
||||||
icon-theme = "MoreWaita";
|
|
||||||
monospace-font-name = "UbuntuMono Nerd Font 11";
|
monospace-font-name = "UbuntuMono Nerd Font 11";
|
||||||
};
|
};
|
||||||
"org/gnome/desktop/wm/keybindings" = {
|
"org/gnome/desktop/wm/keybindings" = {
|
||||||
@@ -157,30 +155,39 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
(nerdfonts.override { fonts = [ "BigBlueTerminal" "ComicShannsMono" "UbuntuMono" ]; })
|
||||||
|
];
|
||||||
|
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
authenticator
|
authenticator
|
||||||
# bottles
|
bottles
|
||||||
# bustle
|
bustle
|
||||||
celluloid
|
celluloid
|
||||||
# d-spy
|
d-spy
|
||||||
# drawing
|
drawing
|
||||||
# fragments
|
fragments
|
||||||
gnome.ghex
|
gnome.ghex
|
||||||
# gnome-builder
|
# gnome-builder
|
||||||
gnome-decoder
|
gnome-decoder
|
||||||
gnome-firmware
|
gnome-firmware
|
||||||
gnome-frog
|
gnome-frog
|
||||||
# gnome-obfuscate
|
gnome-obfuscate
|
||||||
gnome-podcasts
|
gnome-podcasts
|
||||||
identity
|
identity
|
||||||
mission-center
|
mission-center
|
||||||
newsflash
|
newsflash
|
||||||
# schemes
|
schemes
|
||||||
shortwave
|
shortwave
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
adw-gtk3
|
adw-gtk3
|
||||||
|
bind
|
||||||
|
bmon
|
||||||
|
fd
|
||||||
|
ffmpeg
|
||||||
gnome.gnome-boxes
|
gnome.gnome-boxes
|
||||||
gnomeExtensions.another-window-session-manager
|
gnomeExtensions.another-window-session-manager
|
||||||
# gnomeExtensions.bifocals
|
# gnomeExtensions.bifocals
|
||||||
@@ -211,7 +218,14 @@ in {
|
|||||||
# gnomeExtensions.window-is-ready-remover
|
# gnomeExtensions.window-is-ready-remover
|
||||||
# gnomeExtensions.worksets
|
# gnomeExtensions.worksets
|
||||||
# gnomeExtensions.workspace-matrix
|
# gnomeExtensions.workspace-matrix
|
||||||
|
iotop
|
||||||
unstable.morewaita-icon-theme
|
unstable.morewaita-icon-theme
|
||||||
|
ripgrep
|
||||||
|
rsync
|
||||||
|
tcpdump
|
||||||
|
tokei
|
||||||
|
tree
|
||||||
|
wl-clipboard
|
||||||
] ++ (if config.virtualisation.podman.enable then [
|
] ++ (if config.virtualisation.podman.enable then [
|
||||||
pods
|
pods
|
||||||
] else []);
|
] else []);
|
||||||
|
@@ -1,32 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let cfg = config.modules.desktop.kde;
|
|
||||||
in {
|
|
||||||
options.modules.desktop.kde = {
|
|
||||||
enable = lib.mkOption {
|
|
||||||
default = false;
|
|
||||||
example = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.xserver = {
|
|
||||||
enable = true;
|
|
||||||
displayManager.sddm = {
|
|
||||||
enable = true;
|
|
||||||
wayland.enable = true;
|
|
||||||
};
|
|
||||||
desktopManager.plasma5.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
user.packages = with pkgs; [
|
|
||||||
kmail
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
adw-gtk3
|
|
||||||
];
|
|
||||||
|
|
||||||
home.services.gpg-agent.pinentryFlavor = "qt";
|
|
||||||
};
|
|
||||||
}
|
|
@@ -11,7 +11,7 @@ in {
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
user.packages = with pkgs; [
|
user.packages = with pkgs; [
|
||||||
(if config.modules.desktop.kde.enable == true then libreoffice-qt else libreoffice)
|
libreoffice
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -11,126 +11,15 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.programs.nixvim = {
|
user.packages = with pkgs.unstable; [
|
||||||
enable = true;
|
lunarvim
|
||||||
defaultEditor = true;
|
|
||||||
|
|
||||||
viAlias = true;
|
|
||||||
vimAlias = true;
|
|
||||||
|
|
||||||
options = {
|
|
||||||
number = true;
|
|
||||||
tabstop = 2;
|
|
||||||
shiftwidth = 2;
|
|
||||||
expandtab = true;
|
|
||||||
foldlevel = 99;
|
|
||||||
splitbelow = true;
|
|
||||||
splitright = true;
|
|
||||||
undofile = true;
|
|
||||||
updatetime = 100;
|
|
||||||
list = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
globals = {
|
|
||||||
mapleader = ",";
|
|
||||||
maplocalleader = ",";
|
|
||||||
};
|
|
||||||
|
|
||||||
clipboard = {
|
|
||||||
register = "unnamedplus";
|
|
||||||
|
|
||||||
providers.wl-copy.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins.comment-nvim.enable = true;
|
|
||||||
|
|
||||||
plugins.hmts.enable = true;
|
|
||||||
|
|
||||||
plugins.lightline.enable = true;
|
|
||||||
|
|
||||||
plugins.luasnip.enable = true;
|
|
||||||
|
|
||||||
plugins.lsp = {
|
|
||||||
enable = true;
|
|
||||||
servers = {
|
|
||||||
bashls.enable = true;
|
|
||||||
ccls.enable = true;
|
|
||||||
cssls.enable = true;
|
|
||||||
eslint.enable = true;
|
|
||||||
gopls.enable = true;
|
|
||||||
html.enable = true;
|
|
||||||
lua-ls.enable = true;
|
|
||||||
pylsp.enable = true;
|
|
||||||
nixd.enable = true;
|
|
||||||
rust-analyzer = {
|
|
||||||
enable = true;
|
|
||||||
installCargo = true;
|
|
||||||
installRustc = true;
|
|
||||||
};
|
|
||||||
tsserver.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins.nvim-autopairs.enable = true;
|
|
||||||
|
|
||||||
plugins.nvim-cmp = {
|
|
||||||
enable = true;
|
|
||||||
autoEnableSources = true;
|
|
||||||
sources = [
|
|
||||||
{ name = "nvim_lsp"; }
|
|
||||||
{ name = "path"; }
|
|
||||||
{ name = "buffer"; }
|
|
||||||
];
|
];
|
||||||
mapping = {
|
|
||||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
|
||||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
|
||||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins.telescope = {
|
env.EDITOR = "lvim";
|
||||||
enable = true;
|
|
||||||
keymaps = {
|
|
||||||
"<leader>ff" = "find_files";
|
|
||||||
"<leader>fg" = "live_grep";
|
|
||||||
"<leader>b" = "buffers";
|
|
||||||
"<leader>fh" = "help_tags";
|
|
||||||
"<C-p>" = "git_files";
|
|
||||||
"<C-f>" = "live_grep";
|
|
||||||
};
|
|
||||||
keymapsSilent = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins.treesitter = {
|
environment.shellAliases = {
|
||||||
enable = true;
|
vim = "lvim";
|
||||||
|
v = "lvim";
|
||||||
nixvimInjections = true;
|
|
||||||
|
|
||||||
folding = true;
|
|
||||||
indent = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins.treesitter-refactor = {
|
|
||||||
enable = true;
|
|
||||||
highlightDefinitions = {
|
|
||||||
enable = true;
|
|
||||||
clearOnCursorMove = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
plugins.undotree.enable = true;
|
|
||||||
|
|
||||||
# plugins.gitsigns.enable = true;
|
|
||||||
# plugins.gitgutter.enable = true;
|
|
||||||
# plugins.goyo.enable = true;
|
|
||||||
# plugins.fugitive.enable = true;
|
|
||||||
# plugins.fzf-lua.enable = true;
|
|
||||||
# plugins.neo-tree.enable = true;
|
|
||||||
# plugins.none-ls.enable = true;
|
|
||||||
# plugins.nvim-tree.enable = true;
|
|
||||||
# plugins.oil.enable = true;
|
|
||||||
# plugins.project-nvim.enable = true;
|
|
||||||
# plugins.surround.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -66,10 +66,6 @@ with lib;
|
|||||||
};
|
};
|
||||||
dconf.settings = mkAliasDefinitions options.dconf.settings;
|
dconf.settings = mkAliasDefinitions options.dconf.settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
sharedModules = [
|
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
users.users.${config.user.name} = mkAliasDefinitions options.user;
|
||||||
|
@@ -1,68 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.modules.services.mail;
|
|
||||||
domains = [
|
|
||||||
"h0lt.com"
|
|
||||||
"jdholt.com"
|
|
||||||
"jordanholt.xyz"
|
|
||||||
"vimium.co"
|
|
||||||
"vimium.co.uk"
|
|
||||||
"vimium.info"
|
|
||||||
"vimium.net"
|
|
||||||
"vimium.org"
|
|
||||||
"vimium.xyz"
|
|
||||||
];
|
|
||||||
in {
|
|
||||||
options.modules.services.mail = {
|
|
||||||
enable = lib.mkOption {
|
|
||||||
default = false;
|
|
||||||
example = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
services.roundcube = {
|
|
||||||
enable = true;
|
|
||||||
hostName = config.mailserver.fqdn;
|
|
||||||
extraConfig = ''
|
|
||||||
$config['smtp_server'] = "tls://${config.mailserver.fqdn}";
|
|
||||||
$config['smtp_user'] = "%u";
|
|
||||||
$config['smtp_pass'] = "%p";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.nginx.enable = true;
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
||||||
|
|
||||||
mailserver = {
|
|
||||||
enable = true;
|
|
||||||
fqdn = "mail.vimium.com";
|
|
||||||
domains = domains;
|
|
||||||
indexDir = "/var/lib/dovecot/indices";
|
|
||||||
|
|
||||||
certificateDomains = [
|
|
||||||
"imap.vimium.com"
|
|
||||||
"smtp.vimium.com"
|
|
||||||
];
|
|
||||||
certificateScheme = "acme-nginx";
|
|
||||||
|
|
||||||
fullTextSearch.enable = true;
|
|
||||||
|
|
||||||
loginAccounts = {
|
|
||||||
"jordan@vimium.com" = {
|
|
||||||
hashedPasswordFile = config.users.users.jordan.hashedPasswordFile;
|
|
||||||
catchAll = domains;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraVirtualAliases = {
|
|
||||||
"hostmaster@vimium.com" = "jordan@vimium.com";
|
|
||||||
"postmaster@vimium.com" = "jordan@vimium.com";
|
|
||||||
"webmaster@vimium.com" = "jordan@vimium.com";
|
|
||||||
"abuse@vimium.com" = "jordan@vimium.com";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@@ -1,57 +0,0 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let cfg = config.modules.services.photoprism;
|
|
||||||
in {
|
|
||||||
options.modules.services.photoprism = {
|
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
example = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
services.nginx = {
|
|
||||||
virtualHosts = {
|
|
||||||
"gallery.vimium.com" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:${toString config.services.photoprism.port}";
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
|
|
||||||
proxy_buffering off;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
age.secrets."passwords/services/photoprism/admin" = {
|
|
||||||
file = "${inputs.secrets}/passwords/services/photoprism/admin.age";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.photoprism = {
|
|
||||||
enable = true;
|
|
||||||
address = "localhost";
|
|
||||||
passwordFile = config.age.secrets."passwords/services/photoprism/admin".path;
|
|
||||||
originalsPath = "${config.services.photoprism.storagePath}/originals";
|
|
||||||
settings = {
|
|
||||||
PHOTOPRISM_APP_NAME = "Vimium Gallery";
|
|
||||||
PHOTOPRISM_SITE_AUTHOR = "Vimium";
|
|
||||||
PHOTOPRISM_SITE_TITLE = "Vimium Gallery";
|
|
||||||
PHOTOPRISM_SITE_CAPTION = "See your photos and videos on gallery.vimium.com";
|
|
||||||
PHOTOPRISM_DISABLE_TLS = "true";
|
|
||||||
PHOTOPRISM_SPONSOR = "true";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Reference in New Issue
Block a user