{
  config,
  flake,
  pkgs,
  lib,
  osConfig,
  ...
}:
let

  inherit (flake.config.aesthetics.themes) currentTheme palettes;

  inherit (flake.config.people) user0;

  user = config.home.username;

  colourHelpers = {
    themeLogic = if user == user0 then currentTheme else currentTheme;

    el = palettes.${colourHelpers.themeLogic}.colours;

    makeColour = c: "#" + c;
  };

  workspaceStrings = {
    workspace0 = "messaging";
    workspace1 = "work";
    workspace2 = "gaming";
    workspace3 = "media";
    workspace4 = "extra";
  };

  configPath = ./config;

  configImports =
    let
      binds = import (configPath + /binds.nix) {
        inherit
          config
          workspaceStrings
          flake
          osConfig
          ;
      };
      layout = import (configPath + /layout.nix) { inherit colourHelpers flake; };
      main = import (configPath + /main.nix);
      outputs = import (configPath + /outputs.nix) {
        inherit
          flake
          osConfig
          colourHelpers
          ;
      };
      startup = import (configPath + /startup.nix) { inherit lib pkgs; };
      style = import (configPath + /style.nix) { inherit flake; };
      windowrules = import (configPath + /windowrules.nix) { inherit flake workspaceStrings; };
      workspaces = import (configPath + /workspaces.nix) { inherit workspaceStrings; };
    in
    binds // layout // main // outputs // startup // style // windowrules // workspaces;

in
{
  programs.niri = {
    settings = configImports;
  };
}
