nixos-config/flake.nix

109 lines
3 KiB
Nix
Raw Normal View History

2021-11-20 04:08:18 +00:00
{
inputs = {
2022-05-10 20:44:45 +00:00
nixos-hardware.url = "github:nixos/nixos-hardware";
2023-08-26 23:00:18 +00:00
utils.url = "github:numtide/flake-utils";
2024-01-22 02:31:34 +00:00
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";
};
2023-09-10 05:18:56 +00:00
fonts = {
url = "git+https://git.mildlyfunctional.gay/artemist/fonts.git";
inputs.artemist.follows = "artemist";
2023-09-10 05:18:56 +00:00
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "utils";
2023-09-10 05:18:56 +00:00
};
2024-03-28 19:55:28 +00:00
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";
};
2024-03-28 19:55:28 +00:00
lix = {
url = "git+ssh://git@lix.systems/lix-project/lix";
flake = false;
};
lix-module = {
url = "git+ssh://git@lix.systems/lix-project/nixos-module";
2021-11-20 04:08:18 +00:00
inputs.nixpkgs.follows = "nixpkgs";
2024-03-28 19:55:28 +00:00
inputs.flake-utils.follows = "utils";
inputs.lix.follows = "lix";
2021-11-20 04:08:18 +00:00
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
2024-01-10 00:28:00 +00:00
inputs.home-manager.follows = "home-manager";
inputs.nix-darwin.follows = "";
};
2023-10-05 00:34:34 +00:00
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-03-28 19:55:28 +00:00
private.url = "git+ssh://forgejo@git.mildlyfunctional.gay/artemist/nixos-config-private?ref=unified";
2021-11-20 04:08:18 +00:00
rustybar = {
2024-03-02 03:13:17 +00:00
url = "git+https://git.mildlyfunctional.gay/mildlyfunctionalgays/rustybar.git";
2021-11-20 04:08:18 +00:00
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "utils";
2021-11-20 04:08:18 +00:00
};
};
2024-03-02 03:13:17 +00:00
outputs =
{
self,
nixpkgs,
home-manager,
utils,
nixvim,
...
}@inputs:
2021-11-20 04:08:18 +00:00
let
baseDir = ./system;
lib = nixpkgs.lib;
2024-03-02 03:13:17 +00:00
makeSystem =
module:
lib.nixosSystem (rec {
2024-03-02 03:13:17 +00:00
specialArgs = {
inherit inputs;
};
2021-11-21 19:35:25 +00:00
modules = [
home-manager.nixosModules.home-manager
2023-08-26 23:00:18 +00:00
{ home-manager.extraSpecialArgs = specialArgs; }
] ++ [ module ];
2021-11-21 19:35:25 +00:00
});
2024-03-02 03:13:17 +00:00
in
{
nixosConfigurations = lib.mapAttrs (name: _: makeSystem (baseDir + "/${name}")) (
builtins.readDir baseDir
);
}
// utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
formatter = pkgs.nixfmt-rfc-style;
2023-10-27 06:06:33 +00:00
packages = {
nvim = inputs.nixvim.legacyPackages."${system}".makeNixvimWithModule {
2024-03-02 03:13:17 +00:00
extraSpecialArgs = {
inherit inputs;
};
module = import ./sets/nvim.nix {
path = [ ];
inherit (pkgs) lib;
};
};
2023-10-27 06:06:33 +00:00
};
2024-03-02 03:13:17 +00:00
}
);
2021-11-20 04:08:18 +00:00
}