From fc955520dd26ddbed189f19edc438f7c408e470e Mon Sep 17 00:00:00 2001 From: Michael Hoang Date: Mon, 12 Jun 2023 10:47:21 +1000 Subject: flake: add template with basic flake config --- modules/examples/flake.nix | 31 ------------------------------- modules/examples/flake/flake.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 31 deletions(-) delete mode 100644 modules/examples/flake.nix create mode 100644 modules/examples/flake/flake.nix (limited to 'modules/examples') diff --git a/modules/examples/flake.nix b/modules/examples/flake.nix deleted file mode 100644 index 2c5f90e..0000000 --- a/modules/examples/flake.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - description = "Example darwin system flake"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs"; - darwin.url = "github:lnl7/nix-darwin"; - darwin.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = { self, darwin, nixpkgs }: - let - configuration = { pkgs, ... }: { - nix.package = pkgs.nixVersions.stable; - - # FIXME: for github actions, this shouldn't be in the example. - services.nix-daemon.enable = true; - }; - in - { - # Build darwin flake using: - # $ darwin-rebuild build --flake ./modules/examples#simple \ - # --override-input darwin . - darwinConfigurations."simple" = darwin.lib.darwinSystem { - modules = [ configuration darwin.darwinModules.simple ]; - system = "x86_64-darwin"; - }; - - # Expose the package set, including overlays, for convenience. - darwinPackages = self.darwinConfigurations."simple".pkgs; - }; -} diff --git a/modules/examples/flake/flake.nix b/modules/examples/flake/flake.nix new file mode 100644 index 0000000..2c5f90e --- /dev/null +++ b/modules/examples/flake/flake.nix @@ -0,0 +1,31 @@ +{ + description = "Example darwin system flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + darwin.url = "github:lnl7/nix-darwin"; + darwin.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, darwin, nixpkgs }: + let + configuration = { pkgs, ... }: { + nix.package = pkgs.nixVersions.stable; + + # FIXME: for github actions, this shouldn't be in the example. + services.nix-daemon.enable = true; + }; + in + { + # Build darwin flake using: + # $ darwin-rebuild build --flake ./modules/examples#simple \ + # --override-input darwin . + darwinConfigurations."simple" = darwin.lib.darwinSystem { + modules = [ configuration darwin.darwinModules.simple ]; + system = "x86_64-darwin"; + }; + + # Expose the package set, including overlays, for convenience. + darwinPackages = self.darwinConfigurations."simple".pkgs; + }; +} -- cgit v1.2.3