diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..c58c1ec --- /dev/null +++ b/default.nix @@ -0,0 +1,4 @@ +let + flake = builtins.getFlake "git+file://${builtins.toString ./.}"; +in +flake.packages.${builtins.currentSystem}.default diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5ef276f --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1768302833, + "narHash": "sha256-h5bRFy9bco+8QcK7rGoOiqMxMbmn21moTACofNLRMP4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "61db79b0c6b838d9894923920b612048e1201926", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7937138 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "Global packages for dotfiles"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + }; + + outputs = + { self, nixpkgs }: + let + systems = [ + "x86_64-darwin" + "aarch64-darwin" + "x86_64-linux" + "aarch64-linux" + ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); + in + { + packages = forAllSystems ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + default = pkgs.buildEnv { + name = "dotfiles-packages"; + paths = [ + pkgs.nil + pkgs.nixfmt + ]; + }; + } + ); + }; +}