dotfiles/flake.nix

57 lines
1.3 KiB
Nix
Raw Normal View History

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-23 23:28:22 +00:00
};
outputs =
2025-01-24 00:22:01 +00:00
{
nixpkgs,
home-manager,
stylix,
nixvim,
nur,
...
}:
let
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-24 00:22:01 +00:00
];
});
2025-01-24 00:22:01 +00:00
in
2025-01-23 23:28:22 +00:00
{
nixosConfigurations = {
"20212060" = makeConfig ./machines/laptop.nix {
jan = {
sudo = true;
configuration = ./users/jan.nix;
};
2025-01-23 23:28:22 +00:00
};
};
};
}