merge flake-parts rewrite into main #19

Open
Daholli wants to merge 6 commits from main-merge into main
111 changed files with 428 additions and 6886 deletions
Showing only changes of commit fe6de112e6 - Show all commits

201
LICENSE
View file

@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

111
README.md
View file

@ -1,111 +0,0 @@
# Wyrdgard
<a href="https://nixos.wiki/wiki/Flakes" target="_blank">
<img alt="Nix Flakes Ready" src="https://img.shields.io/static/v1?logo=nixos&logoColor=d8dee9&label=Nix%20Flakes&labelColor=5e81ac&message=Ready&color=d8dee9&style=for-the-badge">
</a>
<a href="https://github.com/snowfallorg/lib" target="_blank">
<img alt="Built With Snowfall" src="https://img.shields.io/static/v1?logoColor=d8dee9&label=Built%20With&labelColor=5e81ac&message=Snowfall&color=d8dee9&style=for-the-badge">
</a>
My all-inclusive nix flake to solve all my problems.
> [!WARNING]
> Do not just use this repo out of the box since it will not work for your setup (or at least it probably wont work)
> Feel free to copy any parts you find interesting or useful, but I would recommend building your flake up from scratch as it will allow for easier bughunting.
![hyprlock_screenshot](./modules/nixos/desktop/addons/hyprlock/hyprlock_preview.png)
## Repository Overview
- [homes](#homes)
- [lib](#lib)
- [modules](#modules)
- [overlays](#overlays)
- [secrets](#secrets)
- [shells](#shells)
- [systems](#systems)
Starting your nix journey can be daunting and understanding how the whole ecosystem works takes some time.
For me starting with snowfall-lib was both a blessing and a curse, it took away so many problempoints by being easy, but it also hampered my learning because I never had to do things from scratch and sometimes translating a "normal" flake to a snowfall-lib setup was not trivial.
Luckily for me Jake (the creator of snowfall-lib) was so kind and helped me bugfix and learn how to solve my own Problems.
### homes
The homes folder is home to all your homemanager configuration that is specific to that system (and user) and that system only.
If you want generic home manager configuration then look into [modules/home](modules/home/README.md).
- home/system/user@hostname syntax
I dont really use this besides for testing out some apps, most of the things get turned into generic modules so I can eventually reuse them later.
For more extensive explainations checkout [snowfall-lib/homes](https://snowfall.org/guides/lib/homes/)!
### lib
- extending lib
- any things defined here can be accessed vial `inherit (lib.${namespace})`
Mine is straight ripped from [here](https://github.com/jakehamilton/config/blob/main/lib/module/default.nix), as I have not found much use for this outside of these options, maybe at some point.
For more extensive explainations checkout [snowfall-lib/lib](https://snowfall.org/guides/lib/library/)!
### [modules](./modules/README.md)
This is the most interesting section of the flake, here I (and other users of snowfall-lib) define the packages that are available to your configuration.
there are 3 main categories
- nixos `general system packages`
- home `general homemanager packages`
- darwin `general mac packages (tho at this point in time I do not have a mac)`
Most of my configuration happens in this section and this is also where the different snowfall-lib repos diverge, some aspects are still fairly close to Jakes as that is what I started with, but some areas are more mature and now more my own style.
For more concrete information abotu my system specific setup read [here](/modules/nixos/README.md).
For more extensive explainations checkout [snowfall-lib/modules](https://snowfall.org/guides/lib/homes/)!
### [overlays](./overlays/README.md)
- overlays provided by this flake
For more extensive explainations checkout [snowfall-lib/overlays](https://snowfall.org/guides/lib/overlays/)!
### secrets
- secrets used currently only one file
> [!IMPORTANT]
> This uses [sops-nix](https://github.com/Mic92/sops-nix) to encrypt sensitive information you need in your flake, never have secrets or password unencrypted in your repo, not even if it is private
### [shells](./shells/README.md)
This is also fairly interesting and a section I have not delved in too much, currently I only have a rust flake for [screeps-rust](https://github.com/Daholli/screeps-rust) in here.
I think thi sis great to have quick access to a out of the box dev shell, but generally you probably want a project specific flake.
You can access these flakes either using `self#rust` or in my case `github:Daholli/nixos-config#rust`.
For more extensive explainations checkout [snowfall-lib/shells](https://snowfall.org/guides/lib/shells/)!
### systems
- all the systems that can be built with the flake
- systems/system/hostname syntax
This is the heart piece of the flake, this is what is being targeted if you call `nixos-rebuild switch --flake .#<hostname>` I try to only have very system specific config in here and try to cover all the other things in the [generic part of the flake](/modules/nixos/README.md).
If you want to start piecing together how my config works this is where you would start.
For more extensive explainations checkout [snowfall-lib/systems](https://snowfall.org/guides/lib/systemns/)!
<br>
<br>
## inspirations and thanks
Most of this config draws inspiration from this config:
[https://github.com/jakehamilton/config](https://github.com/jakehamilton/config)

459
flake.lock generated
View file

@ -130,11 +130,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1761115517,
"narHash": "sha256-Fev/ag/c3Fp3JBwHfup3lpA5FlNXfkoshnQ7dssBgJ0=",
"lastModified": 1761201787,
"narHash": "sha256-RQG899vzsoRIMQ6ZR5bi1W9HOomUgID7tk3COQf/OaY=",
"owner": "nix-community",
"repo": "fenix",
"rev": "320433651636186ea32b387cff05d6bbfa30cea7",
"rev": "1ab39eca6ce37b1db23b595c2a754c81ebf49507",
"type": "github"
},
"original": {
@ -208,22 +208,6 @@
}
},
"flake-compat_5": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_6": {
"flake": false,
"locked": {
"lastModified": 1696426674,
@ -260,44 +244,25 @@
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1760948891,
"narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_4"
},
@ -498,11 +463,11 @@
]
},
"locked": {
"lastModified": 1761191301,
"narHash": "sha256-xsRL2Oyb4YRZZ1Tu4WzR2uFg1n931bH+PfLdFcqtLg8=",
"lastModified": 1761235135,
"narHash": "sha256-cux9xeceLIER1lBxUa1gMafkz7gg5ntcUmJBynWdBWI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4958aafe7b237dc1e857fb0c916efff72075048f",
"rev": "0adf9ba3f567da2d53af581a857aacf671aaa547",
"type": "github"
},
"original": {
@ -977,37 +942,18 @@
"type": "github"
}
},
"libcamera-src": {
"flake": false,
"import-tree": {
"locked": {
"lastModified": 1725630279,
"narHash": "sha256-KH30jmHfxXq4j2CL7kv18DYECJRp9ECuWNPnqPZajPA=",
"owner": "raspberrypi",
"repo": "libcamera",
"rev": "69a894c4adad524d3063dd027f5c4774485cf9db",
"lastModified": 1761120675,
"narHash": "sha256-TEbh9zISiQcU82VwVoEbmXHnSGlUxTwvjJA9g9ErSDA=",
"owner": "vic",
"repo": "import-tree",
"rev": "a037ed2a58fc0ebed9e93b9ef79b0646e648f719",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"repo": "libcamera",
"rev": "69a894c4adad524d3063dd027f5c4774485cf9db",
"type": "github"
}
},
"libpisp-src": {
"flake": false,
"locked": {
"lastModified": 1724944683,
"narHash": "sha256-Fo2UJmQHS855YSSKKmGrsQnJzXog1cdpkIOO72yYAM4=",
"owner": "raspberrypi",
"repo": "libpisp",
"rev": "28196ed6edcfeda88d23cc5f213d51aa6fa17bb3",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "v1.0.7",
"repo": "libpisp",
"owner": "vic",
"repo": "import-tree",
"type": "github"
}
},
@ -1031,6 +977,70 @@
"type": "github"
}
},
"niri": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": []
},
"locked": {
"lastModified": 1760940149,
"narHash": "sha256-KbM47vD6E0cx+v4jYQZ8mD5N186AKm2CQlyh34TW58U=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b3245b81a6ed8edfaf5388a74d2e0a23c24941e5",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"niri-flake": {
"inputs": {
"niri-stable": [
"niri"
],
"niri-unstable": "niri-unstable",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1761187190,
"narHash": "sha256-5ln16iOeWpEX5MO7M3jzFEBNFE42gpFsCvSvPjtF6tQ=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "77a07f5d3b775fba67550c38122ebb8d3ee3ba1c",
"type": "github"
},
"original": {
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1760940149,
"narHash": "sha256-KbM47vD6E0cx+v4jYQZ8mD5N186AKm2CQlyh34TW58U=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b3245b81a6ed8edfaf5388a74d2e0a23c24941e5",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix": {
"inputs": {
"flake-compat": [
@ -1175,18 +1185,33 @@
"type": "github"
}
},
"nixpkgs-master": {
"nixpkgs-lib": {
"locked": {
"lastModified": 1761197992,
"narHash": "sha256-Y27P0bnZGZY0Bw44+YtRTzbL7fBrLbzvpyDs/wJrCmI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "43db7111c69a9cbd9a08c88567fd6bbf9631f137",
"lastModified": 1754788789,
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1761016216,
"narHash": "sha256-G/iC4t/9j/52i/nm+0/4ybBmAF4hzR8CNHC75qEhjHo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "481cf557888e05d3128a76f14c76397b7d7cc869",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
@ -1326,42 +1351,12 @@
"type": "github"
}
},
"raspberry-pi-nix": {
"inputs": {
"libcamera-src": "libcamera-src",
"libpisp-src": "libpisp-src",
"nixpkgs": [
"nixpkgs"
],
"rpi-bluez-firmware-src": "rpi-bluez-firmware-src",
"rpi-firmware-nonfree-src": "rpi-firmware-nonfree-src",
"rpi-firmware-src": "rpi-firmware-src",
"rpi-linux-6_10_12-src": "rpi-linux-6_10_12-src",
"rpi-linux-6_6_67-src": "rpi-linux-6_6_67-src",
"rpi-linux-stable-src": "rpi-linux-stable-src",
"rpicam-apps-src": "rpicam-apps-src",
"u-boot-src": "u-boot-src"
},
"locked": {
"lastModified": 1738212544,
"narHash": "sha256-7gcdeZO0iQ6hxhZlhdENJGfFoZE1g5sZ/9STQTi+q9Q=",
"owner": "JamieMagee",
"repo": "raspberry-pi-nix",
"rev": "25118248489e047a7da43a21409b457aa2af315e",
"type": "github"
},
"original": {
"owner": "JamieMagee",
"repo": "raspberry-pi-nix",
"rev": "25118248489e047a7da43a21409b457aa2af315e",
"type": "github"
}
},
"root": {
"inputs": {
"catppuccin": "catppuccin",
"devenv": "devenv",
"fenix": "fenix",
"flake-parts": "flake-parts_2",
"gpg-base-conf": "gpg-base-conf",
"helix": "helix",
"home-manager": "home-manager",
@ -1369,152 +1364,34 @@
"hyprland": "hyprland",
"hyprland-plugins": "hyprland-plugins",
"hyprlock": "hyprlock",
"import-tree": "import-tree",
"nh-flake": "nh-flake",
"niri": "niri",
"niri-flake": "niri-flake",
"nix-ld": "nix-ld",
"nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs_3",
"nixpkgs-latest-factorio": "nixpkgs-latest-factorio",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-tuya-vacuum": "nixpkgs-tuya-vacuum",
"nixpkgs-unstable": "nixpkgs-unstable",
"raspberry-pi-nix": "raspberry-pi-nix",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"snowfall-lib": "snowfall-lib",
"sops-nix": "sops-nix",
"systems": "systems_3",
"tuya-vaccum-maps": "tuya-vaccum-maps",
"zen-browser": "zen-browser",
"zig-overlay": "zig-overlay",
"zls": "zls"
}
},
"rpi-bluez-firmware-src": {
"flake": false,
"locked": {
"lastModified": 1708969706,
"narHash": "sha256-KakKnOBeWxh0exu44beZ7cbr5ni4RA9vkWYb9sGMb8Q=",
"owner": "RPi-Distro",
"repo": "bluez-firmware",
"rev": "78d6a07730e2d20c035899521ab67726dc028e1c",
"type": "github"
},
"original": {
"owner": "RPi-Distro",
"ref": "bookworm",
"repo": "bluez-firmware",
"type": "github"
}
},
"rpi-firmware-nonfree-src": {
"flake": false,
"locked": {
"lastModified": 1723266537,
"narHash": "sha256-T7eTKXqY9cxEMdab8Snda4CEOrEihy5uOhA6Fy+Mhnw=",
"owner": "RPi-Distro",
"repo": "firmware-nonfree",
"rev": "4b356e134e8333d073bd3802d767a825adec3807",
"type": "github"
},
"original": {
"owner": "RPi-Distro",
"ref": "bookworm",
"repo": "firmware-nonfree",
"type": "github"
}
},
"rpi-firmware-src": {
"flake": false,
"locked": {
"lastModified": 1728405098,
"narHash": "sha256-4gnK0KbqFnjBmWia9Jt2gveVWftmHrprpwBqYVqE/k0=",
"owner": "raspberrypi",
"repo": "firmware",
"rev": "7bbb5f80d20a2335066a8781459c9f33e5eebc64",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "1.20241008",
"repo": "firmware",
"type": "github"
}
},
"rpi-linux-6_10_12-src": {
"flake": false,
"locked": {
"lastModified": 1728305462,
"narHash": "sha256-LtvNmGD1D5YYv+C9xxxddAeHw69o3OX/H9M7F663L74=",
"owner": "raspberrypi",
"repo": "linux",
"rev": "26ee50d56618c2d98100b1bc672fd201aed4d00f",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "rpi-6.10.y",
"repo": "linux",
"type": "github"
}
},
"rpi-linux-6_6_67-src": {
"flake": false,
"locked": {
"lastModified": 1734790986,
"narHash": "sha256-q9swM2TmmuzbUuQnbLZk5PseKWD7/SNPwtth6bpGIqE=",
"owner": "raspberrypi",
"repo": "linux",
"rev": "811ff707533bcd67cdcd368bbd46223082009b12",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "rpi-6.6.y",
"repo": "linux",
"type": "github"
}
},
"rpi-linux-stable-src": {
"flake": false,
"locked": {
"lastModified": 1728403745,
"narHash": "sha256-phCxkuO+jUGZkfzSrBq6yErQeO2Td+inIGHxctXbD5U=",
"owner": "raspberrypi",
"repo": "linux",
"rev": "5aeecea9f4a45248bcf564dec924965e066a7bfd",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "stable_20241008",
"repo": "linux",
"type": "github"
}
},
"rpicam-apps-src": {
"flake": false,
"locked": {
"lastModified": 1727515047,
"narHash": "sha256-qCYGrcibOeGztxf+sd44lD6VAOGoUNwRqZDdAmcTa/U=",
"owner": "raspberrypi",
"repo": "rpicam-apps",
"rev": "a8ccf9f3cd9df49875dfb834a2b490d41d226031",
"type": "github"
},
"original": {
"owner": "raspberrypi",
"ref": "v1.5.2",
"repo": "rpicam-apps",
"type": "github"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1761077270,
"narHash": "sha256-O1uTuvI/rUlubJ8AXKyzh1WSWV3qCZX0huTFUvWLN4E=",
"lastModified": 1761178311,
"narHash": "sha256-M5VeAtfip2zdqHKG9Su+5vlDG8AhtTk1ktxUGXdARc8=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "39990a923c8bca38f5bd29dc4c96e20ee7808d5d",
"rev": "f362735f822fe66ed2e357db53717b3db69dc6c9",
"type": "github"
},
"original": {
@ -1567,28 +1444,6 @@
"type": "gitlab"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736130495,
"narHash": "sha256-4i9nAJEZFv7vZMmrE0YG55I3Ggrtfo5/T07JEpEZ/RM=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "02d941739f98a09e81f3d2d9b3ab08918958beac",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_5"
@ -1639,16 +1494,16 @@
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"repo": "default-linux",
"type": "github"
}
},
@ -1683,19 +1538,6 @@
"type": "github"
}
},
"u-boot-src": {
"flake": false,
"locked": {
"lastModified": 1719857238,
"narHash": "sha256-mJ2TBy0Y5ZtcGFgtU5RKr0UDUp5FWzojbFb+o/ebRJU=",
"type": "tarball",
"url": "https://ftp.denx.de/pub/u-boot/u-boot-2024.07.tar.bz2"
},
"original": {
"type": "tarball",
"url": "https://ftp.denx.de/pub/u-boot/u-boot-2024.07.tar.bz2"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
@ -1737,6 +1579,39 @@
"type": "github"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1755491097,
"narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "388d291e82ffbc73be18169d39470f340707edaa",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"ref": "v0.7",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1761173223,
"narHash": "sha256-FumZh+fPRaKXkl9Y1uTh5KV7Io/AyOZso+UkqLhLArs=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "bf745144acda1343934e9a094cf9458a54d57889",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
@ -1758,8 +1633,8 @@
},
"zig-overlay": {
"inputs": {
"flake-compat": "flake-compat_6",
"flake-utils": "flake-utils_2",
"flake-compat": "flake-compat_5",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]

102
flake.nix
View file

@ -1,17 +1,25 @@
{
description = "NixOs Config";
description = "All encompassing flake";
nixConfig = {
allow-import-from-derivation = true;
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
flake-parts.url = "github:hercules-ci/flake-parts";
import-tree.url = "github:vic/import-tree";
nixpkgs-latest-factorio.url = "github:Daholli/nixpkgs/e880129391be2f558d6c205cfd931be338b3b707";
nixpkgs-tuya-vacuum.url = "github:Daholli/nixpkgs/84b34e39e7a0879367189f34401191f6a0364bcf";
home-manager = {
url = "github:nix-community/home-manager/master";
# url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -53,10 +61,21 @@
};
###
# Snowfall dependencies
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
# Niri
niri = {
url = "github:YaLTeR/niri";
inputs = {
nixpkgs.follows = "nixpkgs";
rust-overlay.follows = "";
};
};
niri-flake = {
url = "github:sodiboo/niri-flake";
inputs = {
niri-stable.follows = "niri";
nixpkgs.follows = "nixpkgs";
};
};
helix = {
@ -75,11 +94,6 @@
## temporary
zen-browser.url = "github:0xc000022070/zen-browser-flake";
raspberry-pi-nix = {
url = "github:JamieMagee/raspberry-pi-nix/25118248489e047a7da43a21409b457aa2af315e";
inputs.nixpkgs.follows = "nixpkgs";
};
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
catppuccin.url = "github:catppuccin/nix";
@ -118,68 +132,4 @@
};
};
outputs =
inputs:
let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;
snowfall = {
meta = {
name = "wyrdgard";
title = "Wyrdgard";
};
namespace = "wyrdgard";
};
};
in
lib.mkFlake {
channels-config = {
allowUnfree = true;
};
outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; };
overlays = with inputs; [
devenv.overlays.default
];
homes.modules = with inputs; [
sops-nix.homeManagerModules.sops
catppuccin.homeModules.catppuccin
];
systems.modules.nixos = with inputs; [
home-manager.nixosModules.home-manager
nix-ld.nixosModules.nix-ld
sops-nix.nixosModules.sops
catppuccin.nixosModules.catppuccin
];
systems.hosts.nixberry.modules = with inputs; [
raspberry-pi-nix.nixosModules.raspberry-pi
raspberry-pi-nix.nixosModules.sd-image
];
systems.hosts.loptland.modules = with inputs; [
simple-nixos-mailserver.nixosModules.default
];
systems.hosts.wsl.modules = with inputs; [ nixos-wsl.nixosModules.default ];
}
// rec {
self = inputs.self;
hydraJobs = {
# hosts = lib.mapAttrs (_: cfg: cfg.config.system.build.toplevel) (
# lib.filterAttrs (name: cfg: name != "nixberry") self.outputs.nixosConfigurations
# );
hosts = lib.mapAttrs (_: cfg: cfg.config.system.build.toplevel) self.outputs.nixosConfigurations;
packages = self.packages;
shells = lib.filterAttrs (name: shell: name == "x86_64-linux") self.devShells;
};
};
}

View file

@ -1,22 +0,0 @@
{
lib,
pkgs,
config,
osConfig ? { },
format ? "unknown",
...
}:
with lib.wyrdgard;
{
wyrdgard = {
apps = {
kitty = enabled;
};
tools = {
direnv = enabled;
};
};
home.stateVersion = "24.11";
}

View file

@ -1,20 +0,0 @@
{
lib,
pkgs,
config,
osConfig ? { },
format ? "unknown",
...
}:
with lib.wyrdgard;
{
wyrdgard = {
apps = {
kitty = enabled;
};
tools = {
direnv = enabled;
};
};
}

View file

@ -1,291 +0,0 @@
{
lib,
pkgs,
config,
namespace,
osConfig ? { },
format ? "unknown",
...
}:
with lib.${namespace};
{
wyrdgard = {
apps = {
kitty = enabled;
};
tools = {
direnv = enabled;
};
};
services.easyeffects = {
enable = true;
preset = "jtrv-preset";
extraPresets = {
jtrv-preset = {
input = {
blocklist = [
];
"compressor#0" = {
attack = 5;
boost-amount = 6;
boost-threshold = -72;
bypass = false;
dry = -100;
hpf-frequency = 10;
hpf-mode = "off";
input-gain = 0;
knee = -6;
lpf-frequency = 20000;
lpf-mode = "off";
makeup = 0;
mode = "Downward";
output-gain = 0;
ratio = 4;
release = 75;
release-threshold = -40;
sidechain = {
lookahead = 0;
mode = "RMS";
preamp = 0;
reactivity = 10;
source = "Middle";
stereo-split-source = "Left/Right";
type = "Feed-forward";
};
stereo-split = false;
threshold = -20;
wet = 0;
};
"deesser#0" = {
bypass = false;
detection = "RMS";
f1-freq = 3000.0;
f1-level = -6.0;
f2-freq = 5000.0;
f2-level = -6.0;
f2-q = 1.5000000000000004;
input-gain = 0.0;
laxity = 15;
makeup = 0;
mode = "Wide";
output-gain = 0;
ratio = 5;
sc-listen = false;
threshold = -20;
};
"equalizer#0" = {
balance = 0;
bypass = false;
input-gain = 0;
left = {
band0 = {
frequency = 50;
gain = 3;
mode = "RLC (BT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-pass";
width = 4;
};
band1 = {
frequency = 90;
gain = 3;
mode = "RLC (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Lo-shelf";
width = 4;
};
band2 = {
frequency = 425;
gain = -2;
mode = "BWC (MT)";
mute = false;
q = 0.9999999999999998;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band3 = {
frequency = 3500;
gain = 3;
mode = "BWC (BT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band4 = {
frequency = 9000;
gain = 2;
mode = "LRX (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-shelf";
width = 4;
};
};
mode = "IIR";
num-bands = 5;
output-gain = 0;
pitch-left = 0;
pitch-right = 0;
right = {
band0 = {
frequency = 50;
gain = 3;
mode = "RLC (BT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-pass";
width = 4;
};
band1 = {
frequency = 90;
gain = 3;
mode = "RLC (MT)";
mute = false;
q = 0.9999999999999998;
slope = "x1";
solo = false;
type = "Lo-shelf";
width = 4;
};
band2 = {
frequency = 425;
gain = -2;
mode = "BWC (MT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band3 = {
frequency = 3500;
gain = 3;
mode = "BWC (BT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band4 = {
frequency = 9000;
gain = 2;
mode = "LRX (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-shelf";
width = 4;
};
};
split-channels = false;
};
"gate#0" = {
attack = 1;
bypass = false;
curve-threshold = -50;
curve-zone = -2;
dry = -100;
hpf-frequency = 10;
hpf-mode = "off";
hysteresis = true;
hysteresis-threshold = -3;
hysteresis-zone = -1;
input-gain = 0;
lpf-frequency = 20000;
lpf-mode = "off";
makeup = 1;
output-gain = 0;
reduction = -15;
release = 200;
sidechain = {
input = "Internal";
lookahead = 0;
mode = "RMS";
preamp = 0;
reactivity = 10;
source = "Middle";
stereo-split-source = "Left/Right";
};
stereo-split = false;
wet = -1;
};
"limiter#0" = {
alr = false;
alr-attack = 5;
alr-knee = 0;
alr-release = 50;
attack = 1;
bypass = false;
dithering = "16bit";
external-sidechain = false;
gain-boost = true;
input-gain = 0;
lookahead = 5;
mode = "Herm Wide";
output-gain = 0;
oversampling = "Half x2(2L)";
release = 5;
sidechain-preamp = 0;
stereo-link = 100;
threshold = -1;
};
plugins_order = [
"rnnoise#0"
"gate#0"
"deesser#0"
"compressor#0"
"equalizer#0"
"speex#0"
"limiter#0"
];
"rnnoise#0" = {
bypass = false;
enable-vad = false;
input-gain = 0;
model-path = "";
output-gain = 0;
release = 20;
vad-thres = 50;
wet = 0;
};
"speex#0" = {
bypass = false;
enable-agc = false;
enable-denoise = false;
enable-dereverb = false;
input-gain = 0;
noise-suppression = -70;
output-gain = 0;
vad = {
enable = true;
probability-continue = 90;
probability-start = 95;
};
};
};
};
};
};
}

View file

@ -1,22 +0,0 @@
{
lib,
pkgs,
config,
osConfig ? { },
format ? "unknown",
...
}:
with lib.wyrdgard;
{
wyrdgard = {
apps = {
kitty = enabled;
};
tools = {
direnv = enabled;
};
};
home.packages = with pkgs; [ diebahn ];
}

View file

@ -1,291 +0,0 @@
{
lib,
pkgs,
config,
namespace,
osConfig ? { },
format ? "unknown",
...
}:
with lib.${namespace};
{
wyrdgard = {
apps = {
kitty = enabled;
};
tools = {
direnv = enabled;
};
};
services.easyeffects = {
enable = true;
preset = "jtrv-preset";
extraPresets = {
jtrv-preset = {
input = {
blocklist = [
];
"compressor#0" = {
attack = 5;
boost-amount = 6;
boost-threshold = -72;
bypass = false;
dry = -100;
hpf-frequency = 10;
hpf-mode = "off";
input-gain = 0;
knee = -6;
lpf-frequency = 20000;
lpf-mode = "off";
makeup = 0;
mode = "Downward";
output-gain = 0;
ratio = 4;
release = 75;
release-threshold = -40;
sidechain = {
lookahead = 0;
mode = "RMS";
preamp = 0;
reactivity = 10;
source = "Middle";
stereo-split-source = "Left/Right";
type = "Feed-forward";
};
stereo-split = false;
threshold = -20;
wet = 0;
};
"deesser#0" = {
bypass = false;
detection = "RMS";
f1-freq = 3000.0;
f1-level = -6.0;
f2-freq = 5000.0;
f2-level = -6.0;
f2-q = 1.5000000000000004;
input-gain = 0.0;
laxity = 15;
makeup = 0;
mode = "Wide";
output-gain = 0;
ratio = 5;
sc-listen = false;
threshold = -20;
};
"equalizer#0" = {
balance = 0;
bypass = false;
input-gain = 0;
left = {
band0 = {
frequency = 50;
gain = 3;
mode = "RLC (BT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-pass";
width = 4;
};
band1 = {
frequency = 90;
gain = 3;
mode = "RLC (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Lo-shelf";
width = 4;
};
band2 = {
frequency = 425;
gain = -2;
mode = "BWC (MT)";
mute = false;
q = 0.9999999999999998;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band3 = {
frequency = 3500;
gain = 3;
mode = "BWC (BT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band4 = {
frequency = 9000;
gain = 2;
mode = "LRX (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-shelf";
width = 4;
};
};
mode = "IIR";
num-bands = 5;
output-gain = 0;
pitch-left = 0;
pitch-right = 0;
right = {
band0 = {
frequency = 50;
gain = 3;
mode = "RLC (BT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-pass";
width = 4;
};
band1 = {
frequency = 90;
gain = 3;
mode = "RLC (MT)";
mute = false;
q = 0.9999999999999998;
slope = "x1";
solo = false;
type = "Lo-shelf";
width = 4;
};
band2 = {
frequency = 425;
gain = -2;
mode = "BWC (MT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band3 = {
frequency = 3500;
gain = 3;
mode = "BWC (BT)";
mute = false;
q = 0.7;
slope = "x2";
solo = false;
type = "Bell";
width = 4;
};
band4 = {
frequency = 9000;
gain = 2;
mode = "LRX (MT)";
mute = false;
q = 0.7;
slope = "x1";
solo = false;
type = "Hi-shelf";
width = 4;
};
};
split-channels = false;
};
"gate#0" = {
attack = 1;
bypass = false;
curve-threshold = -50;
curve-zone = -2;
dry = -100;
hpf-frequency = 10;
hpf-mode = "off";
hysteresis = true;
hysteresis-threshold = -3;
hysteresis-zone = -1;
input-gain = 0;
lpf-frequency = 20000;
lpf-mode = "off";
makeup = 1;
output-gain = 0;
reduction = -15;
release = 200;
sidechain = {
input = "Internal";
lookahead = 0;
mode = "RMS";
preamp = 0;
reactivity = 10;
source = "Middle";
stereo-split-source = "Left/Right";
};
stereo-split = false;
wet = -1;
};
"limiter#0" = {
alr = false;
alr-attack = 5;
alr-knee = 0;
alr-release = 50;
attack = 1;
bypass = false;
dithering = "16bit";
external-sidechain = false;
gain-boost = true;
input-gain = 0;
lookahead = 5;
mode = "Herm Wide";
output-gain = 0;
oversampling = "Half x2(2L)";
release = 5;
sidechain-preamp = 0;
stereo-link = 100;
threshold = -1;
};
plugins_order = [
"rnnoise#0"
"gate#0"
"deesser#0"
"compressor#0"
"equalizer#0"
"speex#0"
"limiter#0"
];
"rnnoise#0" = {
bypass = false;
enable-vad = false;
input-gain = 0;
model-path = "";
output-gain = 0;
release = 20;
vad-thres = 50;
wet = 0;
};
"speex#0" = {
bypass = false;
enable-agc = false;
enable-denoise = false;
enable-dereverb = false;
input-gain = 0;
noise-suppression = -70;
output-gain = 0;
vad = {
enable = true;
probability-continue = 90;
probability-start = 95;
};
};
};
};
};
};
}

View file

@ -1,63 +0,0 @@
{ lib, ... }:
with lib;
rec {
## Create a NixOS module option.
##
## ```nix
## lib.mkOpt nixpkgs.lib.types.str "My default" "Description of my option."
## ```
##
#@ Type -> Any -> String
mkOpt =
type: default: description:
mkOption { inherit type default description; };
## Create a NixOS module option without a description.
##
## ```nix
## lib.mkOpt' nixpkgs.lib.types.str "My default"
## ```
##
#@ Type -> Any -> String
mkOpt' = type: default: mkOpt type default null;
## Create a boolean NixOS module option.
##
## ```nix
## lib.mkBoolOpt true "Description of my option."
## ```
##
#@ Type -> Any -> String
mkBoolOpt = mkOpt types.bool;
## Create a boolean NixOS module option without a description.
##
## ```nix
## lib.mkBoolOpt true
## ```
##
#@ Type -> Any -> String
mkBoolOpt' = mkOpt' types.bool;
enabled = {
## Quickly enable an option.
##
## ```nix
## services.nginx = enabled;
## ```
##
#@ true
enable = true;
};
disabled = {
## Quickly disable an option.
##
## ```nix
## services.nginx = enabled;
## ```
##
#@ false
enable = false;
};
}

View file

@ -1,14 +0,0 @@
## Modules Part of the Flake
## [nixos](./nixos/README.md)
All the system configuration should go in here
## [home](./home/README.md)
All the home-manager configuration should go in here
## [darwin](./darwin/README.md)
> [!NOTE]
> I currently do not own a mac so I have not set up a mac specific configuration

13
modules/base/home.nix Normal file
View file

@ -0,0 +1,13 @@
{
flake.modules.homeManager.base = {
programs.home-manager.enable = true;
services = {
home-manager.autoExpire = {
enable = true;
frequency = "weekly";
store.cleanup = true;
};
};
};
}

View file

@ -0,0 +1,24 @@
{
flake.modules.nixos.base =
{ hostConfig, ... }:
{
networking = {
hostName = hostConfig.name;
networkmanager = {
enable = true;
};
useDHCP = false;
};
systemd = {
services.NetworkManager-wait-online.enable = false;
network.wait-online.enable = false;
};
services.resolved = {
enable = true;
};
};
}

View file

@ -0,0 +1,25 @@
{
flake.modules =
let
stateVersion = "25.05";
in
{
homeManager.base = {
home = {
inherit stateVersion;
};
};
nixos.base = {
system = {
# 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. Its 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://search.nixos.org/options?&show=system.stateVersion&from=0&size=50&sort=relevance&type=packages&query=stateVersion).
inherit stateVersion;
};
};
};
}

View file

@ -0,0 +1,4 @@
{ inputs, ... }:
{
imports = [ inputs.flake-parts.flakeModules.modules ];
}

View file

@ -0,0 +1,37 @@
{
inputs,
lib,
config,
...
}:
let
prefix = "hosts/";
collectHostsModules = modules: lib.filterAttrs (name: _: lib.hasPrefix prefix name) modules;
in
{
flake.nixosConfigurations = lib.pipe (collectHostsModules config.flake.modules.nixos) [
(lib.mapAttrs' (
name: module:
let
specialArgs = {
inherit inputs;
hostConfig = module // {
name = lib.removePrefix prefix name;
};
};
in
{
name = lib.removePrefix prefix name;
value = inputs.nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = module.imports ++ [
inputs.home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = specialArgs;
}
];
};
}
))
];
}

View file

@ -1 +0,0 @@
# Home-manager configuration

View file

@ -1,65 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib.${namespace};
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.cli-apps.fish;
in
{
options.${namespace}.apps.cli-apps.fish = {
enable = mkBoolOpt true "Whether or not to enable the fish shell";
};
config = mkIf cfg.enable {
catppuccin.fish.enable = true;
programs = {
fish = {
enable = true;
shellInit = ''
zoxide init fish | source
direnv hook fish | source
set -x LESS_TERMCAP_mb \e'[01;32m'
set -x LESS_TERMCAP_md \e'[01;32m'
set -x LESS_TERMCAP_me \e'[0m'
set -x LESS_TERMCAP_se \e'[0m'
set -x LESS_TERMCAP_so \e'[01;47;34m'
set -x LESS_TERMCAP_ue \e'[0m'
set -x LESS_TERMCAP_us \e'[01;36m'
set -x LESS -R
set -x GROFF_NO_SGR 1
'';
shellAliases = {
vim = "hx";
ls = "eza -lah --icons --git";
lss = "ls --total-size";
};
functions = {
checkHash = "nix hash to-sri --type sha256 $(nix-prefetch-url --unpack $argv)";
deployNixberry = "nixos-rebuild switch --flake .#nixberry --target-host nixberry --sudo --ask-sudo-password";
deployLoptland = "nixos-rebuild switch --flake .#loptland --target-host christophhollizeck.dev --sudo --ask-sudo-password";
checkPR = ''cd /home/cholli/projects/nixpkgs && ${lib.getExe pkgs.nixpkgs-review} pr $argv --post-result --systems "x86_64-linux aarch64-linux"'';
};
plugins = with pkgs.fishPlugins; [
{
name = "forgit";
src = forgit.src;
}
];
};
zoxide = {
enable = true;
options = [ "--cmd cd" ];
};
};
};
}

View file

@ -1,18 +0,0 @@
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt enabled;
cfg = config.${namespace}.apps.cli-apps.home-manager;
in
{
options.${namespace}.apps.cli-apps.home-manager = {
enable = mkBoolOpt true "Enable home-manager";
};
config = mkIf cfg.enable { programs.home-manager = enabled; };
}

View file

@ -1,75 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.cli-apps.starship;
in
{
options.${namespace}.apps.cli-apps.starship = {
enable = mkBoolOpt true "Whether or not to enable starship shell";
};
config = mkIf cfg.enable {
catppuccin.starship.enable = false;
programs = {
fish.shellInit = "
starship init fish | source
";
starship = {
enable = true;
enableTransience = true;
settings = {
character = {
error_symbol = "[ ](bold red)";
};
time = {
disabled = false;
time_format = "%T";
utc_time_offset = "+2";
};
username = {
style_user = "#00de00";
style_root = "red";
format = "[$user]($style) ";
disabled = false;
show_always = true;
};
hostname = {
ssh_only = false;
format = "@ [$hostname](bold yellow) ";
disabled = false;
};
directory = {
home_symbol = "󰋞 ~";
read_only_style = "197";
read_only = " ";
format = "at [$path]($style)[$read_only]($read_only_style) ";
};
git_metrics = {
disabled = false;
added_style = "bold blue";
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
};
git_status = {
format = "([$all_status$ahead_behind]($style) )";
ahead = "[$count](bold green)";
behind = "[$count](bold red)";
diverged = "[$ahead_count$behind_count](red)";
deleted = "[$count](red) ";
modified = "[!$count](yellow) ";
staged = "[+$count](green) ";
renamed = "[$count](green) ";
untracked = "[?$count](blue) ";
};
};
};
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.graphviz;
in
{
options.${namespace}.apps.graphviz = {
enable = mkBoolOpt true "Whether or not you want to install graphviz";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [ graphviz ];
home.shellAliases = {
nixsize = "nix-du -n=50 | dot -Tsvg > ~/Pictures/store.svg";
};
};
}

View file

@ -1,58 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.kitty;
in
{
options.${namespace}.apps.kitty = {
enable = mkEnableOption "Kitty";
};
config = mkIf cfg.enable {
home.packages = [ pkgs.kitty ];
home.sessionVariables.TERMINAL = "kitty";
catppuccin.kitty.enable = true;
# TODO: move this to a thunar specific module
home.file.".config/Thunar/uca.xml".text = ''
<?xml version="1.0" encoding="UTF-8"?>
<actions>
<action>
<icon>kitty</icon>
<name>Open Kitty here</name>
<submenu></submenu>
<unique-id>1726095927116900-1</unique-id>
<command>${pkgs.kitty}/bin/kitty %f</command>
<description>Example for a custom action</description>
<range></range>
<patterns>*</patterns>
<startup-notify/>
<directories/>
</action>
</actions>
'';
programs.kitty = {
enable = true;
# themeFile = "tokyo_night_night";
font = {
name = "FiraCode Nerd Font";
size = 15;
};
shellIntegration.enableFishIntegration = true;
settings = {
"background_opacity" = "0.90";
"shell" = "fish";
"confirm_os_window_close" = "0";
};
};
};
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt enabled;
cfg = config.${namespace}.tools.direnv;
in
{
options.${namespace}.tools.direnv = {
enable = mkBoolOpt false "Whether or not to enable direnv.";
};
config = mkIf cfg.enable {
programs.direnv = {
enable = true;
nix-direnv = enabled;
};
};
}

View file

@ -1,124 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib.${namespace};
let
inherit (lib) mkIf types;
cfg = config.${namespace}.tools.git;
user = config.${namespace}.user;
in
{
options.${namespace}.tools.git = {
enable = mkBoolOpt true "Enable Git (Default true)";
userName = mkOpt types.str user.fullName "The name to configure git with.";
userEmail = mkOpt types.str user.email "The email to configure git with.";
signingKey = mkOpt types.str "ACCFA2DB47795D9E" "The pub key to sign commits with.";
signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
};
config = mkIf cfg.enable {
systemd.user = {
services."git-maintenance@" = {
Unit = {
Description = "Optimize Git repositories data";
};
Service = {
Type = "oneshot";
ExecStart = ''"${lib.getExe config.programs.git.package}" --exec-path="${lib.getBin config.programs.git.package}/bin" -c credential.interactive=false -c core.askPass=true for-each-repo --config=maintenance.repo maintenance run --schedule=%i'';
LockPersonality = "yes";
MemoryDenyWriteExecute = "yes";
NoNewPrivileges = "yes";
RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_VSOCK";
RestrictNamespaces = "yes";
RestrictRealtime = "yes";
RestrictSUIDSGID = "yes";
SystemCallArchitectures = "native";
SystemCallFilter = "@system-service";
};
};
timers = {
"git-maintenance@hourly" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "*-*-* *:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
"git-maintenance@daily" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "*-*-* 20:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
"git-maintenance@weekly" = {
Unit = {
Description = "Optimize Git repositories data";
};
Timer = {
OnCalendar = "Sun *-*-* 20:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
};
programs.git = {
enable = true;
lfs = enabled;
signing = {
key = cfg.signingKey;
inherit (cfg) signByDefault;
};
settings = {
user = {
name = cfg.userName;
email = cfg.userEmail;
};
core = {
fsmonitor = true;
};
init = {
defaultBranch = "main";
};
pull = {
rebase = true;
};
push = {
autoSetupRemote = true;
};
rebase = {
autoStash = true;
};
safe = {
directory = "${user.home}/projects/config";
};
maintenance = {
repo = [
"${user.home}/projects/nixpkgs"
"${user.home}/projects/config"
];
strategy = "incremental";
};
lfs."https://git.christophhollizeck.dev/Daholli/nixos-config.git/info/lfs".locksverify = true;
};
};
};
}

View file

@ -1,51 +0,0 @@
{
lib,
config,
namespace,
...
}:
let
inherit (lib)
types
mkIf
mkDefault
mkMerge
;
inherit (lib.${namespace}) mkOpt;
cfg = config.${namespace}.user;
home-directory = if cfg.name == null then null else "/home/${cfg.name}";
in
{
options.${namespace}.user = {
enable = mkOpt types.bool true "Whether to configure the user account.";
name = mkOpt (types.nullOr types.str) (config.snowfallorg.user.name or "cholli"
) "The user account.";
fullName = mkOpt types.str "Christoph Hollizeck" "The full name of the user.";
email = mkOpt types.str "christoph.hollizeck@hey.com" "The email of the user.";
home = mkOpt (types.nullOr types.str) home-directory "The user's home directory.";
};
config = mkIf cfg.enable (mkMerge [
{
assertions = [
{
assertion = cfg.name != null;
message = "${namespace}.user.name must be set";
}
{
assertion = cfg.home != null;
message = "${namespace}.user.home must be set";
}
];
home = {
username = mkDefault cfg.name;
homeDirectory = mkDefault cfg.home;
};
}
]);
}

View file

@ -0,0 +1,81 @@
{
config,
...
}:
let
in
{
flake.modules.nixos."hosts/yggdrasil" =
{ lib, pkgs, ... }:
{
imports =
with config.flake.modules.nixos;
[
# System modules
base
# Users
cholli
]
++ [
{
home-manager.users.cholli = {
imports = with config.flake.modules.homeManager; [
base
];
};
}
];
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.availableKernelModules = [
"nvme"
"ahci"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
kernelModules = [ "kvm-amd" ];
};
services.fstrim.enable = true;
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/b1a956f4-91d5-456e-a92b-be505bb719bd";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-uuid/B4D4-8BA0";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
"/storage" = {
device = "/dev/disk/by-uuid/c3c1dec1-7716-4c37-a3f2-bb60f9af84fd";
fsType = "ext4";
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/4bec00ec-e9eb-4034-836a-ecf15e0bb40e"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = true;
};
}

View file

@ -1,50 +0,0 @@
# System configuration
## apps
These contain specialized configurations some simple some more complex to enable programs and everything around them.
This section also has a subsection `cli-apps` which is exclusively for apps that live in your terminal.
## [archetypes](./archetypes/README.md)
This section contains configurations that enable whole system types at once, check out the more in depth Readme in that section
Planned archetypes are:
- gaming (this is mostly fleshed out since I use it on my main machine)
- wsl
- pi
- minimal-server
- github runner?
## [desktop](./desktop/README.md)
This section contains everything related to GUI.
currently I am using Hyprland, but I was using more or less out of the box KDE for a long time and was very happy with it.
It also has a `addons` section where I plan to put all configurations for things of the hyprland ecosystem and bars such as waybar / ags (in the future).
## security
This has some of the configuration you need for your system to run properly, gpg has the yubikey configuration, the keyring is well a keyring, so that your computer can access the TPM, and also [sops-nix](https://github.com/Mic92/sops-nix) which I would recommend to setup for critical information.
## services
This section is fairly empty, but will be filled up when I start with the server configs.
## [submodules](./submodules/README.md)
This is the smaller archetypes section, just to combine some aspects that are never used alone into one package, such as the basic one that activates all the mandatory things I don't want to write out every time.
## system
This section is home to all of the low level system related configuration, it contains sections for your hardware, keyboard layouts what boot attributes to set, and which fonts to install.
## tools
This section could also be part of the cli-apps section but I want to have more system critical things here e.g Git and direnv both amazing tools that deserve a special spot in this config.
## user
Here you define the user, or I guess users if you have more people using this system, I will think about multi user systems when I need to :D

View file

@ -1,40 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps._1password;
username = config.${namespace}.user.name;
in
{
options.${namespace}.apps._1password = {
enable = mkBoolOpt true "Enable 1Password";
};
config = mkIf cfg.enable {
programs = {
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = [ username ];
};
};
${namespace}.home.file.".ssh/config".text = ''
Host *
ForwardAgent yes
IdentityAgent /home/${username}/.1password/agent.sock
Host loptland
Hostname christophhollizeck.dev
'';
};
}

View file

@ -1,170 +0,0 @@
{
config,
inputs,
lib,
namespace,
pkgs,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption mkOption;
cfg = config.${namespace}.apps.cli-apps.helix;
cachix-url = "https://helix.cachix.org";
cachix-key = "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=";
helix-pkg = inputs.helix.packages.${system}.default;
in
{
options.${namespace}.apps.cli-apps.helix = {
enable = mkEnableOption "Whether to enable helix or not";
pkg = mkOption {
type = lib.types.package;
default = helix-pkg;
description = "Which helix pacakge to use";
};
};
config = mkIf cfg.enable {
environment = {
systemPackages = [
cfg.pkg
];
};
${namespace} = {
home.extraOptions = {
home.file.".config/helix/ignore".text = ''
.idea/
!**/appsettings.json
.direnv/
.devenv/
'';
catppuccin.helix.enable = true;
programs.helix = {
enable = true;
package = helix-pkg;
defaultEditor = true;
settings = {
editor = {
auto-format = true;
line-number = "relative";
file-picker = {
hidden = false;
};
lsp = {
display-inlay-hints = true;
display-messages = true;
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
indent-guides = {
render = true;
character = "|";
};
statusline = {
left = [
"mode"
"spinner"
];
center = [ "file-name" ];
right = [
"workspace-diagnostics"
"diagnostics"
"selections"
"position"
"total-line-numbers"
"spacer"
"file-encoding"
"file-line-ending"
"file-type"
];
separator = "";
};
};
keys = {
normal = {
esc = [
"collapse_selection"
"keep_primary_selection"
];
space = {
space = "file_picker";
};
C-j = (builtins.genList (_: "move_line_down") 5) ++ [ "align_view_center" ];
C-k = (builtins.genList (_: "move_line_up") 5) ++ [ "align_view_center" ];
};
};
};
languages = {
language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
language-servers = [
"nixd"
"nil"
];
}
{
# provided by the dev environment in the rust shell
name = "rust";
auto-format = true;
formatter.command = "cargo fmt";
language-servers = [ "rust-analyzer" ];
}
];
language-server = {
nixd = {
command = "${pkgs.nixd}/bin/nixd";
};
marksman = {
command = "${pkgs.marksman}/bin/marksman";
};
vscode-json-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-json-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
config.json.validate.enable = true;
};
vscode-html-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-html-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
};
vscode-css-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
};
vscode-eslint-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-eslint-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
};
};
};
};
};
nix.extra-substituters.${cachix-url} = {
key = cachix-key;
};
};
};
}

View file

@ -1,39 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.apps.cli-apps.nixvim;
in
{
options.${namespace}.apps.cli-apps.nixvim = {
enable = mkBoolOpt false "Whether to enable nixvim or not (Default true)";
};
config = mkIf cfg.enable {
environment = {
systemPackages = with pkgs; [
less
nvim-pkg
];
variables = {
EDITOR = "nvim";
SUDOEDITOR = "nvim";
PAGER = "less";
MANPAGER = "less";
};
};
${namespace}.home = {
extraOptions = {
# Use Neovim for Git diffs.
programs.fish.shellAliases.vimdiff = "nvim -d";
};
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.discord;
in
{
options.${namespace}.apps.discord = with types; {
enable = mkBoolOpt false "Whether or not to enable basic configuration";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
discord
vesktop
];
};
}

View file

@ -1,28 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.obs-studio;
in
{
options.${namespace}.apps.obs-studio = with types; {
enable = mkBoolOpt false "Whether or not to enable obs-studio";
};
config = mkIf cfg.enable {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-move-transition
];
};
};
}

View file

@ -1,23 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.starsector;
in
{
options.${namespace}.apps.starsector = {
enable = mkEnableOption "Whether or not to enable the game starsector.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
starsector
];
};
}

View file

@ -1,30 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.steam;
in
{
options.${namespace}.apps.steam = {
enable = mkEnableOption "Whether or not to enable support for Steam.";
};
config = mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
environment.systemPackages = with pkgs; [
protontricks
];
};
}

View file

@ -1,19 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.teamspeak;
in
{
options.${namespace}.apps.teamspeak = with types; {
enable = mkBoolOpt false "Whether or not to enable basic configuration";
};
config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ teamspeak6-client ]; };
}

View file

@ -1,37 +0,0 @@
{
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.apps.vivaldi;
in
{
options.${namespace}.apps.vivaldi = with types; {
enable = mkBoolOpt false "Whether or not to enable vivaldi browser";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
vivaldi
vivaldi-ffmpeg-codecs
qt5.qtwayland
];
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
vivaldi-bin
'';
mode = "0755";
};
};
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
};
}

View file

@ -1,40 +0,0 @@
{
config,
inputs,
lib,
namespace,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.apps.zen-browser;
zenbrowser = inputs.zen-browser.packages."${system}".default;
in
{
options.${namespace}.apps.zen-browser = {
enable = mkEnableOption "Whether or not to enable zen browser";
};
config = mkIf cfg.enable {
environment.systemPackages = [
zenbrowser
];
environment.sessionVariables = {
DEFAULT_BROWSER = "${zenbrowser}/bin/zen-beta";
BROWSER = "zen-beta";
};
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
zen
'';
mode = "0755";
};
};
};
}

View file

@ -1,22 +0,0 @@
# Archetypes
## Gaming
This archetype installs Steam and the Prismlauncher, a graphical user interface (KDE) and some other basic functionality.
I want to look into also setting up some factorio configs declarative later. Maybe setup Lutris to allow for some other games aswell.
Currently Steam with proton is working amazingly.
## Workstation
Mainly for Office or daily stuff, libre Office, Pdf readers and the likes come to mind.
## Server
I want to try setting up a DIY NAS at home using nix and maybe a rasberry pie but there is no real concrete plan for now.
## Pi / Homeassistant
> [!WARNING]
> WIP

View file

@ -1,36 +0,0 @@
{
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.archetypes.gaming;
in
{
options.${namespace}.archetypes.gaming = with types; {
enable = mkBoolOpt false "Whether or not to enable the gaming archetype.";
};
config = mkIf cfg.enable {
${namespace} = {
submodules = {
basics = enabled;
games = enabled;
socials = enabled;
};
system.hardware = {
audio = enabled;
};
apps = {
zen-browser = enabled;
};
};
};
}

View file

@ -1,5 +0,0 @@
# Desktop Configurations
Here I have all of my desktop-/windowmanager configuration and their erspective configurable addons.
For now this is mostly reserved for [Hyprland](https://hyprland.org/).

View file

@ -1,43 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.desktop.addons.hypridle;
in
{
options.${namespace}.desktop.addons.hypridle = {
enable = mkEnableOption "Enable HyprIdle";
};
config = mkIf cfg.enable {
${namespace}.home.extraOptions = {
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock-blur";
};
listener = [
{
timeout = 600;
on-timeout = "loginctl lock-session";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
};
};
}

View file

@ -1,136 +0,0 @@
{
config,
inputs,
lib,
namespace,
pkgs,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption;
hyprlock-package = inputs.hyprlock.packages.${system}.hyprlock;
hyprlock-blur = pkgs.writeShellScriptBin "hyprlock-blur" ''
${pkgs.grim}/bin/grim -o DP-1 -l 0 /tmp/screenshot1.png &
${pkgs.grim}/bin/grim -o HDMI-A-1 -l 0 /tmp/screenshot2.png &
wait &&
hyprlock
'';
cfg = config.${namespace}.desktop.addons.hyprlock;
username = config.${namespace}.user.name;
in
{
options.${namespace}.desktop.addons.hyprlock = {
enable = mkEnableOption "Enable Hyprlock";
};
config = mkIf cfg.enable {
security.pam.services.hyprlock = {
allowNullPassword = false;
startSession = false;
text = ''
auth include login
account include login
'';
};
environment.systemPackages = [ hyprlock-blur ];
${namespace}.desktop.hyprland.settings = {
bind = [
"$mod CTRL, l, exec, hyprlock-blur"
];
};
snowfallorg.users.${username}.home.config = {
programs.hyprlock = {
enable = true;
package = hyprlock-package;
settings = {
# inspiration from https://github.com/justinmdickey/publicdots/blob/main/.config/hypr/hyprlock.conf
background = [
{
monitor = "DP-1";
path = "/tmp/screenshot1.png";
blur_passes = 1; # 0 disables blurring
blur_size = 7;
noise = 1.17e-2;
}
{
monitor = "HDMI-A-1";
path = "/tmp/screenshot2.png";
blur_passes = 2; # 0 disables blurring
blur_size = 7;
noise = 1.17e-2;
}
];
label = [
{
monitor = "DP-1";
text = "$TIME";
color = "rgba(242, 243, 244, 0.75)";
font_size = 95;
font_family = "JetBrains Mono";
position = "0, 300";
halign = "center";
valign = "center";
}
{
monitor = "DP-1";
text = ''cmd[update:1000] echo $(date +"%A, %B %d")'';
color = "rgba(242, 243, 244, 0.75)";
font_size = 22;
font_family = "JetBrains Mono";
position = "0, 200";
halign = "center";
valign = "center";
}
];
image = {
monitor = "DP-1";
path = "/home/${username}/Pictures/profile.png";
position = "0, 50";
halign = "center";
valign = "center";
};
input-field = {
monitor = "DP-1";
size = "200,50";
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.35; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
outer_color = "rgba(0, 0, 0, 0)";
inner_color = "rgba(0, 0, 0, 0.2)";
font_color = "rgb(111, 45, 104)";
fade_on_empty = false;
rounding = -1;
check_color = "rgb(30, 107, 204)";
placeholder_text = ''<i><span foreground="##cdd6f4">Input Password...</span></i>'';
hide_input = false;
position = "0, -100";
halign = "center";
valign = "center";
};
general = {
auth_method = "pam";
};
};
};
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 MiB

View file

@ -1,510 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib)
mkIf
mkEnableOption
;
cfg = config.${namespace}.desktop.addons.hyprpanel;
username = config.${namespace}.user.name;
in
{
options.${namespace}.desktop.addons.hyprpanel = {
enable = mkEnableOption "Enable HyprIdle";
};
config = mkIf cfg.enable {
snowfallorg.users.${username}.home.config = {
wayland.windowManager.hyprland.settings.exec-once = [
"${pkgs.hyprpanel}/bin/hyprpanel"
];
programs.hyprpanel = {
enable = true;
settings = {
menus.dashboard.powermenu.avatar.image = "/home/cholli/Pictures/profile.png";
bar = {
launcher.autoDetectIcon = true;
workspaces = {
show_icons = false;
show_numbered = true;
};
layouts = {
"0" = {
"left" = [
"dashboard"
"workspaces"
];
"middle" = [
"windowtitle"
];
"right" = [
"volume"
"bluetooth"
"cputemp"
"cpu"
"ram"
"systray"
"clock"
"notifications"
];
};
"1" = {
"left" = [
"workspaces"
];
"right" = [
"clock"
];
};
};
customModules = {
ram = {
icon = " ";
labelType = "used/total";
};
cpu = {
icon = " ";
leftClick = "kitty --hold btop";
};
cpuTemp = {
sensor = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp3_input";
unit = "metric";
showUnit = true;
};
};
clock.format = "%a %b %d %H:%M:%S";
notifications = {
show_total = true;
hideCountWhenZero = false;
};
};
layouts = {
"0" = {
left = [
"dashboard"
"workspaces"
];
middle = [ "windowtitle" ];
right = [
"volume"
"bluetooth"
"cputemp"
"cpu"
"ram"
"systray"
"clock"
"notifications"
];
};
"1" = {
left = [ "workspaces" ];
right = [ "clock" ];
};
};
theme = {
bar = {
floating = true;
background = "#11111b";
border.color = "#b4befe";
buttons = {
background = "#242438";
battery.background = "#242438";
battery.border = "#f9e2af";
battery.icon = "#242438";
battery.icon_background = "#f9e2af";
battery.text = "#f9e2af";
bluetooth.background = "#242438";
bluetooth.border = "#89dceb";
bluetooth.icon = "#1e1e2e";
bluetooth.icon_background = "#89dbeb";
bluetooth.text = "#89dceb";
borderColor = "#b4befe";
clock.background = "#242438";
clock.border = "#f5c2e7";
clock.icon = "#232338";
clock.icon_background = "#f5c2e7";
clock.text = "#f5c2e7";
dashboard.background = "#f9e2af";
dashboard.border = "#f9e2af";
dashboard.icon = "#1e1e2e";
hover = "#45475a";
icon = "#242438";
icon_background = "#b4befe";
media.background = "#242438";
media.border = "#b4befe";
media.icon = "#1e1e2e";
media.icon_background = "#b4befe";
media.text = "#b4befe";
modules.cava.background = "#242438";
modules.cava.border = "#94e2d5";
modules.cava.icon = "#242438";
modules.cava.icon_background = "#94e2d5";
modules.cava.text = "#94e2d5";
modules.cpu.background = "#242438";
modules.cpu.border = "#f38ba8";
modules.cpu.icon = "#181825";
modules.cpu.icon_background = "#f38ba8";
modules.cpu.text = "#f38ba8";
modules.hypridle.background = "#242438";
modules.hypridle.border = "#f5c2e7";
modules.hypridle.icon = "#242438";
modules.hypridle.icon_background = "#f5c2e7";
modules.hypridle.text = "#f5c2e7";
modules.hyprsunset.background = "#242438";
modules.hyprsunset.border = "#fab387";
modules.hyprsunset.icon = "#242438";
modules.hyprsunset.icon_background = "#fab387";
modules.hyprsunset.text = "#fab387";
modules.kbLayout.background = "#242438";
modules.kbLayout.border = "#89dceb";
modules.kbLayout.icon = "#181825";
modules.kbLayout.icon_background = "#89dceb";
modules.kbLayout.text = "#89dceb";
modules.microphone.background = "#242438";
modules.microphone.border = "#a6e3a1";
modules.microphone.icon = "#242438";
modules.microphone.icon_background = "#a6e3a1";
modules.microphone.text = "#a6e3a1";
modules.netstat.background = "#242438";
modules.netstat.border = "#a6e3a1";
modules.netstat.icon = "#181825";
modules.netstat.icon_background = "#a6e3a1";
modules.netstat.text = "#a6e3a1";
modules.power.background = "#242438";
modules.power.border = "#f38ba8";
modules.power.icon = "#181825";
modules.power.icon_background = "#f38ba8";
modules.ram.background = "#242438";
modules.ram.border = "#f9e2af";
modules.ram.icon = "#181825";
modules.ram.icon_background = "#f9e2af";
modules.ram.text = "#f9e2af";
modules.storage.background = "#242438";
modules.storage.border = "#f5c2e7";
modules.storage.icon = "#181825";
modules.storage.icon_background = "#f5c2e7";
modules.storage.text = "#f5c2e7";
modules.submap.background = "#242438";
modules.submap.border = "#94e2d5";
modules.submap.icon = "#181825";
modules.submap.icon_background = "#94e2d5";
modules.submap.text = "#94e2d5";
modules.updates.background = "#242438";
modules.updates.border = "#cba6f7";
modules.updates.icon = "#181825";
modules.updates.icon_background = "#cba6f7";
modules.updates.text = "#cba6f7";
modules.weather.background = "#242438";
modules.weather.border = "#b4befe";
modules.weather.icon = "#242438";
modules.weather.icon_background = "#b4befe";
modules.weather.text = "#b4befe";
modules.worldclock.background = "#242438";
modules.worldclock.border = "#f5c2e7";
modules.worldclock.icon = "#242438";
modules.worldclock.icon_background = "#f5c2e7";
modules.worldclock.text = "#f5c2e7";
network.background = "#242438";
network.border = "#cba6f7";
network.icon = "#242438";
network.icon_background = "#caa6f7";
network.text = "#cba6f7";
notifications.background = "#242438";
notifications.border = "#b4befe";
notifications.icon = "#1e1e2e";
notifications.icon_background = "#b4befe";
notifications.total = "#b4befe";
style = "split";
systray.background = "#242438";
systray.border = "#b4befe";
systray.customIcon = "#cdd6f4";
text = "#b4befe";
volume.background = "#242438";
volume.border = "#eba0ac";
volume.icon = "#242438";
volume.icon_background = "#eba0ac";
volume.text = "#eba0ac";
windowtitle.background = "#242438";
windowtitle.border = "#f5c2e7";
windowtitle.icon = "#1e1e2e";
windowtitle.icon_background = "#f5c2e7";
windowtitle.text = "#f5c2e7";
workspaces.active = "#f5c2e7";
workspaces.available = "#89dceb";
workspaces.background = "#242438";
workspaces.border = "#f5c2e7";
workspaces.hover = "#f5c2e7";
workspaces.numbered_active_highlighted_text_color = "#181825";
workspaces.numbered_active_underline_color = "#f5c2e7";
workspaces.occupied = "#f2cdcd";
y_margins = "0.2em";
};
menus = {
background = "#11111b";
border.color = "#313244";
buttons.active = "#f5c2e6";
buttons.default = "#b4befe";
buttons.disabled = "#585b71";
buttons.text = "#181824";
cards = "#1e1e2e";
check_radio_button.active = "#b4beff";
check_radio_button.background = "#45475a";
dimtext = "#585b70";
dropdownmenu.background = "#11111b";
dropdownmenu.divider = "#1e1e2e";
dropdownmenu.text = "#cdd6f4";
feinttext = "#313244";
iconbuttons.active = "#b4beff";
iconbuttons.passive = "#cdd6f3";
icons.active = "#b4befe";
icons.passive = "#585b70";
label = "#b4befe";
listitems.active = "#b4befd";
listitems.passive = "#cdd6f4";
menu = {
battery.background.color = "#11111b";
battery.border.color = "#313244";
battery.card.color = "#1e1e2e";
battery.icons.active = "#f9e2af";
battery.icons.passive = "#9399b2";
battery.label.color = "#f9e2af";
battery.listitems.active = "#f9e2af";
battery.listitems.passive = "#cdd6f3";
battery.slider.background = "#585b71";
battery.slider.backgroundhover = "#45475a";
battery.slider.primary = "#f9e2af";
battery.slider.puck = "#6c7086";
battery.text = "#cdd6f4";
bluetooth.background.color = "#11111b";
bluetooth.border.color = "#313244";
bluetooth.card.color = "#1e1e2e";
bluetooth.iconbutton.active = "#89dceb";
bluetooth.iconbutton.passive = "#cdd6f4";
bluetooth.icons.active = "#89dceb";
bluetooth.icons.passive = "#9399b2";
bluetooth.label.color = "#89dceb";
bluetooth.listitems.active = "#89dcea";
bluetooth.listitems.passive = "#cdd6f4";
bluetooth.scroller.color = "#89dceb";
bluetooth.status = "#6c7086";
bluetooth.switch.disabled = "#313245";
bluetooth.switch.enabled = "#89dceb";
bluetooth.switch.puck = "#454759";
bluetooth.switch_divider = "#45475a";
bluetooth.text = "#cdd6f4";
clock.background.color = "#11111b";
clock.border.color = "#313244";
clock.calendar.contextdays = "#585b70";
clock.calendar.currentday = "#f5c2e7";
clock.calendar.days = "#cdd6f4";
clock.calendar.paginator = "#f5c2e6";
clock.calendar.weekdays = "#f5c2e7";
clock.calendar.yearmonth = "#94e2d5";
clock.card.color = "#1e1e2e";
clock.text = "#cdd6f4";
clock.time.time = "#f5c2e7";
clock.time.timeperiod = "#94e2d5";
clock.weather.hourly.icon = "#f5c2e7";
clock.weather.hourly.temperature = "#f5c2e7";
clock.weather.hourly.time = "#f5c2e7";
clock.weather.icon = "#f5c2e7";
clock.weather.stats = "#f5c2e7";
clock.weather.status = "#94e2d5";
clock.weather.temperature = "#cdd6f4";
clock.weather.thermometer.cold = "#89b4fa";
clock.weather.thermometer.extremelycold = "#89dceb";
clock.weather.thermometer.extremelyhot = "#f38ba8";
clock.weather.thermometer.hot = "#fab387";
clock.weather.thermometer.moderate = "#b4befe";
dashboard.background.color = "#11111b";
dashboard.border.color = "#313244";
dashboard.card.color = "#1e1e2e";
dashboard.controls.bluetooth.background = "#89dceb";
dashboard.controls.bluetooth.text = "#181824";
dashboard.controls.disabled = "#585b70";
dashboard.controls.input.background = "#f5c2e7";
dashboard.controls.input.text = "#181824";
dashboard.controls.notifications.background = "#f9e2af";
dashboard.controls.notifications.text = "#181824";
dashboard.controls.volume.background = "#eba0ac";
dashboard.controls.volume.text = "#181824";
dashboard.controls.wifi.background = "#cba6f7";
dashboard.controls.wifi.text = "#181824";
dashboard.directories.left.bottom.color = "#eba0ac";
dashboard.directories.left.middle.color = "#f9e2af";
dashboard.directories.left.top.color = "#f5c2e7";
dashboard.directories.right.bottom.color = "#b4befe";
dashboard.directories.right.middle.color = "#cba6f7";
dashboard.directories.right.top.color = "#94e2d5";
dashboard.monitors.bar_background = "#45475a";
dashboard.monitors.cpu.bar = "#eba0ad";
dashboard.monitors.cpu.icon = "#eba0ac";
dashboard.monitors.cpu.label = "#eba0ac";
dashboard.monitors.disk.bar = "#f5c2e8";
dashboard.monitors.disk.icon = "#f5c2e7";
dashboard.monitors.disk.label = "#f5c2e7";
dashboard.monitors.gpu.bar = "#a6e3a2";
dashboard.monitors.gpu.icon = "#a6e3a1";
dashboard.monitors.gpu.label = "#a6e3a1";
dashboard.monitors.ram.bar = "#f9e2ae";
dashboard.monitors.ram.icon = "#f9e2af";
dashboard.monitors.ram.label = "#f9e2af";
dashboard.powermenu.confirmation.background = "#11111b";
dashboard.powermenu.confirmation.body = "#cdd6f4";
dashboard.powermenu.confirmation.border = "#313244";
dashboard.powermenu.confirmation.button_text = "#11111a";
dashboard.powermenu.confirmation.card = "#1e1e2e";
dashboard.powermenu.confirmation.confirm = "#a6e3a1";
dashboard.powermenu.confirmation.deny = "#f38ba8";
dashboard.powermenu.confirmation.label = "#b4befe";
dashboard.powermenu.logout = "#a6e3a1";
dashboard.powermenu.restart = "#fab387";
dashboard.powermenu.shutdown = "#f38ba8";
dashboard.powermenu.sleep = "#89dceb";
dashboard.profile.name = "#f5c2e7";
dashboard.shortcuts.background = "#b4befe";
dashboard.shortcuts.recording = "#a6e3a1";
dashboard.shortcuts.text = "#181824";
media.album = "#f5c2e8";
media.artist = "#94e2d6";
media.background.color = "#11111b";
media.border.color = "#313244";
media.buttons.background = "#b4beff";
media.buttons.enabled = "#94e2d4";
media.buttons.inactive = "#585b70";
media.buttons.text = "#11111b";
media.card.color = "#1e1e2e";
media.slider.background = "#585b71";
media.slider.backgroundhover = "#45475a";
media.slider.primary = "#f5c2e7";
media.slider.puck = "#6c7086";
media.song = "#b4beff";
media.timestamp = "#cdd6f4";
network.background.color = "#11111b";
network.border.color = "#313244";
network.card.color = "#1e1e2e";
network.iconbuttons.active = "#cba6f7";
network.iconbuttons.passive = "#cdd6f4";
network.icons.active = "#cba6f7";
network.icons.passive = "#9399b2";
network.label.color = "#cba6f7";
network.listitems.active = "#cba6f6";
network.listitems.passive = "#cdd6f4";
network.scroller.color = "#cba6f7";
network.status.color = "#6c7086";
network.switch.disabled = "#313245";
network.switch.enabled = "#cba6f7";
network.switch.puck = "#454759";
network.text = "#cdd6f4";
notifications.background = "#11111b";
notifications.border = "#313244";
notifications.card = "#1e1e2e";
notifications.clear = "#f38ba8";
notifications.label = "#b4befe";
notifications.no_notifications_label = "#313244";
notifications.pager.background = "#11111b";
notifications.pager.button = "#b4befe";
notifications.pager.label = "#9399b2";
notifications.scrollbar.color = "#b4befe";
notifications.switch.disabled = "#313245";
notifications.switch.enabled = "#b4befe";
notifications.switch.puck = "#454759";
notifications.switch_divider = "#45475a";
power.background.color = "#11111b";
power.border.color = "#313244";
power.buttons.logout.background = "#1e1e2e";
power.buttons.logout.icon = "#181824";
power.buttons.logout.icon_background = "#a6e3a1";
power.buttons.logout.text = "#a6e3a1";
power.buttons.restart.background = "#1e1e2e";
power.buttons.restart.icon = "#181824";
power.buttons.restart.icon_background = "#fab387";
power.buttons.restart.text = "#fab387";
power.buttons.shutdown.background = "#1e1e2e";
power.buttons.shutdown.icon = "#181824";
power.buttons.shutdown.icon_background = "#f38ba7";
power.buttons.shutdown.text = "#f38ba8";
power.buttons.sleep.background = "#1e1e2e";
power.buttons.sleep.icon = "#181824";
power.buttons.sleep.icon_background = "#89dceb";
power.buttons.sleep.text = "#89dceb";
systray.dropdownmenu.background = "#11111b";
systray.dropdownmenu.divider = "#1e1e2e";
systray.dropdownmenu.text = "#cdd6f4";
volume.audio_slider.background = "#585b71";
volume.audio_slider.backgroundhover = "#45475a";
volume.audio_slider.primary = "#eba0ac";
volume.audio_slider.puck = "#585b70";
volume.background.color = "#11111b";
volume.border.color = "#313244";
volume.card.color = "#1e1e2e";
volume.iconbutton.active = "#eba0ac";
volume.iconbutton.passive = "#cdd6f4";
volume.icons.active = "#eba0ac";
volume.icons.passive = "#9399b2";
volume.input_slider.background = "#585b71";
volume.input_slider.backgroundhover = "#45475a";
volume.input_slider.primary = "#eba0ac";
volume.input_slider.puck = "#585b70";
volume.label.color = "#eba0ac";
volume.listitems.active = "#eba0ab";
volume.listitems.passive = "#cdd6f4";
volume.text = "#cdd6f4";
};
popover.background = "#181824";
popover.border = "#181824";
popover.text = "#b4befe";
progressbar.background = "#45475a";
progressbar.foreground = "#b4befe";
slider.background = "#585b71";
slider.backgroundhover = "#45475a";
slider.primary = "#b4befe";
slider.puck = "#6c7086";
switch.disabled = "#313245";
switch.enabled = "#b4befe";
switch.puck = "#454759";
text = "#cdd6f4";
tooltip.background = "#11111b";
tooltip.text = "#cdd6f4";
};
outer_spacing = "0.0em";
transparent = true;
};
notification.actions.background = "#b4befd";
notification.actions.text = "#181825";
notification.background = "#181826";
notification.border = "#313243";
notification.close_button.background = "#f38ba7";
notification.close_button.label = "#11111b";
notification.label = "#b4befe";
notification.labelicon = "#b4befe";
notification.text = "#cdd6f4";
notification.time = "#7f849b";
osd.bar_color = "#b4beff";
osd.bar_container = "#11111b";
osd.bar_empty_color = "#313244";
osd.bar_overflow_color = "#f38ba7";
osd.icon = "#11111b";
osd.icon_container = "#b4beff";
osd.label = "#b4beff";
};
};
};
};
};
}

View file

@ -1,41 +0,0 @@
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.desktop.addons.hyprpaper;
username = config.${namespace}.user.name;
picture-path = "/home/${username}/Pictures/firewatch.jpg";
in
{
options.${namespace}.desktop.addons.hyprpaper = {
enable = mkEnableOption "Enable Hyprpaper";
};
config = mkIf cfg.enable {
snowfallorg.users.${username}.home.config = {
home.file = {
# https://www.reddit.com/r/WidescreenWallpaper/comments/13hib3t/purple_firewatch_3840x1620/
"Pictures/firewatch.jpg".source = ./firewatch.jpg;
};
wayland.windowManager.hyprland.settings.exec-once = [
''hyprctl hyprpaper wallpaper "DP-1,${picture-path}"''
];
services.hyprpaper = {
enable = true;
settings = {
preload = [ picture-path ];
wallpaper = "DP-1,${picture-path}";
};
};
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View file

@ -1,134 +0,0 @@
/*Dracula theme based on the Purple official rofi theme*/
/* https://github.com/dracula/rofi/tree/main */
configuration {
show-icons: true;
display-drun: "";
disable-history: false;
}
* {
font: "Jetbrains Mono 12";
foreground: #f8f8f2;
background-color: #282a36;
active-background: #6272a4;
urgent-background: #ff5555;
urgent-foreground: #282a36;
selected-background: @active-background;
selected-urgent-background: @urgent-background;
selected-active-background: @active-background;
separatorcolor: @active-background;
bordercolor: @active-background;
}
#window {
background-color: @background-color;
border: 3;
border-radius: 6;
border-color: @bordercolor;
padding: 15;
}
#mainbox {
border: 0;
padding: 0;
}
#message {
border: 0px;
border-color: @separatorcolor;
padding: 1px;
}
#textbox {
text-color: @foreground;
}
#listview {
fixed-height: 0;
border: 0px;
border-color: @bordercolor;
spacing: 2px ;
scrollbar: false;
padding: 2px 0px 0px ;
}
#element {
border: 0;
padding: 3px ;
}
#element.normal.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
#element.normal.active {
background-color: @active-background;
text-color: @foreground;
}
#element.selected.normal {
background-color: @selected-background;
text-color: @foreground;
}
#element.selected.urgent {
background-color: @selected-urgent-background;
text-color: @foreground;
}
#element.selected.active {
background-color: @selected-active-background;
text-color: @foreground;
}
#element.alternate.normal {
background-color: @background-color;
text-color: @foreground;
}
#element.alternate.urgent {
background-color: @urgent-background;
text-color: @foreground;
}
#element.alternate.active {
background-color: @active-background;
text-color: @foreground;
}
#scrollbar {
width: 2px ;
border: 0;
handle-width: 8px ;
padding: 0;
}
#sidebar {
border: 2px dash 0px 0px ;
border-color: @separatorcolor;
}
#button.selected {
background-color: @selected-background;
text-color: @foreground;
}
#inputbar {
spacing: 0;
text-color: @foreground;
padding: 1px ;
}
#case-indicator {
spacing: 0;
text-color: @foreground;
}
#entry {
spacing: 0;
text-color: @foreground;
}
#prompt {
spacing: 0;
text-color: @foreground;
}
#inputbar {
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
expand: false;
str: ">";
margin: 0px 0.3em 0em 0em ;
text-color: @foreground;
}
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}

