fixup! flake: refactor
This commit is contained in:
parent
f457676f1c
commit
42b9e71edf
1 changed files with 13 additions and 12 deletions
25
flake.nix
25
flake.nix
|
@ -122,7 +122,17 @@
|
||||||
inputs.flake-utils.lib.eachDefaultSystem (system: let
|
inputs.flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
||||||
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
treefmtEval = inputs.treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
|
||||||
|
in {
|
||||||
|
### nix fmt
|
||||||
|
formatter = treefmtEval.config.build.wrapper;
|
||||||
|
|
||||||
|
### nix flake check
|
||||||
|
checks = {formatting = treefmtEval.config.build.check inputs.self;};
|
||||||
|
|
||||||
|
### nix {run,shell,build}
|
||||||
|
packages = import ./pkgs pkgs;
|
||||||
|
})
|
||||||
|
// (let
|
||||||
mkNixOS = system: modules:
|
mkNixOS = system: modules:
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
inherit system modules;
|
inherit system modules;
|
||||||
|
@ -135,23 +145,14 @@
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
### nix fmt
|
|
||||||
formatter = treefmtEval.config.build.wrapper;
|
|
||||||
|
|
||||||
### nix flake check
|
|
||||||
checks = {formatting = treefmtEval.config.build.check inputs.self;};
|
|
||||||
|
|
||||||
### nix {run,shell,build}
|
|
||||||
packages = import ./pkgs pkgs;
|
|
||||||
|
|
||||||
### nixpkgs.overlays = [];
|
|
||||||
overlays = import ./overlays;
|
|
||||||
|
|
||||||
### imports = [];
|
### imports = [];
|
||||||
nixosModules.default = ./nixos/modules;
|
nixosModules.default = ./nixos/modules;
|
||||||
darwinModules.default = ./darwin/modules;
|
darwinModules.default = ./darwin/modules;
|
||||||
homeManagerModules.default = ./home/modules;
|
homeManagerModules.default = ./home/modules;
|
||||||
|
|
||||||
|
### nixpkgs.overlays = [];
|
||||||
|
overlays = import ./overlays;
|
||||||
|
|
||||||
### NixOS
|
### NixOS
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"aristotle" = mkNixOS "x86_64-linux" [./hosts/aristotle];
|
"aristotle" = mkNixOS "x86_64-linux" [./hosts/aristotle];
|
||||||
|
|
Loading…
Reference in a new issue