dotfiles/nix/flake.nix
2024-07-31 07:17:52 +02:00

70 lines
1.7 KiB
Nix
Executable file

{
description = "A simple NixOS flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; # default packages
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; # unstable branch for newer packages
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nvidia-patch = {
url = "github:icewind1991/nvidia-patch-nixos";
inputs.nixpkgs.follows = "nixpkgs";
};
dttyper.url = "git+https://git.4o1x5.dev/4o1x5/dttyper";
romodoro.url = "path:/home/grape/code/romodoro";
nixvim = {
url = "github:nix-community/nixvim/nixos-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self
, nixpkgs
, home-manager
, nixpkgs-unstable
, nvidia-patch
, dttyper
, romodoro
, nixvim
, ...
}@inputs:
let
system = "x86_64-linux";
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
};
in
{
nixosConfigurations.strix = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs.inputs = inputs;
modules = [
# adding unstable overlay
({ config, pkgs, ... }: {
nixpkgs.overlays = [
overlay-unstable
nvidia-patch.overlays.default
];
})
./system/drivers/shitvidia-patch.nix
./configuration.nix
nixvim.nixosModules.nixvim
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
];
};
};
}