matt1432
7391427c29
Flake Inputs: • Updated input 'astal': 'github:Aylur/astal/c1eb257' (2024-10-29) → 'github:Aylur/astal/2585ca7' (2024-10-30) • Updated input 'gtk-theme-src': 'github:dracula/gtk/a698492' (2024-10-21) → 'github:dracula/gtk/9330b7f' (2024-10-30) • Updated input 'hyprgrass': 'github:horriblename/hyprgrass/4045c9f' (2024-10-27) → 'github:horriblename/hyprgrass/f97b6ac' (2024-10-30) • Updated input 'hyprland': 'github:hyprwm/Hyprland/d679d20' (2024-10-28) → 'github:hyprwm/Hyprland/7c7a84f' (2024-10-30) • Updated input 'nix-fast-build': 'github:Mic92/nix-fast-build/1775c73' (2024-10-07) → 'github:Mic92/nix-fast-build/8e7c9d7' (2024-10-30) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/d3bb51e' (2024-10-29) → 'github:nix-community/nixpkgs-wayland/35f40f1' (2024-10-30) • Updated input 'spotifyplus-src': 'github:thlucas1/homeassistantcomponent_spotifyplus/f4ab736' (2024-10-27) → 'github:thlucas1/homeassistantcomponent_spotifyplus/392f331' (2024-10-30) • Updated input 'spotifywebapi-src': 'github:thlucas1/SpotifyWebApiPython/8c6aff1' (2024-10-19) → 'github:thlucas1/SpotifyWebApiPython/4d3b7b5' (2024-10-30) • Updated input 'tuya-local-src': 'github:make-all/tuya-local/351e576' (2024-10-29) → 'github:make-all/tuya-local/bbd4179' (2024-10-30) Docker Images: • vegardit/gitea-act-runner dind-latest: sha256:fe6f44905830a17f404e9912e2c4fe2f4a2c47bb3ee35409da6476618cf9dab5 → sha256:ea8e9a0304fba7648b62fe19c39c38dd08e8c71b8d2a0cac65f834ccf6215daf |
||
---|---|---|
.forgejo/workflows | ||
apps | ||
checks | ||
common | ||
devices | ||
homeManagerModules | ||
legacyPackages | ||
lib | ||
nixosModules | ||
overlays | ||
packages | ||
.gitignore | ||
flake.lock | ||
flake.nix | ||
inputs.nix | ||
LICENSE.md | ||
outputs.nix | ||
README.md |
My NixOS configs
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 |
legacyPackages |
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