mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-14 20:33:59 +01:00
nix: Use variables
This should make things easier to change and maintain over time, with the ultimate goal of making it easy to provide example configurations that can be expanded upon.
This commit is contained in:
parent
d400ad5986
commit
a22b9355dd
4
examples/laptop.nix
Normal file
4
examples/laptop.nix
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
hostname = "nixos";
|
||||||
|
system = "x86_64-linux";
|
||||||
|
}
|
@ -31,9 +31,11 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, hyprland, stylix, hypr-contrib, nix-gaming, ... }@attrs: {
|
outputs = { self, nixpkgs, home-manager, hyprland, stylix, hypr-contrib, nix-gaming, ... }@attrs: let
|
||||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
variables = import ./examples/laptop.nix;
|
||||||
system = "x86_64-linux";
|
in {
|
||||||
|
nixosConfigurations."${variables.hostname}" = nixpkgs.lib.nixosSystem {
|
||||||
|
system = variables.system;
|
||||||
specialArgs = attrs;
|
specialArgs = attrs;
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
Loading…
Reference in New Issue
Block a user