aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-16 19:00:22 -0700
committerFuwn <[email protected]>2024-09-16 19:01:18 -0700
commitd1525c29af2f0c58fd4970fc33cc641cb460bbef (patch)
tree8e930859a82585e1b29a5ab595197dbd14d7c537 /flake.nix
downloadtsutsumi-d1525c29af2f0c58fd4970fc33cc641cb460bbef.tar.xz
tsutsumi-d1525c29af2f0c58fd4970fc33cc641cb460bbef.zip
feat: initial release
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix87
1 files changed, 87 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..4a4b53e
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,87 @@
+{
+ description = "Top-level Flake for Applications and Libraries Packaged for Nix";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs";
+ systems.url = "github:nix-systems/default";
+ flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
+
+ flake-utils = {
+ url = "github:numtide/flake-utils";
+ inputs.systems.follows = "systems";
+ };
+
+ pre-commit-hooks = {
+ url = "github:cachix/git-hooks.nix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
+ rui = {
+ url = "github:Fuwn/rui";
+ inputs.nixpkgs.follows = "nixpkgs";
+ inputs.systems.follows = "systems";
+ };
+ };
+
+ outputs =
+ {
+ self,
+ nixpkgs,
+ flake-utils,
+ pre-commit-hooks,
+ rui,
+ ...
+ }:
+ flake-utils.lib.eachDefaultSystem (
+ system:
+ let
+ pkgs = import nixpkgs {
+ inherit system;
+
+ overlays = [
+ (final: _: {
+ buildRustPackage = import ./lib/build-rust-package.nix {
+ inherit (final) lib rustPlatform fetchFromGitHub;
+ };
+ })
+ ];
+ };
+ in
+ {
+ packages = {
+ bollux = pkgs.callPackage ./pkgs/bollux { };
+ ahoviewer = pkgs.callPackage ./pkgs/t.nix { };
+ bindtointerface = pkgs.callPackage ./pkgs/bindtointerface.nix { };
+ cargo-clean-all = pkgs.callPackage ./pkgs/cargo-clean-all.nix { };
+ chan-downloader = pkgs.callPackage ./pkgs/chan-downloader.nix { };
+ git-sumi = pkgs.callPackage ./pkgs/git-sumi.nix { };
+ private-internet-access = pkgs.callPackage ./pkgs/private-internet-access.nix { };
+ rui = rui.packages.${system}.default;
+ swaddle = pkgs.callPackage ./pkgs/swaddle.nix { };
+ t = pkgs.callPackage ./pkgs/t.nix { };
+ thorium = pkgs.callPackage ./pkgs/thorium.nix { };
+ yaak = pkgs.callPackage ./pkgs/yaak.nix { };
+ zen-browser-bin = pkgs.callPackage ./pkgs/zen-browser-bin { };
+ };
+
+ formatter = nixpkgs.legacyPackages."${system}".nixfmt-rfc-style;
+
+ checks.pre-commit-check = pre-commit-hooks.lib.${system}.run {
+ src = ./.;
+
+ hooks = {
+ deadnix.enable = true;
+ flake-checker.enable = true;
+ nixfmt-rfc-style.enable = true;
+ statix.enable = true;
+ };
+ };
+
+ devShells.default = pkgs.mkShell {
+ inherit (self.checks.${system}.pre-commit-check) shellHook;
+
+ buildInputs = [ pkgs.just ] ++ self.checks.${system}.pre-commit-check.enabledPackages;
+ };
+ }
+ );
+}