View file

@ -1,35 +0,0 @@
{
config,
namespace,
options,
pkgs,
lib,
...
}:
let
cfg = config.${namespace}.desktop.addons.rofi;
inherit (lib)
mkIf
mkEnableOption
mkOption
types
;
in
{
options.${namespace}.desktop.addons.rofi = {
enable = mkEnableOption "Rofi";
package = mkOption {
type = types.package;
default = pkgs.rofi;
description = "The package to use for Rofi";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
${namespace}.home.file = {
".config/rofi/config.rasi".source = ./config.rasi;
};
};
}

View file

@ -1,194 +0,0 @@
{
"layer": "top",
"height": 42,
"position": "top",
"mod": "dock",
"margin-left": 10,
"margin-right": 10,
"margin-top": 7,
"margin-bottom": 0,
"exclusive": true,
"passthrough": false,
"gtk-layer-shell": true,
"reload_style_on_change": true,
"modules-left": [
"custom/smallspacer",
"hyprland/workspaces",
"custom/spacer"
],
"modules-center": [
"custom/padd",
"custom/l_end",
"custom/r_end",
"hyprland/window",
"custom/padd"
],
"modules-right": [
"custom/padd",
"custom/l_end",
"tray",
"custom/smallspacer",
"pulseaudio",
"pulseaudio/slider",
"memory",
"cpu",
"clock",
"custom/padd"
],
"custom/smallspacer": {
"format": ""
},
"memory": {
"interval": 1,
"rotate": 270,
"format": "{icon}",
"format-icons": [
"󰝦",
"󰪞",
"󰪟",
"󰪠",
"󰪡",
"󰪢",
"󰪣",
"󰪤",
"󰪥"
],
"max-length": 10
},
"cpu": {
"interval": 1,
"format": "{icon}",
"rotate": 270,
"format-icons": [
"󰝦",
"󰪞",
"󰪟",
"󰪠",
"󰪡",
"󰪢",
"󰪣",
"󰪤",
"󰪥"
]
},
"tray": {
"icon-size": 18,
"rotate": 0,
"spacing": 3
},
"hyprland/window": {
"format": "<span weight='bold' >{initialTitle}</span>",
"max-length": 120,
"separate-outputs": true,
"icon": false,
"icon-size": 18
},
"custom/spacer": {
"format": "|"
},
"hyprland/workspaces": {
"format": "{icon}",
"format-icons": {
"default": "",
"active": ""
}
},
"wlr/workspaces": {
"persistent-workspaces": {
"1": [
"DP-2"
],
"2": [
"HDMI-A-1"
],
"3": [
"DP-2"
],
"4": [
"HDMI-A-1"
]
}
},
"idle_inhibitor": {
"format": "{icon}",
"rotate": 0,
"format-icons": {
"activated": "󰥔",
"deactivated": ""
}
},
"clock": {
"format": "{:%H:%M}",
"rotate": 0,
"tooltip-format": "<tt>{calendar}</tt>",
"calendar": {
"mode": "month",
"mode-mon-col": 3,
"on-scroll": 1,
"on-click-right": "mode",
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b>{}</b></span>"
}
}
},
"pulseaudio": {
"format": " {icon}",
"rotate": 0,
"tooltip-format": "{icon} {desc} // {volume}%",
"scroll-step": 5,
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"default": [
"",
"",
""
]
}
},
"custom/l_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/r_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/sl_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/sr_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/rl_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/rr_end": {
"format": " ",
"interval": "once",
"tooltip": false
},
"custom/padd": {
"format": " ",
"interval": "once",
"tooltip": false
},
"pulseaudio/slider": {
"min": 5,
"max": 100,
"rotate": 0,
"device": "pulseaudio",
"scroll-step": 1
}
}

