dotfiles/flake.nix

90 lines
2.2 KiB
Nix
Raw Normal View History

2024-08-02 11:12:36 +02:00
{
description = "NixOS configuration";
2024-11-07 01:20:00 +01:00
nixConfig = {
substituters = [
"https://cache-nixos-org.aarn.patagia.net/"
2024-11-07 01:20:00 +01:00
];
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
2024-08-02 11:12:36 +02:00
inputs = {
ghostty.url = "github:ghostty-org/ghostty";
2025-01-03 14:01:39 +01:00
jujutsu.url = "github:dln/jj/openssh";
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";
2024-12-11 20:15:15 +01:00
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
2024-11-09 10:09:10 +01:00
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
2024-08-02 11:12:36 +02:00
2025-01-04 13:00:29 +01:00
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
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-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,
2025-01-04 13:00:29 +01:00
nix-index-database,
2024-10-19 11:06:43 +02:00
nixpkgs,
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 = [
./home/common
2025-01-04 13:00:29 +01:00
nix-index-database.hmModules.nix-index
2024-08-10 23:06:08 +02:00
] ++ 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
nixd
2024-10-18 10:38:31 +02:00
];
};
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
};
2024-08-02 11:12:36 +02:00
};
}