flake: simplify the definition of packages
This commit is contained in:
parent
a44a99e371
commit
aafa64942c
16
flake.nix
16
flake.nix
|
@ -92,7 +92,7 @@
|
||||||
# - if fs wasn't resized automatically, then `sudo btrfs filesystem resize max /`
|
# - if fs wasn't resized automatically, then `sudo btrfs filesystem resize max /`
|
||||||
# - checkout this flake into /etc/nixos AND UPDATE THE FS UUIDS.
|
# - checkout this flake into /etc/nixos AND UPDATE THE FS UUIDS.
|
||||||
# - `nixos-rebuild --flake './#<host>' switch`
|
# - `nixos-rebuild --flake './#<host>' switch`
|
||||||
imgs = builtins.mapAttrs (name: value: value.config.system.build.img) self.nixosConfigurations;
|
imgs = builtins.mapAttrs (_: host-dfn: host-dfn.config.system.build.img) self.nixosConfigurations;
|
||||||
|
|
||||||
overlays = rec {
|
overlays = rec {
|
||||||
default = pkgs;
|
default = pkgs;
|
||||||
|
@ -131,16 +131,10 @@
|
||||||
aarch64-linux = allPkgsFor "aarch64-linux";
|
aarch64-linux = allPkgsFor "aarch64-linux";
|
||||||
};
|
};
|
||||||
|
|
||||||
packages =
|
# extract only our own packages from the full set
|
||||||
let
|
packages = builtins.mapAttrs
|
||||||
myPkgsFor = sys:
|
(_: full: full.sane // { inherit (full) sane uninsane-dot-org; })
|
||||||
let full = self.legacyPackages."${sys}"; in full.sane // {
|
self.legacyPackages;
|
||||||
inherit (full) sane uninsane-dot-org;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
x86_64-linux = myPkgsFor "x86_64-linux";
|
|
||||||
aarch64-linux = myPkgsFor "aarch64-linux";
|
|
||||||
};
|
|
||||||
|
|
||||||
templates = {
|
templates = {
|
||||||
python-data = {
|
python-data = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user