View file

@ -1,47 +0,0 @@
{
lib,
config,
options,
pkgs,
namespace,
...
}:
let
cfg = config.${namespace}.desktop.addons.waybar;
inherit (lib)
mkEnableOption
mkOption
mkIf
types
;
inherit (lib.${namespace}) enabled;
in
{
options.${namespace}.desktop.addons.waybar = {
enable = mkEnableOption "Waybar";
package = mkOption {
type = types.package;
default = pkgs.waybar;
description = "The package to use for Waybar";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
services.upower = enabled;
fonts.packages = with pkgs; [
cascadia-code
jetbrains-mono
maple-mono-NF
material-design-icons
noto-fonts-cjk-sans
];
${namespace}.home.file = {
".config/waybar/config.jsonc".source = ./config.jsonc;
".config/waybar/style.css".source = ./style.css;
};
};
}

View file

@ -1,240 +0,0 @@
* {
font-family: "JetBrains Mono Nerd Font";
font-weight: bold;
font-size: 16px;
}
window#waybar {
background: #0F0F17;
border-radius: 12px;
border: 3px solid rgba(255, 255, 255, 0.1);
}
tooltip {
background: #171717;
color: #A1BDCE;
font-size: 13px;
border-radius: 7px;
border: 2px solid #101a24;
}
#workspaces {
margin-left: 2px;
}
#workspaces button {
color: #86aaec;
margin-left: 2px;
background-color: transparent;
}
#workspaces button.hover {
background-color: transparent;
}
#workspaces button.active {
color: #c296eb;
background-color: transparent;
}
#taskbar button {
box-shadow: none;
text-shadow: none;
font-size: 4px;
padding: 0px;
border-radius: 9px;
margin-bottom: 3px;
margin-left: 0px;
padding-left: 3px;
padding-right: 3px;
margin-right: 0px;
color: @wb-color;
animation: tb_normal 20s ease-in-out 1;
}
#taskbar button.active {
background: @wb-act-bg;
color: @wb-act-color;
margin-left: 3px;
padding-left: 12px;
padding-right: 12px;
margin-right: 3px;
animation: tb_active 20s ease-in-out 1;
transition: all 0.4s cubic-bezier(.55, -0.68, .48, 1.682);
min-height: 9px;
}
#taskbar button:hover {
background: @wb-hvr-bg;
color: @wb-hvr-color;
animation: tb_hover 20s ease-in-out 1;
transition: all 0.3s cubic-bezier(.55, -0.68, .48, 1.682);
}
#tray menu * {
min-height: 16px;
font-weight: bold;
font-size: 13px;
color: #9488e3;
}
#tray menu separator {
min-height: 10px
}
#custom-spacer {
opacity: 0.0;
}
#custom-smallspacer {
opacity: 0.0;
}
#bluetooth {
color: #E6E7E7;
background: #161320;
opacity: 1;
margin: 4px 0px 4px 0px;
padding-left: 4px;
padding-right: 4px;
}
#clock {
color: #A1BDCE;
font-size: 15px;
font-weight: 900;
font-family: "JetBrains Mono Nerd Font";
background: rgba(23, 23, 23, 0.0);
opacity: 1;
margin: 3px 0px 0px 0px;
padding-left: 10px;
padding-right: 10px;
border: none;
}
#pulseaudio {
font-weight: normal;
font-size: 20px;
color: #6F8FDB;
background: rgba(22, 19, 32, 0.0);
opacity: 1;
margin: 0px 0px 0px 0px;
padding-left: 3px;
padding-right: 3px;
}
#cpu {
font-weight: normal;
font-size: 24px;
color: #915CAF;
}
#memory {
font-weight: normal;
font-size: 24px;
color: #E4C9AF;
}
@keyframes blink {
to {
color: #4a4a4a;
}
}
#tray,
#window {
color: #A1BDCE;
font-family: "Martian Mono";
}
#custom-l_end,
#custom-r_end,
#custom-sl_end,
#custom-sr_end,
#custom-rl_end,
#upower#headset,
#upower {
color: #a6d189;
}
#custom-rr_end {
font-weight: normal;
color: #E8EDF0;
background: rgba(23, 23, 23, 0.0);
opacity: 1;
margin: 0px 0px 0px 0px;
padding-left: 4px;
padding-right: 4px;
;
}
#pulseaudio-slider slider {
background: #A1BDCE;
background-color: transparent;
box-shadow: none;
margin-right: 7px;
}
#pulseaudio-slider trough {
margin-top: -3px;
min-width: 90px;
min-height: 10px;
margin-bottom: -4px;
border-radius: 8px;
background: #343434;
}
#pulseaudio-slider highlight {
border-radius: 8px;
background-color: #2096C0;
}
#taskbar {
padding: 1px;
}
#custom-r_end {
border-radius: 0px 7px 7px 0px;
margin-right: 1px;
padding-right: 3px;
}
#custom-l_end {
border-radius: 7px 0px 0px 7px;
margin-left: 1px;
padding-left: 3px;
}
#custom-sr_end {
border-radius: 0px;
margin-right: 1px;
padding-right: 3px;
}
#custom-sl_end {
border-radius: 0px;
margin-left: 1px;
padding-left: 3px;
}
#custom-rr_end {
border-radius: 0px 7px 7px 0px;
margin-right: 1px;
padding-right: 3px;
}
#custom-rl_end {
border-radius: 7px 0px 0px 7px;
margin-left: 1px;
padding-left: 3px;
}
#custom-expand {
min-width: 25px;
color: #A1BDCE;
font-size: 16px;
}

