flake/flake.nix

83 lines
1.7 KiB
Nix
Raw Normal View History

2023-08-29 13:23:48 +02:00
{
description = "example flake idk";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
2023-11-07 15:52:47 +01:00
2023-11-08 14:42:16 +01:00
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
2023-11-13 04:22:42 +01:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-11-08 15:18:44 +01:00
lanzaboote = {
url = "github:nix-community/lanzaboote";
2023-11-08 14:42:16 +01:00
inputs = {
nixpkgs.follows = "nixpkgs";
2023-11-08 15:18:44 +01:00
flake-parts.follows = "flake-parts";
2023-11-08 14:42:16 +01:00
};
};
2023-11-08 15:18:44 +01:00
getchvim = {
url = "github:getchoo/getchvim";
2023-11-08 14:42:16 +01:00
inputs = {
nixpkgs.follows = "nixpkgs";
2023-11-08 15:18:44 +01:00
parts.follows = "flake-parts";
2023-11-08 14:42:16 +01:00
};
2023-11-07 15:52:47 +01:00
};
2023-08-29 13:23:48 +02:00
};
2023-11-08 14:42:16 +01:00
outputs = {
2023-11-14 00:56:27 +01:00
flake-parts,
2023-11-08 14:42:16 +01:00
nixpkgs,
2023-11-08 15:18:44 +01:00
lanzaboote,
2023-11-13 04:22:42 +01:00
home-manager,
2023-11-08 14:42:16 +01:00
...
2023-11-14 00:56:27 +01:00
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
2023-11-14 00:56:27 +01:00
flake = let
mkSystem = name:
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./common.nix
2023-11-14 00:56:27 +01:00
./${name}
./${name}/hardware-configuration.nix
2023-11-14 00:56:27 +01:00
{networking.hostName = name;}
lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager
];
specialArgs = inputs;
};
in {
nixosConfigurations = nixpkgs.lib.genAttrs ["fuji" "kilimandjaro"] mkSystem;
};
2023-11-05 22:49:25 +01:00
2023-11-14 00:56:27 +01:00
perSystem = {system, ...}: let
pkgs = import nixpkgs {
inherit system;
};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs; [
alejandra
fzf
just
nil
];
};
formatter = pkgs.alejandra;
};
};
2023-08-29 13:23:48 +02:00
}