mirror of
https://github.com/ryantm/agenix.git
synced 2024-11-22 01:30:48 +03:00
dev: remove i686 support; simplify flake
Why === * flake.nix had a lot of almost redundant lines in it. * i686 support is probably being dropped soon in nixpkgs https://github.com/NixOS/nixpkgs/pull/266164 What changed == * Add new input nix-systems/default which represents the default systems typically used in the Nix community * Define and use an eachSystem function that simplifies the flake.nix file
This commit is contained in:
parent
564595d0ad
commit
344f985526
2 changed files with 26 additions and 26 deletions
18
flake.lock
18
flake.lock
|
@ -61,7 +61,23 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"systems": "systems"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
34
flake.nix
34
flake.nix
|
@ -11,6 +11,7 @@
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
@ -18,9 +19,9 @@
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
darwin,
|
darwin,
|
||||||
home-manager,
|
home-manager,
|
||||||
|
systems,
|
||||||
}: let
|
}: let
|
||||||
agenix = system: nixpkgs.legacyPackages.${system}.callPackage ./pkgs/agenix.nix {};
|
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||||
doc = system: nixpkgs.legacyPackages.${system}.callPackage ./pkgs/doc.nix {};
|
|
||||||
in {
|
in {
|
||||||
nixosModules.age = import ./modules/age.nix;
|
nixosModules.age = import ./modules/age.nix;
|
||||||
nixosModules.default = self.nixosModules.age;
|
nixosModules.default = self.nixosModules.age;
|
||||||
|
@ -33,30 +34,13 @@
|
||||||
|
|
||||||
overlays.default = import ./overlay.nix;
|
overlays.default = import ./overlay.nix;
|
||||||
|
|
||||||
formatter.x86_64-darwin = nixpkgs.legacyPackages.x86_64-darwin.alejandra;
|
formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||||
packages.x86_64-darwin.agenix = agenix "x86_64-darwin";
|
|
||||||
packages.x86_64-darwin.doc = doc "x86_64-darwin";
|
|
||||||
packages.x86_64-darwin.default = self.packages.x86_64-darwin.agenix;
|
|
||||||
|
|
||||||
formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
|
packages = eachSystem (system: {
|
||||||
packages.aarch64-darwin.agenix = agenix "aarch64-darwin";
|
agenix = nixpkgs.legacyPackages.${system}.callPackage ./pkgs/agenix.nix {};
|
||||||
packages.aarch64-darwin.doc = doc "aarch64-darwin";
|
doc = nixpkgs.legacyPackages.${system}.callPackage ./pkgs/doc.nix {};
|
||||||
packages.aarch64-darwin.default = self.packages.aarch64-darwin.agenix;
|
default = self.packages.${system}.agenix;
|
||||||
|
});
|
||||||
formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
|
|
||||||
packages.aarch64-linux.agenix = agenix "aarch64-linux";
|
|
||||||
packages.aarch64-linux.doc = doc "aarch64-linux";
|
|
||||||
packages.aarch64-linux.default = self.packages.aarch64-linux.agenix;
|
|
||||||
|
|
||||||
formatter.i686-linux = nixpkgs.legacyPackages.i686-linux.alejandra;
|
|
||||||
packages.i686-linux.agenix = agenix "i686-linux";
|
|
||||||
packages.i686-linux.doc = doc "i686-linux";
|
|
||||||
packages.i686-linux.default = self.packages.i686-linux.agenix;
|
|
||||||
|
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
|
||||||
packages.x86_64-linux.agenix = agenix "x86_64-linux";
|
|
||||||
packages.x86_64-linux.default = self.packages.x86_64-linux.agenix;
|
|
||||||
packages.x86_64-linux.doc = doc "x86_64-linux";
|
|
||||||
|
|
||||||
checks =
|
checks =
|
||||||
nixpkgs.lib.genAttrs ["aarch64-darwin" "x86_64-darwin"] (system: {
|
nixpkgs.lib.genAttrs ["aarch64-darwin" "x86_64-darwin"] (system: {
|
||||||
|
|
Loading…
Reference in a new issue