diff options
| author | seth <[email protected]> | 2024-07-06 04:02:35 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-07-06 04:12:41 -0400 |
| commit | 8875ad5fb466944667e5171035aa8f5c01675e93 (patch) | |
| tree | e453699bbfcc7b8fb566490c8930e60c6adac07b /templates/full | |
| parent | c3ad734168ea13fde1e2f6ec3fbdccf78f72aada (diff) | |
tree-wide: alejandra -> nixfmt
Diffstat (limited to 'templates/full')
| -rw-r--r-- | templates/full/default.nix | 15 | ||||
| -rw-r--r-- | templates/full/flake.nix | 7 | ||||
| -rw-r--r-- | templates/full/nix/default.nix | 8 | ||||
| -rw-r--r-- | templates/full/nix/derivation.nix | 2 | ||||
| -rw-r--r-- | templates/full/nix/packages.nix | 24 | ||||
| -rw-r--r-- | templates/full/nix/shell.nix | 20 |
6 files changed, 37 insertions, 39 deletions
diff --git a/templates/full/default.nix b/templates/full/default.nix index 5804660..6466507 100644 --- a/templates/full/default.nix +++ b/templates/full/default.nix @@ -1,10 +1,9 @@ -(import - (let +(import ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in - fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; - sha256 = lock.nodes.flake-compat.locked.narHash; - }) - {src = ./.;}) -.defaultNix + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } +) { src = ./.; }).defaultNix diff --git a/templates/full/flake.nix b/templates/full/flake.nix index b9be66c..9d33ecb 100644 --- a/templates/full/flake.nix +++ b/templates/full/flake.nix @@ -15,9 +15,10 @@ }; }; - outputs = inputs: - inputs.flake-parts.lib.mkFlake {inherit inputs;} { - imports = [./nix]; + outputs = + inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ ./nix ]; systems = [ "x86_64-linux" diff --git a/templates/full/nix/default.nix b/templates/full/nix/default.nix index c0457fd..66bb711 100644 --- a/templates/full/nix/default.nix +++ b/templates/full/nix/default.nix @@ -4,7 +4,9 @@ ./packages.nix ]; - perSystem = {pkgs, ...}: { - formatter = pkgs.alejandra; - }; + perSystem = + { pkgs, ... }: + { + formatter = pkgs.alejandra; + }; } diff --git a/templates/full/nix/derivation.nix b/templates/full/nix/derivation.nix index 043b140..ac18240 100644 --- a/templates/full/nix/derivation.nix +++ b/templates/full/nix/derivation.nix @@ -1 +1 @@ -{hello}: hello +{ hello }: hello diff --git a/templates/full/nix/packages.nix b/templates/full/nix/packages.nix index 562823e..e48cdde 100644 --- a/templates/full/nix/packages.nix +++ b/templates/full/nix/packages.nix @@ -1,18 +1,18 @@ -{self, ...}: let +{ self, ... }: +let version = self.shortRev or self.dirtyShortRev or "unknown"; -in { +in +{ flake.overlays.default = _: prev: { - hello = prev.callPackage ./derivation.nix {inherit version;}; + hello = prev.callPackage ./derivation.nix { inherit version; }; }; - perSystem = { - pkgs, - self', - ... - }: { - package = { - hello = pkgs.callPackage ./derivation.nix {inherit version;}; - default = self'.packages.hello; + perSystem = + { pkgs, self', ... }: + { + package = { + hello = pkgs.callPackage ./derivation.nix { inherit version; }; + default = self'.packages.hello; + }; }; - }; } diff --git a/templates/full/nix/shell.nix b/templates/full/nix/shell.nix index 66cd1a4..680c875 100644 --- a/templates/full/nix/shell.nix +++ b/templates/full/nix/shell.nix @@ -1,17 +1,13 @@ { - perSystem = { - pkgs, - self', - ... - }: { - devShells = { - default = pkgs.mkShell { - packages = [ - self'.formatter - ]; + perSystem = + { pkgs, self', ... }: + { + devShells = { + default = pkgs.mkShell { + packages = [ self'.formatter ]; - inputsFrom = [self'.packages.hello]; + inputsFrom = [ self'.packages.hello ]; + }; }; }; - }; } |
