/R3PLAYX-nix

Primary LanguageNixMIT LicenseMIT

R3PLAYX-nix

Bring R3PALYX to NixOS

Build and populate cache

How to use

Note: You'll need nix flake taking over your system management. If you're still using legacy way to describe your nixos build, please refer to link below to integrate your system management with flake.

en_US: Enabling NixOS with Flakes - NixOS & Flakes Book

zh_CN: 使用 Flakes 来管理你的 NixOS - NixOS 与 Flakes

  1. Add this repository in your flakes inputs and pass input as special args to your submodules
/etc/nixos/flake.nix
  {
    description = "EndCredits's NixOS Flake";
    nixConfig = {};
    inputs = {
      nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
++    r3playx.url = "github:EndCredits/R3PLAYX-nix/master";
    };

    outputs = { self, nixpkgs, ... }@inputs: {
      nixosConfigurations = {
        "crepuscular-nixos" = nixpkgs.lib.nixosSystem {
          system = "x86_64-linux";
++        specialArgs = inputs;
          modules = [
            ./configuration.nix
          ];
        };
      };
    };
  }
  1. Add r3playx as a input parameter to your configuration and build r3playx package.
/etc/nixos/configuration.nix (or anywhere you define your system package)

--  { config, pkgs, ... }:
++  { config, pkgs, r3playx, ... }:

    {
      imports =
        [ # Include the results of the hardware scan.
          ./hardware-configuration.nix
          ./configs/configs.nix
        ];

    ......

    environment.systemPackages = with pkgs; [
        ......
++      r3playx.packages."${pkgs.system}".r3playx
    ]

    ......

    }
  1. Update your flake lock

In /etc/nixos

sudo nix flake update
  1. Rebuild your NixOS

In /etc/nixos/

sudo nixos-rebuild switch --flake ./