69 lines
2.1 KiB
Nix
69 lines
2.1 KiB
Nix
{
|
|
description = "Steam ROM Manager Home Manager Module";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
# home-manager is declared so consumers can do
|
|
# inputs.home-manager.follows = "steam-rom-manager/home-manager"
|
|
# and so nix flake check can instantiate the module correctly.
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
home-manager,
|
|
}:
|
|
let
|
|
# Linux systems where Steam (and AppImages) are supported.
|
|
# Darwin is intentionally excluded: the SRM AppImage is Linux-only.
|
|
linuxSystems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
forLinux = nixpkgs.lib.genAttrs linuxSystems;
|
|
in
|
|
{
|
|
# Home Manager module — available under both the conventional .default
|
|
# key and an explicit name for clarity in consumer flakes.
|
|
homeManagerModules.default = import ./modules/steam-rom-manager;
|
|
homeManagerModules.steam-rom-manager = import ./modules/steam-rom-manager;
|
|
|
|
# `nix flake check` target: instantiate the module with a minimal config
|
|
# to catch evaluation errors before they reach users.
|
|
checks = forLinux (
|
|
system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
hmLib = home-manager.lib;
|
|
in
|
|
{
|
|
module-eval =
|
|
(hmLib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
modules = [
|
|
self.homeManagerModules.default
|
|
{
|
|
home = {
|
|
username = "test";
|
|
homeDirectory = "/home/test";
|
|
stateVersion = "24.11";
|
|
};
|
|
programs.steam-rom-manager = {
|
|
enable = true;
|
|
steamUsername = "testuser";
|
|
# retroarch is cross-platform; use it as the check target
|
|
emulators.retroarch.enable = true;
|
|
};
|
|
}
|
|
];
|
|
}).activationPackage;
|
|
}
|
|
);
|
|
};
|
|
}
|