Add multi-host configuration
based loosely on https://github.com/tom-on-the-internet/system-configuration
This commit is contained in:
parent
f554a9038b
commit
8f0f5b9bbf
13 changed files with 254 additions and 240 deletions
53
hosts/default.nix
Normal file
53
hosts/default.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ lib, inputs, nixpkgs, home-manager, user, ... }:
|
||||
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
elnupad = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit user; };
|
||||
modules = [
|
||||
./elnupad
|
||||
./configuration.nix
|
||||
./desktop.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit user; };
|
||||
home-manager.users.${user} = {
|
||||
imports = [
|
||||
(import ./home.nix)
|
||||
(import ./elnupad/home.nix)
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
virtualbox = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit user; };
|
||||
modules = [
|
||||
./virtualbox
|
||||
./configuration.nix
|
||||
./desktop.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = { inherit user; };
|
||||
home-manager.users.${user} = {
|
||||
imports = [
|
||||
(import ./home.nix)
|
||||
(import ./virtualbox/home.nix)
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue