mirror of
https://github.com/srid/nixos-config.git
synced 2026-01-17 12:57:58 +08:00
Isolate common nix into lib.nix
This commit is contained in:
parent
2fdf57226a
commit
08bfaa4e88
6 changed files with 93 additions and 85 deletions
11
flake.nix
11
flake.nix
|
|
@ -33,11 +33,11 @@
|
|||
inputs.flake-parts.lib.mkFlake { inherit (inputs) self; } {
|
||||
systems = [ "x86_64-linux" "aarch64-darwin" ];
|
||||
imports = [
|
||||
./lib.nix
|
||||
./config.nix
|
||||
./home
|
||||
./nixos
|
||||
./nix-darwin
|
||||
./activate.nix
|
||||
];
|
||||
|
||||
people = {
|
||||
|
|
@ -68,11 +68,9 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
# Configurations for my only[^1] macOS machine (using nix-darwin)
|
||||
#
|
||||
# [^1]: This is why attr key is 'default'.
|
||||
# Configurations for my (only) macOS machine (using nix-darwin)
|
||||
darwinConfigurations = {
|
||||
default = self.lib-darwin.mkMacosSystem {
|
||||
default = self.lib.mkMacosSystem {
|
||||
imports = [
|
||||
self.darwinModules.default # Defined in nix-darwin/default.nix
|
||||
./systems/darwin.nix
|
||||
|
|
@ -81,11 +79,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
perSystem = { pkgs, ... }: {
|
||||
perSystem = { pkgs, config, ... }: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [ pkgs.nixpkgs-fmt ];
|
||||
};
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
apps.default = config.apps.activate;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue