aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2026-09-23 08:09:45 +0200
committerKarel Kočí <cynerd@email.cz>2026-09-23 08:09:45 +0200
commitc42de3037ec406fa834c6c1756a6f0b70dcdd38f (patch)
tree0d195492fc3f24c9742567f5bff8c157ec72baa0 /flake.nix
parentb0af9c76e1687f2afad15ba7a0de1d24331868c8 (diff)
downloadnixos-personal-c42de3037ec406fa834c6c1756a6f0b70dcdd38f.tar.gz
nixos-personal-c42de3037ec406fa834c6c1756a6f0b70dcdd38f.tar.bz2
nixos-personal-c42de3037ec406fa834c6c1756a6f0b70dcdd38f.zip
treewise: cleanup and general updateHEADmaster
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix24
1 files changed, 9 insertions, 15 deletions
diff --git a/flake.nix b/flake.nix
index e9427f6..80f9214 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,6 +2,7 @@
description = "Cynerd's personal flake";
inputs = {
+ systems.url = "github:nix-systems/default-linux";
nixpkgs.url = "flake:nixpkgs/nixos-unstable-small";
nixos-hardware.url = "nixos-hardware";
nixosdeploy.url = "gitlab:cynerd/nixosdeploy";
@@ -34,20 +35,10 @@
nixturris,
...
}: let
- inherit (nixpkgs.lib) genAttrs mapAttrs' nameValuePair filterAttrs;
+ inherit (nixpkgs.lib) genAttrs;
+ inherit (nixosdeploy.lib) nixosFilterHostBuilds;
forSystems = genAttrs (import systems);
withPkgs = func: forSystems (system: func self.legacyPackages.${system});
-
- osFilterMap = system: attr:
- mapAttrs' (n: v: let
- os =
- if v.config.nixpkgs.hostPlatform.system == system
- then v
- else (v.extendModules {modules = [{nixpkgs.buildPlatform.system = system;}];});
- in
- nameValuePair "${attr}-${n}" os.config.system.build."${attr}")
- (filterAttrs (_: v: v.config.system.build ? "${attr}")
- self.nixosConfigurations);
in {
overlays = {
lib = import ./lib;
@@ -84,9 +75,12 @@
packages = forSystems (
system:
{inherit (nixosdeploy.packages.${system}) default;}
- // (osFilterMap system "toplevel")
- // (osFilterMap system "tarball")
- // (osFilterMap system "firmware")
+ // (nixosFilterHostBuilds self.nixosConfigurations [
+ "toplevel"
+ "tarball"
+ "firmware"
+ ]
+ system)
);
devShells = withPkgs (import ./devShells);