View file

@ -1,43 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
user = config.${namespace}.user.name;
cfg = config.${namespace}.desktop.hyprland;
in
{
options.${namespace}.desktop = {
enable = mkEnableOption "Whether to enable desktop theming";
};
config = mkIf cfg.enable {
${namespace}.home.extraOptions = {
dconf = {
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
};
systemd.user.sessionVariables = config.home-manager.users.${user}.home.sessionVariables;
};
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
};
}

View file

@ -1,398 +0,0 @@
{
config,
inputs,
lib,
pkgs,
system,
namespace,
...
}:
with lib.${namespace};
let
inherit (lib)
mkIf
mkEnableOption
mkOption
mkMerge
types
;
cfg = config.${namespace}.desktop.hyprland;
cachix-url = "https://hyprland.cachix.org";
cachix-key = "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=";
hyprland-package = inputs.hyprland.packages.${system}.hyprland;
focus-1password = pkgs.writeShellScriptBin "focus-or-open-1pass" ''
running=$(hyprctl -j clients | jq -r '.[] | select(.class == "1password") | .workspace.id')
if [[ $running != "" ]]; then
hyprctl dispatch workspace $running
else
# always open on w/space 4
hyprctl dispatch workspace 9
ELECTRON_OZONE_PLATFORM_HINT=x11 1password&
fi
'';
# clipsync = pkgs.writeShellScriptBin "clipsync" ''
# insert() {
# # Read all the piped input into variable.
# value=$(cat)
# wValue="$(wl-paste)"
# xValue="$(xclip -o -selection clipboard)"
# notify() {
# notify-send -u low -c clipboard "$1" "$value"
# }
# if [ "$value" != "$wValue" ]; then
# notify "Wayland"
# echo -n "$value" | wl-copy
# fi
# if [ "$value" != "$xValue" ]; then
# notify "X11"
# echo -n "$value" | xclip -selection clipboard
# fi
# }
# watch() {
# # Wayland -> X11
# wl-paste --type text --watch clipsync insert &
# # X11 -> Wayland
# while clipnotify; do
# xclip -o -selection clipboard | clipsync insert
# done &
# }
# kill() {
# pkill wl-paste
# pkill clipnotify
# pkill xclip
# pkill clipsync
# }
# "$@"
# '';
in
{
options.${namespace}.desktop.hyprland = {
enable = mkEnableOption "Whether to enable hyprland";
settings = mkOption {
type = types.attrs;
default = { };
description = "Additional Hyprland settings to apply.";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
# Auth Agent
hyprpolkitagent
# Notification daemon
libnotify
# Wayland Utilities
wlr-randr
# Clipboard Stuff
wl-clipboard
xclip
clipnotify
# clipsync
# Screenshot Utility
grimblast
# File Manager
xfce.thunar
# clean sddm theme
elegant-sddm
# json cli parser for bash script to focus 1password
jq
focus-1password
hyprpanel
#####
xdg-dbus-proxy
];
programs = {
hyprland = {
enable = true;
package = hyprland-package;
portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland;
withUWSM = true;
};
};
xdg = {
autostart.enable = true;
portal = {
enable = true;
extraPortals = [
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-gtk
];
xdgOpenUsePortal = true;
config = {
common = {
default = [ "*" ];
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
};
hyprland = {
default = [
"hyprland"
"gtk"
];
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
};
};
};
};
services.displayManager.gdm = {
enable = true;
wayland = true;
};
${namespace} = {
desktop = {
enable = true;
addons = {
rofi = {
enable = true;
package = pkgs.rofi-unwrapped;
};
hypridle = enabled;
hyprlock = enabled;
hyprpanel = enabled;
hyprpaper = enabled;
};
};
nix.extra-substituters.${cachix-url} = {
key = cachix-key;
};
home.extraOptions = {
wayland.windowManager.hyprland = {
enable = true;
package = hyprland-package;
plugins = [ inputs.hy3.packages.${system}.hy3 ];
systemd.variables = [ "--all" ];
settings = mkMerge [
{
"$mod" = "SUPER";
exec-once = [
"systemctl --user start hyprpolkitagent"
"[workspace 2 silent] steam"
"[workspace 8 silent] discord"
"[workspace 9 silent] ELECTRON_OZONE_PLATFORM_HINT=x11 1password" # fix for promts not showing up anymore
"[workspace 1 silent] zen-beta"
"${pkgs.xorg.xhost}/bin/xhost +"
];
windowrulev2 = [
#stean is a bit wierd, since it opens in multiple phases, so just move the last window to the workspace
"workspace 2 silent, class:^(steam)$, title:^(Steam)"
# make xwaylandvideobridge window invisible
"opacity 0.0 override, class:^(xwaylandvideobridge)$"
"noanim, class:^(xwaylandvideobridge)$"
"noinitialfocus, class:^(xwaylandvideobridge)$"
"maxsize 1 1, class:^(xwaylandvideobridge)$"
"noblur, class:^(xwaylandvideobridge)$"
];
general = {
layout = "hy3";
gaps_in = 5;
gaps_out = 5;
border_size = 1;
"col.active_border" = "rgba(88888888)";
"col.inactive_border" = "rgba(00000088)";
allow_tearing = true;
resize_on_border = true;
};
misc = {
# hyprchan
force_default_wallpaper = 2;
# focus new windows that want to be focused
focus_on_activate = true;
};
decoration = {
rounding = 16;
blur = {
enabled = true;
brightness = 1.0;
contrast = 1.0;
noise = 1.0e-2;
vibrancy = 0.2;
vibrancy_darkness = 0.5;
passes = 4;
size = 7;
popups = true;
popups_ignorealpha = 0.2;
};
shadow = {
enabled = true;
range = 100;
render_power = 2;
ignore_window = true;
color = "rgba(00000055)";
offset = "0 15";
scale = 0.97;
};
};
animations = {
enabled = true;
animation = [
"border, 1, 2, default"
"fade, 1, 4, default"
"windows, 1, 3, default, popin 80%"
"workspaces, 1, 2, default, slide"
];
};
bind = [
# compositor commands
"$mod SHIFT, R, exec, hyprctl reload"
"$mod SHIFT, Q, killactive,"
"$mod SHIFT, E, exec, pkill Hyprland"
"$mod, F, fullscreen,"
"$mod, G, togglegroup,"
"$mod SHIFT, N, changegroupactive, f"
"$mod SHIFT, P, changegroupactive, b"
"$mod, R, togglesplit,"
"$mod, T, togglefloating,"
"$mod ALT, ,resizeactive,"
"$mod CTRL, left, movecurrentworkspacetomonitor, l"
"$mod CTRL, right, movecurrentworkspacetomonitor, r"
# move focus
"$mod, h, hy3:movefocus, l"
"$mod, j, hy3:movefocus, d"
"$mod, k, hy3:movefocus, u"
"$mod, l, hy3:movefocus, r"
"$mod, left, hy3:movefocus, l"
"$mod, down, hy3:movefocus, d"
"$mod, up, hy3:movefocus, u"
"$mod, right, hy3:movefocus, r"
# move focus
"$mod SHIFT, h, hy3:movewindow, l, once"
"$mod SHIFT, j, hy3:movewindow, d, once"
"$mod SHIFT, k, hy3:movewindow, u, once"
"$mod SHIFT, l, hy3:movewindow, r, once"
"$mod SHIFT, left, hy3:movewindow, l, once"
"$mod SHIFT, down, hy3:movewindow, d, once"
"$mod SHIFT, up, hy3:movewindow, u, once"
"$mod SHIFT, right, hy3:movewindow, r, once"
#run important programs
"$mod, Return, exec, kitty"
"$mod, D, exec, rofi -show drun"
"$mod, P, exec, focus-or-open-1pass"
# "$mod, D, exec, rofi -show combi"
#screenshot
", Print, exec, grimblast copy area"
]
++ (
# workspaces
# binds $mod + [shift +] {1..9} to [move to] workspace {1..9}
builtins.concatLists (
builtins.genList (
i:
let
ws = i + 1;
in
[
"$mod, code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT, code:1${toString i}, hy3:movetoworkspace, ${toString ws}"
]
) 9
)
);
# mouse movements
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
bindl = [
# volume
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindle = [
# volume
", XF86AudioRaiseVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+"
", XF86AudioLowerVolume, exec, wpctl set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-"
];
input = {
kb_layout = "us";
# focus change on cursor move
follow_mouse = 2;
force_no_accel = 1;
accel_profile = "flat";
};
plugin = {
hy3 = {
autotile = {
enable = true;
trigger_width = 800;
trigger_height = 500;
};
};
};
}
cfg.settings
];
};
};
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
ELECTRON_OZONE_PLATFORM_HINT = "auto";
XDG_SESSION_TYPE = "wayland";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QT_QPA_PLATFORM = "wayland;xcb";
};
};
}

View file

@ -1,29 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.desktop.kde;
in
{
options.${namespace}.desktop.kde = with types; {
enable = mkEnableOption "Whether to enable a kde plasma6";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
xdg-utils
kdePackages.qtbase
];
services = {
xserver = enabled;
desktopManager.plasma6 = enabled;
};
};
}

