dotfiles/flake.nix

81 lines
2 KiB
Nix
Raw Normal View History

2024-08-02 11:12:36 +02:00
{
description = "NixOS configuration";
inputs = {
2024-11-07 01:11:48 +01:00
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
2024-10-19 11:06:43 +02:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
2024-08-02 11:12:36 +02:00
home-manager.url = "github:nix-community/home-manager";
2024-10-19 11:06:43 +02:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2024-08-10 23:06:08 +02:00
ghostty = {
url = "git+ssh://git@github.com/ghostty-org/ghostty";
inputs = {
2024-10-19 11:06:43 +02:00
nixpkgs-stable.follows = "nixpkgs";
nixpkgs-unstable.follows = "nixpkgs";
2024-08-10 23:06:08 +02:00
};
};
ghostty-hm.url = "github:clo4/ghostty-hm-module";
2024-08-02 11:12:36 +02:00
};
outputs =
2024-10-18 10:38:31 +02:00
inputs@{
2024-08-02 11:12:36 +02:00
self,
2024-10-19 11:06:43 +02:00
nixpkgs,
2024-08-10 23:06:08 +02:00
ghostty-hm,
2024-08-02 11:12:36 +02:00
home-manager,
...
2024-10-18 10:38:31 +02:00
}:
2024-08-02 11:12:36 +02:00
let
inherit (self) outputs;
2024-10-18 10:38:31 +02:00
system = "x86_64-linux";
2024-10-19 11:06:43 +02:00
pkgs = nixpkgs.legacyPackages.${system};
2024-10-18 10:57:46 +02:00
mkHost =
modules:
2024-10-19 11:06:43 +02:00
nixpkgs.lib.nixosSystem {
2024-10-18 10:57:46 +02:00
specialArgs = {
inherit inputs outputs;
};
modules = [ ./common ] ++ modules;
};
2024-10-18 10:38:31 +02:00
2024-08-02 11:12:36 +02:00
mkHome =
modules:
home-manager.lib.homeManagerConfiguration {
2024-10-18 10:38:31 +02:00
inherit pkgs;
extraSpecialArgs = {
inherit inputs outputs;
};
2024-08-10 23:06:08 +02:00
modules = [
ghostty-hm.homeModules.default
./home/common
] ++ modules;
2024-08-02 11:12:36 +02:00
};
in
{
overlays = import ./overlays { inherit inputs outputs; };
2024-10-18 10:38:31 +02:00
devShell.${system} = pkgs.mkShell {
packages = with pkgs; [
just
nh
];
};
2024-08-02 11:12:36 +02:00
2024-10-18 10:57:46 +02:00
nixosConfigurations = {
dinky = mkHost [ ./hosts/dinky ];
nemo = mkHost [ ./hosts/nemo ];
pearl = mkHost [ ./hosts/pearl ];
};
2024-08-02 11:12:36 +02:00
homeConfigurations = {
2024-08-02 14:09:42 +02:00
"dln@dinky" = mkHome [ ./home/dln/dinky.nix ];
"dln@nemo" = mkHome [ ./home/dln/nemo.nix ];
2024-09-03 17:13:48 +02:00
"dln@pearl" = mkHome [ ./home/dln/pearl.nix ];
2024-08-02 14:09:42 +02:00
"lsjostro@nemo" = mkHome [ ./home/lsjostro/nemo.nix ];
};
2024-08-02 11:12:36 +02:00
};
}