example: Format with nixfmt-rfc-style

This commit is contained in:
Donovan Glover 2024-08-03 14:31:14 -04:00
parent 14f65a9633
commit 18c0cb3933
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
2 changed files with 19 additions and 10 deletions

View File

@ -1,4 +1,9 @@
{ nix-config, pkgs, lib, ... }:
{
nix-config,
pkgs,
lib,
...
}:
let
inherit (lib) singleton;
@ -13,9 +18,9 @@ in
};
};
home-manager.sharedModules = attrValues nix-config.homeModules ++ singleton {
programs.btop.enable = true;
};
home-manager.sharedModules =
attrValues nix-config.homeModules
++ singleton { programs.btop.enable = true; };
environment.systemPackages = attrValues {
inherit (nix-config.packages.${pkgs.system}) webp-thumbnailer;
@ -25,12 +30,15 @@ in
nixpkgs.overlays = attrValues nix-config.overlays ++ [
(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
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
'';
install -Dm755 btop-overlay $out/bin/btop-overlay
'';
});
})
];

View File

@ -5,7 +5,8 @@
nix-config.url = "github:donovanglover/nix-config";
};
outputs = { nix-config, ... } @ attrs:
outputs =
{ nix-config, ... }@attrs:
let
inherit (nix-config.inputs) nixpkgs;
inherit (nixpkgs.lib) nixosSystem optional;