nixos-config-mirror/flake-mods/hm.nix
2025-06-01 14:07:33 +02:00

47 lines
1.4 KiB
Nix

{ inputs, lib, ... }:
{
imports = [ ./hm-flake-part.nix ];
perSystem =
{
config,
self,
inputs,
pkgs,
system,
...
}:
let
# split system (e.g. x86_64-linux) into os and arch
splitSystem = lib.splitString "-" system;
os = builtins.elemAt splitSystem 0;
arch = builtins.elemAt splitSystem 1;
in
{
legacyPackages.homeConfigurations.xqtc = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs {
inherit system;
# overlays = [
# inputs.hyprpanel.overlay
# ];
};
nixpkgs.overlays = [ inputs.hyprpanel.overlay ];
modules = [
../home
inputs.nixvim.homeManagerModules.nixvim
inputs.sops-nix.homeManagerModules.sops
inputs.hyprpanel.homeManagerModules.hyprpanel
{ inherit os arch; }
];
extraSpecialArgs = {
inherit inputs;
inherit system;
};
};
# # this sounds stupid, but it's the only way to make home-manager consume a
# # flake output with the system in it, which *should* be the case because it
# # wants system-specific pkgs, but flake-parts (rightfully so!) complains
# # that this isn't a package, so we do this to make both happy.
# packages.homeConfigurations.type = "derivation";
};
}