NixOS is the endgame to Distro Hopping
Find a file
matt1432 49aa21cf32
All checks were successful
Discord / discord commits (push) Has been skipped
doc(bbsteamie): add instructions for how to make decky work
2024-07-04 19:06:17 -04:00
.forgejo/workflows feat(servers): test github action 2024-01-11 17:22:35 -05:00
common feat: use http for cache if tailscale not enabled 2024-06-29 22:10:01 -04:00
devices doc(bbsteamie): add instructions for how to make decky work 2024-07-04 19:06:17 -04:00
home/firefox feat(firefox): add auto-refresh addon 2024-06-29 17:46:32 -04:00
modules fix: update flake.lock for latest openssh 2024-07-02 12:21:47 -04:00
pkgs fix(bbsteamie): use older version of ryujinx 2024-07-03 20:54:52 -04:00
.gitignore chore: organize gitignore 2024-05-20 11:49:21 -04:00
ci.nix refactor: reduce amount of IFDs 2024-06-10 22:57:20 -04:00
flake.in.nix feat(steamdeck): prepare config for eventual install 2024-06-29 03:45:06 -04:00
flake.lock chore: update flake.lock and add discord overlay 2024-07-03 13:24:53 -04:00
flake.nix chore: update flake.lock and add discord overlay 2024-07-03 13:24:53 -04:00
inputs.nix chore: update flake.lock and add discord overlay 2024-07-03 13:24:53 -04:00
lib.nix chore: update flake.lock and add discord overlay 2024-07-03 13:24:53 -04:00
LICENSE.md chore: add license 2024-01-18 11:01:09 -05:00
README.md refactor: move mpv scripts and firefox addons to scopes in lgcyPkgs 2024-06-26 14:47:14 -04:00
updateSha.sh chore: update flake.lock and nvidia version 2024-06-28 02:06:10 -04:00

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. I tend to mix Home-Manager and NixOS a lot to make my custom modules by using my global vars system explained here

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
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 ./flake.in.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";
  oksys = "somekey2";
in {
  creation_rules = [
    {
      path_regex = "secrets/[^/]+\\.(yaml|json|env|ini)$";
      key_groups = [
        {
          age = [wim oksys];
        }
      ];
    }
  ];
}

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