mirror of
https://github.com/thegeneralist01/config.git
synced 2026-03-07 10:59:55 +01:00
initial commit
This commit is contained in:
commit
50da7ffff8
68 changed files with 3086 additions and 0 deletions
39
flake.nix
Normal file
39
flake.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
description = "thegeneralist's config flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-darwin = {
|
||||
url = "github:nix-darwin/nix-darwin/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
inputs.darwin.follows = "nix-darwin";
|
||||
};
|
||||
ghostty = {
|
||||
url = "github:ghostty-org/ghostty";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }: let
|
||||
inherit (builtins) readDir;
|
||||
inherit (nixpkgs.lib) attrsToList const groupBy listToAttrs mapAttrs;
|
||||
|
||||
targetHost = readDir ./hosts
|
||||
|> mapAttrs (name: const <| import ./hosts/${name} nixpkgs.lib inputs self)
|
||||
|> attrsToList
|
||||
|> groupBy (host:
|
||||
if host.name == "thegeneralist" then
|
||||
"nixosConfigurations"
|
||||
else
|
||||
"darwinConfigurations")
|
||||
|> mapAttrs (const listToAttrs);
|
||||
in targetHost;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue