smooooth/flake.nix
2025-05-21 18:56:36 +10:00

49 lines
1.1 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nix-systems.url = "github:nix-systems/default-linux";
};
outputs =
inputs:
with inputs;
let
forAllSystems =
function:
nixpkgs.lib.genAttrs (import nix-systems) (system: function nixpkgs.legacyPackages.${system});
in
{
packages = forAllSystems (pkgs: {
default =
nix:
pkgs.writeShellApplication {
name = "smooooth";
runtimeInputs = builtins.attrValues {
inherit (pkgs)
gnugrep
coreutils
libnotify
inotify-tools
git
;
inherit nix;
};
text = builtins.readFile ./smooooth.sh;
};
});
nixosModules.smooooth =
{
config,
pkgs,
lib,
...
}:
{
imports = [ ./module.nix ];
services.smooooth.package = (
self.packages.${pkgs.system}.default config.services.smooooth.nixPackage
);
};
};
}