NixOS is the endgame to Distro Hopping
Find a file
matt1432 a8a278202c
All checks were successful
Discord / discord commits (push) Has been skipped
chore: unpin pcsd and hypr to update flake.lock
Flake Inputs:
• Updated input 'hyprland':
    'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=cd942ad&submodules=1' (2024-07-25)
  → 'git+https://github.com/hyprwm/Hyprland?ref=refs/heads/main&rev=bc86afe&submodules=1' (2024-07-27)

• Updated input 'pcsd':
    'github:matt1432/nixos-pcsd/40731ec' (2024-07-20)
  → 'github:matt1432/nixos-pcsd/62b44c2' (2024-07-27)

• Updated input 'discord-overlay':
    'github:matt1432/discord-nightly-overlay/1a8688b' (2024-07-26)
  → 'github:matt1432/discord-nightly-overlay/798e83f' (2024-07-27)

• Updated input 'home-manager':
    'github:nix-community/home-manager/bc2b96a' (2024-07-26)
  → 'github:nix-community/home-manager/975b83c' (2024-07-27)

• Updated input 'hyprland/aquamarine':
    'github:hyprwm/aquamarine/353dc1b' (2024-07-24)
  → 'github:hyprwm/aquamarine/4918e57' (2024-07-27)

• Updated input 'hyprland/hyprutils':
    'github:hyprwm/hyprutils/962582a' (2024-07-18)
  → 'github:hyprwm/hyprutils/5dcbbc1' (2024-07-27)

• Updated input 'hyprland/xdph':
    'github:hyprwm/xdg-desktop-portal-hyprland/663be9c' (2024-07-22)
  → 'github:hyprwm/xdg-desktop-portal-hyprland/5555f46' (2024-07-23)

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/5ad6a14' (2024-07-25)
  → 'github:NixOS/nixpkgs/b73c222' (2024-07-27)

• Updated input 'nixpkgs-wayland':
    'github:nix-community/nixpkgs-wayland/55a7d37' (2024-07-26)
  → 'github:nix-community/nixpkgs-wayland/9cf33b4' (2024-07-27)

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/aff2f88' (2024-07-22)
  → 'github:Mic92/sops-nix/eb34eb5' (2024-07-27)
2024-07-27 17:40:10 -04:00
.forgejo/workflows feat(servers): test github action 2024-01-11 17:22:35 -05:00
apps fix(update): use nix run for mozilla-addons-to-nix 2024-07-24 22:11:21 -04:00
common feat: go back to nix 2024-07-24 21:58:37 -04:00
devices feat(bbsteamie): add setup for palia map 2024-07-27 15:22:55 -04:00
flake chore: unpin pcsd and hypr to update flake.lock 2024-07-27 17:40:10 -04:00
home/firefox refactor(flake): move stuff in flake dir 2024-07-21 16:10:13 -04:00
legacyPackages chore: update flake.lock 2024-07-26 22:03:01 -04:00
modules refactor(greetd): astal -> ags 2024-07-25 23:24:19 -04:00
packages feat(bbsteamie): add setup for palia map 2024-07-27 15:22:55 -04:00
.gitignore feat(ags): use eslint flat-config 2024-07-14 16:12:09 -04:00
flake.in.nix feat(docker): arion -> khepri 2024-07-24 15:49:31 -04:00
flake.lock chore: unpin pcsd and hypr to update flake.lock 2024-07-27 17:40:10 -04:00
flake.nix chore: unpin pcsd and hypr to update flake.lock 2024-07-27 17:40:10 -04:00
LICENSE.md chore: add license 2024-01-18 11:01:09 -05:00
README.md docs: fix package readmes 2024-07-21 17:30:11 -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";
  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