2025-01-23 23:28:22 +00:00
|
|
|
{
|
|
|
|
description = "NixOS system";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2025-01-23 23:50:13 +00:00
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2025-01-24 00:22:01 +00:00
|
|
|
stylix.url = "github:danth/stylix";
|
|
|
|
nixvim.url = "github:nix-community/nixvim";
|
|
|
|
nur = {
|
|
|
|
url = "github:nix-community/NUR";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2025-01-26 11:57:38 +00:00
|
|
|
nix-matlab = {
|
|
|
|
url = "gitlab:doronbehar/nix-matlab";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2025-01-23 23:28:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs =
|
2025-01-24 00:22:01 +00:00
|
|
|
{
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
|
|
|
stylix,
|
|
|
|
nixvim,
|
|
|
|
nur,
|
2025-01-26 11:57:38 +00:00
|
|
|
nix-matlab,
|
2025-01-24 00:22:01 +00:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
2025-01-24 01:38:09 +00:00
|
|
|
makeConfig =
|
|
|
|
machineConfig: userConfig:
|
|
|
|
(nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
machineConfig
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
machine.users = userConfig;
|
|
|
|
home-manager.sharedModules = [
|
|
|
|
stylix.homeManagerModules.stylix
|
|
|
|
nixvim.homeManagerModules.nixvim
|
|
|
|
nur.modules.homeManager.default
|
2025-01-26 11:57:38 +00:00
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
nix-matlab.overlay
|
|
|
|
];
|
|
|
|
}
|
2025-01-24 01:38:09 +00:00
|
|
|
];
|
|
|
|
}
|
2025-01-24 00:22:01 +00:00
|
|
|
];
|
2025-01-24 01:38:09 +00:00
|
|
|
});
|
2025-01-24 00:22:01 +00:00
|
|
|
in
|
2025-01-23 23:28:22 +00:00
|
|
|
{
|
|
|
|
nixosConfigurations = {
|
2025-01-24 01:38:09 +00:00
|
|
|
"20212060" = makeConfig ./machines/laptop.nix {
|
|
|
|
jan = {
|
|
|
|
sudo = true;
|
|
|
|
configuration = ./users/jan.nix;
|
|
|
|
};
|
2025-01-23 23:28:22 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|