Format flake.nix

This commit is contained in:
Torjus Håkestad 2025-01-27 22:35:16 +01:00
parent 5b9b65bc1f
commit 8722afe2c8
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4

View File

@ -3,7 +3,8 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }: outputs =
{ self, nixpkgs }:
let let
allSystems = [ allSystems = [
"x86_64-linux" "x86_64-linux"
@ -11,24 +12,31 @@
"x86_64-darwin" "x86_64-darwin"
"aarch64-darwin" "aarch64-darwin"
]; ];
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f { forAllSystems =
pkgs = import nixpkgs { inherit system; }; f:
}); nixpkgs.lib.genAttrs allSystems (
system:
f {
pkgs = import nixpkgs { inherit system; };
}
);
in in
{ {
nixosModules.backup-helper = import ./backup.nix; nixosModules.backup-helper = import ./backup.nix;
nixosModules.default = self.nixosModules.backup-helper; nixosModules.default = self.nixosModules.backup-helper;
devShells = forAllSystems ({ pkgs }: { devShells = forAllSystems (
default = pkgs.mkShell { { pkgs }:
packages = with pkgs; {
[ default = pkgs.mkShell {
packages = with pkgs; [
restic restic
bash bash
jq jq
curl curl
]; ];
}; };
}); }
);
}; };
} }