View file

@ -1,38 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.home;
in
{
options.${namespace}.home = with types; {
file = mkOpt attrs { } (mdDoc "A set of files to be managed by home-manager's `home.file`.");
configFile = mkOpt attrs { } (
mdDoc "A set of files to be managed by home-manager's `xdg.configFile`."
);
extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
};
config = {
snowfallorg.users.${config.${namespace}.user.name}.home.config = mkMerge [
{
home.stateVersion = config.system.stateVersion;
home.file = mkAliasDefinitions options.${namespace}.home.file;
xdg.enable = true;
xdg.configFile = mkAliasDefinitions options.${namespace}.home.configFile;
}
config.${namespace}.home.extraOptions
];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
};
};
}

View file

@ -1,107 +0,0 @@
{
config,
inputs,
lib,
namespace,
pkgs,
system,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.nix;
substituters-submodule = types.submodule (
{ name, ... }:
{
options = with types; {
key = mkOpt (nullOr str) null "The trusted public key for this substituter.";
};
}
);
in
{
options.${namespace}.nix = with types; {
enable = mkBoolOpt true "Whether or not to manage nix configuration.";
package = mkOpt package pkgs.lix "Which nix package to use.";
default-substituter = {
url = mkOpt str "https://cache.nixos.org" "The url for the substituter.";
key =
mkOpt str "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"The trusted public key for the substituter.";
};
extra-substituters = mkOpt (attrsOf substituters-submodule) { } "Extra substituters to configure.";
};
config = mkIf cfg.enable {
assertions = mapAttrsToList (name: value: {
assertion = value.key != null;
message = "plusultra.nix.extra-substituters.${name}.key must be set";
}) cfg.extra-substituters;
environment.systemPackages = with pkgs; [
nixfmt-rfc-style
nix-prefetch-git
nix-du
nix-weather
nix-index
nix-output-monitor
];
programs.nh = {
enable = true;
package = inputs.nh-flake.packages.${system}.nh;
flake = "/home/cholli/projects/config";
};
nix =
let
users = [
"root"
config.${namespace}.user.name
"gitea-runner"
] ++ optional config.services.hydra.enable "hydra hydra-www hydra-evaluator hydra-queue-runner";
in
{
package = cfg.package;
settings =
{
experimental-features = "nix-command flakes";
http-connections = 50;
warn-dirty = false;
log-lines = 50;
sandbox = "relaxed";
auto-optimise-store = true;
trusted-users = users;
allowed-users = users;
allowed-uris = "github: https://github.com/ git+https://github.com/ gitlab: https://gitlab.com/ git+https://gitlab.com/";
substituters = [
cfg.default-substituter.url
] ++ (mapAttrsToList (name: value: name) cfg.extra-substituters);
trusted-public-keys = [
cfg.default-substituter.key
] ++ (mapAttrsToList (name: value: value.key) cfg.extra-substituters);
}
// (lib.optionalAttrs config.${namespace}.tools.direnv.enable {
keep-outputs = true;
keep-derivations = true;
});
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
# flake-utils-plus
generateRegistryFromInputs = true;
generateNixPathFromInputs = true;
linkInputs = true;
};
};
}

