2023-05-04 19:09:45 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-03-06 01:17:14 +01:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-06-06 01:26:46 +02:00
|
|
|
|
2023-05-17 05:07:14 +02:00
|
|
|
home-manager = {
|
2023-12-13 00:29:55 +01:00
|
|
|
url = "github:nix-community/home-manager";
|
2023-05-17 05:07:14 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-06-06 01:26:46 +02:00
|
|
|
|
2023-05-17 05:07:14 +02:00
|
|
|
stylix = {
|
2024-01-25 23:34:09 +01:00
|
|
|
url = "github:bluskript/stylix";
|
2023-05-17 05:35:52 +02:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager.follows = "home-manager";
|
|
|
|
};
|
2023-05-17 05:07:14 +02:00
|
|
|
};
|
2023-08-08 20:08:41 +02:00
|
|
|
|
|
|
|
sakaya = {
|
|
|
|
url = "github:donovanglover/sakaya";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-06-21 08:41:38 +02:00
|
|
|
};
|
2023-06-06 01:26:46 +02:00
|
|
|
|
2024-04-01 00:51:09 +02:00
|
|
|
outputs = { self, nixpkgs, ... } @ attrs: with nixpkgs.lib; {
|
2024-03-09 03:25:47 +01:00
|
|
|
nixosConfigurations = {
|
|
|
|
nixos = nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = attrs;
|
2024-04-01 00:51:09 +02:00
|
|
|
modules = [
|
|
|
|
./.
|
|
|
|
{
|
2024-04-01 10:25:10 +02:00
|
|
|
environment.pathsToLink = [
|
|
|
|
"/share/backgrounds"
|
|
|
|
"/share/eww"
|
|
|
|
"/share/thumbnailers"
|
|
|
|
"/share/fonts"
|
|
|
|
];
|
|
|
|
|
2024-04-01 00:51:09 +02:00
|
|
|
nixpkgs.overlays = builtins.attrValues self.overlays;
|
2024-04-01 01:23:01 +02:00
|
|
|
imports = builtins.attrValues self.nixosModules;
|
|
|
|
home-manager.sharedModules = builtins.attrValues self.homeManagerModules;
|
2024-04-01 10:25:10 +02:00
|
|
|
environment.systemPackages = builtins.attrValues self.packages.x86_64-linux;
|
2024-04-01 00:51:09 +02:00
|
|
|
}
|
|
|
|
];
|
2024-03-09 03:25:47 +01:00
|
|
|
};
|
2023-06-21 08:41:38 +02:00
|
|
|
};
|
2024-04-01 04:22:22 +02:00
|
|
|
} //
|
|
|
|
(builtins.listToAttrs
|
|
|
|
(builtins.map
|
|
|
|
(attr: {
|
|
|
|
name = attr;
|
|
|
|
value = let
|
|
|
|
directory = builtins.replaceStrings
|
|
|
|
["nixosModules" "homeManagerModules"]
|
|
|
|
["modules" "home"]
|
|
|
|
attr;
|
2024-04-01 10:12:21 +02:00
|
|
|
function = if directory == "packages"
|
|
|
|
then nixpkgs.legacyPackages.x86_64-linux.callPackage
|
|
|
|
else import;
|
|
|
|
filesMap = (builtins.listToAttrs
|
|
|
|
(builtins.map
|
|
|
|
(filename: {
|
|
|
|
name = builtins.replaceStrings [".nix"] [""] filename;
|
|
|
|
value = function ./${directory}/${filename}; })
|
|
|
|
(builtins.attrNames
|
|
|
|
(builtins.readDir ./${directory}))));
|
|
|
|
callP = (builtins.listToAttrs
|
|
|
|
(builtins.map
|
|
|
|
(filename: {
|
|
|
|
name = builtins.replaceStrings [".nix"] [""] filename;
|
|
|
|
value = function ./${directory}/${filename} { }; })
|
|
|
|
(builtins.attrNames
|
|
|
|
(builtins.readDir ./${directory}))));
|
|
|
|
val = if directory == "packages"
|
|
|
|
then { x86_64-linux = callP; }
|
|
|
|
else filesMap;
|
|
|
|
in (val); })
|
|
|
|
["overlays" "nixosModules" "homeManagerModules" "packages"]));
|
2023-05-04 19:09:45 +02:00
|
|
|
}
|