dotfiles/flake.nix

57 lines
1.3 KiB
Nix
Raw Normal View History

2022-09-26 20:28:35 +00:00
{
2023-07-30 22:01:46 +00:00
inputs = {
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2024-01-14 09:11:03 +00:00
home-manager.url = "github:nix-community/home-manager";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
opdavies-nvim.inputs.nixpkgs.follows = "nixpkgs";
opdavies-nvim.url = "github:opdavies/opdavies.nvim";
2023-07-30 22:01:46 +00:00
};
2022-09-26 20:28:35 +00:00
2024-02-13 21:33:32 +00:00
outputs = inputs @ {
flake-parts,
self,
...
}: let
system = "x86_64-linux";
username = "opdavies";
2024-02-13 21:33:32 +00:00
pkgs = inputs.nixpkgs.legacyPackages.${system};
2023-11-06 23:24:53 +00:00
2024-02-29 08:24:01 +00:00
nixos-system = import ./lib/nixos {inherit inputs pkgs self system username;};
wsl-system = import ./lib/wsl2 {inherit inputs pkgs self system username;};
2024-02-13 21:33:32 +00:00
in
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
2024-02-13 21:33:32 +00:00
perSystem = {
pkgs,
self',
...
}: {
2024-02-24 10:21:53 +00:00
packages.default = pkgs.mkShell {
nativeBuildInputs = [pkgs.just];
};
2024-02-13 21:33:32 +00:00
formatter = pkgs.alejandra;
2023-05-03 23:04:02 +00:00
};
2023-05-03 23:04:02 +00:00
flake = {
nixosConfigurations = {
2024-01-09 20:39:56 +00:00
apollo = nixos-system {
desktop = true;
hostname = "apollo";
};
nixedo = nixos-system {
desktop = true;
hostname = "nixedo";
};
};
2022-09-27 06:37:57 +00:00
2023-05-03 23:04:02 +00:00
homeConfigurations = {
wsl2 = wsl-system;
};
2022-09-27 06:37:57 +00:00
};
2022-09-26 20:28:35 +00:00
};
}