nixos/flake.nix

65 lines
1.6 KiB
Nix
Raw Normal View History

2024-02-25 23:33:11 -08:00
{
2024-05-29 20:43:48 -07:00
description = "snowhawk: a nixos configuration flake";
2024-02-25 23:33:11 -08:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2024-05-29 15:23:56 -07:00
neovim-overlay.url = "github:nix-community/neovim-nightly-overlay";
2024-02-25 23:33:11 -08:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-02-28 20:37:01 -08:00
fish_theme = {
url = "git+https://git.zynh.me/Zynh0722/omf-theme";
flake = false;
};
2024-02-25 23:33:11 -08:00
};
2024-06-28 07:48:26 -07:00
outputs =
{ self, nixpkgs, ... }@inputs:
2024-02-25 23:33:11 -08:00
{
2024-06-28 07:11:38 -07:00
nixosConfigurations =
let
2024-06-28 07:48:26 -07:00
lib = import ./lib { inherit (nixpkgs) lib; };
2024-06-28 08:06:07 -07:00
toPartialNixosConfig =
2024-06-28 07:55:01 -07:00
{ hostname, system }:
{
2024-06-28 08:06:07 -07:00
name = hostname;
value = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
./hosts/${hostname}/hardware-configuration.nix
./hosts/${hostname}/configuration.nix
inputs.home-manager.nixosModules.default
];
};
2024-06-28 07:55:01 -07:00
};
2024-06-28 08:03:01 -07:00
compileSystems =
systems:
lib.right
builtins.listToAttrs
2024-06-28 08:06:07 -07:00
(map toPartialNixosConfig)
2024-06-28 08:03:01 -07:00
systems;
2024-06-28 07:11:38 -07:00
in
2024-06-28 07:48:26 -07:00
compileSystems
[
{
hostname = "snowhawk";
system = "x86_64-linux";
}
{
hostname = "sprite";
system = "aarch64-linux";
}
{
hostname = "nixos";
system = "x86_64-linux";
}
];
2024-02-25 23:33:11 -08:00
};
}