nix-config/example/configuration.nix

48 lines
977 B
Nix
Raw Normal View History

2024-08-03 20:31:14 +02:00
{
nix-config,
pkgs,
lib,
...
}:
let
inherit (lib) singleton;
2024-04-09 15:19:29 +02:00
inherit (builtins) attrValues;
in
{
imports = attrValues {
inherit (nix-config.nixosModules) system shell desktop;
customConfig = {
modules.system.username = "asuna";
};
};
2024-08-03 20:31:14 +02:00
home-manager.sharedModules =
attrValues nix-config.homeModules
++ singleton {
programs.btop.enable = true;
};
environment.systemPackages = attrValues {
inherit (nix-config.packages.${pkgs.system}) webp-thumbnailer;
inherit (pkgs) ruby php;
};
nixpkgs.overlays = attrValues nix-config.overlays ++ [
(final: prev: {
btop = prev.btop.overrideAttrs (oldAttrs: {
2024-08-03 20:31:14 +02:00
postInstall =
(oldAttrs.postInstall or "")
# bash
+ ''
echo "#!/usr/bin/env sh" >> btop-overlay
echo "echo 'hello world'" >> btop-overlay
2024-08-03 20:31:14 +02:00
install -Dm755 btop-overlay $out/bin/btop-overlay
'';
});
})
];
}