dotfiles/flake.nix

72 lines
1.8 KiB
Nix
Raw Permalink 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-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
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
{
2025-01-26 14:11:52 +00:00
# TODO: Remove insecure package exception
nixpkgs.config.permittedInsecurePackages = [
"freeimage-unstable-2021-11-01" # For emulation station
"electron-31.7.7" # For feishin
];
2025-01-26 11:57:38 +00:00
nixpkgs.overlays = [
nix-matlab.overlay
];
}
];
}
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
};
};
};
}