2024-08-23 21:32:44 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; # actualizar esto para actualizar
|
|
|
|
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
hm-isolation.url = "github:3442/hm-isolation";
|
|
|
|
nixGL.url = "github:guibou/nixGL";
|
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-24.05"; # actualizar esto para actualizar
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
unstable,
|
|
|
|
home-manager,
|
|
|
|
nur,
|
|
|
|
hm-isolation,
|
|
|
|
nixGL,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
system = "x86_64-linux";
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
};
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
inherit (pkgs) lib;
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
base = platform: {
|
|
|
|
name = platform;
|
|
|
|
value = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
modules = [(import ./base)];
|
2024-08-23 21:32:44 +02:00
|
|
|
};
|
2024-08-24 09:55:59 +02:00
|
|
|
};
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
home = platform: {
|
|
|
|
name = "fabian@${platform}";
|
|
|
|
value = home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
modules = [
|
|
|
|
(import ./home {
|
|
|
|
inherit self nixpkgs unstable hm-isolation nixGL;
|
|
|
|
})
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
./home/platforms/${platform}.nix
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
{
|
|
|
|
config.local = {inherit platform;};
|
|
|
|
}
|
|
|
|
];
|
2024-08-23 21:32:44 +02:00
|
|
|
};
|
2024-08-24 09:55:59 +02:00
|
|
|
};
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
localPkgs = import ./pkgs;
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
platforms = domain:
|
|
|
|
map
|
|
|
|
(lib.removeSuffix ".nix")
|
|
|
|
(lib.attrNames (builtins.readDir ./${domain}/platforms));
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
configs = domain: builder:
|
|
|
|
lib.listToAttrs
|
|
|
|
(map builder (platforms domain));
|
|
|
|
in {
|
|
|
|
nixosConfigurations = configs "base" base;
|
|
|
|
homeConfigurations = configs "home" home;
|
|
|
|
packages.${system} = localPkgs pkgs;
|
|
|
|
formatter.${system} = pkgs.alejandra;
|
2024-08-23 21:32:44 +02:00
|
|
|
|
2024-08-24 09:55:59 +02:00
|
|
|
overlay = self: super: {
|
|
|
|
unstable = import unstable {
|
|
|
|
inherit (super) config system;
|
2024-08-23 21:32:44 +02:00
|
|
|
};
|
2024-08-24 09:55:59 +02:00
|
|
|
local = localPkgs self;
|
2024-08-23 21:32:44 +02:00
|
|
|
};
|
2024-08-24 09:55:59 +02:00
|
|
|
};
|
2024-08-23 21:32:44 +02:00
|
|
|
}
|