View file

@ -1,75 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.acme;
in
{
options.${namespace}.security.acme = with lib.types; {
enable = mkEnableOption "Enable sops (Default true)";
email = mkOpt str config.${namespace}.user.email "The email to use.";
sopsFile = mkOption {
type = lib.types.path;
default = lib.snowfall.fs.get-file "secrets/secrets.yaml";
description = "SecretFile";
};
domainname = mkOpt str "christophhollizeck.dev" "domainname to use";
staging = mkOpt bool false "Use staging server for testing or not";
};
config = mkIf cfg.enable {
sops = {
secrets = {
"netcup/customer_number" = {
inherit (cfg) sopsFile;
};
"netcup/api/key" = {
inherit (cfg) sopsFile;
};
"netcup/api/password" = {
inherit (cfg) sopsFile;
};
};
templates = {
"netcup.env" = {
content = ''
NETCUP_CUSTOMER_NUMBER=${config.sops.placeholder."netcup/customer_number"}
NETCUP_API_KEY=${config.sops.placeholder."netcup/api/key"}
NETCUP_API_PASSWORD=${config.sops.placeholder."netcup/api/password"}
NETCUP_PROPAGATION_TIMEOUT=1200
'';
};
};
};
security.acme = {
acceptTerms = true;
defaults = {
inherit (cfg) email;
group = mkIf config.services.nginx.enable "nginx";
reloadServices = optional config.services.nginx.enable "nginx.service";
dnsProvider = "netcup";
environmentFile = config.sops.templates."netcup.env".path;
};
certs."${cfg.domainname}" = {
server = mkIf cfg.staging "https://acme-staging-v02.api.letsencrypt.org/directory";
dnsResolver = "1.1.1.1:53";
extraDomainNames = [ "*.${cfg.domainname}" ];
};
};
};
}

