update
This commit is contained in:
98
flake.nix
98
flake.nix
@@ -13,50 +13,70 @@
|
||||
};
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||
neovim-nightly-overlay = {
|
||||
url = "github:nix-community/neovim-nightly-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
nixpkgs,
|
||||
nix-darwin,
|
||||
nixos-wsl,
|
||||
...
|
||||
}: {
|
||||
nixosConfigurations = {
|
||||
desktop = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/desktop/configuration.nix
|
||||
];
|
||||
outputs = { nixpkgs, home-manager, nix-darwin, nixos-wsl, neovim-nightly-overlay, ... }@inputs:
|
||||
let
|
||||
user = "mthomson";
|
||||
specialArgs = { inherit inputs user; };
|
||||
overlays = [
|
||||
neovim-nightly-overlay.overlays.default
|
||||
];
|
||||
mkHome = host: {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = specialArgs;
|
||||
users.${user} = import ./hosts/${host}/home.nix;
|
||||
};
|
||||
};
|
||||
thinkpad = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/thinkpad/configuration.nix
|
||||
];
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
desktop = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = specialArgs;
|
||||
modules = [
|
||||
./hosts/desktop/configuration.nix
|
||||
{ nixpkgs.overlays = overlays; }
|
||||
home-manager.nixosModules.home-manager
|
||||
(mkHome "desktop")
|
||||
];
|
||||
};
|
||||
thinkpad = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = specialArgs;
|
||||
modules = [
|
||||
./hosts/thinkpad/configuration.nix
|
||||
{ nixpkgs.overlays = overlays; }
|
||||
home-manager.nixosModules.home-manager
|
||||
(mkHome "thinkpad")
|
||||
];
|
||||
};
|
||||
wsl = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = specialArgs;
|
||||
modules = [
|
||||
nixos-wsl.nixosModules.default
|
||||
./hosts/wsl/configuration.nix
|
||||
{ nixpkgs.overlays = overlays; }
|
||||
home-manager.nixosModules.home-manager
|
||||
(mkHome "wsl")
|
||||
];
|
||||
};
|
||||
};
|
||||
wsl = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
nixos-wsl.nixosModules.default
|
||||
./hosts/wsl/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
darwinConfigurations = {
|
||||
macbook = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/macbook/configuration.nix
|
||||
];
|
||||
darwinConfigurations = {
|
||||
macbook = nix-darwin.lib.darwinSystem {
|
||||
specialArgs = specialArgs;
|
||||
modules = [
|
||||
./hosts/macbook/configuration.nix
|
||||
{ nixpkgs.overlays = overlays; }
|
||||
home-manager.darwinModules.home-manager
|
||||
(mkHome "macbook")
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user