matt1432
5fdf0d98ed
All checks were successful
Discord / discord commits (push) Has been skipped
Flake Inputs: • Updated input 'ags': 'github:Aylur/ags/344ea72' (2024-07-18) → 'github:Aylur/ags/aaef50b' (2024-09-09) • Updated input 'discord-overlay': 'github:matt1432/discord-nightly-overlay/925a600' (2024-09-07) → 'github:matt1432/discord-nightly-overlay/38e756a' (2024-09-10) • Updated input 'home-manager': 'github:nix-community/home-manager/aaebdea' (2024-09-07) → 'github:nix-community/home-manager/e5fa72b' (2024-09-10) • Updated input 'hyprland': 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=312411f&submodules=1' (2024-09-07) → 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=155d440&submodules=1' (2024-09-10) • Updated input 'jellyfin-flake': 'github:matt1432/nixos-jellyfin/03d120f' (2024-09-08) → 'github:matt1432/nixos-jellyfin/8ed2440' (2024-09-10) • Updated input 'jovian': 'github:Jovian-Experiments/Jovian-NixOS/2d050e6' (2024-09-06) → 'github:Jovian-Experiments/Jovian-NixOS/b9af8b3' (2024-09-10) • Updated input 'nix-gaming': 'github:fufexan/nix-gaming/ec0bcac' (2024-09-08) → 'github:fufexan/nix-gaming/5e1b352' (2024-09-10) • Updated input 'nix-index-db': 'github:Mic92/nix-index-database/32058e9' (2024-09-01) → 'github:Mic92/nix-index-database/6422754' (2024-09-08) • Updated input 'nixpkgs-wayland': 'github:nix-community/nixpkgs-wayland/0483138' (2024-09-07) → 'github:nix-community/nixpkgs-wayland/9004631' (2024-09-10) • Updated input 'sops-nix': 'github:Mic92/sops-nix/d9d7815' (2024-09-05) → 'github:Mic92/sops-nix/cede1a0' (2024-09-09) Docker Images: • vegardit/gitea-act-runner dind-latest: sha256:d1071eb21edbb477b2d93dda5c8ba4e0aa471ee73e4e52776389744215d8536c → sha256:674ef43377a9b802d53cbcf97ee128f95dd00cec817fb075950dcf7a618d880c • rssbridge/rss-bridge latest: sha256:a869f33f22d10ce04b5efa40efe273f3454dee8113508f64bca18a85b1eff724 → sha256:833fa82afded7dd01514807009ccf66983bc21d874fc6acbe057a1fcda0f5e2d • ghcr.io/gethomepage/homepage latest: sha256:e5b2616d17db8961a53c0b7d389d812d31c265d35696d475732f53278c9276f7 → sha256:5c264918d2d18a753da8657fee7e0579c8b11581b19275d9a93fde76a8267f3c • postgres 15-alpine: sha256:362404e4f27e4f477c6cd4a76c65f06d387b7fda2caf216e656b17bf00f9908f → sha256:620dc79c45816cff4f38f0b49c71f15a3bc6bab9439ba1eea3a76d23ebcf1e4d • ghcr.io/linuxserver/radarr latest: sha256:47acec85a0d92d107096088aebe83d1d0a434def34e5bac317fff18ca28741ae → sha256:5ab12592e768d04d94bc04877bee194f372ea3946abc6de689311f4d8559ee2f Firefox Addons: bitwarden: 2024.8.1 -> 2024.8.2 floccus: 5.2.6 -> 5.2.7 |
||
---|---|---|
.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