feat(nix): add initial Nix flake configuration and lock file for package management

This commit is contained in:
2026-01-14 18:59:10 +00:00
parent a954f2b588
commit a6af299d8d
3 changed files with 67 additions and 0 deletions

36
flake.nix Normal file
View File

@@ -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
];
};
}
);
};
}