125 lines
3.6 KiB
Nix
125 lines
3.6 KiB
Nix
{
|
|
inputs = {
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
|
utils.url = "github:numtide/flake-utils";
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
artemist = {
|
|
url = "git+https://git.mildlyfunctional.gay/artemist/packages.git";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.utils.follows = "utils";
|
|
};
|
|
darwin = {
|
|
url = "github:lnl7/nix-darwin";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
fonts = {
|
|
url = "git+https://git.mildlyfunctional.gay/artemist/fonts.git";
|
|
inputs.artemist.follows = "artemist";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "utils";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
jovian = {
|
|
url = "github:jovian-experiments/jovian-nixos";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.nix-github-actions.follows = "";
|
|
};
|
|
lanzaboote = {
|
|
url = "github:nix-community/lanzaboote/v0.3.0";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "utils";
|
|
};
|
|
lix = {
|
|
url = "git+ssh://git@lix.systems/lix-project/lix";
|
|
flake = false;
|
|
};
|
|
lix-module = {
|
|
url = "git+ssh://git@lix.systems/lix-project/nixos-module";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "utils";
|
|
inputs.lix.follows = "lix";
|
|
};
|
|
nixvim = {
|
|
url = "github:nix-community/nixvim/82a19581defe682ff9ca7cb8b1b980b6dc297cf2";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.home-manager.follows = "home-manager";
|
|
inputs.nix-darwin.follows = "darwin";
|
|
};
|
|
nix-index-database = {
|
|
url = "github:nix-community/nix-index-database";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
private.url = "git+ssh://forgejo@git.mildlyfunctional.gay/artemist/nixos-config-private?ref=unified";
|
|
rustybar = {
|
|
url = "git+https://git.mildlyfunctional.gay/mildlyfunctionalgays/rustybar.git";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.utils.follows = "utils";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
darwin,
|
|
home-manager,
|
|
nixpkgs,
|
|
nixvim,
|
|
utils,
|
|
...
|
|
}@inputs:
|
|
let
|
|
lib = nixpkgs.lib;
|
|
makeNixosSystem =
|
|
module:
|
|
lib.nixosSystem (rec {
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
home-manager.nixosModules.home-manager
|
|
{ home-manager.extraSpecialArgs = specialArgs; }
|
|
] ++ [ module ];
|
|
});
|
|
makeDarwinSystem =
|
|
module:
|
|
darwin.lib.darwinSystem rec {
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
modules = [
|
|
home-manager.darwinModules.home-manager
|
|
{ home-manager.extraSpecialArgs = specialArgs; }
|
|
] ++ [ module ];
|
|
};
|
|
makeConfigurations =
|
|
baseDir: make: lib.mapAttrs (name: _: make (baseDir + "/${name}")) (builtins.readDir baseDir);
|
|
in
|
|
{
|
|
nixosConfigurations = makeConfigurations ./system makeNixosSystem;
|
|
darwinConfigurations = makeConfigurations ./darwin makeDarwinSystem;
|
|
}
|
|
// utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
in
|
|
{
|
|
formatter = pkgs.nixfmt-rfc-style;
|
|
packages = {
|
|
nvim = inputs.nixvim.legacyPackages."${system}".makeNixvimWithModule {
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
};
|
|
module = import ./sets/nvim.nix {
|
|
path = [ ];
|
|
inherit (pkgs) lib;
|
|
};
|
|
};
|
|
};
|
|
}
|
|
);
|
|
}
|