From ad7ee4ad2787837f4bebae0dc70147ac67f8377f Mon Sep 17 00:00:00 2001 From: lsoriano-mcm Date: Fri, 8 Aug 2025 11:19:41 -0500 Subject: [PATCH] added flake.nix --- flake.nix | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..de2758024 --- /dev/null +++ b/flake.nix @@ -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 = [ + ]; + }; + }); + }; +}