{ description = "snowhawk: a nixos configuration flake"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; neovim-overlay.url = "github:nix-community/neovim-nightly-overlay"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; fish_theme = { url = "git+https://git.zynh.me/Zynh0722/omf-theme"; flake = false; }; }; outputs = { self, nixpkgs, ... }@inputs: { nixosConfigurations = let lib = import ./lib { inherit (nixpkgs) lib; }; cleanHostname = config: builtins.removeAttrs config [ "hostname" ]; toPartialNixosConfigSet = config: { name = config.hostname; value = nixpkgs.lib.nixosSystem (cleanHostname config); }; toNixosSystemConfig = { hostname, system }: { inherit system hostname; specialArgs = { inherit inputs; }; modules = [ ./hosts/${hostname}/hardware-configuration.nix ./hosts/${hostname}/configuration.nix inputs.home-manager.nixosModules.default ]; }; compileSystems = systems: lib.right builtins.listToAttrs (map toPartialNixosConfigSet) (map toNixosSystemConfig) systems; in compileSystems [ { hostname = "snowhawk"; system = "x86_64-linux"; } { hostname = "sprite"; system = "aarch64-linux"; } { hostname = "nixos"; system = "x86_64-linux"; } ]; }; }