View file

@ -1,70 +0,0 @@
{
config,
inputs,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.gpg;
gpgConf = "${inputs.gpg-base-conf}/gpg.conf";
gpgAgentConf = ''
enable-ssh-support
default-cache-ttl 60
max-cache-ttl 120
pinentry-program ${pkgs.pinentry-qt}/bin/pinentry-qt
'';
reload-yubikey = pkgs.writeShellScriptBin "reload-yubikey" ''
${pkgs.gnupg}/bin/gpg-connect-agent "scd serialno" "learn --force" /bye
'';
in
{
options.${namespace}.security.gpg = with types; {
enable = mkBoolOpt false "Wether or not to enable GPG.";
agentTimeout = mkOpt int 5 "The amount of time to wait before continuing with shell init.";
};
config = mkIf cfg.enable {
services.pcscd.enable = true;
services.udev.packages = with pkgs; [ yubikey-personalization ];
environment.systemPackages = with pkgs; [
cryptsetup
paperkey
gnupg
pinentry-curses
pinentry-qt
yubikey-manager
yubioath-flutter
reload-yubikey
];
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
enableExtraSocket = true;
};
};
${namespace} = {
home.file = {
".gnupg/.keep".text = "";
".gnupg/gpg.conf".source = gpgConf;
".gnupg/gpg-agent.conf".text = gpgAgentConf;
".gnupg/scdeamon.conf".text = "disable-ccid";
};
};
};
}

View file

@ -1,30 +0,0 @@
{
options,
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt;
cfg = config.${namespace}.security.keyring;
in
{
options.${namespace}.security.keyring = {
enable = mkBoolOpt true "Whether to enable gnome keyring.";
};
config = mkIf cfg.enable {
services.gnome.gnome-keyring.enable = true;
security.pam.services.gdm.enableGnomeKeyring = true;
services.dbus.packages = [
pkgs.gnome-keyring
pkgs.gcr
];
environment.systemPackages = [ pkgs.seahorse ];
};
}

View file

@ -1,33 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.sops;
in
{
options.${namespace}.security.sops = with types; {
enable = mkBoolOpt true "Enable sops (Default true)";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
sops
age
ssh-to-age
];
sops = {
defaultSopsFile = lib.snowfall.fs.get-file "secrets/secrets.yaml";
defaultSopsFormat = "yaml";
# age.keyFile = "/home/cholli/.config/sops/age/keys.txt";
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
};
};
}

View file

@ -1,56 +0,0 @@
{
config,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.syncthing;
user = config.${namespace}.user;
in
{
options.${namespace}.security.syncthing = with types; {
enable = mkEnableOption "Enable Syncthing";
};
config = mkIf cfg.enable {
services.syncthing = {
enable = true;
user = user.name;
dataDir = "/home/" + user.name + "/Documents";
configDir = "/home/" + user.name + "/Documents/.config/syncthing";
settings = {
folders = {
"Documents" = {
# Name of folder in Syncthing, also the folder ID
path = "/home/" + user.name + "/Documents"; # Which folder to add to Syncthing
};
"Pictures" = {
path = "/home/" + user.name + "/Pictures";
};
"7vfj7-k83xj" = {
path = "/home/" + user.name + "/WhatsApp Documents";
};
};
gui = {
theme = "black";
};
};
};
# Syncthing ports: 8384 for remote access to GUI
# 22000 TCP and/or UDP for sync traffic
# 21027/UDP for discovery
# source: https://docs.syncthing.net/users/firewall.html
networking.firewall.allowedTCPPorts = [
8384
22000
];
networking.firewall.allowedUDPPorts = [
22000
21027
];
};
}

View file

@ -1,79 +0,0 @@
{
lib,
config,
namespace,
pkgs,
...
}:
with lib.${namespace};
let
cfg = config.${namespace}.services.factorio-server;
inherit (lib) mkIf mkOption mkEnableOption;
in
{
options.${namespace}.services.factorio-server = {
enable = mkEnableOption "Enable Factorio Headless Server";
sopsFile = mkOption {
type = lib.types.path;
default = lib.snowfall.fs.get-file "secrets/secrets.yaml";
description = "SecretFile";
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.factorio-headless ];
sops = {
secrets = {
"factorio/token" = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
"factorio/username" = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
"factorio/game_password" = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
};
templates."extraSettingsFile.json".content = ''
{
"name": "Pyanodons Holli",
"description": "Trying to run a factorio-headless-server on my nix system",
"tags": ["vanilla"],
"max_players": 10,
"game_password": "${config.sops.placeholder."factorio/game_password"}",
"allow_commands": "admins-only",
"autosave_slots": 5,
"ignore_player_limit_for_returning_players": true,
"username" : "${config.sops.placeholder."factorio/username"}",
"token": "${config.sops.placeholder."factorio/token"}"
}
'';
templates."extraSettingsFile.json".mode = "0444";
};
systemd.tmpfiles.rules = [
"Z /var/lib/factorio/mods 770 65400 65400 - -"
"Z /var/lib/factorio/saves 770 65400 65400 - -"
];
services.factorio = {
enable = true;
openFirewall = true;
public = true;
lan = true;
nonBlockingSaving = true;
autosave-interval = 5;
saveName = "Pyanodons";
loadLatestSave = true;
admins = [
"daholli"
"galbrain"
"geigeabc"
];
extraSettingsFile = config.sops.templates."extraSettingsFile.json".path;
};
};
}

View file

@ -1,182 +0,0 @@
{
lib,
config,
namespace,
pkgs,
...
}:
with lib.${namespace};
let
cfg = config.${namespace}.services.gitea-runner;
inherit (lib) mkIf mkOption mkEnableOption;
inherit (lib.types)
attrsOf
package
path
submodule
str
;
in
{
options.${namespace}.services.gitea-runner = {
enable = mkEnableOption "Enable gitea/forgejo runner";
git-url = mkOption {
type = str;
default = "https://git.christophhollizeck.dev";
};
sopsFile = mkOption {
type = path;
default = lib.snowfall.fs.get-file "secrets/secrets.yaml";
description = "SecretFile";
};
runner-package = mkOption {
type = package;
default = pkgs.forgejo-actions-runner;
description = "Which runner to use Gitea/Forgjo";
};
## taken from nixos/modules/services/continuous-integration/gitea-actions-runner.nix
runner-instances = mkOption {
default = { };
description = ''
Gitea Actions Runner instances.
'';
type = attrsOf (submodule {
options = {
enable = mkEnableOption "Gitea Actions Runner instance";
name = mkOption {
type = str;
example = literalExpression "config.networking.hostName";
description = ''
The name identifying the runner instance towards the Gitea/Forgejo instance.
'';
};
url = mkOption {
type = str;
example = "https://forge.example.com";
description = ''
Base URL of your Gitea/Forgejo instance.
'';
};
tokenFile = mkOption {
type = nullOr (either str path);
default = null;
description = ''
Path to an environment file, containing the `TOKEN` environment
variable, that holds a token to register at the configured
Gitea/Forgejo instance.
'';
};
labels = mkOption {
type = listOf str;
example = literalExpression ''
[
# provide a debian base with nodejs for actions
"debian-latest:docker://node:18-bullseye"
# fake the ubuntu name, because node provides no ubuntu builds
"ubuntu-latest:docker://node:18-bullseye"
# provide native execution on the host
#"native:host"
]
'';
description = ''
Labels used to map jobs to their runtime environment. Changing these
labels currently requires a new registration token.
Many common actions require bash, git and nodejs, as well as a filesystem
that follows the filesystem hierarchy standard.
'';
};
settings = mkOption {
description = ''
Configuration for `act_runner daemon`.
See https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml for an example configuration
'';
type = types.submodule {
freeformType = settingsFormat.type;
};
default = { };
};
hostPackages = mkOption {
type = listOf package;
default = with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
];
defaultText = literalExpression ''
with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
]
'';
description = ''
List of packages, that are available to actions, when the runner is configured
with a host execution label.
'';
};
};
});
};
};
config = mkIf cfg.enable {
sops = {
secrets = {
"forgejo/runner/token" = {
inherit (cfg) sopsFile;
};
};
};
services.gitea-actions-runner = {
package = cfg.runner-package;
instances = {
native = {
enable = true;
name = "monolith";
url = cfg.git-url;
tokenFile = config.sops.secrets."forgejo/runner/token".path;
labels = [
"native:host"
];
hostPackages = with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nodejs
wget
lix
];
settings = {
log.level = "info";
runner = {
capacity = 1;
timeout = "3h";
shutdown_timeout = "5s";
fetch_timeout = "10s";
fetch_inteval = "5s";
};
};
};
} // cfg.runner-instances;
};
};
}

View file

@ -1,40 +0,0 @@
{
lib,
config,
namespace,
...
}:
let
cfg = config.${namespace}.services.hydra;
inherit (lib) mkIf mkOption mkEnableOption;
in
{
options.${namespace}.services.hydra = {
enable = mkEnableOption "Enable Hydra CI";
httpPort = mkOption {
type = lib.types.int;
default = 2000;
description = "The path to host the http server on, relevant for nginx forwarding";
};
enableCache = mkEnableOption "Enable cache using nix-server";
};
config = mkIf cfg.enable {
services.nix-serve = mkIf cfg.enableCache {
enable = true;
secretKeyFile = "/var/cache-priv-key.pem";
};
services.hydra = {
enable = true;
hydraURL = "http://localhost:${toString cfg.httpPort}";
port = cfg.httpPort;
notificationSender = "hydra@localhost";
useSubstitutes = true;
extraConfig = ''
allow-import-from-derivation = 1
'';
};
};
}

View file

@ -1,29 +0,0 @@
{
lib,
config,
namespace,
...
}:
let
cfg = config.${namespace}.services.openssh;
inherit (lib) mkIf mkEnableOption;
in
{
options.${namespace}.services.openssh = {
enable = mkEnableOption "Enable SSH";
};
config = mkIf cfg.enable {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
services.fail2ban = {
enable = true;
};
};
}

View file

@ -1,52 +0,0 @@
{
lib,
config,
namespace,
...
}:
let
cfg = config.${namespace}.services.remotebuild;
inherit (lib) mkIf mkEnableOption;
in
{
options.${namespace}.services.remotebuild = {
enable = mkEnableOption "Enable remotebuild";
};
config = mkIf cfg.enable {
users.users.remotebuild = {
isNormalUser = true;
createHome = false;
group = "remotebuild";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYZjG+XPNoVHVdCel5MK4mwvtoFCqDY1WMI1yoU71Rd root@yggdrasil"
];
};
users.groups.remotebuild = { };
nix = {
nrBuildUsers = 64;
settings = {
trusted-users = [ "remotebuild" ];
min-free = 10 * 1024 * 1024;
max-free = 200 * 1024 * 1024;
max-jobs = "auto";
cores = 0;
};
daemonIOSchedClass = lib.mkDefault "idle";
daemonCPUSchedPolicy = lib.mkDefault "idle";
};
systemd.services.nix-daemon.serviceConfig = {
MemoryAccounting = true;
MemoryMax = "90%";
OOMScoreAdjust = 500;
Slice = "-.slice";
};
};
}

View file

@ -1,19 +0,0 @@
# Submodule Configurations
This is mostly just to make Archetypes configurations look a bit neater and make bitesized collections of programs used in tandem
## basics
Every setup will want this. It handles are the things that you need anyways.
## basics wsl
Just [basics](#basics) without the boot stuff mostly because wsl is a bit special there.
## games
Stuff related to gaming
## socials
If was more active on social media I would have stuff to put here, for now this is just ways to talk to other people e.g discord

View file

@ -1,70 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf;
inherit (lib.${namespace}) mkBoolOpt enabled;
cfg = config.${namespace}.submodules.basics-wsl;
in
{
options.${namespace}.submodules.basics-wsl = {
enable = mkBoolOpt false "Whether or not to enable basic configuration.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
fastfetch
fd
tree
ripgrep
fzf
eza
wslu
wsl-open
zip
unzip
];
${namespace} = {
nix = {
enable = true;
extra-substituters = {
"https://cache.lix.systems" = {
key = "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=";
};
"https://nix-community.cachix.org" = {
key = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
};
"https://nixcache.christophhollizeck.dev" = {
key = "christophhollizeck.dev:7pPAvm9xqFQB8FDApVNL6Tii1Jsv+Sj/LjEIkdeGhbA=";
};
};
};
apps.cli-apps.helix = enabled;
tools = {
git = enabled;
};
system.hardware = {
networking = enabled;
};
system = {
fonts = enabled;
locale = enabled;
time = enabled;
xkb = enabled;
};
};
};
}

View file

