2023-05-04 19:09:45 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-08-27 19:24:35 +02: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 = {
|
2024-08-13 20:28:59 +02:00
|
|
|
url = "github:donovanglover/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-08-03 18:17:31 +02:00
|
|
|
url = "github:donovanglover/stylix";
|
2024-10-11 19:47:59 +02:00
|
|
|
|
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";
|
|
|
|
};
|
2024-06-15 18:42:02 +02:00
|
|
|
|
|
|
|
mobile-nixos = {
|
2024-06-28 00:45:36 +02:00
|
|
|
url = "github:donovanglover/mobile-nixos";
|
2024-10-11 17:59:38 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-06-15 18:42:02 +02:00
|
|
|
};
|
2023-06-21 08:41:38 +02:00
|
|
|
};
|
2023-06-06 01:26:46 +02:00
|
|
|
|
2024-08-03 20:42:39 +02:00
|
|
|
outputs =
|
2024-10-11 19:47:59 +02:00
|
|
|
{ self, nixpkgs, ... }:
|
2024-04-05 17:26:22 +02:00
|
|
|
let
|
2024-10-11 20:52:33 +02:00
|
|
|
inherit (nixpkgs.lib) nixosSystem genAttrs replaceStrings;
|
2024-10-10 01:25:40 +02:00
|
|
|
inherit (nixpkgs.lib.filesystem) packagesFromDirectoryRecursive listFilesRecursive;
|
2024-08-03 20:42:39 +02:00
|
|
|
|
2024-10-10 01:51:53 +02:00
|
|
|
forAllSystems =
|
|
|
|
function:
|
2024-10-11 20:30:35 +02:00
|
|
|
genAttrs [
|
2024-10-10 00:50:02 +02:00
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
] (system: function nixpkgs.legacyPackages.${system});
|
2024-10-10 02:16:53 +02:00
|
|
|
|
|
|
|
nameOf = path: replaceStrings [ ".nix" ] [ "" ] (baseNameOf (toString path));
|
2024-04-05 17:26:22 +02:00
|
|
|
in
|
|
|
|
{
|
2024-10-10 01:51:53 +02:00
|
|
|
packages = forAllSystems (
|
|
|
|
pkgs:
|
|
|
|
packagesFromDirectoryRecursive {
|
2024-10-10 14:17:37 +02:00
|
|
|
inherit (pkgs) callPackage;
|
|
|
|
|
2024-10-10 01:51:53 +02:00
|
|
|
directory = ./packages;
|
|
|
|
}
|
|
|
|
);
|
2024-10-10 00:50:02 +02:00
|
|
|
|
2024-10-11 20:30:35 +02:00
|
|
|
nixosModules = genAttrs (map nameOf (listFilesRecursive ./modules)) (
|
|
|
|
name: import ./modules/${name}.nix
|
2024-10-10 01:44:40 +02:00
|
|
|
);
|
|
|
|
|
2024-10-11 20:52:33 +02:00
|
|
|
homeModules = genAttrs (map nameOf (listFilesRecursive ./home)) (name: import ./home/${name}.nix);
|
2024-10-10 01:44:40 +02:00
|
|
|
|
2024-10-11 20:30:35 +02:00
|
|
|
overlays = genAttrs (map nameOf (listFilesRecursive ./overlays)) (
|
|
|
|
name: import ./overlays/${name}.nix
|
2024-10-10 01:44:40 +02:00
|
|
|
);
|
|
|
|
|
2024-10-11 20:39:00 +02:00
|
|
|
checks = forAllSystems (
|
|
|
|
pkgs:
|
|
|
|
genAttrs (map nameOf (listFilesRecursive ./tests)) (
|
|
|
|
name:
|
|
|
|
import ./tests/${name}.nix {
|
|
|
|
inherit self pkgs;
|
|
|
|
}
|
|
|
|
)
|
2024-10-10 01:51:53 +02:00
|
|
|
);
|
2024-10-10 01:25:40 +02:00
|
|
|
|
2024-10-10 02:13:44 +02:00
|
|
|
nixosConfigurations = {
|
|
|
|
nixos = nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-10-11 19:47:59 +02:00
|
|
|
specialArgs.nix-config = self;
|
2024-06-15 18:42:02 +02:00
|
|
|
|
2024-10-10 02:13:44 +02:00
|
|
|
modules = [
|
|
|
|
./hosts/laptop/configuration.nix
|
|
|
|
./hosts/laptop/hardware-configuration.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
mobile-nixos = nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
2024-10-11 19:47:59 +02:00
|
|
|
specialArgs.nix-config = self;
|
2024-06-15 18:42:02 +02:00
|
|
|
|
2024-10-10 02:13:44 +02:00
|
|
|
modules = [
|
|
|
|
./hosts/phone/configuration.nix
|
|
|
|
./hosts/phone/hardware-configuration.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
2024-06-15 18:37:15 +02:00
|
|
|
|
2024-10-10 02:10:41 +02:00
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
2024-10-10 01:44:40 +02:00
|
|
|
};
|
2023-05-04 19:09:45 +02:00
|
|
|
}
|