|
62 | 62 | };
|
63 | 63 |
|
64 | 64 | outputs =
|
65 |
| - inputs@{ self, flake-parts, ... }: |
| 65 | + inputs@{ |
| 66 | + self, |
| 67 | + flake-parts, |
| 68 | + nixpkgs, |
| 69 | + ... |
| 70 | + }: |
66 | 71 | flake-parts.lib.mkFlake { inherit inputs; } {
|
67 | 72 | imports = [ inputs.devshell.flakeModule ];
|
68 |
| - flake = { |
69 |
| - overlay = self.overlays.default; |
70 |
| - overlays.default = |
71 |
| - let |
72 |
| - nixpkgs-stable = import inputs.nixpkgs-stable { |
73 |
| - system = "x86_64-linux"; |
74 |
| - config = { |
75 |
| - allowUnfree = true; |
| 73 | + flake = |
| 74 | + let |
| 75 | + inherit (nixpkgs) lib; |
| 76 | + in |
| 77 | + { |
| 78 | + overlay = self.overlays.default; |
| 79 | + overlays.default = |
| 80 | + let |
| 81 | + nixpkgs-stable = import inputs.nixpkgs-stable { |
| 82 | + system = "x86_64-linux"; |
| 83 | + config = { |
| 84 | + allowUnfree = true; |
| 85 | + }; |
76 | 86 | };
|
77 |
| - }; |
78 |
| - in |
79 |
| - import ./patches { inherit nixpkgs-stable; }; |
80 |
| - homeManagerModules = { |
81 |
| - dotfiles = import ./modules/home-manager/dotfiles.nix; |
82 |
| - zinit = import ./modules/home-manager/zinit.nix; |
83 |
| - zotero = import ./modules/home-manager/zotero.nix; |
84 |
| - }; |
85 |
| - nixosModules = { |
86 |
| - vfio = import ./modules/nixos/vfio.nix; |
87 |
| - virtualisation = import ./modules/nixos/virtualisation.nix; |
88 |
| - xp-pentablet = import ./modules/nixos/xp-pentablet.nix; |
89 |
| - }; |
90 |
| - homeConfigurations = import ./machines/home-manager.nix { |
91 |
| - inherit (inputs.nixpkgs) lib; |
92 |
| - inherit inputs self; |
93 |
| - }; |
94 |
| - nixosConfigurations = import ./machines { |
95 |
| - inherit (inputs.nixpkgs) lib; |
96 |
| - inherit inputs self; |
| 87 | + in |
| 88 | + import ./patches { inherit nixpkgs-stable; }; |
| 89 | + homeManagerModules = |
| 90 | + let |
| 91 | + modulePath = ./modules/home-manager; |
| 92 | + in |
| 93 | + lib.mapAttrs' ( |
| 94 | + f: _: lib.nameValuePair (lib.removeSuffix ".nix" f) (import (modulePath + "/${f}")) |
| 95 | + ) (builtins.readDir modulePath); |
| 96 | + nixosModules = |
| 97 | + let |
| 98 | + modulePath = ./modules/nixos; |
| 99 | + in |
| 100 | + lib.mapAttrs' ( |
| 101 | + f: _: lib.nameValuePair (lib.removeSuffix ".nix" f) (import (modulePath + "/${f}")) |
| 102 | + ) (builtins.readDir modulePath); |
| 103 | + homeConfigurations = import ./machines/home-manager.nix { |
| 104 | + inherit (inputs.nixpkgs) lib; |
| 105 | + inherit inputs self; |
| 106 | + }; |
| 107 | + nixosConfigurations = import ./machines { |
| 108 | + inherit (inputs.nixpkgs) lib; |
| 109 | + inherit inputs self; |
| 110 | + }; |
97 | 111 | };
|
98 |
| - }; |
99 | 112 | systems = [ "x86_64-linux" ];
|
100 | 113 | perSystem =
|
101 | 114 | { pkgs, system, ... }:
|
|
0 commit comments