nixos-config/flake.nix

75 lines
2.1 KiB
Nix
Raw Normal View History

2021-11-20 04:08:18 +00:00
{
inputs = {
2023-06-06 00:51:11 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
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";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.3.0";
inputs.nixpkgs.follows = "nixpkgs";
};
2021-11-20 04:08:18 +00:00
home-manager = {
2023-06-06 00:51:11 +00:00
url = "github:nix-community/home-manager/release-23.05";
2021-11-20 04:08:18 +00:00
inputs.nixpkgs.follows = "nixpkgs";
};
rustybar = {
url = "github:mildlyfunctionalgays/rustybar";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-08-26 23:00:18 +00:00
private.url =
"git+ssh://git@github.com/artemist/nixos-config-private?ref=unified";
2021-11-20 04:08:18 +00:00
wip-pinebook-pro = {
url = "github:samueldr/wip-pinebook-pro";
flake = false;
};
};
2023-08-26 23:00:18 +00:00
outputs = { self, nixpkgs, home-manager, private, nixpkgs-unstable, utils, ...
}@inputs:
2021-11-20 04:08:18 +00:00
let
2023-08-26 23:00:18 +00:00
makeSystem = conf:
nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate conf rec {
2021-11-20 04:08:18 +00:00
specialArgs = {
2021-11-21 18:53:51 +00:00
inherit inputs;
2023-08-26 23:00:18 +00:00
pkgs-unstable = import nixpkgs-unstable {
config.allowUnfree = true;
system = conf.system;
};
2021-11-20 04:08:18 +00:00
};
2021-11-21 19:35:25 +00:00
modules = [
private.nixosModules.base
home-manager.nixosModules.home-manager
2023-08-26 23:00:18 +00:00
{ home-manager.extraSpecialArgs = specialArgs; }
2021-11-21 19:35:25 +00:00
] ++ (conf.modules or [ ]);
});
2023-08-26 23:00:18 +00:00
in {
2021-11-20 04:08:18 +00:00
nixosConfigurations.starlight = makeSystem {
system = "x86_64-linux";
2023-08-26 23:00:18 +00:00
modules = [ ./system/starlight private.nixosModules.starlight ];
2021-11-20 04:08:18 +00:00
};
nixosConfigurations.rainbowdash = makeSystem {
system = "x86_64-linux";
2023-08-26 23:00:18 +00:00
modules = [ ./system/rainbowdash ];
2021-11-20 04:08:18 +00:00
};
nixosConfigurations.spike = makeSystem {
system = "x86_64-linux";
2023-08-26 23:00:18 +00:00
modules = [ ./system/spike ];
2021-11-20 04:08:18 +00:00
};
nixosConfigurations.mistmane = makeSystem {
system = "aarch64-linux";
2023-08-26 23:00:18 +00:00
modules = [ ./system/mistmane ];
2021-11-20 04:08:18 +00:00
};
2023-08-26 23:00:18 +00:00
} // utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in { formatter = pkgs.nixfmt; });
2021-11-20 04:08:18 +00:00
}