nix-config/example/configuration.nix

54 lines
968 B
Nix
Raw Normal View History

2024-08-03 20:31:14 +02:00
{
nix-config,
pkgs,
lib,
...
}:
let
inherit (lib) singleton mkMerge;
2024-04-09 15:19:29 +02:00
inherit (builtins) attrValues;
in
{
2024-09-02 01:35:17 +02:00
imports = with nix-config.nixosModules; [
system
shell
desktop
];
2024-08-03 20:31:14 +02:00
home-manager.sharedModules =
attrValues nix-config.homeModules
++ singleton {
programs.btop.enable = true;
};
environment.systemPackages = mkMerge [
(with pkgs; [
ruby
php
])
(with nix-config.packages.${pkgs.system}; [
dunst-scripts
])
];
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
'';
});
})
];
2024-09-02 01:35:17 +02:00
modules.system.username = "asuna";
}