matt1432
9af0b7f86a
All checks were successful
Discord / discord commits (push) Has been skipped
Flake Inputs: • Updated input 'ags': 'github:Aylur/ags' (2025-01-18) rev: 92bdcb227dc390e2edb122b5bb182b38456b6a5e → 'github:Aylur/ags' (2025-01-23) rev: cbe373ff8571126424f8f11b1cc01d9ad19db13e • Updated input 'astal': 'github:Aylur/astal' (2025-01-23) rev: cee257694447f846b0fb6fb12c21532e088031fd → 'github:Aylur/astal' (2025-01-23) rev: 127e9cdcbf173846a3c40ddc0abfbb038df48042 • Updated input 'gpu-screen-recorder-src': 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-01-18) rev: bae0fdd9498c844f27d1aac6a072360f785c8e14 → 'git+https://repo.dec05eba.com/gpu-screen-recorder' (2025-01-24) rev: 8e267bb3b0ba3b3ffec963416b0e67a210338e6c • Updated input 'home-manager': 'github:nix-community/home-manager' (2025-01-23) rev: 7b9ece1bf3c8780cde9b975b28c2d9ccd7e9cdb9 → 'github:nix-community/home-manager' (2025-01-24) rev: a0428685572b134f6594e7d7f5db5e1febbab2d7 • Updated input 'hyprland': 'github:hyprwm/Hyprland' (2025-01-23) rev: 465cf66df14c28427ba30580253be6e3908bd28c → 'github:hyprwm/Hyprland' (2025-01-24) rev: d8f79d7678f428738f3173020109bd7b7fbd0840 • Updated input 'hyprland-plugins': 'github:hyprwm/hyprland-plugins' (2025-01-17) rev: d2dad5b434b338d18458bafa506f2993c13f24fc → 'github:hyprwm/hyprland-plugins' (2025-01-24) rev: 7634792d199d32ed9396d5864e6431cde1cca6bd • Updated input 'hyprutils': 'github:hyprwm/hyprutils' (2025-01-23) rev: 006620eb29d54ea9086538891404c78563d1bae1 → 'github:hyprwm/hyprutils' (2025-01-24) rev: fb0c2d1de3d1ef7396d19c18ac09e12bd956929e • Updated input 'nixcord': 'github:kaylorben/nixcord' (2025-01-23) rev: 40020c324d76a1806c07d7401c25ee00ef20626a → 'github:kaylorben/nixcord' (2025-01-24) rev: 5e8cebecc895070e041fc259a69295a437ef5c0b • Updated input 'nixpkgs': 'github:NixOS/nixpkgs' (2025-01-23) rev: 864f89f98b0b4e1bbcb762b025fd83da8bc1bae0 → 'github:NixOS/nixpkgs' (2025-01-24) rev: dcb7446a099fe1c95b3694fdb7a4dda8f19d6ba8 • Updated input 'spotifywebapi-src': 'github:thlucas1/SpotifyWebApiPython' (2025-01-23) rev: b68007ef3032289edb3dda2ded4543af8e12cb15 → 'github:thlucas1/SpotifyWebApiPython' (2025-01-24) rev: 55eb8e8d66bf0660a09c0433617447e2ff68c1a6 Docker Images: • ghcr.io/linuxserver/prowlarr latest: sha256:ae3abf37d442c6aed1125f7ce9d9cb7f56e64db576071f54b259da58487627a5 → sha256:5c9d62af19a810f7799c1d5fbf686cc6c28690c00f916c029699ae3d1c75e8ef Node modules: eslint: 9.18.0 -> 9.19.0 @eslint/js: 9.18.0 -> 9.19.0 |
||
---|---|---|
.forgejo/workflows | ||
apps | ||
configurations | ||
devShells | ||
homeManagerModules | ||
inputs | ||
lib | ||
modules | ||
nixFastChecks | ||
overlays | ||
packages | ||
results | ||
scopedPackages | ||
.gitattributes | ||
.gitignore | ||
_outputs.nix | ||
flake.lock | ||
flake.nix | ||
LICENSE.md | ||
README.md |
My NixOS configs
TODO: add directory structure info and enforce it
- [x] every root folder in the repo represents a flake output except inputs
- [x] every root folder only has an optional `default.nix` and subfolders for each
of its attrs
- [x] if there is non nix code, it will be in a `config` folder
- [x] every module should not do anything if imported
- [x] all nix files that represent a module should be `default.nix` (a nix file
which is imported directly can be called anything alongside `default.nix`)
- [ ] redo docs
AGS
You might find it weird that most of my config is written in TypeScript. That's because all my desktops run AGS for UI. Click on this to see my configuration.
I'm also a victim of Stockholm syndrome at this point and make my scripts in TypeScript because it's the scripting language I am most comfortable with.
About
General
This repo is the complete configuration of machines I own, running NixOS or Nix. Its structure is based on a flake's outputs.
Flake Location
This git repo will always be located at $FLAKE
(config.environment.variables.FLAKE
)
and symlinked to /etc/nixos
to have everything where NixOS tools
expect things to be.
ie.
sudo rm -r /etc/nixos
echo "$FLAKE" # /home/matt/.nix
sudo ln -sf /home/matt/.nix /etc/nixos
Flake Outputs
Output | Description |
---|---|
nixosConfigurations |
devices' + ISO's configurations |
nixOnDroidConfigurations.default |
Nix-On-Droid's configuration |
packages |
Some custom packages not available in nixpkgs or modified from it |
scopedPackages |
Some custom package scopes not available in nixpkgs or modified from it |
apps |
Scripts ran from the flake defined here |
homeManagerModules |
Modules made for home-manager |
homeManagerModules |
Modules made for NixOS systems |
formatter |
I format nix code with alejandra |
devShells.default |
A dev shell to build an ISO from the live-image nixosConfiguration |
devShells.ags |
A dev shell to have a NodeJS env when I enter my AGS's config directory |
Flake Inputs
To allow use of the full nix language for my inputs, I use genflake.
Therefore, the flake I edit is located at ./outputs.nix
.
I also prefer using a more descriptive format for my inputs like so:
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
# Branch name
ref = "nixos-unstable";
# Pin this input to a specific commit
rev = "842d9d80cfd4560648c785f8a4e6f3b096790e19";
};
to make it more clear what is what in the flake URI
Secrets
All my secrets are in a private git repo that makes use of
sops-nix.
I generate .sops.yaml
from .sops.nix
:
let
wim = "somekey";
binto = "somekey2";
in {
creation_rules = [
{
path_regex = "secrets/[^/]+\\.(yaml|json|env|ini)$";
key_groups = [
{
age = [wim binto];
}
];
}
];
}
which is then converted to .sops.yaml
using
remarshal
and this shell command:
nix eval --json --file ./.sops.nix | remarshal --if json --of yaml > .sops.yaml
TLDR: I hate YAML