added flake.nix

This commit is contained in:
lsoriano-mcm
2025-08-08 11:19:41 -05:00
parent db66b85e61
commit ad7ee4ad27
+47
View File
@@ -0,0 +1,47 @@
{
description = "A simple NixOS flake for a single system architecture.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
}: let
# A list of supported systems. We are restricting this to x86_64-linux.
supportedSystems = ["x86_64-linux"];
# A helper function to apply a function to each supported system.
# This ensures that all outputs are only built for x86_64-linux.
eachSupportedSystem = f:
nixpkgs.lib.genAttrs supportedSystems (system: let
pkgs = import nixpkgs {
inherit system;
};
in
f pkgs);
in {
# This output defines the NixOS modules.
# It points to the `./modules` directory, which would contain your system configuration.
nixosModules = rec {
default = illogical-impulse;
illogical-impulse = ./nix/modules;
};
# The legacyPackages output is required for some Nix commands to work.
# We set it to the standard nixpkgs set for our supported system.
legacyPackages = eachSupportedSystem (pkgs: pkgs);
devShells = eachSupportedSystem (pkgs: {
default = pkgs.mkShell {
packages = [
];
};
});
};
}