Created
January 20, 2021 14:46
-
-
Save eraserhd/7776270a15538d115a4889f11d67089d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "2u environment configuration"; | |
inputs.nixpkgs.url = "github:NixOS/nixpkgs"; | |
outputs = { self, nixpkgs }: let | |
devEnvironmentForSystem = system: let | |
pkgs = import nixpkgs { | |
inherit system; | |
config.allowUnfree = true; | |
}; | |
in | |
pkgs.callPackage ./default.nix {}; | |
in { | |
packages.x86_64-darwin.devEnvironment = devEnvironmentForSystem "x86_64-darwin"; | |
packages.x86_64-linux.devEnvironment = devEnvironmentForSystem "x86_64-linux"; | |
defaultPackage.x86_64-darwin = self.packages.x86_64-darwin.devEnvironment; | |
defaultPackage.x86_64-linux = self.packages.x86_64-linux.devEnvironment; | |
nixosModules = { pkgs, ... }: { | |
config.environment.systemPackages = [ self.defaultPackage.${pkgs.stdenv.hostPlatform.system} ]; | |
}; | |
darwinModules = { pkgs, ... }: { | |
config.environment.systemPackages = [ self.defaultPackage.${pkgs.stdenv.hostPlatform.system} ]; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment