mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
Make modules list explit in one place
This commit is contained in:
parent
ea7bdbc18c
commit
2fdf57226a
3 changed files with 20 additions and 17 deletions
25
flake.nix
25
flake.nix
|
|
@ -53,24 +53,31 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake = {
|
||||
# Configurations for Linux (NixOS) systems
|
||||
nixosConfigurations = {
|
||||
# My Linux development computer (on Hetzner)
|
||||
pinch = self.lib.mkLinuxSystem [
|
||||
./systems/hetzner/ax41.nix
|
||||
./nixos/server/harden.nix
|
||||
# I share my Hetzner server with other people who need it.
|
||||
self.nixosModules.guests
|
||||
];
|
||||
pinch = self.lib.mkLinuxSystem {
|
||||
imports = [
|
||||
self.nixosModules.default # Defined in nixos/default.nix
|
||||
./systems/hetzner/ax41.nix
|
||||
./nixos/server/harden.nix
|
||||
# I share my Hetzner server with other people who need it.
|
||||
self.nixosModules.guests
|
||||
];
|
||||
};
|
||||
};
|
||||
# Configurations for my only[^1] macOS machine (using nix-darwin)
|
||||
#
|
||||
# [^1]: This is why attr key is 'default'.
|
||||
darwinConfigurations = {
|
||||
default = self.lib-darwin.mkMacosSystem [
|
||||
./systems/darwin.nix
|
||||
];
|
||||
default = self.lib-darwin.mkMacosSystem {
|
||||
imports = [
|
||||
self.darwinModules.default # Defined in nix-darwin/default.nix
|
||||
./systems/darwin.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -18,16 +18,14 @@
|
|||
../nixos/caches
|
||||
];
|
||||
};
|
||||
lib-darwin.mkMacosSystem = extraModules: inputs.darwin.lib.darwinSystem rec {
|
||||
lib-darwin.mkMacosSystem = mod: inputs.darwin.lib.darwinSystem rec {
|
||||
system = "aarch64-darwin";
|
||||
specialArgs = {
|
||||
inherit inputs system;
|
||||
flake = { inherit config; };
|
||||
rosettaPkgs = import inputs.nixpkgs { system = "x86_64-darwin"; };
|
||||
};
|
||||
modules = [
|
||||
self.darwinModules.default
|
||||
] ++ extraModules;
|
||||
modules = [ mod ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,16 +31,14 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
lib.mkLinuxSystem = extraModules: inputs.nixpkgs.lib.nixosSystem rec {
|
||||
lib.mkLinuxSystem = mod: inputs.nixpkgs.lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
# Arguments to pass to all modules.
|
||||
specialArgs = {
|
||||
inherit system inputs;
|
||||
flake = { inherit config; };
|
||||
};
|
||||
modules = [
|
||||
self.nixosModules.default
|
||||
] ++ extraModules;
|
||||
modules = [ mod ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue