add core configuration
This commit is contained in:
parent
74c78e1c68
commit
f40517cff1
94 changed files with 2816 additions and 959 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
*.env
|
19
LICENSE
19
LICENSE
|
@ -1,19 +0,0 @@
|
||||||
Copyright (c) 2024 Luxzi
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
40
README.md
40
README.md
|
@ -1,40 +0,0 @@
|
||||||
# NixOS configuration files
|
|
||||||
|
|
||||||
Configured for KDE Plasma Wayland on Nvidia.
|
|
||||||
|
|
||||||
## Customizing user settings
|
|
||||||
|
|
||||||
To change your username or any additional user settings, you must:
|
|
||||||
|
|
||||||
- Create `./nixos/users/<your-name>.nix`, this can be copied from `luxzi.nix` in the same directory.
|
|
||||||
- Import the newly created file in `./nixos/configuration.nix`.
|
|
||||||
- Edit `./home-manager/home.nix` to the corresponding username and home directory.
|
|
||||||
|
|
||||||
## Adjusting hardware configuration
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> If you use an older Nvidia graphics card (i.e. before RTX 20 series), you do not need to modify `./nixos/hardware/nvidia.nix`.
|
|
||||||
> Although if you use a newer Nvidia graphics card, it is advised to enable `open` to use the open-source kernel driver.
|
|
||||||
|
|
||||||
To use AMD graphics cards:
|
|
||||||
|
|
||||||
- Create `./nixos/hardware/amd.nix`
|
|
||||||
- Add `services.xserver.videoDrivers = [ "amdgpu" ];`
|
|
||||||
|
|
||||||
## Deployment
|
|
||||||
|
|
||||||
If you would like to use these configuration files as is:
|
|
||||||
|
|
||||||
- Mount and format desired filesystems (as described in the NixOS manual).
|
|
||||||
- Run the following git clone command while also making sure to replace `<your-name>` with your desired username:
|
|
||||||
``` sh
|
|
||||||
git clone git@codeberg.org:luxzi/nixos /mnt/home/<your-name>/.dotfiles
|
|
||||||
```
|
|
||||||
- Make any desired changes.
|
|
||||||
- Install the system with the command below, again, making sure to replace `<your-name>` with your desired username:
|
|
||||||
``` sh
|
|
||||||
nixos-install --flake /mnt/home/<your-name>/.dotfiles
|
|
||||||
```
|
|
||||||
|
|
||||||
For more modified versions of this configuration, I recommend forking this repository.
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
|
|
||||||
nixos-rebuild switch --upgrade
|
|
||||||
nixos-install --flake /mnt/home/luxzi/.dotfiles
|
|
320
flake.lock
generated
320
flake.lock
generated
|
@ -1,35 +1,118 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"catppuccin": {
|
"agenix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"darwin": "darwin",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737579274,
|
"lastModified": 1736955230,
|
||||||
"narHash": "sha256-8kBIYfn8TI9jbffhDNS12SdbQHb9ITXflwcgIJBeGqw=",
|
"narHash": "sha256-uenf8fv2eG5bKM8C/UvFaiJMZ4IpUFaQxk9OH5t/1gA=",
|
||||||
"owner": "catppuccin",
|
"owner": "ryantm",
|
||||||
"repo": "nix",
|
"repo": "agenix",
|
||||||
"rev": "06f0ea19334bcc8112e6d671fd53e61f9e3ad63a",
|
"rev": "e600439ec4c273cf11e06fe4d9d906fb98fa097c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "catppuccin",
|
"owner": "ryantm",
|
||||||
"repo": "nix",
|
"repo": "agenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"darwin": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1700795494,
|
||||||
|
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||||
|
"owner": "lnl7",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "lnl7",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nix-darwin",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741352980,
|
||||||
|
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741352980,
|
||||||
|
"narHash": "sha256-+u2UunDA4Cl5Fci3m7S643HzKmIDAe+fiXrLqYsR2fs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "f4330d22f1c5d2ba72d3d22df5597d123fdb60a9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
"agenix",
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737762889,
|
"lastModified": 1703113217,
|
||||||
"narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=",
|
"narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "daf04c5950b676f47a794300657f1d3d14c1a120",
|
"rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -38,13 +121,81 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742234739,
|
||||||
|
"narHash": "sha256-zFL6zsf/5OztR1NSNQF33dvS1fL/BzVUjabZq4qrtY4=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "f6af7280a3390e65c2ad8fd059cdc303426cbd59",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.11",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ixx": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nuschtosSearch",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729958008,
|
||||||
|
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "ixx",
|
||||||
|
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"ref": "v0.0.6",
|
||||||
|
"repo": "ixx",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-gaming": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": "nixpkgs_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742262357,
|
||||||
|
"narHash": "sha256-6JGR5I4cuFFun3AJKPnMPz6PKUPywIH+AFYROUFRvYQ=",
|
||||||
|
"owner": "fufexan",
|
||||||
|
"repo": "nix-gaming",
|
||||||
|
"rev": "53eda8bba79a2c28782734bca51d70ecffb82d74",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "fufexan",
|
||||||
|
"repo": "nix-gaming",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736012469,
|
"lastModified": 1703013332,
|
||||||
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
|
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
|
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -54,27 +205,152 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1740877520,
|
||||||
|
"narHash": "sha256-oiwv/ZK/2FhGxrCkQkB83i7GnWXPPLzoqFHpDD3uYpk=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"rev": "147dee35aab2193b174e4c0868bd80ead5ce755c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixpkgs.lib",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742288794,
|
||||||
|
"narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "b6eaf97c6960d97350c584de1b6dcff03c9daf42",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737885589,
|
"lastModified": 1741865919,
|
||||||
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
|
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
|
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742268799,
|
||||||
|
"narHash": "sha256-IhnK4LhkBlf14/F8THvUy3xi/TxSQkp9hikfDZRD4Ic=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "da044451c6a70518db5b730fe277b70f494188f1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-24.11",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_2",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"nuschtosSearch": "nuschtosSearch"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742396414,
|
||||||
|
"narHash": "sha256-e9Uv44rVDAG2ohNejttl9Pq5r4dxIzWxt+1hvKTQK5E=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "d79c291d5d80d587d518e0f530cc55adb0638c80",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nuschtosSearch": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"ixx": "ixx",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1741886583,
|
||||||
|
"narHash": "sha256-sScfYKtxp3CYv5fJcHQDvQjqBL+tPNQqS9yf9Putd+s=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "2974bc5fa3441a319fba943f3ca41f7dcd1a1467",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"catppuccin": "catppuccin",
|
"agenix": "agenix",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager_2",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nix-gaming": "nix-gaming",
|
||||||
|
"nixpkgs": "nixpkgs_3",
|
||||||
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
"nixvim": "nixvim"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
135
flake.nix
135
flake.nix
|
@ -1,30 +1,127 @@
|
||||||
{
|
{
|
||||||
description = "Luxzi's NixOS system configuration";
|
description = "Your new nix config";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
# Nixpkgs
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
|
# You can access packages and modules from different nixpkgs revs
|
||||||
|
# at the same time. Here's an working example:
|
||||||
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||||
|
# Home manager
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||||
catppuccin.url = "github:catppuccin/nix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
|
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, catppuccin, ... }:
|
outputs = {
|
||||||
let
|
self,
|
||||||
lib = nixpkgs.lib;
|
nixpkgs,
|
||||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
home-manager,
|
||||||
in {
|
agenix,
|
||||||
nixosConfigurations = {
|
nixvim,
|
||||||
nixos = lib.nixosSystem {
|
...
|
||||||
specialArgs = { inherit self; };
|
} @ inputs: let
|
||||||
modules = [ ./nixos/configuration.nix catppuccin.nixosModules.catppuccin ];
|
inherit (self) outputs;
|
||||||
|
# Supported systems for your flake packages, shell, etc.
|
||||||
|
systems = [
|
||||||
|
"aarch64-linux"
|
||||||
|
"i686-linux"
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
"x86_64-darwin"
|
||||||
|
];
|
||||||
|
# This is a function that generates an attribute by calling a function you
|
||||||
|
# pass to it, with each system as an argument
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
|
in {
|
||||||
|
# Your custom packages
|
||||||
|
# Accessible through 'nix build', 'nix shell', etc
|
||||||
|
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||||
|
# Formatter for your nix files, available through 'nix fmt'
|
||||||
|
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||||
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||||
|
|
||||||
|
# Your custom packages and modifications, exported as overlays
|
||||||
|
overlays = import ./overlays {inherit inputs;};
|
||||||
|
|
||||||
|
nixosModules = builtins.listToAttrs (
|
||||||
|
(map (x: {
|
||||||
|
name = x;
|
||||||
|
value = import (./modules + "/${x}");
|
||||||
|
}) (builtins.attrNames (builtins.readDir ./modules)))
|
||||||
|
++ [
|
||||||
|
{
|
||||||
|
name = "agenix";
|
||||||
|
value = agenix.nixosModules.default;
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
homeManagerModules =
|
||||||
|
builtins.listToAttrs
|
||||||
|
(
|
||||||
|
map
|
||||||
|
(name: {
|
||||||
|
inherit name;
|
||||||
|
value = import (./home-manager/modules + "/${name}");
|
||||||
|
})
|
||||||
|
(builtins.attrNames (builtins.readDir ./home-manager/modules))
|
||||||
|
)
|
||||||
|
// {
|
||||||
|
nix = {pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
# inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||||
|
# inputs.wall-utils.homeManagerModules.wall-utils
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
homeConfigurations = {
|
# NixOS configuration entrypoint
|
||||||
luxzi = home-manager.lib.homeManagerConfiguration {
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
inherit pkgs;
|
# GreenMachine = nixpkgs.lib.nixosSystem {
|
||||||
modules = [ ./home-manager/home.nix catppuccin.homeManagerModules.catppuccin ];
|
# specialArgs = {inherit inputs outputs;};
|
||||||
};
|
# modules = [
|
||||||
|
# # > Our main nixos configuration file <
|
||||||
|
# ./nixos/GreenMachine/configuration.nix
|
||||||
|
# agenix.nixosModules.default
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
nixosConfigurations =
|
||||||
|
builtins.listToAttrs
|
||||||
|
(
|
||||||
|
map
|
||||||
|
(x: {
|
||||||
|
name = x;
|
||||||
|
value = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
flake-self = self;
|
||||||
|
};
|
||||||
|
modules =
|
||||||
|
builtins.attrValues self.nixosModules
|
||||||
|
++ [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.nix-gaming.nixosModules.platformOptimizations
|
||||||
|
inputs.nixvim.nixosModules.nixvim
|
||||||
|
(import "${./.}/machines/${x}/configuration.nix" {inherit self;})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(builtins.attrNames (builtins.readDir ./machines))
|
||||||
|
);
|
||||||
|
homeConfigurations = {
|
||||||
|
lily = {...}: {
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./home-manager/profiles/desktop.nix
|
||||||
|
]
|
||||||
|
++ builtins.attrValues self.homeManagerModules;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./packages/packages.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
home.username = "luxzi";
|
|
||||||
home.homeDirectory = "/home/luxzi";
|
|
||||||
home.stateVersion = "24.05";
|
|
||||||
}
|
|
27
home-manager/modules/chromium/default.nix
Normal file
27
home-manager/modules/chromium/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.chromium;
|
||||||
|
in {
|
||||||
|
options.lily.chromium = {
|
||||||
|
enable = lib.mkEnableOption "activate chromium";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.chromium = {
|
||||||
|
enable = true;
|
||||||
|
extensions = [
|
||||||
|
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin
|
||||||
|
{id = "pkehgijcmpdhfbdbbnkijodmdjhbjlgp";} # privacy badger
|
||||||
|
{id = "ldpochfccmkkmhdbclfhpagapcfdljkj";} # decentraleyes
|
||||||
|
{id = "mnjggcdmjocbbbhaepdhchncahnbgone";} # sponsor block
|
||||||
|
{id = "gebbhagfogifgggkldgodflihgfeippi";} # return youtube dislike (just cuz)
|
||||||
|
];
|
||||||
|
commandLineArgs = [
|
||||||
|
"--enable-features=UseOzonePlatform"
|
||||||
|
"--ozone-platform=wayland"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
37
home-manager/modules/ghostty/default.nix
Normal file
37
home-manager/modules/ghostty/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.ghostty;
|
||||||
|
in {
|
||||||
|
options.lily.ghostty = {
|
||||||
|
enable = lib.mkEnableOption "activate ghostty";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home.file.".config/ghostty/shaders" = {
|
||||||
|
source = ./shaders;
|
||||||
|
recursive = true;
|
||||||
|
};
|
||||||
|
programs.ghostty = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
background-blur-radius = 0;
|
||||||
|
#theme = "dark:catppuccin-mocha,light:catppuccin-latte";
|
||||||
|
window-theme = "dark";
|
||||||
|
background-opacity = 0.75;
|
||||||
|
minimum-contrast = 1.1;
|
||||||
|
window-padding-x = 5;
|
||||||
|
window-padding-y = 5;
|
||||||
|
gtk-adwaita = false;
|
||||||
|
gtk-titlebar = false;
|
||||||
|
# custom-shader = "shaders/crt.glsl";
|
||||||
|
# custom-shader = "shaders/glow.glsl";
|
||||||
|
confirm-close-surface = false;
|
||||||
|
custom-shader-animation = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
153
home-manager/modules/ghostty/shaders/crt.glsl
Normal file
153
home-manager/modules/ghostty/shaders/crt.glsl
Normal file
|
@ -0,0 +1,153 @@
|
||||||
|
// First it does a "chromatic aberration" by splitting the rgb signals by a product of sin functions
|
||||||
|
// over time, then it does a glow effect in a perceptual color space
|
||||||
|
// Based on kalgynirae's Ghostty passable glow shader and NickWest's Chromatic Aberration shader demo
|
||||||
|
// Passable glow: https://github.com/kalgynirae/dotfiles/blob/main/ghostty/glow.glsl
|
||||||
|
// "Chromatic Aberration": https://www.shadertoy.com/view/Mds3zn
|
||||||
|
|
||||||
|
// sRGB linear -> nonlinear transform from https://bottosson.github.io/posts/colorwrong/
|
||||||
|
float f(float x) {
|
||||||
|
if (x >= 0.0031308) {
|
||||||
|
return 1.055 * pow(x, 1.0 / 2.4) - 0.055;
|
||||||
|
} else {
|
||||||
|
return 12.92 * x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float f_inv(float x) {
|
||||||
|
if (x >= 0.04045) {
|
||||||
|
return pow((x + 0.055) / 1.055, 2.4);
|
||||||
|
} else {
|
||||||
|
return x / 12.92;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Oklab <-> linear sRGB conversions from https://bottosson.github.io/posts/oklab/
|
||||||
|
vec4 toOklab(vec4 rgb) {
|
||||||
|
vec3 c = vec3(f_inv(rgb.r), f_inv(rgb.g), f_inv(rgb.b));
|
||||||
|
float l = 0.4122214708 * c.r + 0.5363325363 * c.g + 0.0514459929 * c.b;
|
||||||
|
float m = 0.2119034982 * c.r + 0.6806995451 * c.g + 0.1073969566 * c.b;
|
||||||
|
float s = 0.0883024619 * c.r + 0.2817188376 * c.g + 0.6299787005 * c.b;
|
||||||
|
float l_ = pow(l, 1.0 / 3.0);
|
||||||
|
float m_ = pow(m, 1.0 / 3.0);
|
||||||
|
float s_ = pow(s, 1.0 / 3.0);
|
||||||
|
return vec4(
|
||||||
|
0.2104542553 * l_ + 0.7936177850 * m_ - 0.0040720468 * s_,
|
||||||
|
1.9779984951 * l_ - 2.4285922050 * m_ + 0.4505937099 * s_,
|
||||||
|
0.0259040371 * l_ + 0.7827717662 * m_ - 0.8086757660 * s_,
|
||||||
|
rgb.a
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 toRgb(vec4 oklab) {
|
||||||
|
vec3 c = oklab.rgb;
|
||||||
|
float l_ = c.r + 0.3963377774 * c.g + 0.2158037573 * c.b;
|
||||||
|
float m_ = c.r - 0.1055613458 * c.g - 0.0638541728 * c.b;
|
||||||
|
float s_ = c.r - 0.0894841775 * c.g - 1.2914855480 * c.b;
|
||||||
|
float l = l_ * l_ * l_;
|
||||||
|
float m = m_ * m_ * m_;
|
||||||
|
float s = s_ * s_ * s_;
|
||||||
|
vec3 linear_srgb = vec3(
|
||||||
|
4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
|
||||||
|
-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
|
||||||
|
-0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s
|
||||||
|
);
|
||||||
|
return vec4(
|
||||||
|
clamp(f(linear_srgb.r), 0.0, 1.0),
|
||||||
|
clamp(f(linear_srgb.g), 0.0, 1.0),
|
||||||
|
clamp(f(linear_srgb.b), 0.0, 1.0),
|
||||||
|
oklab.a
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bloom samples from https://gist.github.com/qwerasd205/c3da6c610c8ffe17d6d2d3cc7068f17f
|
||||||
|
const vec3[24] samples = {
|
||||||
|
vec3(0.1693761725038636, 0.9855514761735895, 1),
|
||||||
|
vec3(-1.333070830962943, 0.4721463328627773, 0.7071067811865475),
|
||||||
|
vec3(-0.8464394909806497, -1.51113870578065, 0.5773502691896258),
|
||||||
|
vec3(1.554155680728463, -1.2588090085709776, 0.5),
|
||||||
|
vec3(1.681364377589461, 1.4741145918052656, 0.4472135954999579),
|
||||||
|
vec3(-1.2795157692199817, 2.088741103228784, 0.4082482904638631),
|
||||||
|
vec3(-2.4575847530631187, -0.9799373355024756, 0.3779644730092272),
|
||||||
|
vec3(0.5874641440200847, -2.7667464429345077, 0.35355339059327373),
|
||||||
|
vec3(2.997715703369726, 0.11704939884745152, 0.3333333333333333),
|
||||||
|
vec3(0.41360842451688395, 3.1351121305574803, 0.31622776601683794),
|
||||||
|
vec3(-3.167149933769243, 0.9844599011770256, 0.30151134457776363),
|
||||||
|
vec3(-1.5736713846521535, -3.0860263079123245, 0.2886751345948129),
|
||||||
|
vec3(2.888202648340422, -2.1583061557896213, 0.2773500981126146),
|
||||||
|
vec3(2.7150778983300325, 2.5745586041105715, 0.2672612419124244),
|
||||||
|
vec3(-2.1504069972377464, 3.2211410627650165, 0.2581988897471611),
|
||||||
|
vec3(-3.6548858794907493, -1.6253643308191343, 0.25),
|
||||||
|
vec3(1.0130775986052671, -3.9967078676335834, 0.24253562503633297),
|
||||||
|
vec3(4.229723673607257, 0.33081361055181563, 0.23570226039551587),
|
||||||
|
vec3(0.40107790291173834, 4.340407413572593, 0.22941573387056174),
|
||||||
|
vec3(-4.319124570236028, 1.159811599693438, 0.22360679774997896),
|
||||||
|
vec3(-1.9209044802827355, -4.160543952132907, 0.2182178902359924),
|
||||||
|
vec3(3.8639122286635708, -2.6589814382925123, 0.21320071635561041),
|
||||||
|
vec3(3.3486228404946234, 3.4331800232609, 0.20851441405707477),
|
||||||
|
vec3(-2.8769733643574344, 3.9652268864187157, 0.20412414523193154)
|
||||||
|
};
|
||||||
|
|
||||||
|
float offsetFunction(float iTime) {
|
||||||
|
float amount = 1.0;
|
||||||
|
const float periods[4] = {6.0, 16.0, 19.0, 27.0};
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
amount *= 1.0 + 0.5 * sin(iTime*periods[i]);
|
||||||
|
}
|
||||||
|
//return amount;
|
||||||
|
return amount * periods[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
const float DIM_CUTOFF = 0.35;
|
||||||
|
const float BRIGHT_CUTOFF = 0.65;
|
||||||
|
const float ABBERATION_FACTOR = 0.05;
|
||||||
|
|
||||||
|
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
||||||
|
vec2 uv = fragCoord.xy / iResolution.xy;
|
||||||
|
|
||||||
|
// Sample the original color
|
||||||
|
vec4 originalColor = texture(iChannel0, uv);
|
||||||
|
|
||||||
|
// Check if the pixel is part of the text (assuming alpha > 0.0)
|
||||||
|
if (originalColor.a > 0.0) {
|
||||||
|
float amount = offsetFunction(iTime);
|
||||||
|
|
||||||
|
vec3 col;
|
||||||
|
col.r = texture( iChannel0, vec2(uv.x-ABBERATION_FACTOR*amount / iResolution.x, uv.y) ).r;
|
||||||
|
col.g = texture( iChannel0, uv ).g;
|
||||||
|
col.b = texture( iChannel0, vec2(uv.x+ABBERATION_FACTOR*amount / iResolution.x, uv.y) ).b;
|
||||||
|
|
||||||
|
vec4 splittedColor = vec4(col, originalColor.a); // Keep the original alpha
|
||||||
|
vec4 source = toOklab(splittedColor);
|
||||||
|
vec4 dest = source;
|
||||||
|
|
||||||
|
if (source.x > DIM_CUTOFF) {
|
||||||
|
dest.x *= 1.2;
|
||||||
|
// dest.x = 1.2;
|
||||||
|
} else {
|
||||||
|
vec2 step = vec2(1.414) / iResolution.xy;
|
||||||
|
vec3 glow = vec3(0.0);
|
||||||
|
for (int i = 0; i < 24; i++) {
|
||||||
|
vec3 s = samples[i];
|
||||||
|
float weight = s.z;
|
||||||
|
vec4 c = toOklab(texture(iChannel0, uv + s.xy * step));
|
||||||
|
if (c.x > DIM_CUTOFF) {
|
||||||
|
glow.yz += c.yz * weight * 0.3;
|
||||||
|
if (c.x <= BRIGHT_CUTOFF) {
|
||||||
|
glow.x += c.x * weight * 0.05;
|
||||||
|
} else {
|
||||||
|
glow.x += c.x * weight * 0.10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// float lightness_diff = clamp(glow.x - dest.x, 0.0, 1.0);
|
||||||
|
// dest.x = lightness_diff;
|
||||||
|
// dest.yz = dest.yz * (1.0 - lightness_diff) + glow.yz * lightness_diff;
|
||||||
|
dest.xyz += glow.xyz;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragColor = toRgb(dest);
|
||||||
|
} else {
|
||||||
|
// If the pixel is background, set alpha to 0.0 for transparency
|
||||||
|
fragColor = vec4(originalColor.rgb, 0.0);
|
||||||
|
}
|
||||||
|
}
|
145
home-manager/modules/ghostty/shaders/glow.glsl
Normal file
145
home-manager/modules/ghostty/shaders/glow.glsl
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
// First it does a "chromatic aberration" by splitting the rgb signals by a product of sin functions
|
||||||
|
// over time, then it does a glow effect in a perceptual color space
|
||||||
|
// Based on kalgynirae's Ghostty passable glow shader and NickWest's Chromatic Aberration shader demo
|
||||||
|
// Passable glow: https://github.com/kalgynirae/dotfiles/blob/main/ghostty/glow.glsl
|
||||||
|
// "Chromatic Aberration": https://www.shadertoy.com/view/Mds3zn
|
||||||
|
|
||||||
|
// sRGB linear -> nonlinear transform from https://bottosson.github.io/posts/colorwrong/
|
||||||
|
float f(float x) {
|
||||||
|
if (x >= 0.0031308) {
|
||||||
|
return 1.055 * pow(x, 1.0 / 2.4) - 0.055;
|
||||||
|
} else {
|
||||||
|
return 12.92 * x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float f_inv(float x) {
|
||||||
|
if (x >= 0.04045) {
|
||||||
|
return pow((x + 0.055) / 1.055, 2.4);
|
||||||
|
} else {
|
||||||
|
return x / 12.92;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Oklab <-> linear sRGB conversions from https://bottosson.github.io/posts/oklab/
|
||||||
|
vec4 toOklab(vec4 rgb) {
|
||||||
|
vec3 c = vec3(f_inv(rgb.r), f_inv(rgb.g), f_inv(rgb.b));
|
||||||
|
float l = 0.4122214708 * c.r + 0.5363325363 * c.g + 0.0514459929 * c.b;
|
||||||
|
float m = 0.2119034982 * c.r + 0.6806995451 * c.g + 0.1073969566 * c.b;
|
||||||
|
float s = 0.0883024619 * c.r + 0.2817188376 * c.g + 0.6299787005 * c.b;
|
||||||
|
float l_ = pow(l, 1.0 / 3.0);
|
||||||
|
float m_ = pow(m, 1.0 / 3.0);
|
||||||
|
float s_ = pow(s, 1.0 / 3.0);
|
||||||
|
return vec4(
|
||||||
|
0.2104542553 * l_ + 0.7936177850 * m_ - 0.0040720468 * s_,
|
||||||
|
1.9779984951 * l_ - 2.4285922050 * m_ + 0.4505937099 * s_,
|
||||||
|
0.0259040371 * l_ + 0.7827717662 * m_ - 0.8086757660 * s_,
|
||||||
|
rgb.a
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 toRgb(vec4 oklab) {
|
||||||
|
vec3 c = oklab.rgb;
|
||||||
|
float l_ = c.r + 0.3963377774 * c.g + 0.2158037573 * c.b;
|
||||||
|
float m_ = c.r - 0.1055613458 * c.g - 0.0638541728 * c.b;
|
||||||
|
float s_ = c.r - 0.0894841775 * c.g - 1.2914855480 * c.b;
|
||||||
|
float l = l_ * l_ * l_;
|
||||||
|
float m = m_ * m_ * m_;
|
||||||
|
float s = s_ * s_ * s_;
|
||||||
|
vec3 linear_srgb = vec3(
|
||||||
|
4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s,
|
||||||
|
-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s,
|
||||||
|
-0.0041960863 * l - 0.7034186147 * m + 1.7076147010 * s
|
||||||
|
);
|
||||||
|
return vec4(
|
||||||
|
clamp(f(linear_srgb.r), 0.0, 1.0),
|
||||||
|
clamp(f(linear_srgb.g), 0.0, 1.0),
|
||||||
|
clamp(f(linear_srgb.b), 0.0, 1.0),
|
||||||
|
oklab.a
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bloom samples from https://gist.github.com/qwerasd205/c3da6c610c8ffe17d6d2d3cc7068f17f
|
||||||
|
const vec3[24] samples = {
|
||||||
|
vec3(0.1693761725038636, 0.9855514761735895, 1),
|
||||||
|
vec3(-1.333070830962943, 0.4721463328627773, 0.7071067811865475),
|
||||||
|
vec3(-0.8464394909806497, -1.51113870578065, 0.5773502691896258),
|
||||||
|
vec3(1.554155680728463, -1.2588090085709776, 0.5),
|
||||||
|
vec3(1.681364377589461, 1.4741145918052656, 0.4472135954999579),
|
||||||
|
vec3(-1.2795157692199817, 2.088741103228784, 0.4082482904638631),
|
||||||
|
vec3(-2.4575847530631187, -0.9799373355024756, 0.3779644730092272),
|
||||||
|
vec3(0.5874641440200847, -2.7667464429345077, 0.35355339059327373),
|
||||||
|
vec3(2.997715703369726, 0.11704939884745152, 0.3333333333333333),
|
||||||
|
vec3(0.41360842451688395, 3.1351121305574803, 0.31622776601683794),
|
||||||
|
vec3(-3.167149933769243, 0.9844599011770256, 0.30151134457776363),
|
||||||
|
vec3(-1.5736713846521535, -3.0860263079123245, 0.2886751345948129),
|
||||||
|
vec3(2.888202648340422, -2.1583061557896213, 0.2773500981126146),
|
||||||
|
vec3(2.7150778983300325, 2.5745586041105715, 0.2672612419124244),
|
||||||
|
vec3(-2.1504069972377464, 3.2211410627650165, 0.2581988897471611),
|
||||||
|
vec3(-3.6548858794907493, -1.6253643308191343, 0.25),
|
||||||
|
vec3(1.0130775986052671, -3.9967078676335834, 0.24253562503633297),
|
||||||
|
vec3(4.229723673607257, 0.33081361055181563, 0.23570226039551587),
|
||||||
|
vec3(0.40107790291173834, 4.340407413572593, 0.22941573387056174),
|
||||||
|
vec3(-4.319124570236028, 1.159811599693438, 0.22360679774997896),
|
||||||
|
vec3(-1.9209044802827355, -4.160543952132907, 0.2182178902359924),
|
||||||
|
vec3(3.8639122286635708, -2.6589814382925123, 0.21320071635561041),
|
||||||
|
vec3(3.3486228404946234, 3.4331800232609, 0.20851441405707477),
|
||||||
|
vec3(-2.8769733643574344, 3.9652268864187157, 0.20412414523193154)
|
||||||
|
};
|
||||||
|
|
||||||
|
float offsetFunction(float iTime) {
|
||||||
|
float amount = 1.0;
|
||||||
|
const float periods[4] = {6.0, 16.0, 19.0, 27.0};
|
||||||
|
for (int i = 0; i < 4; i++) {
|
||||||
|
amount *= 1.0 + 0.5 * sin(iTime*periods[i]);
|
||||||
|
}
|
||||||
|
//return amount;
|
||||||
|
return amount * periods[3];
|
||||||
|
}
|
||||||
|
|
||||||
|
const float DIM_CUTOFF = 0.35;
|
||||||
|
const float BRIGHT_CUTOFF = 0.65;
|
||||||
|
const float ABBERATION_FACTOR = 0.05;
|
||||||
|
|
||||||
|
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
||||||
|
vec2 uv = fragCoord.xy / iResolution.xy;
|
||||||
|
|
||||||
|
float amount = offsetFunction(iTime);
|
||||||
|
|
||||||
|
vec3 col;
|
||||||
|
col.r = texture( iChannel0, vec2(uv.x-ABBERATION_FACTOR*amount / iResolution.x, uv.y) ).r;
|
||||||
|
col.g = texture( iChannel0, uv ).g;
|
||||||
|
col.b = texture( iChannel0, vec2(uv.x+ABBERATION_FACTOR*amount / iResolution.x, uv.y) ).b;
|
||||||
|
|
||||||
|
vec4 splittedColor = vec4(col, 1.0);
|
||||||
|
vec4 source = toOklab(splittedColor);
|
||||||
|
vec4 dest = source;
|
||||||
|
|
||||||
|
if (source.x > DIM_CUTOFF) {
|
||||||
|
dest.x *= 1.2;
|
||||||
|
// dest.x = 1.2;
|
||||||
|
} else {
|
||||||
|
vec2 step = vec2(1.414) / iResolution.xy;
|
||||||
|
vec3 glow = vec3(0.0);
|
||||||
|
for (int i = 0; i < 24; i++) {
|
||||||
|
vec3 s = samples[i];
|
||||||
|
float weight = s.z;
|
||||||
|
vec4 c = toOklab(texture(iChannel0, uv + s.xy * step));
|
||||||
|
if (c.x > DIM_CUTOFF) {
|
||||||
|
glow.yz += c.yz * weight * 0.3;
|
||||||
|
if (c.x <= BRIGHT_CUTOFF) {
|
||||||
|
glow.x += c.x * weight * 0.05;
|
||||||
|
} else {
|
||||||
|
glow.x += c.x * weight * 0.10;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// float lightness_diff = clamp(glow.x - dest.x, 0.0, 1.0);
|
||||||
|
// dest.x = lightness_diff;
|
||||||
|
// dest.yz = dest.yz * (1.0 - lightness_diff) + glow.yz * lightness_diff;
|
||||||
|
dest.xyz += glow.xyz;
|
||||||
|
dest.a = 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
fragColor = toRgb(dest);
|
||||||
|
}
|
33
home-manager/modules/git/default.nix
Normal file
33
home-manager/modules/git/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.git;
|
||||||
|
in {
|
||||||
|
options.lily.git = {
|
||||||
|
enable = lib.mkEnableOption "activate git";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
user = {
|
||||||
|
name = "Lily";
|
||||||
|
email = "Caznix01@gmail.com";
|
||||||
|
signingKey = "Caznix";
|
||||||
|
};
|
||||||
|
commit.gpgsign = true;
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
merge = {
|
||||||
|
ff = "no";
|
||||||
|
no-commit = "yes";
|
||||||
|
};
|
||||||
|
pull.ff = "only";
|
||||||
|
push = {autoSetupRemote = true;};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
116
home-manager/modules/hyprland/default.nix
Normal file
116
home-manager/modules/hyprland/default.nix
Normal file
|
@ -0,0 +1,116 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.hyprland;
|
||||||
|
in {
|
||||||
|
options.lily.hyprland = {
|
||||||
|
enable = lib.mkEnableOption "activate hyprland";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
programs.kitty.enable = true; # required for the default Hyprland config
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
decoration = {
|
||||||
|
rounding = 10;
|
||||||
|
# rounding_power = 2;
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 10;
|
||||||
|
passes = 3;
|
||||||
|
popups = true;
|
||||||
|
|
||||||
|
xray = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
blurls = "waybar";
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||||
|
preserve_split = true; # You probably want this
|
||||||
|
};
|
||||||
|
general = {
|
||||||
|
resize_on_border = true; # Enables resizing by dragging window borders
|
||||||
|
extend_border_grab_area = 15; # Extends the clickable area around the border for resizing
|
||||||
|
hover_icon_on_border = true; # Shows a cursor icon when
|
||||||
|
layout = "dwindle";
|
||||||
|
"col.active_border" = "rgba(C55900ee) rgba(FFAA63ee) 45deg";
|
||||||
|
"col.inactive_border" = "rgba(595959aa)";
|
||||||
|
border_size = 2;
|
||||||
|
gaps_out = 10;
|
||||||
|
};
|
||||||
|
exec-once = [
|
||||||
|
"${pkgs.kdePackages.kwallet-pam}/libexec/pam_kwallet_init"
|
||||||
|
"${pkgs.networkmanagerapplet}/bin/nm-applet"
|
||||||
|
"${pkgs.blueman}/bin/blueman-applet"
|
||||||
|
];
|
||||||
|
"$super" = "SUPER";
|
||||||
|
"$alt_super" = "CTRL";
|
||||||
|
|
||||||
|
bind = [
|
||||||
|
"$super, Q, killactive"
|
||||||
|
"$alt_super $super,Q,exit"
|
||||||
|
# Screenshot region
|
||||||
|
"$super SHIFT,S, exec, GRIM_DEFAULT_DIR=${config.home.homeDirectory}/Pictures/Screenshots/ ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | wl-copy "
|
||||||
|
"$super,T, exec, ghostty"
|
||||||
|
"$super, L,exec, hyprlock --immediate"
|
||||||
|
"$super, B,exec, chromium"
|
||||||
|
"$super,F,fullscreen"
|
||||||
|
"$super SHIFT,F,togglefloating"
|
||||||
|
"$super,E,exec,kate"
|
||||||
|
|
||||||
|
"ALT,SPACE,exec, rofi -show drun"
|
||||||
|
"$super, P, pseudo,"
|
||||||
|
|
||||||
|
"$super, 1, workspace, 1"
|
||||||
|
"$super, 2, workspace, 2"
|
||||||
|
"$super, 3, workspace, 3"
|
||||||
|
"$super, 4, workspace, 4"
|
||||||
|
"$super, 5, workspace, 5"
|
||||||
|
"$super, 6, workspace, 6"
|
||||||
|
"$super, 7, workspace, 7"
|
||||||
|
"$super, 8, workspace, 8"
|
||||||
|
"$super, 9, workspace, 9"
|
||||||
|
"$super, 0, workspace, 10"
|
||||||
|
|
||||||
|
# Move active window to a workspace iwth mainMod + SHIFT + j
|
||||||
|
"$super SHIFT, 1, movetoworkspace, 1"
|
||||||
|
"$super SHIFT, 2, movetoworkspace, 2"
|
||||||
|
"$super SHIFT, 3, movetoworkspace, 3"
|
||||||
|
"$super SHIFT, 4, movetoworkspace, 4"
|
||||||
|
"$super SHIFT, 5, movetoworkspace, 5"
|
||||||
|
"$super SHIFT, 6, movetoworkspace, 6"
|
||||||
|
"$super SHIFT, 7, movetoworkspace, 7"
|
||||||
|
"$super SHIFT, 8, movetoworkspace, 8"
|
||||||
|
"$super SHIFT, 9, movetoworkspace, 9"
|
||||||
|
"$super SHIFT, 0, movetoworkspace, 10"
|
||||||
|
|
||||||
|
"$super, J, togglesplit"
|
||||||
|
|
||||||
|
"$super, left, movefocus, l"
|
||||||
|
"$super, right, movefocus, r"
|
||||||
|
"$super, up, movefocus, u"
|
||||||
|
"$super, down, movefocus, d"
|
||||||
|
];
|
||||||
|
bindm = [
|
||||||
|
"$super, mouse:272, movewindow"
|
||||||
|
"$super, mouse:273, resizewindow"
|
||||||
|
];
|
||||||
|
bindel = [
|
||||||
|
",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
|
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||||
|
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 10%+"
|
||||||
|
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 10%-"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
42
home-manager/modules/neovim/colorscheme.nix
Normal file
42
home-manager/modules/neovim/colorscheme.nix
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
{...}: {
|
||||||
|
programs.nixvim = {
|
||||||
|
colorschemes.catppuccin = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
flavour = "mocha";
|
||||||
|
background = {
|
||||||
|
light = "latte";
|
||||||
|
dark = "mocha";
|
||||||
|
};
|
||||||
|
transparent_background = true;
|
||||||
|
show_end_of_buffer = false;
|
||||||
|
term_colors = false;
|
||||||
|
dim_inactive.enabled = false;
|
||||||
|
no_italic = false;
|
||||||
|
no_bold = false;
|
||||||
|
styles = {
|
||||||
|
comments = ["italic"];
|
||||||
|
conditionals = ["italic"];
|
||||||
|
loops = null;
|
||||||
|
functions = null;
|
||||||
|
keywords = null;
|
||||||
|
strings = null;
|
||||||
|
variables = null;
|
||||||
|
numbers = null;
|
||||||
|
booleans = null;
|
||||||
|
properties = null;
|
||||||
|
types = null;
|
||||||
|
operators = null;
|
||||||
|
};
|
||||||
|
integrations = {
|
||||||
|
cmp = true;
|
||||||
|
gitsigns = true;
|
||||||
|
nvimtree = true;
|
||||||
|
telescope = true;
|
||||||
|
notify = false;
|
||||||
|
mini = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
32
home-manager/modules/neovim/default.nix
Normal file
32
home-manager/modules/neovim/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
nixvim,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.neovim;
|
||||||
|
in {
|
||||||
|
imports = [
|
||||||
|
# ./colorscheme.nix
|
||||||
|
./plugins
|
||||||
|
./keybinds.nix
|
||||||
|
];
|
||||||
|
options.lily.neovim = {
|
||||||
|
enable = lib.mkEnableOption "activate neovim";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.nixvim = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
vimdiffAlias = true;
|
||||||
|
|
||||||
|
performance = {
|
||||||
|
byteCompileLua.enable = true;
|
||||||
|
combinePlugins = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
32
home-manager/modules/neovim/keybinds.nix
Normal file
32
home-manager/modules/neovim/keybinds.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{...}: {
|
||||||
|
programs.nixvim = {
|
||||||
|
globals = {
|
||||||
|
mapleader = " ";
|
||||||
|
maplocalleader = " ";
|
||||||
|
};
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = ["n" "v"];
|
||||||
|
key = "<SPACE>";
|
||||||
|
action = "<NOP>";
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<LEADER>,";
|
||||||
|
action = "A,<ESC>";
|
||||||
|
options.silent = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<LEADER>sf";
|
||||||
|
action.__raw = "require('telescope.builtin').find_files";
|
||||||
|
options = {
|
||||||
|
silent = true;
|
||||||
|
desc = "[S]earch [F]iles";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
24
home-manager/modules/neovim/plugins/default.nix
Normal file
24
home-manager/modules/neovim/plugins/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./telescope.nix
|
||||||
|
./lualine.nix
|
||||||
|
./treesitter.nix
|
||||||
|
./gitsigns.nix
|
||||||
|
./tree.nix
|
||||||
|
./lsp
|
||||||
|
# ./dap.nix
|
||||||
|
];
|
||||||
|
programs.nixvim.plugins = {
|
||||||
|
sleuth.enable = true;
|
||||||
|
comment.enable = true;
|
||||||
|
indent-blankline.enable = true;
|
||||||
|
web-devicons.enable = true;
|
||||||
|
fugitive.enable = true;
|
||||||
|
markdown-preview.enable = true;
|
||||||
|
|
||||||
|
git-worktree = {
|
||||||
|
enable = true;
|
||||||
|
enableTelescope = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
45
home-manager/modules/neovim/plugins/gitsigns.nix
Normal file
45
home-manager/modules/neovim/plugins/gitsigns.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{...}: {
|
||||||
|
programs.nixvim.plugins.gitsigns = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
signs = {
|
||||||
|
add.text = "▎";
|
||||||
|
change.text = "▎";
|
||||||
|
delete.text = "";
|
||||||
|
topdelete.text = "";
|
||||||
|
changedelete.text = "▎";
|
||||||
|
};
|
||||||
|
|
||||||
|
signs_staged_enable = true;
|
||||||
|
signcolumn = true;
|
||||||
|
numhl = false;
|
||||||
|
linehl = false;
|
||||||
|
word_diff = false;
|
||||||
|
watch_gitdir = {
|
||||||
|
interval = 1000;
|
||||||
|
follow_files = true;
|
||||||
|
};
|
||||||
|
attach_to_untracked = true;
|
||||||
|
current_line_blame = false;
|
||||||
|
current_line_blame_opts = {
|
||||||
|
virt_text = true;
|
||||||
|
virt_text_pos = "eol";
|
||||||
|
delay = 100;
|
||||||
|
ignore_whitespace = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> — <summary>";
|
||||||
|
sign_priority = 6;
|
||||||
|
status_formatter = null;
|
||||||
|
update_debounce = 200;
|
||||||
|
max_file_length = 40000;
|
||||||
|
preview_config = {
|
||||||
|
border = "rounded";
|
||||||
|
style = "minimal";
|
||||||
|
relative = "cursor";
|
||||||
|
row = 0;
|
||||||
|
col = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
85
home-manager/modules/neovim/plugins/lsp/cmp.nix
Normal file
85
home-manager/modules/neovim/plugins/lsp/cmp.nix
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
{...}: {
|
||||||
|
programs.nixvim.plugins = {
|
||||||
|
cmp = {
|
||||||
|
autoEnableSources = false;
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||||
|
formatting = {
|
||||||
|
fields = ["kind" "abbr" "menu"];
|
||||||
|
format = ''
|
||||||
|
function(entry, vim_item)
|
||||||
|
local kind_icons = {
|
||||||
|
Text = "",
|
||||||
|
Method = "",
|
||||||
|
Function = "",
|
||||||
|
Constructor = "",
|
||||||
|
Field = " ",
|
||||||
|
Variable = "",
|
||||||
|
Class = "",
|
||||||
|
Interface = "",
|
||||||
|
Module = "",
|
||||||
|
Property = "",
|
||||||
|
Unit = "",
|
||||||
|
Value = "",
|
||||||
|
Enum = "",
|
||||||
|
Keyword = "",
|
||||||
|
Snippet = "",
|
||||||
|
Color = "",
|
||||||
|
File = "",
|
||||||
|
Reference = "",
|
||||||
|
Folder = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Constant = "",
|
||||||
|
Struct = "",
|
||||||
|
Event = "",
|
||||||
|
Operator = "",
|
||||||
|
TypeParameter = " ",
|
||||||
|
Misc = " ",
|
||||||
|
}
|
||||||
|
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
|
||||||
|
vim_item.abbr = vim_item.abbr .. " " .. (vim_item.menu and vim_item.menu or "")
|
||||||
|
if vim.fn.strchars(vim_item.abbr) > 50 then
|
||||||
|
vim_item.abbr = vim.fn.strcharpart(vim_item.abbr, 0, 50) .. "..."
|
||||||
|
end
|
||||||
|
vim_item.menu = ({
|
||||||
|
nvim_lsp = "[LSP]",
|
||||||
|
luasnip = "[Snippet]",
|
||||||
|
buffer = "[Buffer]",
|
||||||
|
path = "[Path]"
|
||||||
|
})[entry.source.name]
|
||||||
|
return vim_item
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
mapping.__raw = '' cmp.mapping.preset.insert({
|
||||||
|
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||||
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
|
["<CR>"] = cmp.mapping.confirm({
|
||||||
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
|
select = true,
|
||||||
|
}),
|
||||||
|
["<S-TAB>"] = cmp.mapping.select_prev_item(),
|
||||||
|
["<TAB>"] = cmp.mapping.select_next_item(),
|
||||||
|
})'';
|
||||||
|
window = {
|
||||||
|
completion.__raw = "cmp.config.window.bordered()";
|
||||||
|
documentation.__raw = "cmp.config.window.bordered()";
|
||||||
|
};
|
||||||
|
sources = [
|
||||||
|
{name = "nvim_lsp";}
|
||||||
|
{name = "luasnip";}
|
||||||
|
{name = "path";}
|
||||||
|
{name = "buffer";}
|
||||||
|
{name = "crates";}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
cmp_luasnip.enable = true;
|
||||||
|
cmp-buffer.enable = true;
|
||||||
|
cmp-path.enable = true;
|
||||||
|
cmp-nvim-lsp.enable = true;
|
||||||
|
luasnip.enable = true;
|
||||||
|
};
|
||||||
|
}
|
192
home-manager/modules/neovim/plugins/lsp/default.nix
Normal file
192
home-manager/modules/neovim/plugins/lsp/default.nix
Normal file
|
@ -0,0 +1,192 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./cmp.nix
|
||||||
|
];
|
||||||
|
programs.nixvim.plugins = {
|
||||||
|
crates.enable = true; # Does not work
|
||||||
|
dressing.enable = true;
|
||||||
|
};
|
||||||
|
programs.nixvim.extraConfigVim = ''
|
||||||
|
augroup unrecognized_filetypes
|
||||||
|
autocmd!
|
||||||
|
autocmd BufRead,BufNewFile *.vert set filetype=glsl
|
||||||
|
autocmd BufRead,BufNewFile *.tesc set filetype=glsl
|
||||||
|
autocmd BufRead,BufNewFile *.tese set filetype=glsl
|
||||||
|
autocmd BufRead,BufNewFile *.frag set filetype=glsl
|
||||||
|
autocmd BufRead,BufNewFile *.geom set filetype=glsl
|
||||||
|
autocmd BufRead,BufNewFile *.comp set filetype=glsl
|
||||||
|
autocmd BufRead,BufNewFile *.qml set filetype=qml
|
||||||
|
autocmd BufRead,BufNewFile *.slint set filetype=slint
|
||||||
|
autocmd BufRead,BufNewFile *.typ set filetype=typst
|
||||||
|
augroup END
|
||||||
|
'';
|
||||||
|
programs.nixvim.plugins.lsp = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
capabilities = ''
|
||||||
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
capabilities.textDocument.completion.completionItem.snippetSupport = true'';
|
||||||
|
preConfig = ''
|
||||||
|
local border = {
|
||||||
|
{ "╭", "FloatBorder" },
|
||||||
|
{ "─", "FloatBorder" },
|
||||||
|
{ "╮", "FloatBorder" },
|
||||||
|
{ "│", "FloatBorder" },
|
||||||
|
{ "╯", "FloatBorder" },
|
||||||
|
{ "─", "FloatBorder" },
|
||||||
|
{ "╰", "FloatBorder" },
|
||||||
|
{ "│", "FloatBorder" }
|
||||||
|
}
|
||||||
|
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||||
|
vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
||||||
|
'';
|
||||||
|
|
||||||
|
inlayHints = true;
|
||||||
|
servers = {
|
||||||
|
clangd = {
|
||||||
|
enable = true;
|
||||||
|
settings.arguments = [
|
||||||
|
"--clang-tidy"
|
||||||
|
"--background-index"
|
||||||
|
"--completion-style=detailed"
|
||||||
|
"--cross-file-rename"
|
||||||
|
"--header-insertion=iwyu"
|
||||||
|
"--all-scopes-completion"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# jdtls.enable = true;
|
||||||
|
emmet_ls.enable = true;
|
||||||
|
ts_ls.enable = true;
|
||||||
|
cssls.enable = true;
|
||||||
|
# glsl_analyzer.enable = true;
|
||||||
|
glslls.enable = true;
|
||||||
|
pyright.enable = true;
|
||||||
|
nixd.enable = true;
|
||||||
|
lua_ls = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
telemetry.enable = false;
|
||||||
|
workspace.checkThirdParty = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
svelte = {
|
||||||
|
enable = true;
|
||||||
|
settings.enable_ts_plugin = true;
|
||||||
|
};
|
||||||
|
slint_lsp.enable = true;
|
||||||
|
zls.enable = true;
|
||||||
|
rust_analyzer = {
|
||||||
|
enable = true;
|
||||||
|
installRustc = false;
|
||||||
|
installCargo = false;
|
||||||
|
settings = {
|
||||||
|
imports = {
|
||||||
|
granularity.group = "crate";
|
||||||
|
prefix = "self";
|
||||||
|
preferNoStd = true;
|
||||||
|
};
|
||||||
|
check = {
|
||||||
|
command = "clippy";
|
||||||
|
allTargets = true;
|
||||||
|
};
|
||||||
|
completion = {
|
||||||
|
fullFunctionSignatures.enable = false;
|
||||||
|
autoimport.enable = true;
|
||||||
|
};
|
||||||
|
cargo = {
|
||||||
|
allTargets = true;
|
||||||
|
features = "all";
|
||||||
|
};
|
||||||
|
procMacro.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keymaps = {
|
||||||
|
silent = true;
|
||||||
|
extra = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>rn";
|
||||||
|
action.__raw = "vim.lsp.buf.rename";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ca";
|
||||||
|
action.__raw = "vim.lsp.buf.code_action";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>di";
|
||||||
|
action.__raw = "vim.diagnostic.open_float";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>dv";
|
||||||
|
action.__raw = "require('telescope.builtin').diagnostics";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gd";
|
||||||
|
action.__raw = "vim.lsp.buf.definition";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gr";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_references";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "gI";
|
||||||
|
action.__raw = "vim.lsp.buf.implementation";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>D";
|
||||||
|
action.__raw = "vim.lsp.buf.type_definition";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ds";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_document_symbols";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>ws";
|
||||||
|
action.__raw = "require('telescope.builtin').lsp_dynamic_workspace_symbols";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>K";
|
||||||
|
action.__raw = "vim.lsp.buf.hover";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>k";
|
||||||
|
action.__raw = "vim.lsp.buf.signature_help";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>gD";
|
||||||
|
action.__raw = "vim.lsp.buf.declaration";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>wa";
|
||||||
|
action.__raw = "vim.lsp.buf.add_workspace_folder";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>wr";
|
||||||
|
action.__raw = "vim.lsp.buf.remove_workspace_folder";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>wl";
|
||||||
|
action.__raw = "function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
21
home-manager/modules/neovim/plugins/lualine.nix
Normal file
21
home-manager/modules/neovim/plugins/lualine.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{...}: {
|
||||||
|
programs.nixvim.plugins.lualine = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
options = {
|
||||||
|
icons_enabled = true;
|
||||||
|
component_seperators = {
|
||||||
|
left = "|";
|
||||||
|
right = "|";
|
||||||
|
};
|
||||||
|
section_seperators = {
|
||||||
|
left = "";
|
||||||
|
right = "";
|
||||||
|
};
|
||||||
|
disabled_filetypes.statusline = ["NvimTree" "alpha"];
|
||||||
|
disabled_filetypes.winbar = ["NvimTree" "alpha"];
|
||||||
|
theme = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
47
home-manager/modules/neovim/plugins/telescope.nix
Normal file
47
home-manager/modules/neovim/plugins/telescope.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{...}: {
|
||||||
|
programs.nixvim.plugins.telescope = {
|
||||||
|
enable = true;
|
||||||
|
extensions = {
|
||||||
|
fzf-native.enable = true;
|
||||||
|
file-browser.enable = true;
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
theme = "dropdown";
|
||||||
|
defaults = {
|
||||||
|
prompt_prefix = " ";
|
||||||
|
selection_caret = " ";
|
||||||
|
entry_prefix = " ";
|
||||||
|
initial_mode = "insert";
|
||||||
|
selection_strategy = "reset";
|
||||||
|
layout_config = {};
|
||||||
|
mappings.i = {
|
||||||
|
"<C-u>" = false;
|
||||||
|
"<C-d>" = false;
|
||||||
|
};
|
||||||
|
file_ignore_patters = {};
|
||||||
|
path_display = "smart";
|
||||||
|
winblend = 0;
|
||||||
|
border = {};
|
||||||
|
borderchars = null;
|
||||||
|
color_devicons = true;
|
||||||
|
set_env = {COLORTERM = "truecolor";};
|
||||||
|
};
|
||||||
|
pickers = {
|
||||||
|
planets = {
|
||||||
|
show_pluto = true;
|
||||||
|
show_moon = true;
|
||||||
|
};
|
||||||
|
git_files = {
|
||||||
|
hidden = true;
|
||||||
|
show_untracked = true;
|
||||||
|
};
|
||||||
|
colorscheme = {
|
||||||
|
enable_preview = true;
|
||||||
|
};
|
||||||
|
find_files = {
|
||||||
|
hidden = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
17
home-manager/modules/neovim/plugins/tree.nix
Normal file
17
home-manager/modules/neovim/plugins/tree.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
programs.nixvim.plugins.nvim-tree = {
|
||||||
|
enable = true;
|
||||||
|
disableNetrw = true;
|
||||||
|
hijackNetrw = true;
|
||||||
|
diagnostics.enable = true;
|
||||||
|
preferStartupRoot = false;
|
||||||
|
syncRootWithCwd = true;
|
||||||
|
view = {
|
||||||
|
side = "left";
|
||||||
|
width = 30;
|
||||||
|
};
|
||||||
|
renderer.groupEmpty = true;
|
||||||
|
actions.openFile.resizeWindow = true;
|
||||||
|
git.ignore = false;
|
||||||
|
};
|
||||||
|
}
|
19
home-manager/modules/neovim/plugins/treesitter.nix
Normal file
19
home-manager/modules/neovim/plugins/treesitter.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{config, ...}: {
|
||||||
|
programs.nixvim.plugins.treesitter = {
|
||||||
|
enable = true;
|
||||||
|
nixvimInjections = true;
|
||||||
|
settings = {
|
||||||
|
indent.enable = true;
|
||||||
|
incremental_selection = {
|
||||||
|
enable = true;
|
||||||
|
# keymaps = {
|
||||||
|
# init_selection = "<c-space>";
|
||||||
|
# node_incremental = "<c-space>";
|
||||||
|
# scope_incremental = "<c-s";
|
||||||
|
# node_decremental = "<c-backspace>";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
highlight.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
20
home-manager/modules/rofi/default.nix
Normal file
20
home-manager/modules/rofi/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.rofi;
|
||||||
|
in {
|
||||||
|
options.lily.rofi = {
|
||||||
|
enable = lib.mkEnableOption "activate rofi";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.rofi = {
|
||||||
|
package = pkgs.rofi-wayland;
|
||||||
|
enable = true;
|
||||||
|
plugins = [pkgs.rofi-calc];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
84
home-manager/modules/vscode/default.nix
Normal file
84
home-manager/modules/vscode/default.nix
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.vscode;
|
||||||
|
in {
|
||||||
|
options.lily.vscode = {
|
||||||
|
enable = lib.mkEnableOption "activate vscode";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.vscode = {
|
||||||
|
enable = true;
|
||||||
|
enableUpdateCheck = false;
|
||||||
|
enableExtensionUpdateCheck = false;
|
||||||
|
mutableExtensionsDir = false;
|
||||||
|
package = pkgs.vscode.overrideAttrs (attrs: {
|
||||||
|
buildInputs = with pkgs;
|
||||||
|
attrs.buildInputs
|
||||||
|
++ [
|
||||||
|
bun
|
||||||
|
gcc
|
||||||
|
cmake
|
||||||
|
ninja
|
||||||
|
];
|
||||||
|
});
|
||||||
|
extensions = with pkgs.vscode-extensions; [
|
||||||
|
github.copilot
|
||||||
|
github.copilot-chat
|
||||||
|
rust-lang.rust-analyzer
|
||||||
|
svelte.svelte-vscode
|
||||||
|
bradlc.vscode-tailwindcss
|
||||||
|
ms-vsliveshare.vsliveshare
|
||||||
|
ms-vscode.cmake-tools
|
||||||
|
ms-python.python
|
||||||
|
vadimcn.vscode-lldb
|
||||||
|
bierner.markdown-preview-github-styles
|
||||||
|
bierner.markdown-checkbox
|
||||||
|
bierner.markdown-emoji
|
||||||
|
bierner.markdown-footnotes
|
||||||
|
bierner.markdown-mermaid
|
||||||
|
denoland.vscode-deno
|
||||||
|
ziglang.vscode-zig
|
||||||
|
# geequlim.godot-tools
|
||||||
|
gruntfuggly.todo-tree
|
||||||
|
mhutchie.git-graph
|
||||||
|
fill-labs.dependi
|
||||||
|
bbenoist.nix
|
||||||
|
tamasfe.even-better-toml
|
||||||
|
twxs.cmake
|
||||||
|
llvm-vs-code-extensions.vscode-clangd
|
||||||
|
mkhl.direnv
|
||||||
|
(pkgs.vscode-utils.buildVscodeMarketplaceExtension {
|
||||||
|
mktplcRef = {
|
||||||
|
name = "darcula-solid";
|
||||||
|
publisher = "jussiemion";
|
||||||
|
version = "1.2.1";
|
||||||
|
hash = "sha256-tIfCkOR1Z/uRWiZhrBfOQCZT3Cu6yNjAnxjn0UJFO2U=";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
userSettings = {
|
||||||
|
"editor.cursorSmoothCaretAnimation" = "on";
|
||||||
|
"editor.smoothScrolling" = true;
|
||||||
|
"editor.cursorBlinking" = "expand";
|
||||||
|
"workbench.colorTheme" = "Darcula Solid";
|
||||||
|
"clangd.path" = "${pkgs.clang-tools}/bin/clangd";
|
||||||
|
"clangd.arguments" = [
|
||||||
|
"--clang-tidy"
|
||||||
|
"--background-index"
|
||||||
|
"--completion-style=detailed"
|
||||||
|
"--cross-file-rename"
|
||||||
|
"--header-insertion=iwyu"
|
||||||
|
"--all-scopes-completion"
|
||||||
|
];
|
||||||
|
"editor.fontFamily" = "JetBrainsMono Nerd Font";
|
||||||
|
"zig.path" = "${pkgs.zls}/bin/zls";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
18
home-manager/modules/waybar/default.nix
Normal file
18
home-manager/modules/waybar/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.waybar;
|
||||||
|
in {
|
||||||
|
options.lily.waybar = {
|
||||||
|
enable = lib.mkEnableOption "activate waybar";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
103
home-manager/modules/zed/default.nix
Normal file
103
home-manager/modules/zed/default.nix
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.zed;
|
||||||
|
in {
|
||||||
|
options.lily.zed = {
|
||||||
|
enable = lib.mkEnableOption "activate zed";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.zed-editor = {
|
||||||
|
enable = true;
|
||||||
|
extensions = ["nix" "toml" "elixir" "make"];
|
||||||
|
|
||||||
|
## everything inside of these brackets are Zed options.
|
||||||
|
userSettings = {
|
||||||
|
assistant = {
|
||||||
|
enabled = true;
|
||||||
|
version = "2";
|
||||||
|
default_open_ai_model = null;
|
||||||
|
### PROVIDER OPTIONS
|
||||||
|
### zed.dev models { claude-3-5-sonnet-latest } requires github connected
|
||||||
|
### anthropic models { claude-3-5-sonnet-latest claude-3-haiku-latest claude-3-opus-latest } requires API_KEY
|
||||||
|
### copilot_chat models { gpt-4o gpt-4 gpt-3.5-turbo o1-preview } requires github connected
|
||||||
|
default_model = {
|
||||||
|
provider = "zed.dev";
|
||||||
|
model = "claude-3-5-sonnet-latest";
|
||||||
|
};
|
||||||
|
|
||||||
|
# inline_alternatives = [
|
||||||
|
# {
|
||||||
|
# provider = "copilot_chat";
|
||||||
|
# model = "gpt-3.5-turbo";
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
};
|
||||||
|
|
||||||
|
node = {
|
||||||
|
path = lib.getExe pkgs.nodejs;
|
||||||
|
npm_path = lib.getExe' pkgs.nodejs "npm";
|
||||||
|
};
|
||||||
|
|
||||||
|
hour_format = "hour24";
|
||||||
|
auto_update = false;
|
||||||
|
terminal = {
|
||||||
|
alternate_scroll = "off";
|
||||||
|
blinking = "off";
|
||||||
|
copy_on_select = false;
|
||||||
|
dock = "bottom";
|
||||||
|
detect_venv = {
|
||||||
|
on = {
|
||||||
|
directories = [".env" "env" ".venv" "venv"];
|
||||||
|
activate_script = "default";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
font_family = "JetBrains Mono";
|
||||||
|
font_features = null;
|
||||||
|
font_size = null;
|
||||||
|
line_height = "comfortable";
|
||||||
|
option_as_meta = false;
|
||||||
|
button = false;
|
||||||
|
shell = {
|
||||||
|
program = "zsh";
|
||||||
|
};
|
||||||
|
toolbar = {
|
||||||
|
title = true;
|
||||||
|
};
|
||||||
|
working_directory = "current_project_directory";
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
rust-analyzer = {
|
||||||
|
binary = {
|
||||||
|
path = "/run/current-system/sw/bin/rust-analyzer";
|
||||||
|
path_lookup = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nix = {
|
||||||
|
binary = {
|
||||||
|
path = "${pkgs.nixd}/bin/nixd";
|
||||||
|
path_lookup = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
vim_mode = false; # Not yet...
|
||||||
|
load_direnv = "shell_hook";
|
||||||
|
base_keymap = "VSCode";
|
||||||
|
theme = {
|
||||||
|
mode = "system";
|
||||||
|
light = "One Light";
|
||||||
|
dark = "Andromeda";
|
||||||
|
};
|
||||||
|
show_whitespaces = "all";
|
||||||
|
ui_font_size = 16;
|
||||||
|
buffer_font_size = 16;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
53
home-manager/modules/zsh/default.nix
Normal file
53
home-manager/modules/zsh/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.zsh;
|
||||||
|
in {
|
||||||
|
options.lily.zsh = {
|
||||||
|
enable = lib.mkEnableOption "activate zsh";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autocd = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
autosuggestion.strategy = [
|
||||||
|
"completion"
|
||||||
|
"history"
|
||||||
|
];
|
||||||
|
shellAliases = {
|
||||||
|
nix-switch = "sudo nixos-rebuild switch --flake $HOME/.dotfiles";
|
||||||
|
ls = "eza";
|
||||||
|
cd = "z";
|
||||||
|
};
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
|
antidote = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
"zsh-users/zsh-autosuggestions"
|
||||||
|
"mattmc3/ez-compinit"
|
||||||
|
"zdharma-continuum/fast-syntax-highlighting kind:defer"
|
||||||
|
"zsh-users/zsh-completions kind:fpath path:src"
|
||||||
|
"getantidote/use-omz" # handle OMZ dependencies
|
||||||
|
"ohmyzsh/ohmyzsh path:lib" # load OMZ's library
|
||||||
|
"ohmyzsh/ohmyzsh path:plugins/colored-man-pages" # load OMZ plugins
|
||||||
|
"ohmyzsh/ohmyzsh path:plugins/magic-enter"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
programs.starship.enable = true;
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
colors = "always";
|
||||||
|
icons = "always";
|
||||||
|
git = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
85
home-manager/nix/home.nix
Normal file
85
home-manager/nix/home.nix
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
# This is your home-manager configuration file
|
||||||
|
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# You can import other home-manager modules here
|
||||||
|
imports = [
|
||||||
|
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||||
|
# outputs.homeManagerModules.example
|
||||||
|
|
||||||
|
# Or modules exported from other flakes (such as nix-colors):
|
||||||
|
# inputs.nix-colors.homeManagerModules.default
|
||||||
|
|
||||||
|
# You can also split up your configuration and import pieces of it here:
|
||||||
|
# ./nvim.nix
|
||||||
|
../applications/git.nix
|
||||||
|
../applications/chromium.nix
|
||||||
|
../applications/git.nix
|
||||||
|
../applications/zsh.nix
|
||||||
|
../applications/direnv.nix
|
||||||
|
../applications/vscode.nix
|
||||||
|
../applications/ghostty
|
||||||
|
../applications/hyprland
|
||||||
|
../applications/neovim
|
||||||
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
# You can add overlays here
|
||||||
|
overlays = [
|
||||||
|
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||||
|
outputs.overlays.additions
|
||||||
|
outputs.overlays.modifications
|
||||||
|
outputs.overlays.unstable-packages
|
||||||
|
|
||||||
|
# You can also add overlays exported from other flakes:
|
||||||
|
# neovim-nightly-overlay.overlays.default
|
||||||
|
|
||||||
|
# Or define it inline, for example:
|
||||||
|
# (final: prev: {
|
||||||
|
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||||
|
# patches = [ ./change-hello-to-hi.patch ];
|
||||||
|
# });
|
||||||
|
# })
|
||||||
|
];
|
||||||
|
# Configure your nixpkgs instance
|
||||||
|
config = {
|
||||||
|
# Disable if you don't want unfree packages
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "lily";
|
||||||
|
homeDirectory = "/home/lily";
|
||||||
|
packages = with pkgs; # installs a package
|
||||||
|
|
||||||
|
[
|
||||||
|
vesktop
|
||||||
|
(prismlauncher.override {
|
||||||
|
jdks = [jdk23 jdk8 jdk17 jdk21];
|
||||||
|
})
|
||||||
|
itch
|
||||||
|
inputs.nix-gaming.packages.${pkgs.system}.viper
|
||||||
|
kdePackages.kate
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Add stuff for your user as you see fit:
|
||||||
|
# programs.neovim.enable = true;
|
||||||
|
# home.packages = with pkgs; [ steam ];
|
||||||
|
|
||||||
|
# Enable home-manager and git
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
programs.git.enable = true;
|
||||||
|
|
||||||
|
# Nicely reload system units when changing configs
|
||||||
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
}
|
|
@ -1,100 +0,0 @@
|
||||||
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;; Place your private configuration here! Remember, you do not need to run 'doom
|
|
||||||
;; sync' after modifying this file!
|
|
||||||
|
|
||||||
|
|
||||||
;; Some functionality uses this to identify you, e.g. GPG configuration, email
|
|
||||||
;; clients, file templates and snippets. It is optional.
|
|
||||||
;; (setq user-full-name "John Doe"
|
|
||||||
;; user-mail-address "john@doe.com")
|
|
||||||
|
|
||||||
;; Doom exposes five (optional) variables for controlling fonts in Doom:
|
|
||||||
;;
|
|
||||||
;; - `doom-font' -- the primary font to use
|
|
||||||
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
|
|
||||||
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
|
|
||||||
;; presentations or streaming.
|
|
||||||
;; - `doom-symbol-font' -- for symbols
|
|
||||||
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
|
|
||||||
;;
|
|
||||||
;; See 'C-h v doom-font' for documentation and more examples of what they
|
|
||||||
;; accept. For example:
|
|
||||||
;;
|
|
||||||
(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 12 :weight 'semi-light)
|
|
||||||
doom-variable-pitch-font (font-spec :family "Liberation Sans" :size 13))
|
|
||||||
;;
|
|
||||||
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
|
|
||||||
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
|
||||||
;; refresh your font settings. If Emacs still can't find your font, it likely
|
|
||||||
;; wasn't installed correctly. Font issues are rarely Doom issues!
|
|
||||||
|
|
||||||
;; There are two ways to load a theme. Both assume the theme is installed and
|
|
||||||
;; available. You can either set `doom-theme' or manually load a theme with the
|
|
||||||
;; `load-theme' function. This is the default:
|
|
||||||
(setq doom-theme 'catppuccin)
|
|
||||||
|
|
||||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
|
||||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
|
||||||
(setq display-line-numbers-type 'relative)
|
|
||||||
|
|
||||||
;; Modeline config
|
|
||||||
(setq doom-modeline-height 28)
|
|
||||||
(setq doom-modeline-modal t)
|
|
||||||
(setq doom-modeline-modal-icon t)
|
|
||||||
(setq doom-modeline-modal-modern-icon nil)
|
|
||||||
(setq doom-modeline-enable-word-count nil)
|
|
||||||
(setq doom-modeline-total-line-number t)
|
|
||||||
(setq doom-modeline-buffer-file-name-style 'truncate-with-project)
|
|
||||||
(setq doom-modeline-persp-name t)
|
|
||||||
(setq doom-modeline-persp-icon t)
|
|
||||||
(setq doom-modeline-major-mode-icon t)
|
|
||||||
(setq doom-modeline-major-mode-color-icon t)
|
|
||||||
(setq doom-modeline-buffer-state-icon t)
|
|
||||||
(setq doom-modeline-buffer-modification-icon t)
|
|
||||||
(setq doom-modeline-lsp-icon t)
|
|
||||||
(setq doom-modeline-always-show-macro-register t)
|
|
||||||
(setq doom-modeline-time t)
|
|
||||||
(setq doom-modeline-time-icon t)
|
|
||||||
|
|
||||||
;; If you use `org' and don't want your org files in the default location below,
|
|
||||||
;; change `org-directory'. It must be set before org loads!
|
|
||||||
(setq org-directory "~/org/")
|
|
||||||
|
|
||||||
(setq pixel-scroll-precision-large-scroll-height 40)
|
|
||||||
(setq pixel-scroll-precision-mode 1)
|
|
||||||
(setq catppuccin-flavor 'mocha)
|
|
||||||
|
|
||||||
(setq evil-want-integration t)
|
|
||||||
|
|
||||||
;; Whenever you reconfigure a package, make sure to wrap your config in an
|
|
||||||
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
|
|
||||||
;;
|
|
||||||
;; (after! PACKAGE
|
|
||||||
;; (setq x y))
|
|
||||||
;;
|
|
||||||
;; The exceptions to this rule:
|
|
||||||
;;
|
|
||||||
;; - Setting file/directory variables (like `org-directory')
|
|
||||||
;; - Setting variables which explicitly tell you to set them before their
|
|
||||||
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
|
|
||||||
;; - Setting doom variables (which start with 'doom-' or '+').
|
|
||||||
;;
|
|
||||||
;; Here are some additional functions/macros that will help you configure Doom.
|
|
||||||
;;
|
|
||||||
;; - `load!' for loading external *.el files relative to this one
|
|
||||||
;; - `use-package!' for configuring packages
|
|
||||||
;; - `after!' for running code after a package has loaded
|
|
||||||
;; - `add-load-path!' for adding directories to the `load-path', relative to
|
|
||||||
;; this file. Emacs searches the `load-path' when you load packages with
|
|
||||||
;; `require' or `use-package'.
|
|
||||||
;; - `map!' for binding new keys
|
|
||||||
;;
|
|
||||||
;; To get information about any of these functions/macros, move the cursor over
|
|
||||||
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
|
|
||||||
;; This will open documentation for it, including demos of how they are used.
|
|
||||||
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
|
|
||||||
;; etc).
|
|
||||||
;;
|
|
||||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
|
||||||
;; they are implemented.
|
|
|
@ -1,13 +0,0 @@
|
||||||
(custom-set-variables
|
|
||||||
;; custom-set-variables was added by Custom.
|
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
|
||||||
;; Your init file should contain only one such instance.
|
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
'(custom-safe-themes
|
|
||||||
'("4825b816a58680d1da5665f8776234d4aefce7908594bea75ec9d7e3dc429753" "8d3ef5ff6273f2a552152c7febc40eabca26bae05bd12bc85062e2dc224cde9a" "da75eceab6bea9298e04ce5b4b07349f8c02da305734f7c0c8c6af7b5eaa9738" "014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69" "d481904809c509641a1a1f1b1eb80b94c58c210145effc2631c1a7f2e4a2fdf4" "77fff78cc13a2ff41ad0a8ba2f09e8efd3c7e16be20725606c095f9a19c24d3d" "aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8" default)))
|
|
||||||
(custom-set-faces
|
|
||||||
;; custom-set-faces was added by Custom.
|
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
|
||||||
;; Your init file should contain only one such instance.
|
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
)
|
|
|
@ -1,191 +0,0 @@
|
||||||
;;; init.el -*- lexical-binding: t; -*-
|
|
||||||
|
|
||||||
;; This file controls what Doom modules are enabled and what order they load
|
|
||||||
;; in. Remember to run 'doom sync' after modifying it!
|
|
||||||
|
|
||||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
|
||||||
;; documentation. There you'll find a link to Doom's Module Index where all
|
|
||||||
;; of our modules are listed, including what flags they support.
|
|
||||||
|
|
||||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
|
||||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
|
||||||
;; flags as well (those symbols that start with a plus).
|
|
||||||
;;
|
|
||||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
|
||||||
;; directory (for easy access to its source code).
|
|
||||||
|
|
||||||
(doom! :input
|
|
||||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
|
||||||
;;chinese
|
|
||||||
;;japanese
|
|
||||||
;;layout ; auie,ctsrnm is the superior home row
|
|
||||||
|
|
||||||
:completion
|
|
||||||
company ; the ultimate code completion backend
|
|
||||||
;;(corfu +orderless) ; complete with cap(f), cape and a flying feather!
|
|
||||||
;;helm ; the *other* search engine for love and life
|
|
||||||
;;ido ; the other *other* search engine...
|
|
||||||
;;ivy ; a search engine for love and life
|
|
||||||
vertico ; the search engine of the future
|
|
||||||
|
|
||||||
:ui
|
|
||||||
;;deft ; notational velocity for Emacs
|
|
||||||
doom ; what makes DOOM look the way it does
|
|
||||||
doom-dashboard ; a nifty splash screen for Emacs
|
|
||||||
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
|
|
||||||
;;(emoji +unicode) ; 🙂
|
|
||||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
|
||||||
;;indent-guides ; highlighted indent columns
|
|
||||||
;;ligatures ; ligatures and symbols to make your code pretty again
|
|
||||||
;;minimap ; show a map of the code on the side
|
|
||||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
|
||||||
;;nav-flash ; blink cursor line after big motions
|
|
||||||
;;neotree ; a project drawer, like NERDTree for vim
|
|
||||||
ophints ; highlight the region an operation acts on
|
|
||||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
|
||||||
;;tabs ; a tab bar for Emacs
|
|
||||||
treemacs ; a project drawer, like neotree but cooler
|
|
||||||
;;unicode ; extended unicode support for various languages
|
|
||||||
(vc-gutter +pretty) ; vcs diff in the fringe
|
|
||||||
;;vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
|
||||||
;;window-select ; visually switch windows
|
|
||||||
workspaces ; tab emulation, persistence & separate workspaces
|
|
||||||
;;zen ; distraction-free coding or writing
|
|
||||||
|
|
||||||
:editor
|
|
||||||
(evil +everywhere); come to the dark side, we have cookies
|
|
||||||
file-templates ; auto-snippets for empty files
|
|
||||||
fold ; (nigh) universal code folding
|
|
||||||
;;(format +onsave) ; automated prettiness
|
|
||||||
;;god ; run Emacs commands without modifier keys
|
|
||||||
;;lispy ; vim for lisp, for people who don't like vim
|
|
||||||
;;multiple-cursors ; editing in many places at once
|
|
||||||
;;objed ; text object editing for the innocent
|
|
||||||
;;parinfer ; turn lisp into python, sort of
|
|
||||||
;;rotate-text ; cycle region at point between text candidates
|
|
||||||
snippets ; my elves. They type so I don't have to
|
|
||||||
word-wrap ; soft wrapping with language-aware indent
|
|
||||||
|
|
||||||
:emacs
|
|
||||||
dired ; making dired pretty [functional]
|
|
||||||
electric ; smarter, keyword-based electric-indent
|
|
||||||
;;ibuffer ; interactive buffer management
|
|
||||||
undo ; persistent, smarter undo for your inevitable mistakes
|
|
||||||
vc ; version-control and Emacs, sitting in a tree
|
|
||||||
|
|
||||||
:term
|
|
||||||
;;eshell ; the elisp shell that works everywhere
|
|
||||||
;;shell ; simple shell REPL for Emacs
|
|
||||||
term ; basic terminal emulator for Emacs
|
|
||||||
;;vterm ; the best terminal emulation in Emacs
|
|
||||||
|
|
||||||
:checkers
|
|
||||||
syntax ; tasing you for every semicolon you forget
|
|
||||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
|
||||||
;;grammar ; tasing grammar mistake every you make
|
|
||||||
|
|
||||||
:tools
|
|
||||||
;;ansible
|
|
||||||
;;biblio ; Writes a PhD for you (citation needed)
|
|
||||||
;;collab ; buffers with friends
|
|
||||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
|
||||||
;;direnv
|
|
||||||
;;docker
|
|
||||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
|
||||||
;;ein ; tame Jupyter notebooks with emacs
|
|
||||||
(eval +overlay) ; run code, run (also, repls)
|
|
||||||
lookup ; navigate your code and its documentation
|
|
||||||
lsp ; M-x vscode
|
|
||||||
magit ; a git porcelain for Emacs
|
|
||||||
;;make ; run make tasks from Emacs
|
|
||||||
;;pass ; password manager for nerds
|
|
||||||
;;pdf ; pdf enhancements
|
|
||||||
;;prodigy ; FIXME managing external services & code builders
|
|
||||||
;;terraform ; infrastructure as code
|
|
||||||
;;tmux ; an API for interacting with tmux
|
|
||||||
;;tree-sitter ; syntax and parsing, sitting in a tree...
|
|
||||||
;;upload ; map local to remote projects via ssh/ftp
|
|
||||||
|
|
||||||
:os
|
|
||||||
(:if (featurep :system 'macos) macos) ; improve compatibility with macOS
|
|
||||||
;;tty ; improve the terminal Emacs experience
|
|
||||||
|
|
||||||
:lang
|
|
||||||
;;agda ; types of types of types of types...
|
|
||||||
;;beancount ; mind the GAAP
|
|
||||||
(cc +lsp) ; C > C++ == 1
|
|
||||||
;;clojure ; java with a lisp
|
|
||||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
|
||||||
;;coq ; proofs-as-programs
|
|
||||||
;;crystal ; ruby at the speed of c
|
|
||||||
;;csharp ; unity, .NET, and mono shenanigans
|
|
||||||
;;data ; config/data formats
|
|
||||||
;;(dart +flutter) ; paint ui and not much else
|
|
||||||
;;dhall
|
|
||||||
;;elixir ; erlang done right
|
|
||||||
;;elm ; care for a cup of TEA?
|
|
||||||
emacs-lisp ; drown in parentheses
|
|
||||||
;;erlang ; an elegant language for a more civilized age
|
|
||||||
;;ess ; emacs speaks statistics
|
|
||||||
;;factor
|
|
||||||
;;faust ; dsp, but you get to keep your soul
|
|
||||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
|
||||||
;;fsharp ; ML stands for Microsoft's Language
|
|
||||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
|
||||||
;;gdscript ; the language you waited for
|
|
||||||
;;(go +lsp) ; the hipster dialect
|
|
||||||
;;(graphql +lsp) ; Give queries a REST
|
|
||||||
(haskell +lsp) ; a language that's lazier than I am
|
|
||||||
;;hy ; readability of scheme w/ speed of python
|
|
||||||
;;idris ; a language you can depend on
|
|
||||||
;;json ; At least it ain't XML
|
|
||||||
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
|
||||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
|
||||||
;;julia ; a better, faster MATLAB
|
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
|
||||||
latex ; writing papers in Emacs has never been so fun
|
|
||||||
;;lean ; for folks with too much to prove
|
|
||||||
;;ledger ; be audit you can be
|
|
||||||
;;lua ; one-based indices? one-based indices
|
|
||||||
markdown ; writing docs for people to ignore
|
|
||||||
;;nim ; python + lisp at the speed of c
|
|
||||||
nix ; I hereby declare "nix geht mehr!"
|
|
||||||
;;ocaml ; an objective camel
|
|
||||||
org ; organize your plain life in plain text
|
|
||||||
;;php ; perl's insecure younger brother
|
|
||||||
;;plantuml ; diagrams for confusing people more
|
|
||||||
;;purescript ; javascript, but functional
|
|
||||||
python ; beautiful is better than ugly
|
|
||||||
;;qt ; the 'cutest' gui framework ever
|
|
||||||
;;racket ; a DSL for DSLs
|
|
||||||
;;raku ; the artist formerly known as perl6
|
|
||||||
;;rest ; Emacs as a REST client
|
|
||||||
;;rst ; ReST in peace
|
|
||||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
|
||||||
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
|
||||||
;;scala ; java, but good
|
|
||||||
;;(scheme +guile) ; a fully conniving family of lisps
|
|
||||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
|
||||||
;;sml
|
|
||||||
;;solidity ; do you need a blockchain? No.
|
|
||||||
;;swift ; who asked for emoji variables?
|
|
||||||
;;terra ; Earth and Moon in alignment for performance.
|
|
||||||
;;web ; the tubes
|
|
||||||
;;yaml ; JSON, but readable
|
|
||||||
;;zig ; C, but simpler
|
|
||||||
|
|
||||||
:email
|
|
||||||
;;(mu4e +org +gmail)
|
|
||||||
;;notmuch
|
|
||||||
;;(wanderlust +gmail)
|
|
||||||
|
|
||||||
:app
|
|
||||||
;;calendar
|
|
||||||
;;emms
|
|
||||||
;;everywhere ; *leave* Emacs!? You must be joking
|
|
||||||
;;irc ; how neckbeards socialize
|
|
||||||
;;(rss +org) ; emacs as an RSS reader
|
|
||||||
|
|
||||||
:config
|
|
||||||
;;literate
|
|
||||||
(default +bindings +smartparens))
|
|
|
@ -1,63 +0,0 @@
|
||||||
;; -*- no-byte-compile: t; -*-
|
|
||||||
;;; $DOOMDIR/packages.el
|
|
||||||
|
|
||||||
;; To install a package with Doom you must declare them here and run 'doom sync'
|
|
||||||
;; on the command line, then restart Emacs for the changes to take effect -- or
|
|
||||||
;; use 'M-x doom/reload'.
|
|
||||||
|
|
||||||
|
|
||||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
|
||||||
;; (package! some-package)
|
|
||||||
|
|
||||||
;; To install a package directly from a remote git repo, you must specify a
|
|
||||||
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
|
|
||||||
;; https://github.com/radian-software/straight.el#the-recipe-format
|
|
||||||
;; (package! another-package
|
|
||||||
;; :recipe (:host github :repo "username/repo"))
|
|
||||||
|
|
||||||
;; If the package you are trying to install does not contain a PACKAGENAME.el
|
|
||||||
;; file, or is located in a subdirectory of the repo, you'll need to specify
|
|
||||||
;; `:files' in the `:recipe':
|
|
||||||
;; (package! this-package
|
|
||||||
;; :recipe (:host github :repo "username/repo"
|
|
||||||
;; :files ("some-file.el" "src/lisp/*.el")))
|
|
||||||
|
|
||||||
;; If you'd like to disable a package included with Doom, you can do so here
|
|
||||||
;; with the `:disable' property:
|
|
||||||
;; (package! builtin-package :disable t)
|
|
||||||
|
|
||||||
;; You can override the recipe of a built in package without having to specify
|
|
||||||
;; all the properties for `:recipe'. These will inherit the rest of its recipe
|
|
||||||
;; from Doom or MELPA/ELPA/Emacsmirror:
|
|
||||||
;; (package! builtin-package :recipe (:nonrecursive t))
|
|
||||||
;; (package! builtin-package-2 :recipe (:repo "myfork/package"))
|
|
||||||
|
|
||||||
;; Specify a `:branch' to install a package from a particular branch or tag.
|
|
||||||
;; This is required for some packages whose default branch isn't 'master' (which
|
|
||||||
;; our package manager can't deal with; see radian-software/straight.el#279)
|
|
||||||
;; (package! builtin-package :recipe (:branch "develop"))
|
|
||||||
|
|
||||||
;; Use `:pin' to specify a particular commit to install.
|
|
||||||
;; (package! builtin-package :pin "1a2b3c4d5e")
|
|
||||||
|
|
||||||
|
|
||||||
;; Doom's packages are pinned to a specific commit and updated from release to
|
|
||||||
;; release. The `unpin!' macro allows you to unpin single packages...
|
|
||||||
;; (unpin! pinned-package)
|
|
||||||
;; ...or multiple packages
|
|
||||||
;; (unpin! pinned-package another-pinned-package)
|
|
||||||
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
|
|
||||||
;; (unpin! t)
|
|
||||||
|
|
||||||
(package! elcord)
|
|
||||||
(package! catppuccin-theme)
|
|
||||||
(package! org-view-mode)
|
|
||||||
(package! org-superstar)
|
|
||||||
(package! lsp-ui)
|
|
||||||
(package! svelte-mode)
|
|
||||||
(package! typescript-mode)
|
|
||||||
|
|
||||||
(setq lsp-log-io t)
|
|
||||||
(add-hook 'org-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
(org-superstar-mode 1)))
|
|
1
home-manager/packages/doom-emacs/.gitignore
vendored
1
home-manager/packages/doom-emacs/.gitignore
vendored
|
@ -1 +0,0 @@
|
||||||
!.doom.d/
|
|
|
@ -1,23 +0,0 @@
|
||||||
{ pkgs, config, lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.emacs = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.emacs;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.activation = {
|
|
||||||
cloneDoomEmacs = ''
|
|
||||||
if [ ! -d "$HOME/.emacs.d" ]; then
|
|
||||||
${pkgs.git}/bin/git clone https://github.com/doomemacs/doomemacs $HOME/.emacs.d
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.".doom.d" = {
|
|
||||||
source = ./doom-emacs/.doom.d;
|
|
||||||
recursive = true;
|
|
||||||
onChange = "${config.home.homeDirectory}/.emacs.d/bin/doom sync";
|
|
||||||
force = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.git = {
|
|
||||||
enable = true;
|
|
||||||
userName = "luxzi";
|
|
||||||
userEmail = "lesson085@gmail.com";
|
|
||||||
aliases = {
|
|
||||||
pf = "push --force";
|
|
||||||
kl = "log --show-signature";
|
|
||||||
};
|
|
||||||
signing = {
|
|
||||||
key = "C90237A70F2FDD53";
|
|
||||||
signByDefault = true;
|
|
||||||
};
|
|
||||||
extraConfig = {
|
|
||||||
init.defaultBranch = "main";
|
|
||||||
core.symlinks = true;
|
|
||||||
commit.gpgsign = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.kitty = {
|
|
||||||
enable = true;
|
|
||||||
font = {
|
|
||||||
name = "FiraCode Nerd Font";
|
|
||||||
package = pkgs.nerd-fonts.fira-code;
|
|
||||||
size = 14;
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
window_padding_width = 4;
|
|
||||||
background_opacity = "0.65";
|
|
||||||
background_blur = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./zsh.nix
|
|
||||||
./git.nix
|
|
||||||
./emacs.nix
|
|
||||||
./kitty.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
hyfetch
|
|
||||||
nix-output-monitor
|
|
||||||
firefox
|
|
||||||
tree
|
|
||||||
vesktop
|
|
||||||
fzf
|
|
||||||
tor-browser
|
|
||||||
nix-search-cli
|
|
||||||
mpv
|
|
||||||
element-desktop
|
|
||||||
mission-center
|
|
||||||
nvtop
|
|
||||||
alacritty
|
|
||||||
nerd-fonts.fira-code
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
}
|
|
|
@ -1,99 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
autocd = true;
|
|
||||||
shellAliases = {
|
|
||||||
hm-switch = "home-manager switch --flake $HOME/.dotfiles";
|
|
||||||
nx-switch = "sudo nixos-rebuild switch --flake $HOME/.dotfiles";
|
|
||||||
nx-boot = "sudo nixos-rebuild boot --flake $HOME/.dotfiles";
|
|
||||||
nx-clean = "sudo nix-collect-garbage --delete-old && nix-collect-garbage --delete-old";
|
|
||||||
hm-clean = "home-manager remove-generations";
|
|
||||||
gl-switch = "sudo nixos-rebuild switch --flake $HOME/.dotfiles && home-manager switch --flake $HOME/.dotfiles";
|
|
||||||
gl-clean = "sudo nix-collect-garbage --delete-old && nix-collect-garbage --delete-old && home-manager remove-generations";
|
|
||||||
snv = "sudo -E nvim";
|
|
||||||
sen = "sudo -E";
|
|
||||||
emacs-config = "emacs --chdir $HOME/.dotfiles/home-manager/packages/doom-emacs/.doom.d &";
|
|
||||||
};
|
|
||||||
|
|
||||||
zplug = {
|
|
||||||
enable = true;
|
|
||||||
plugins = [
|
|
||||||
{ name = "Aloxaf/fzf-tab"; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
history = {
|
|
||||||
size = 5000;
|
|
||||||
save = 5000;
|
|
||||||
ignoreAllDups = true;
|
|
||||||
ignoreDups = true;
|
|
||||||
ignoreSpace = true;
|
|
||||||
share = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
initExtra = ''
|
|
||||||
bindkey -v
|
|
||||||
bindkey '^k' history-search-backward
|
|
||||||
bindkey '^j' history-search-forward
|
|
||||||
setopt appendHistory
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
|
||||||
zstyle ':completion:*' menu no
|
|
||||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
|
|
||||||
eval "$(fzf --zsh)"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.starship = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
format = "$username$hostname$directory$git_branch$git_state$git_status$nix_shell$cmd_duration$line_break$python$character";
|
|
||||||
|
|
||||||
directory = {
|
|
||||||
style = "blue";
|
|
||||||
};
|
|
||||||
|
|
||||||
character = {
|
|
||||||
success_symbol = "[❯](white)";
|
|
||||||
error_symbol = "[❯](red)";
|
|
||||||
vimcmd_symbol = "[❮](green)";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_branch = {
|
|
||||||
format = "[$branch]($style)";
|
|
||||||
style = "green";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_status = {
|
|
||||||
format = "[[($conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)";
|
|
||||||
style = "cyan";
|
|
||||||
conflicted = "!";
|
|
||||||
untracked = "u";
|
|
||||||
modified = "*";
|
|
||||||
staged = "+";
|
|
||||||
renamed = "r";
|
|
||||||
deleted = "d";
|
|
||||||
stashed = "≡";
|
|
||||||
};
|
|
||||||
|
|
||||||
git_state = {
|
|
||||||
format = "\([$state( $progress_current/$progress_total)]($style)\) ";
|
|
||||||
style = "bright-black";
|
|
||||||
};
|
|
||||||
|
|
||||||
cmd_duration = {
|
|
||||||
format = "[$duration]($style) ";
|
|
||||||
style = "yellow";
|
|
||||||
};
|
|
||||||
|
|
||||||
python = {
|
|
||||||
format = "[$virtualenv]($style) ";
|
|
||||||
style = "bright-black";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
22
home-manager/profiles/desktop.nix
Normal file
22
home-manager/profiles/desktop.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./main.nix
|
||||||
|
];
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
lily = {
|
||||||
|
hyprland.enable = true;
|
||||||
|
ghostty.enable = true;
|
||||||
|
neovim.enable = true;
|
||||||
|
rofi.enable = true;
|
||||||
|
vscode.enable = true;
|
||||||
|
zed.enable = true;
|
||||||
|
waybar.enable = true;
|
||||||
|
chromium.enable = true;
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
vesktop
|
||||||
|
];
|
||||||
|
}
|
10
home-manager/profiles/main.nix
Normal file
10
home-manager/profiles/main.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home.stateVersion = "24.11";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
lily = {
|
||||||
|
zsh.enable = true;
|
||||||
|
git.enable = true;
|
||||||
|
};
|
||||||
|
}
|
79
machines/nix/configuration.nix
Normal file
79
machines/nix/configuration.nix
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
# This is your system's configuration file.
|
||||||
|
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
|
||||||
|
{...}: {
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
flake-self,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# You can import other NixOS modules here
|
||||||
|
imports = [
|
||||||
|
# Or modules from other flakes (such as nixos-hardware):
|
||||||
|
# inputs.hardware.nixosModules.common-cpu-amd
|
||||||
|
# inputs.hardware.nixosModules.common-ssd
|
||||||
|
|
||||||
|
# inputs.home-manager.nixosModules.home-manager
|
||||||
|
# inputs.nix-gaming.nixosModules.platformOptimizations
|
||||||
|
|
||||||
|
# Import your generated (nixos-generate-config) hardware configuration
|
||||||
|
./hardware-configuration.nix
|
||||||
|
# ../common.nix
|
||||||
|
# ./plymouth.nix
|
||||||
|
];
|
||||||
|
lily = {
|
||||||
|
users.lily.enable = true;
|
||||||
|
laptop.enable = true;
|
||||||
|
common.enable = true;
|
||||||
|
containers = {
|
||||||
|
enable = true;
|
||||||
|
podman = true;
|
||||||
|
# docker = false;
|
||||||
|
};
|
||||||
|
nvidia.enable = true;
|
||||||
|
desktop = {
|
||||||
|
enable = true;
|
||||||
|
hyprland.enable = true;
|
||||||
|
plasma.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
networking.hostName = "nix";
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
timeout = 0;
|
||||||
|
};
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
initrd.verbose = false;
|
||||||
|
kernelPackages = pkgs.linuxPackages_lqx;
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
platformOptimizations.enable = true;
|
||||||
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
extraCompatPackages = let gamePkgs = inputs.nix-gaming.packages.${pkgs.hostPlatform.system}; in [pkgs.proton-ge-bin gamePkgs.northstar-proton];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
users = {
|
||||||
|
lily = flake-self.homeConfigurations.lily;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
# system.stateVersion = "24.11";
|
||||||
|
}
|
45
machines/nix/hardware-configuration.nix
Normal file
45
machines/nix/hardware-configuration.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" "rtsx_pci_sdmmc"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-intel"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/95c3ec11-8329-4b54-a690-97c31250a110";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = ["subvol=@"];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/9666-823F";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{device = "/dev/disk/by-uuid/5fd02c5b-4ce0-46be-8771-9c1b0d280d8d";}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp92s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
31
machines/nix/plymouth.nix
Normal file
31
machines/nix/plymouth.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
boot = {
|
||||||
|
plymouth = {
|
||||||
|
enable = true;
|
||||||
|
theme = "bgrt";
|
||||||
|
#themePackages = with pkgs; [
|
||||||
|
# By default we would install all themes
|
||||||
|
#(adi1090x-plymouth-themes.override {
|
||||||
|
# selected_themes = [ "bgrt" ];
|
||||||
|
#})
|
||||||
|
#];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable "Silent Boot"
|
||||||
|
consoleLogLevel = 0;
|
||||||
|
initrd.verbose = false;
|
||||||
|
kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
"boot.shell_on_fail"
|
||||||
|
"loglevel=3"
|
||||||
|
"rd.systemd.show_status=false"
|
||||||
|
"rd.udev.log_level=3"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
];
|
||||||
|
# Hide the OS choice for bootloaders.
|
||||||
|
# It's still possible to open the bootloader list by pressing any key
|
||||||
|
# It will just not appear on screen unless a key is pressed
|
||||||
|
loader.timeout = 0;
|
||||||
|
};
|
||||||
|
}
|
47
modules/common/common.nix
Normal file
47
modules/common/common.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.common;
|
||||||
|
in {
|
||||||
|
options.lily.common.enable = lib.mkEnableOption "activate common";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
services.openssh.enable = true;
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
neovim
|
||||||
|
toybox
|
||||||
|
util-linux
|
||||||
|
tmux
|
||||||
|
ghostty
|
||||||
|
|
||||||
|
# encryption and filesystem
|
||||||
|
cryptsetup
|
||||||
|
age
|
||||||
|
|
||||||
|
# network tools
|
||||||
|
wget
|
||||||
|
curl
|
||||||
|
# FS-tools
|
||||||
|
unzip
|
||||||
|
gnutar
|
||||||
|
xz
|
||||||
|
bzip2
|
||||||
|
p7zip
|
||||||
|
|
||||||
|
netcat-gnu
|
||||||
|
dnsutils
|
||||||
|
fd
|
||||||
|
file
|
||||||
|
tree
|
||||||
|
];
|
||||||
|
environment.shells = with pkgs; [zsh];
|
||||||
|
};
|
||||||
|
}
|
17
modules/common/default.nix
Normal file
17
modules/common/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
# recursively construct attr-set of a directory
|
||||||
|
getDir = dir:
|
||||||
|
lib.mapAttrs (file: type:
|
||||||
|
if type == "directory"
|
||||||
|
then getDir "${dir}/${file}"
|
||||||
|
else type) (
|
||||||
|
builtins.readDir dir
|
||||||
|
);
|
||||||
|
files = dir: lib.collect lib.isString (lib.mapAttrsRecursive (path: type: lib.concatStringsSep "/" path) (getDir dir));
|
||||||
|
validFiles = dir:
|
||||||
|
map (file: ./. + "/${file}") (
|
||||||
|
lib.filter (file: lib.hasSuffix ".nix" file && file != "default.nix") (files dir)
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
imports = validFiles ./.;
|
||||||
|
}
|
82
modules/common/desktop.nix
Normal file
82
modules/common/desktop.nix
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
flake-self,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.desktop;
|
||||||
|
in {
|
||||||
|
options.lily.desktop = {
|
||||||
|
enable = lib.mkEnableOption "activate desktop";
|
||||||
|
plasma.enable = lib.mkEnableOption "activate plasma desktop environment";
|
||||||
|
hyprland.enable = lib.mkEnableOption "activate hyprland desktop";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
lily = {
|
||||||
|
plasma.enable = cfg.plasma.enable;
|
||||||
|
hyprland.enable = cfg.hyprland.enable;
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
|
kdeconnect.enable = true;
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vulkan-tools
|
||||||
|
jq
|
||||||
|
libqalculate
|
||||||
|
envsubst
|
||||||
|
glib
|
||||||
|
headsetcontrol
|
||||||
|
];
|
||||||
|
networking = {
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts = {
|
||||||
|
enableDefaultPackages = true;
|
||||||
|
packages = with pkgs; [
|
||||||
|
jetbrains-mono
|
||||||
|
noto-fonts-color-emoji
|
||||||
|
garamond-libre
|
||||||
|
helvetica-neue-lt-std
|
||||||
|
# nerd-fonts.jetbrains-mono
|
||||||
|
];
|
||||||
|
fontDir.enable = true;
|
||||||
|
fontconfig = {
|
||||||
|
defaultFonts = {
|
||||||
|
monospace = ["JetBrainsMono Bold"];
|
||||||
|
serif = ["Garamond Libre"];
|
||||||
|
sansSerif = ["Helvetica Neue LT Std"];
|
||||||
|
emoji = ["Noto Color Emoji"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa = {
|
||||||
|
enable = true;
|
||||||
|
support32Bit = true;
|
||||||
|
};
|
||||||
|
audio.enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# services.printing.enable = true;
|
||||||
|
# services.flatpak.enable = true;
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
services.udev.packages = [pkgs.headsetcontrol];
|
||||||
|
# environment.sessionVariables = {
|
||||||
|
# MOZ_DISABLE_RDD_SANDBOX = "1";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
18
modules/common/locale.nix
Normal file
18
modules/common/locale.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{...}: {
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n = {
|
||||||
|
defaultLocale = "en_US.UTF-8";
|
||||||
|
extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
time.timeZone = "America/Detroit";
|
||||||
|
}
|
49
modules/common/nixcommon.nix
Normal file
49
modules/common/nixcommon.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = {inherit inputs outputs;};
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||||
|
package = pkgs.nixVersions.stable;
|
||||||
|
optimise.automatic = true;
|
||||||
|
gc = {
|
||||||
|
persistent = true;
|
||||||
|
automatic = true;
|
||||||
|
};
|
||||||
|
extraOptions = ''
|
||||||
|
# If set to true, Nix will fall back to building from source if a binary substitute fails.
|
||||||
|
fallback = true
|
||||||
|
# the timeout (in seconds) for establishing connections in the binary cache substituter.
|
||||||
|
connect-timeout = 10
|
||||||
|
# these log lines are only shown on a failed build
|
||||||
|
log-lines = 25
|
||||||
|
'';
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
|
||||||
|
trusted-users = ["root" "@wheel"];
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
48
modules/containers/default.nix
Normal file
48
modules/containers/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.containers;
|
||||||
|
in {
|
||||||
|
options.lily.containers = {
|
||||||
|
enable = lib.mkEnableOption "activate containers";
|
||||||
|
docker = lib.mkEnableOption "activate docker";
|
||||||
|
podman = lib.mkEnableOption "activate podman";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkMerge [
|
||||||
|
# (lib.mkIf (cfg.enable && cfg.docker && cfg.podman)
|
||||||
|
# (builtins.throw "You can't enable both docker and podman at the same time"))
|
||||||
|
{
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = !(cfg.docker && cfg.podman);
|
||||||
|
message = "You cannot enable docker and podman at the same time";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
(lib.mkIf (cfg.enable && cfg.docker) {
|
||||||
|
# Enable docker support:
|
||||||
|
virtualisation.containers.enable = true;
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
})
|
||||||
|
(lib.mkIf (cfg.enable && cfg.podman) {
|
||||||
|
# Enable podman support:
|
||||||
|
virtualisation.containers.enable = true;
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
dockerCompat = true;
|
||||||
|
dockerSocket.enable = true;
|
||||||
|
defaultNetwork.settings = {
|
||||||
|
dns_enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
podman
|
||||||
|
podman-compose
|
||||||
|
];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
17
modules/fileshare/default.nix
Normal file
17
modules/fileshare/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
# recursively construct attr-set of a directory
|
||||||
|
getDir = dir:
|
||||||
|
lib.mapAttrs (file: type:
|
||||||
|
if type == "directory"
|
||||||
|
then getDir "${dir}/${file}"
|
||||||
|
else type) (
|
||||||
|
builtins.readDir dir
|
||||||
|
);
|
||||||
|
files = dir: lib.collect lib.isString (lib.mapAttrsRecursive (path: type: lib.concatStringsSep "/" path) (getDir dir));
|
||||||
|
validFiles = dir:
|
||||||
|
map (file: ./. + "/${file}") (
|
||||||
|
lib.filter (file: lib.hasSuffix ".nix" file && file != "default.nix") (files dir)
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
imports = validFiles ./.;
|
||||||
|
}
|
55
modules/fileshare/samba.nix
Normal file
55
modules/fileshare/samba.nix
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.fileshare;
|
||||||
|
in {
|
||||||
|
options.lily.fileshare.enable = lib.mkEnableOption "activate local filesharing";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.samba = {
|
||||||
|
enable = true;
|
||||||
|
securityType = "user"; #Keep user, but use guest account.
|
||||||
|
openFirewall = true;
|
||||||
|
settings = {
|
||||||
|
global = {
|
||||||
|
workgroup = "WORKGROUP"; #Ensure this matches your network's workgroup.
|
||||||
|
"server string" = "smbnix";
|
||||||
|
"netbios name" = "smbnix";
|
||||||
|
"security" = "user"; #Keep this as user, but guest will be used for access.
|
||||||
|
"hosts allow" = "192.168.1. 127.0.0.1 localhost"; #Adjust to your LAN.
|
||||||
|
"hosts deny" = "0.0.0.0/0";
|
||||||
|
"guest account" = "nobody"; #Important for guest access.
|
||||||
|
"map to guest" = "bad user"; #Maps unknown users to guest.
|
||||||
|
};
|
||||||
|
"public" = {
|
||||||
|
"path" = "/ext/share";
|
||||||
|
"browseable" = "yes";
|
||||||
|
"read only" = "no";
|
||||||
|
"guest ok" = "yes"; #Allows guest access.
|
||||||
|
"create mask" = "0644";
|
||||||
|
"directory mask" = "0755";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.samba-wsdd = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
nssmdns = true;
|
||||||
|
nssmdns4 = true;
|
||||||
|
openFirewall = true;
|
||||||
|
reflector = true;
|
||||||
|
publish = {
|
||||||
|
domain = true;
|
||||||
|
enable = true;
|
||||||
|
userServices = true;
|
||||||
|
addresses = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
17
modules/hardware/default.nix
Normal file
17
modules/hardware/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
# recursively construct attr-set of a directory
|
||||||
|
getDir = dir:
|
||||||
|
lib.mapAttrs (file: type:
|
||||||
|
if type == "directory"
|
||||||
|
then getDir "${dir}/${file}"
|
||||||
|
else type) (
|
||||||
|
builtins.readDir dir
|
||||||
|
);
|
||||||
|
files = dir: lib.collect lib.isString (lib.mapAttrsRecursive (path: type: lib.concatStringsSep "/" path) (getDir dir));
|
||||||
|
validFiles = dir:
|
||||||
|
map (file: ./. + "/${file}") (
|
||||||
|
lib.filter (file: lib.hasSuffix ".nix" file && file != "default.nix") (files dir)
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
imports = validFiles ./.;
|
||||||
|
}
|
33
modules/hardware/laptop.nix
Normal file
33
modules/hardware/laptop.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.laptop;
|
||||||
|
in {
|
||||||
|
options.lily.laptop.enable = lib.mkEnableOption "activate laptop hardware";
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
Experimental = true;
|
||||||
|
Enable = "Source,Sink,Media,Socket";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
powerManagement.enable = true;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
libinput.enable = true;
|
||||||
|
};
|
||||||
|
systemd.sleep.extraConfig = ''
|
||||||
|
AllowSuspend=yes
|
||||||
|
AllowHibernation=yes
|
||||||
|
AllowHybridSleep=yes
|
||||||
|
AllowSuspendThenHibernate=yes
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
67
modules/hardware/nvidia.nix
Normal file
67
modules/hardware/nvidia.nix
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.nvidia;
|
||||||
|
in {
|
||||||
|
options.lily.nvidia.enable = lib.mkEnableOption "activate Nvidia GPU support";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libva-utils
|
||||||
|
nvidia-vaapi-driver
|
||||||
|
nvtopPackages.nvidia
|
||||||
|
pciutils
|
||||||
|
vdpauinfo
|
||||||
|
cudaPackages.cudatoolkit
|
||||||
|
cudaPackages.cudnn
|
||||||
|
cudaPackages.cutensor
|
||||||
|
];
|
||||||
|
# environment.sessionVariables = lib.mkIf config.lily.wayland.enable {
|
||||||
|
# GBM_BACKEND = "nvidia-drm";
|
||||||
|
# __GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
# __GL_GSYNC_ALLOWED = "1";
|
||||||
|
# };
|
||||||
|
hardware = {
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
vaapiVdpau
|
||||||
|
libvdpau-va-gl
|
||||||
|
nvidia-vaapi-driver
|
||||||
|
ocl-icd
|
||||||
|
];
|
||||||
|
extraPackages32 = with pkgs; [vaapiVdpau];
|
||||||
|
};
|
||||||
|
nvidia = {
|
||||||
|
# Modesetting is required.
|
||||||
|
modesetting.enable = true;
|
||||||
|
|
||||||
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
|
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||||
|
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||||
|
# of just the bare essentials.
|
||||||
|
powerManagement.enable = true;
|
||||||
|
|
||||||
|
# Fine-grained power management. Turns off GPU when not in use.
|
||||||
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
|
||||||
|
# Use the NVidia open source kernel module (not to be confused with the
|
||||||
|
# independent third-party "nouveau" open source driver).
|
||||||
|
# Support is limited to the Turing and later architectures. Full list of
|
||||||
|
# supported GPUs is at:
|
||||||
|
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||||
|
# Only available from driver 515.43.04+
|
||||||
|
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||||
|
open = true;
|
||||||
|
|
||||||
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
141
modules/hyprland/default.nix
Normal file
141
modules/hyprland/default.nix
Normal file
|
@ -0,0 +1,141 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.hyprland;
|
||||||
|
in {
|
||||||
|
options.lily.hyprland = {
|
||||||
|
enable = lib.mkEnableOption "activate hyprland";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
lily = {
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.displayManager.sddm = lib.mkDefault {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
package = pkgs.kdePackages.sddm;
|
||||||
|
theme = "breeze";
|
||||||
|
wayland.compositor = "kwin";
|
||||||
|
extraPackages = with pkgs.kdePackages; [
|
||||||
|
breeze-icons
|
||||||
|
kirigami
|
||||||
|
libplasma
|
||||||
|
plasma5support
|
||||||
|
qtsvg
|
||||||
|
qtvirtualkeyboard
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
withUWSM = true;
|
||||||
|
systemd.setPath.enable = true;
|
||||||
|
};
|
||||||
|
programs.waybar.enable = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
|
||||||
|
qt.enable = true;
|
||||||
|
qt.platformTheme = "kde";
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# KDE APPLICATIONS
|
||||||
|
kdePackages.dolphin
|
||||||
|
kdePackages.systemsettings
|
||||||
|
|
||||||
|
kdePackages.qtwayland
|
||||||
|
|
||||||
|
kdePackages.kwallet # provides helper service
|
||||||
|
kdePackages.kwallet-pam # provides helper service
|
||||||
|
kdePackages.kwalletmanager # provides KCMs and stuff
|
||||||
|
|
||||||
|
# FRAMEWORKS AND BASES
|
||||||
|
kdePackages.plasma-desktop
|
||||||
|
kdePackages.plasma-workspace
|
||||||
|
kdePackages.frameworkintegration # For qt plugins
|
||||||
|
kdePackages.plasma-integration # kde platform theme
|
||||||
|
kdePackages.sonnet
|
||||||
|
kdePackages.libplasma
|
||||||
|
kdePackages.qtsvg
|
||||||
|
kdePackages.ksvg
|
||||||
|
kdePackages.knewstuff
|
||||||
|
kdePackages.kdeplasma-addons
|
||||||
|
kdePackages.qtsvg
|
||||||
|
kdePackages.qtdeclarative
|
||||||
|
kdePackages.kcoreaddons
|
||||||
|
kdePackages.kguiaddons
|
||||||
|
kdePackages.kirigami-addons
|
||||||
|
kdePackages.plasma-integration.qt5
|
||||||
|
kdePackages.qtlocation
|
||||||
|
|
||||||
|
# artwork, makes appliations which require org.kde.destkop work
|
||||||
|
kdePackages.breeze
|
||||||
|
kdePackages.breeze-icons
|
||||||
|
kdePackages.breeze-gtk
|
||||||
|
kdePackages.ocean-sound-theme
|
||||||
|
kdePackages.plasma-workspace-wallpapers
|
||||||
|
hicolor-icon-theme # fallback icons
|
||||||
|
kdePackages.qqc2-breeze-style
|
||||||
|
kdePackages.qqc2-desktop-style
|
||||||
|
|
||||||
|
kdePackages.breeze.qt5
|
||||||
|
kdePackages.plasma-integration.qt5
|
||||||
|
plasma5Packages.kwayland-integration
|
||||||
|
];
|
||||||
|
environment.sessionVariables = {
|
||||||
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_DESKTOP = "Hyprland";
|
||||||
|
KPACKAGE_DEP_RESOLVERS_PATH = "${pkgs.kdePackages.frameworkintegration.out}/libexec/kf6/kpackagehandlers";
|
||||||
|
};
|
||||||
|
services.udisks2.enable = true;
|
||||||
|
services.upower.enable = true;
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
|
# make open menu work
|
||||||
|
environment.etc."xdg/menus/applications.menu" = {
|
||||||
|
source = "${pkgs.kdePackages.plasma-workspace}/etc/xdg/menus/plasma-applications.menu";
|
||||||
|
};
|
||||||
|
#
|
||||||
|
|
||||||
|
programs.ssh.askPassword = lib.mkDefault "${pkgs.kdePackages.ksshaskpass.out}/bin/ksshaskpass";
|
||||||
|
programs.gnupg.agent.pinentryPackage = lib.mkForce pkgs.pinentry-qt;
|
||||||
|
security.pam.services = {
|
||||||
|
login.kwallet = {
|
||||||
|
enable = true;
|
||||||
|
package = lib.mkDefault pkgs.kdePackages.kwallet-pam;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
programs.kdeconnect.package = lib.mkForce pkgs.kdePackages.kdeconnect-kde;
|
||||||
|
systemd = {
|
||||||
|
user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
|
description = "polkit-gnome-authentication-agent-1";
|
||||||
|
wantedBy = ["graphical-session.target"];
|
||||||
|
wants = ["graphical-session.target"];
|
||||||
|
after = ["graphical-session.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
user.services.powerdevil = {
|
||||||
|
description = "powerdevil";
|
||||||
|
wantedBy = ["graphical-session.target"];
|
||||||
|
wants = ["graphical-session.target"];
|
||||||
|
after = ["graphical-session.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.kdePackages.powerdevil}/libexec/org_kde_powerdevil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
18
modules/plasma/default.nix
Normal file
18
modules/plasma/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.plasma;
|
||||||
|
in {
|
||||||
|
options.lily.plasma.enable = lib.mkEnableOption "activate plasma";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services = {
|
||||||
|
displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
desktopManager.plasma6.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
32
modules/runners/default.nix
Normal file
32
modules/runners/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.runners;
|
||||||
|
in {
|
||||||
|
options.lily.runners.enable = lib.mkEnableOption "activate plasma";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
# Example
|
||||||
|
# age.secrets.lily.file = ./secrets/lily.age;
|
||||||
|
# services.gitea-actions-runner = {
|
||||||
|
# package = pkgs.forgejo-runner;
|
||||||
|
# instances = {
|
||||||
|
# lilyvex = {
|
||||||
|
# enable = true;
|
||||||
|
# name = "caz-runner";
|
||||||
|
# # token = runner-key;
|
||||||
|
# tokenFile = config.age.secrets.lily.path;
|
||||||
|
# url = "https://git.lilyvex.dev/";
|
||||||
|
# labels = [
|
||||||
|
# "node-22:docker://node:22-bookworm"
|
||||||
|
# "nixos-latest:docker://nixos/nix"
|
||||||
|
# "ubuntu-latest:docker://node:16-bullseye"
|
||||||
|
# ];
|
||||||
|
# #settings = { ... };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
}
|
7
modules/runners/secrets/lily.age
Normal file
7
modules/runners/secrets/lily.age
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-ed25519 gwCq6Q YfhZEEqe8nFJInm13FuPk3lAS5MpTHeTbPYE2czQJmk
|
||||||
|
YApzb5JSzg+hGULtJGOzH04XWuzjTtf4jB9rPnweBzU
|
||||||
|
-> ssh-ed25519 TvHG8g o8lSKhyOUvW8lz303Z6b5/TasTiN4ENcS0Bg1ZAugFA
|
||||||
|
e5tvFv819718uInabUIRJYOC45f/MYQkI4jep+DA+6o
|
||||||
|
--- Hw3Q1yUIXUmajkeK0sBRjLQcR4GjFh97hTu9jTIopIM
|
||||||
|
.<2E><>-<2D>ԓN1<4E>3$<24>0<EFBFBD>\ <09><>2<EFBFBD>p<EFBFBD><70><EFBFBD>|/<2F>y<EFBFBD><79>7S<08>X5bLdI<64>t<EFBFBD><74><EFBFBD><EFBFBD><EFBFBD><16><><EFBFBD>r<0B>F<EFBFBD>2`<60>X<1B>s<><73><EFBFBD><EFBFBD><EFBFBD>#<08>
|
BIN
modules/runners/secrets/potato.age
Normal file
BIN
modules/runners/secrets/potato.age
Normal file
Binary file not shown.
19
modules/runners/secrets/secrets.nix
Normal file
19
modules/runners/secrets/secrets.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
let
|
||||||
|
lily = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHj4f4GlA+DP491i9ssmm+Ys/TLikz6ALk1kkglhcywY lily@GreenMachine";
|
||||||
|
users = [lily];
|
||||||
|
system = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID/rgN3hR4K2Mu/Oy3tgaGfDfCss3CrNJn2jTTQJQKKn root@nixos";
|
||||||
|
systems = [system];
|
||||||
|
in {
|
||||||
|
# age.secrets.potato.file = ./potato.age;
|
||||||
|
# age.secrets.lily.file = ./lily.age;
|
||||||
|
"potato.age".publicKeys = [
|
||||||
|
lily
|
||||||
|
|
||||||
|
system
|
||||||
|
];
|
||||||
|
"lily.age".publicKeys = [
|
||||||
|
lily
|
||||||
|
|
||||||
|
system
|
||||||
|
];
|
||||||
|
}
|
17
modules/users/default.nix
Normal file
17
modules/users/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
# recursively construct attr-set of a directory
|
||||||
|
getDir = dir:
|
||||||
|
lib.mapAttrs (file: type:
|
||||||
|
if type == "directory"
|
||||||
|
then getDir "${dir}/${file}"
|
||||||
|
else type) (
|
||||||
|
builtins.readDir dir
|
||||||
|
);
|
||||||
|
files = dir: lib.collect lib.isString (lib.mapAttrsRecursive (path: type: lib.concatStringsSep "/" path) (getDir dir));
|
||||||
|
validFiles = dir:
|
||||||
|
map (file: ./. + "/${file}") (
|
||||||
|
lib.filter (file: lib.hasSuffix ".nix" file && file != "default.nix") (files dir)
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
imports = validFiles ./.;
|
||||||
|
}
|
21
modules/users/lily.nix
Normal file
21
modules/users/lily.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.users.lily;
|
||||||
|
# interpolated_secrets = import ../../secrets/interpolated_secrets.nix;
|
||||||
|
in {
|
||||||
|
options.lily.users.lily.enable = lib.mkEnableOption "activate user lily";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
users.users.lily = {
|
||||||
|
home = "/home/lily";
|
||||||
|
isNormalUser = true;
|
||||||
|
# hashedPasswordFile = lib.mkIf config.lily.sops config.sops.secrets."users/lily/hashedPassword".path;
|
||||||
|
extraGroups = ["wheel" "openrazer" "docker"] ++ lib.optionals config.networking.networkmanager.enable ["networkmanager"];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
# sops.secrets."users/lily/hashedPassword" = lib.mkIf config.lily.sops { neededForUsers = true; };
|
||||||
|
};
|
||||||
|
}
|
37
modules/wayland/default.nix
Normal file
37
modules/wayland/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.lily.wayland;
|
||||||
|
in {
|
||||||
|
options.lily.wayland.enable = lib.mkEnableOption "activate wayland";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.xwayland.enable = true;
|
||||||
|
environment.systemPackages = with pkgs;
|
||||||
|
[
|
||||||
|
wl-clipboard
|
||||||
|
xwayland
|
||||||
|
xwaylandvideobridge
|
||||||
|
wayland-utils
|
||||||
|
wev
|
||||||
|
]
|
||||||
|
++ lib.optionals (config.lily.plasma.enable) [kdePackages.plasma-wayland-protocols];
|
||||||
|
environment.sessionVariables = {
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
QT_QUICK_CONTROLS_STYLE = "org.kde.desktop";
|
||||||
|
SDL_VIDEODRIVER = "wayland";
|
||||||
|
CLUTTER_BACKEND = "wayland";
|
||||||
|
QT_QPA_PLATFORM = "wayland;xcb";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
GDK_BACKEND = "wayland,x11";
|
||||||
|
};
|
||||||
|
services.dbus.enable = true;
|
||||||
|
security = {
|
||||||
|
polkit.enable = true;
|
||||||
|
rtkit.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,28 +0,0 @@
|
||||||
{ config, lib, pkgs, self, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ # Include the results of the hardware scan.
|
|
||||||
./hardware/hardware.nix
|
|
||||||
./environments/plasma-wayland.nix
|
|
||||||
# ./environments/gnome.nix
|
|
||||||
./users/luxzi.nix
|
|
||||||
./services/services.nix
|
|
||||||
./programs/programs.nix
|
|
||||||
./misc/misc.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
|
||||||
# accidentally delete configuration.nix.
|
|
||||||
# system.copySystemConfiguration = true;
|
|
||||||
|
|
||||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|
||||||
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|
||||||
# to actually do that.
|
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.xserver.enable = true;
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
|
||||||
services.xserver.displayManager.gdm.wayland = true;
|
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
|
|
||||||
services.displayManager.sddm.enable = true;
|
|
||||||
services.displayManager.sddm.wayland.enable = true;
|
|
||||||
services.desktopManager.plasma6.enable = true;
|
|
||||||
|
|
||||||
environment.plasma6.excludePackages = with pkgs; [
|
|
||||||
plasma-browser-integration
|
|
||||||
konsole
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,14 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/afce32c1-67df-4324-aebb-a113b71317b9";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/12CE-A600";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./modules.nix
|
|
||||||
./fstab.nix
|
|
||||||
./audio.nix
|
|
||||||
./network.nix
|
|
||||||
./intel.nix
|
|
||||||
./nvidia.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ lib, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
hardware.graphics.enable = true;
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = false;
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
open = false;
|
|
||||||
nvidiaSettings = false;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./time.nix
|
|
||||||
./locale.nix
|
|
||||||
./nixconfig.nix
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
time.timeZone = "America/New_York";
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.dconf.enable = true;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.nix-ld = {
|
|
||||||
enable = true;
|
|
||||||
libraries = with pkgs; [];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./nix-ld.nix
|
|
||||||
./dconf.nix
|
|
||||||
./gpg.nix
|
|
||||||
./steam.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
git
|
|
||||||
neovim
|
|
||||||
nerd-fonts.fira-code
|
|
||||||
cmake
|
|
||||||
ninja
|
|
||||||
libgcc
|
|
||||||
gnumake
|
|
||||||
topgrade
|
|
||||||
unzip
|
|
||||||
patchelf
|
|
||||||
wl-clipboard
|
|
||||||
jdk17
|
|
||||||
jre8
|
|
||||||
python3
|
|
||||||
clang-tools
|
|
||||||
clang
|
|
||||||
libtool
|
|
||||||
libvterm
|
|
||||||
pkg-config
|
|
||||||
openssl
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.steam.enable = true;
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.pulseaudio.enable = false;
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
|
||||||
boot.loader.systemd-boot.configurationLimit = 10;
|
|
||||||
boot.loader.systemd-boot.editor = false;
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.printing.enable = true;
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
networking.firewall.enable = false;
|
|
||||||
networking.firewall.allowedTCPPorts = [];
|
|
||||||
networking.firewall.allowedUDPPorts = [];
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.libinput.enable = true;
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
networking.hostName = "nixos";
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
}
|
|
|
@ -1,11 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
audio.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
./boot.nix
|
|
||||||
./pipewire.nix
|
|
||||||
./cups.nix
|
|
||||||
./firewall.nix
|
|
||||||
./libinput.nix
|
|
||||||
./networkmanager.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
{ self, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
users.users.luxzi = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
packages = [
|
|
||||||
self.inputs.home-manager.packages.${pkgs.system}.home-manager
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.shells = with pkgs; [ zsh ];
|
|
||||||
programs.zsh.enable = true;
|
|
||||||
}
|
|
37
overlays/default.nix
Normal file
37
overlays/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{inputs, ...}: {
|
||||||
|
# This one brings our custom packages from the 'pkgs' directory
|
||||||
|
additions = final: _prev: import ../pkgs final.pkgs;
|
||||||
|
|
||||||
|
# This one contains whatever you want to overlay
|
||||||
|
# You can change versions, add patches, set compilation flags, anything really.
|
||||||
|
# https://nixos.wiki/wiki/Overlays
|
||||||
|
modifications = final: prev: {
|
||||||
|
prismlauncher = prev.prismlauncher.overrideAttrs (oldAttrs: {
|
||||||
|
buildInputs = (oldAttrs.buildInputs or []) ++ [final.jdk23];
|
||||||
|
jdks = [
|
||||||
|
final.jdk23
|
||||||
|
];
|
||||||
|
# configurePhase = ''
|
||||||
|
# export JAVA_HOME=${pkgs.jdk22}
|
||||||
|
# '';
|
||||||
|
# installPhase = ''
|
||||||
|
# mkdir -p $out/bin
|
||||||
|
# cp -r $oldAttrs.out/* $out/
|
||||||
|
# # Create a wrapper script to ensure JAVA_HOME is set
|
||||||
|
# echo '#!/bin/sh' > $out/bin/prismlauncher
|
||||||
|
# echo "export JAVA_HOME=${pkgs.jdk22}" >> $out/bin/prismlauncher
|
||||||
|
# echo "exec $out/bin/PrismLauncher \"\$@\"" >> $out/bin/prismlauncher
|
||||||
|
# chmod +x $out/bin/prismlauncher
|
||||||
|
# '';
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||||
|
# be accessible through 'pkgs.unstable'
|
||||||
|
unstable-packages = final: _prev: {
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = final.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
5
pkgs/default.nix
Normal file
5
pkgs/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||||
|
# You can build them using 'nix build .#example'
|
||||||
|
pkgs: {
|
||||||
|
# example = pkgs.callPackage ./example { };
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue