nix-config/example/configuration.nix
Donovan Glover a4637faad6
example: Define basic hyprland setup
I wrote a simple flake.nix that shows how to use this nix-config in your
own flake. This example in particular has been updated to show a working
demonstration with hyprland, although it's possible to use only parts of
this nix-config in e.g. headless environments as well.
2024-04-06 14:03:10 -04:00

40 lines
981 B
Nix

{ nix-config, pkgs, lib, ... }:
let
inherit (builtins) attrValues;
inherit (lib) singleton;
in
{
imports = attrValues {
inherit (nix-config.nixosModules) system shell desktop;
customConfig = {
modules.system.username = "asuna";
};
};
home-manager.sharedModules = attrValues nix-config.homeManagerModules ++ singleton {
programs.btop.enable = true;
};
environment.systemPackages = attrValues {
inherit (nix-config.packages.x86_64-linux) fluent-icons hycov osu-backgrounds;
inherit (pkgs) ruby php;
};
nixpkgs.overlays = attrValues {
inherit (nix-config.overlays) kitty;
exampleOverlay = final: prev: {
btop = prev.btop.overrideAttrs (oldAttrs: {
postInstall = (oldAttrs.postInstall or "") + /* bash */ ''
echo "#!/usr/bin/env sh" >> btop-overlay
echo "echo 'hello world'" >> btop-overlay
install -Dm755 btop-overlay $out/bin/btop-overlay
'';
});
};
};
}