2023-12-17 13:33:15 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-06-01 17:55:28 +00:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
2023-12-17 13:33:15 +00:00
|
|
|
nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
|
2024-04-06 12:00:33 +00:00
|
|
|
|
|
|
|
colmena = {
|
|
|
|
url = "github:zhaofengli/colmena";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-03-24 18:02:31 +00:00
|
|
|
|
2023-12-17 13:33:15 +00:00
|
|
|
home-manager = {
|
2024-06-01 17:55:28 +00:00
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
2023-12-17 13:33:15 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-04-20 13:07:59 +00:00
|
|
|
|
2024-05-04 16:37:52 +00:00
|
|
|
|
2024-04-20 13:07:59 +00:00
|
|
|
cherrykitten-website = {
|
2024-04-21 19:00:58 +00:00
|
|
|
url = "git+https://git.cherrykitten.dev/sammy/cherrykitten.dev?ref=nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-12-17 13:33:15 +00:00
|
|
|
|
2024-04-21 19:00:58 +00:00
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
};
|
2024-03-24 18:02:29 +00:00
|
|
|
|
2024-04-21 19:00:58 +00:00
|
|
|
outputs = inputs @ { self, flake-parts, nixpkgs, nixpkgs-unstable, home-manager, colmena, ... }:
|
|
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
|
|
imports = [
|
|
|
|
./hive.nix
|
|
|
|
];
|
2024-03-24 18:02:22 +00:00
|
|
|
|
2024-04-21 19:00:58 +00:00
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
];
|
2024-03-24 18:02:25 +00:00
|
|
|
|
2024-04-21 19:00:58 +00:00
|
|
|
perSystem = { config, pkgs, ... }: {
|
2024-03-24 18:02:32 +00:00
|
|
|
|
2024-04-21 19:00:58 +00:00
|
|
|
formatter = pkgs.nixpkgs-fmt;
|
|
|
|
devShells =
|
|
|
|
let
|
|
|
|
packages = [ pkgs.nix pkgs.colmena pkgs.just pkgs.git pkgs.home-manager pkgs.pass pkgs.nixos-rebuild ];
|
|
|
|
in
|
|
|
|
{
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
nativeBuildInputs = packages;
|
|
|
|
shellHook = "exec $SHELL";
|
2024-04-15 17:04:08 +00:00
|
|
|
};
|
2024-04-21 19:00:58 +00:00
|
|
|
hcloud = pkgs.mkShell {
|
|
|
|
nativeBuildInputs = packages ++ [ pkgs.hcloud ];
|
|
|
|
shellHook = ''
|
|
|
|
export HCLOUD_TOKEN=$(pass services/hcloud/api_token)
|
|
|
|
exec $SHELL
|
|
|
|
'';
|
2024-04-06 12:00:33 +00:00
|
|
|
};
|
2024-03-24 18:02:32 +00:00
|
|
|
};
|
2024-04-21 19:00:58 +00:00
|
|
|
};
|
2024-03-24 18:02:32 +00:00
|
|
|
|
2024-04-21 19:00:58 +00:00
|
|
|
flake =
|
|
|
|
{
|
2024-05-04 10:03:59 +00:00
|
|
|
|
|
|
|
nixosModules = builtins.listToAttrs (
|
|
|
|
map
|
|
|
|
(x: {
|
|
|
|
name = x;
|
|
|
|
value = import (./modules/nixos + "/${x}");
|
|
|
|
})
|
|
|
|
(builtins.attrNames (builtins.readDir ./modules/nixos))
|
|
|
|
);
|
|
|
|
|
|
|
|
homeManagerModules = builtins.listToAttrs (
|
|
|
|
map
|
|
|
|
(name: {
|
|
|
|
inherit name;
|
|
|
|
value = import (./modules/home + "/${name}");
|
|
|
|
})
|
|
|
|
(builtins.attrNames (builtins.readDir ./modules/home))
|
|
|
|
);
|
|
|
|
|
2024-04-21 19:00:58 +00:00
|
|
|
packages.x86_64-linux.iso = self.nixosConfigurations.iso.config.system.build.isoImage;
|
2024-04-20 08:31:22 +00:00
|
|
|
};
|
2023-12-17 13:33:15 +00:00
|
|
|
};
|
|
|
|
}
|