@ -1,73 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.submodules.basics;
in
{
options.${namespace}.submodules.basics = with types; {
enable = mkEnableOption "Whether or not to enable basic configuration.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
fastfetch
fd
tree
ripgrep
fzf
eza
#optional
pciutils
usbutils
btop
zip
unzip
];
${namespace} = {
nix = {
enable = true;
extra-substituters = {
"https://cache.lix.systems" = {
key = "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=";
};
"https://nix-community.cachix.org" = {
key = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
};
"https://nixcache.christophhollizeck.dev" = {
key = "christophhollizeck.dev:7pPAvm9xqFQB8FDApVNL6Tii1Jsv+Sj/LjEIkdeGhbA=";
};
};
};
apps.cli-apps.helix = enabled;
tools = {
git = enabled;
};
system.hardware = {
networking = enabled;
};
system = {
boot = enabled;
fonts = enabled;
locale = enabled;
time = enabled;
xkb = enabled;
};
};
};
}

View file

@ -1,84 +0,0 @@
Arch: win64
CompatData: ''
Creation_Date: '2024-11-12 18:24:45.924771'
Custom_Path: false
DLL_Overrides: {}
DXVK: dxvk-2.4.1
Environment: Custom
Environment_Variables: {}
External_Programs:
b8ae3872-d1d4-435f-ba7f-1cd829b4da81:
executable: eve-online-latest+Setup.exe
folder: /home/cholli/Downloads
id: b8ae3872-d1d4-435f-ba7f-1cd829b4da81
name: eve-online-latest+Setup
path: /home/cholli/Downloads/eve-online-latest+Setup.exe
Installed_Dependencies:
- dotnet40
- dotnet48
- vcredist2022
Language: sys
LatencyFleX: latencyflex-v0.1.1
NVAPI: dxvk-nvapi-v0.7.1
Name: EVE
Parameters:
custom_dpi: 96
decorated: true
discrete_gpu: false
dxvk: true
dxvk_nvapi: false
fixme_logs: false
fsr: false
fsr_quality_mode: none
fsr_sharpening_strength: 2
fullscreen_capture: false
gamemode: false
gamescope: false
gamescope_borderless: false
gamescope_fps: 0
gamescope_fps_no_focus: 0
gamescope_fullscreen: true
gamescope_game_height: 0
gamescope_game_width: 0
gamescope_scaling: false
gamescope_window_height: 0
gamescope_window_width: 0
latencyflex: false
mangohud: false
mouse_warp: true
obsvkc: false
pulseaudio_latency: false
renderer: gl
sandbox: false
sync: wine
take_focus: false
use_be_runtime: true
use_eac_runtime: true
use_runtime: false
use_steam_runtime: false
versioning_automatic: false
versioning_compression: false
versioning_exclusion_patterns: false
virtual_desktop: false
virtual_desktop_res: 1280x720
vkbasalt: false
vkd3d: true
vmtouch: false
vmtouch_cache_cwd: false
Path: EVE
Runner: caffe-9.7
RunnerPath: ''
Sandbox:
share_net: false
share_sound: false
State: 0
Uninstallers: {}
Update_Date: '2024-11-12 18:36:11.134986'
VKD3D: vkd3d-proton-2.13
Versioning: false
Versioning_Exclusion_Patterns: []
Windows: win10
WorkingDir: /storage/home/bottles
data: {}
run_in_terminal: false
session_arguments: ''

View file

@ -1,28 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.submodules.games;
in
{
options.${namespace}.submodules.games = with types; {
enable = mkBoolOpt false "Whether or not you want to enable steam and other games";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ prismlauncher ];
${namespace} = {
apps = {
steam = enabled;
};
};
};
}

View file

@ -1,25 +0,0 @@
{
config,
lib,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.submodules.socials;
in
{
options.${namespace}.submodules.socials = with types; {
enable = mkBoolOpt false "Whether to enable social apps";
};
config = mkIf cfg.enable {
${namespace} = {
apps = {
discord = enabled;
teamspeak = enabled;
};
};
};
}

View file

@ -1,33 +0,0 @@
{
config,
inputs,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.autoUpgrade;
in
{
options.${namespace}.system.autoUpgrade = with types; {
enable = mkEnableOption "Enable auto-upgrade";
time = mkOpt str "02:00" "Time to run auto-upgrade";
};
config = mkIf cfg.enable {
system.autoUpgrade = {
enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"--print-build-logs"
];
dates = cfg.time;
randomizedDelaySec = "45min";
};
};
}

View file

@ -1,29 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.boot;
in
{
options.${namespace}.system.boot = with types; {
enable = mkBoolOpt false "Whether or not to enable booting.";
};
config = mkIf cfg.enable {
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
services.fstrim = enabled;
};
}

View file

@ -1,41 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.fonts;
in
{
options.${namespace}.system.fonts = with types; {
enable = mkBoolOpt false "Whether or not to manage fonts.";
fonts = mkOpt (listOf package) [ ] "Custom font packages to install.";
};
config = mkIf cfg.enable {
environment.variables = {
# Enable icons in tooling since we have nerdfonts.
LOG_ICONS = "true";
};
environment.systemPackages = with pkgs; [ font-manager ];
fonts.packages =
with pkgs;
[
font-awesome
powerline-fonts
powerline-symbols
nerd-fonts.code-new-roman
nerd-fonts.fira-code
nerd-fonts.symbols-only
fira
]
++ cfg.fonts;
};
}

View file

@ -1,46 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.hardware.audio;
in
{
options.${namespace}.system.hardware.audio = with types; {
enable = mkBoolOpt false "Whether or not to enable audio";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
pavucontrol
easyeffects
];
services.pulseaudio = disabled;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.configPackages = [
(pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/11-bluetooth-policy.conf" ''
wireplumber.settings = {
bluetooth.autoswitch-to-headset-profile = false
}
'')
(pkgs.writeTextDir "share/wireplumber/policy.lua.d/11-bluetooth-policy.conf" ''
bluetooth_policy.policy["media-role.use-headset-profile"] = false
'')
];
};
};
}

View file

@ -1,46 +0,0 @@
{
config,
lib,
namespace,
pkgs,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.hardware.bluetooth;
in
{
options.${namespace}.system.hardware.bluetooth = with types; {
enable = mkBoolOpt false "Whether or not to enable bluetooth";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ kdePackages.bluez-qt ];
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
Experimental = true;
KernelExperimental = true;
Enable = "Source,Sink,Media,Socket";
};
};
};
fileSystems."/var/lib/bluetooth" = {
device = "/persist/var/lib/bluetooth";
options = [
"bind"
"noauto"
"x-systemd.automount"
];
noCheck = true;
};
# https://github.com/NixOS/nixpkgs/issues/170573
};
}

View file

@ -1,29 +0,0 @@
{
lib,
config,
pkgs,
namespace,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.system.hardware.gpu.amd;
in
{
options.${namespace}.system.hardware.gpu.amd = {
enable = mkEnableOption "Enable AMD GPU";
};
config = mkIf cfg.enable {
hardware.graphics = {
enable = true;
enable32Bit = true;
};
environment = {
variables = {
AMD_VULKAN_ICD = "RADV";
};
};
};
}

View file

@ -1,47 +0,0 @@
{
lib,
config,
pkgs,
namespace,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.system.hardware.gpu.nvidia;
in
{
options.${namespace}.system.hardware.gpu.nvidia = {
enable = mkEnableOption "Enable Nvidia GPU";
};
config = mkIf cfg.enable {
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = [
pkgs.nvidia-vaapi-driver
];
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta; # stable, beta
};
services.xserver.videoDrivers = [ "nvidia" ];
boot.kernelParams = [
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
"nvidia_drm.fbdev=1"
];
environment.sessionVariables = {
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
LIBVA_DRIVER_NAME = "nvidia";
NVD_BACKEND = "direct";
};
};
}

View file

@ -1,19 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.hardware.networking;
in
{
options.${namespace}.system.hardware.networking = with types; {
enable = mkBoolOpt false "Whether or not to enable networking";
};
config = mkIf cfg.enable { networking.networkmanager.enable = true; };
}

View file

@ -1,39 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.locale;
in
{
options.${namespace}.system.locale = with types; {
enable = mkBoolOpt false "Whether or not to manage locale settings.";
};
config = mkIf cfg.enable {
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LANG = "en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
console = {
keyMap = mkForce "us";
};
};
}

View file

@ -1,19 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.time;
in
{
options.${namespace}.system.time = with types; {
enable = mkBoolOpt false "Whether or not to configure timezone information.";
};
config = mkIf cfg.enable { time.timeZone = "Europe/Berlin"; };
}

View file

@ -1,26 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.system.xkb;
in
{
options.${namespace}.system.xkb = with types; {
enable = mkBoolOpt false "Whether or not to configure xkb.";
};
config = mkIf cfg.enable {
console.useXkbConfig = true;
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
xkb.options = "caps:escape";
};
};
}

View file

@ -1,23 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.tools.devenv;
in
{
options.${namespace}.tools.devenv = {
enable = mkEnableOption "Whether or not to enable direnv.";
};
config = mkIf cfg.enable {
environment.systemPackages = [
pkgs.devenv
];
};
}

View file

@ -1,26 +0,0 @@
{
config,
lib,
namespace,
options,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.tools.direnv;
in
{
options.${namespace}.tools.direnv = with types; {
enable = mkBoolOpt false "Whether or not to enable direnv.";
};
config = mkIf cfg.enable {
${namespace}.home.extraOptions = {
programs.direnv = {
enable = true;
nix-direnv = enabled;
};
};
};
}

View file

@ -1,60 +0,0 @@
{
config,
lib,
namespace,
options,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.tools.git;
user = config.${namespace}.user;
in
{
options.${namespace}.tools.git = with types; {
enable = mkBoolOpt true "Wether or not to enable git (Default enabled)";
userName = mkOpt types.str user.fullName "The name to use git with";
userEmail = mkOpt types.str user.email "The email to use git with";
signingKey = mkOpt types.str "ACCFA2DB47795D9E" "The key ID to sign commits with.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
git
gitAndTools.gh
# gitbutler
];
${namespace}.home.extraOptions = {
programs.git = {
enable = true;
inherit (cfg) userName userEmail;
lfs.enable = true;
signing = {
key = cfg.signingKey;
signByDefault = true;
};
extraConfig = {
init = {
defaultBranch = "main";
};
pull = {
rebase = true;
};
push = {
autoSetupRemote = true;
};
rebase = {
autoStash = true;
};
safe = {
directory = "${config.users.users.${user.name}.home}/projects/config";
};
lfs."https://git.christophhollizeck.dev/Daholli/nixos-config.git/info/lfs".locksverify = true;
};
};
};
};
}

View file

@ -1,77 +0,0 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.user;
defaultIconFileName = "profile.png";
in
{
options.${namespace}.user = with types; {
name = mkOpt str "cholli" "The name to use for the user account.";
fullName = mkOpt str "Christoph Hollizeck" "The full name of the user.";
email = mkOpt str "christoph.hollizeck@hey.com" "The email of the user.";
initialPassword = mkOpt str "asdf" "The initial password to use when the user is first created.";
icon = mkOpt (nullOr path) ./${defaultIconFileName} "The profile picture to use for the user.";
extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned.";
extraOptions = mkOpt attrs { } (mdDoc "Extra options passed to `users.users.<name>`.");
trustedPublicKeys = mkOption {
default = [ ];
type = nullOr (listOf str);
description = "Trusted public keys for this user for the machine";
};
};
config = {
environment.systemPackages = [ ];
# remove default nix alias
environment.shellAliases = {
l = null;
ls = null;
ll = null;
};
programs.fish = enabled;
users.defaultUserShell = pkgs.fish;
${namespace}.home = {
file = {
"Desktop/.keep".text = "";
"Documents/.keep".text = "";
"Downloads/.keep".text = "";
"Music/.keep".text = "";
"Pictures/.keep".text = "";
"Videos/.keep".text = "";
"projects/.keep".text = "";
".face".source = cfg.icon;
"Pictures/${defaultIconFileName}".source = cfg.icon;
};
};
users.users.${cfg.name} = {
isNormalUser = true;
inherit (cfg) name initialPassword;
home = "/home/${cfg.name}";
group = "users";
# Arbitrary user ID to use for the user. Since I only
# have a single user on my machines this won't ever collide.
# However, if you add multiple users you'll need to change this
# so each user has their own unique uid (or leave it out for the
# system to select).
uid = 1000;
openssh.authorizedKeys.keys = cfg.trustedPublicKeys;
extraGroups = [ "steamcmd" ] ++ cfg.extraGroups;
} // cfg.extraOptions;
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

View file

@ -0,0 +1,7 @@
{
inputs,
...
}:
{
systems = import inputs.systems;
}

View file

@ -0,0 +1,44 @@
{
config,
...
}:
{
flake = {
meta.users = {
cholli = {
email = "christoph.hollizeck@hey.com";
name = "Christoph Hollizeck";
username = "cholli";
key = "ACCFA2DB47795D9E";
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHFrDiO5+vMfD5MimkzN32iw3MnSMLZ0mHvOrHVVmLD0"
];
};
};
modules.nixos.cholli =
{ pkgs, ... }:
{
programs.fish.enable = true;
users.users.cholli = {
description = config.flake.meta.users.cholli.name;
isNormalUser = true;
createHome = true;
extraGroups = [
"audio"
"input"
"networkmanager"
"sound"
"tty"
"wheel"
];
shell = pkgs.fish;
};
};
};
}

View file

@ -1,3 +0,0 @@
## Overlays provided by this flake
Here I put all the overlays e.g compatability fixes for my systems which could also be accessed from outside using this flake, but for now these are not meant for outside use.

View file

@ -1,3 +0,0 @@
{ channels, ... }:
final: prev: { inherit (channels.nixpkgs-latest-factorio) factorio-headless; }

View file

@ -1,15 +0,0 @@
{ ... }:
final: prev: {
obsidian = prev.obsidian.overrideAttrs (oldAttrs: rec {
# Add arguments to the .desktop entry
desktopItem = oldAttrs.desktopItem.override (desktopitem: {
exec = "${desktopitem.exec} --disable-gpu ";
});
# Update the install script to use the new .desktop entry
installPhase = builtins.replaceStrings [ "${oldAttrs.desktopItem}" ] [
"${desktopItem}"
] oldAttrs.installPhase;
});
}

View file

@ -1,8 +0,0 @@
{ ... }:
final: prev: {
path-of-building = prev.path-of-building.overrideAttrs (prevAttrs: {
postInstall = ''
wrapProgram $out/bin/pobfrontend --set QT_QPA_PLATFORM xcb
'';
});
}

View file

@ -1,8 +0,0 @@
{ ... }:
final: prev: {
starsector = prev.starsector.overrideAttrs (prevAttrs: {
postInstall = ''
wrapProgram $out/bin/starsector --set __GL_THREADED_OPTIMIZATIONS 0
'';
});
}

View file

@ -1,9 +0,0 @@
{ ... }:
final: prev: {
steam = prev.steam.overrideAttrs (oldAttrs: {
commandLineArgs = ''
--disable-gpu-compositing
'';
});
}

View file

@ -1,9 +0,0 @@
{ ... }:
final: prev: {
teams-for-linux = prev.teams-for-linux.overrideAttrs (oldAttrs: {
commandLineArgs = ''
--disable-gpu-compositing
'';
});
}

View file

@ -1,5 +0,0 @@
{ channels, ... }:
final: prev: {
tuya-vacuum = channels.nixpkgs-tuya-vacuum.python3Packages.tuya-vacuum;
}

View file

@ -1,14 +0,0 @@
{ channels, ... }:
final: prev: {
vivaldi = prev.vivaldi.overrideAttrs (oldAttrs: {
dontWrapQtApps = false;
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ channels.unstable.kdePackages.wrapQtAppsHook ];
commandLineArgs = ''
-enable-features=UseOzonePlatform
--ozone-platform=wayland
--ozone-platform-hint=auto
--enable-features=WaylandWindowDecorations
'';
});
}

View file

@ -1,11 +0,0 @@
## Shells provided by this flake
## rust
A very non specialized rust flake that provides rust and rust analyzer for use in a simple rust project, more complex flakes should be part of the respective repositories.
## rust-screeps
A shell for use in any project built upon [screeps-starter-rust](https://github.com/rustyscreeps/screeps-starter-rust).

Some files were not shown because too many files have changed in this diff Show more