2022-03-17 08:05:27 +01:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-04-06 20:10:20 +02:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; # actualizar esto para actualizar
|
2022-11-05 05:36:34 +01:00
|
|
|
unstable.url = "github:nixos/nixpkgs/master";
|
2022-03-17 08:05:27 +01:00
|
|
|
nur.url = "github:nix-community/NUR";
|
2022-08-26 05:43:18 +02:00
|
|
|
hm-isolation.url = "github:3442/hm-isolation";
|
2022-11-30 00:28:53 +01:00
|
|
|
nixGL.url = "github:guibou/nixGL";
|
2022-08-26 05:43:18 +02:00
|
|
|
|
2022-03-17 08:05:27 +01:00
|
|
|
home-manager = {
|
2024-04-06 20:10:20 +02:00
|
|
|
url = "github:nix-community/home-manager/release-23.11"; # actualizar esto para actualizar
|
2022-03-17 08:05:27 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-11-29 19:54:49 +01:00
|
|
|
};
|
2022-03-17 08:05:27 +01:00
|
|
|
|
2022-11-30 00:28:53 +01:00
|
|
|
outputs = {self, nixpkgs, unstable, home-manager, nur, hm-isolation, nixGL, ...}:
|
2022-03-29 08:00:36 +02:00
|
|
|
let
|
2022-11-29 19:54:49 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
};
|
|
|
|
|
2022-11-29 20:55:12 +01:00
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
|
|
|
base = platform: {
|
|
|
|
name = platform;
|
|
|
|
value = nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
|
2023-03-23 03:39:10 +01:00
|
|
|
modules = [ ./base ./base/platforms/${platform} ];
|
2022-11-29 20:55:12 +01:00
|
|
|
};
|
2022-03-17 08:05:27 +01:00
|
|
|
};
|
2022-11-29 20:55:12 +01:00
|
|
|
|
|
|
|
home = platform: {
|
|
|
|
name = "fabian@${platform}";
|
|
|
|
value = home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit pkgs;
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
(import ./home {
|
2022-11-30 00:28:53 +01:00
|
|
|
inherit self nixpkgs unstable hm-isolation nixGL;
|
2022-11-29 20:55:12 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
./home/platforms/${platform}.nix
|
|
|
|
|
|
|
|
{
|
|
|
|
config.local = { inherit platform; };
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-03-17 09:56:03 +01:00
|
|
|
};
|
2022-03-29 07:34:10 +02:00
|
|
|
|
2022-11-30 07:18:44 +01:00
|
|
|
localPkgs = import ./pkgs;
|
|
|
|
|
2022-11-29 20:55:12 +01:00
|
|
|
platforms = domain:
|
|
|
|
map
|
|
|
|
(lib.removeSuffix ".nix")
|
|
|
|
(lib.attrNames (builtins.readDir ./${domain}/platforms));
|
|
|
|
|
|
|
|
configs = domain: builder:
|
|
|
|
lib.listToAttrs
|
|
|
|
(map builder (platforms domain));
|
|
|
|
in
|
|
|
|
{
|
|
|
|
|
|
|
|
nixosConfigurations = configs "base" base;
|
|
|
|
homeConfigurations = configs "home" home;
|
2022-11-30 07:18:44 +01:00
|
|
|
packages."${system}" = localPkgs pkgs;
|
2022-11-29 20:55:12 +01:00
|
|
|
|
2022-03-29 08:00:36 +02:00
|
|
|
overlay = self: super: {
|
2022-11-29 18:33:48 +01:00
|
|
|
unstable = import unstable {
|
|
|
|
inherit(super) config system;
|
|
|
|
};
|
2022-11-30 07:18:44 +01:00
|
|
|
local = localPkgs self;
|
2022-03-29 08:00:36 +02:00
|
|
|
};
|
2022-03-17 08:05:27 +01:00
|
|
|
};
|
|
|
|
}
|