61 lines
1.6 KiB
Nix
Executable file
61 lines
1.6 KiB
Nix
Executable file
{
|
|
description = "A simple NixOS flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; # default packages
|
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; # unstable branch for newer packages
|
|
agenix.url = "github:ryantm/agenix";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-23.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
}; # home manger for more customization
|
|
# adding nvidia-patch for nvenc and nvfvc
|
|
nvidia-patch.url = "github:icewind1991/nvidia-patch-nixos";
|
|
nvidia-patch.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs =
|
|
{ self
|
|
, nixpkgs
|
|
, home-manager
|
|
, nixpkgs-unstable
|
|
, nvidia-patch
|
|
, agenix
|
|
, ...
|
|
}:
|
|
let
|
|
system = "x86_64-linux";
|
|
#colors = import ./configs/colors.nix;
|
|
overlay-unstable = final: prev: {
|
|
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
|
|
};
|
|
in
|
|
{
|
|
nixosConfigurations.strix = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = [
|
|
# adding unstable overlay
|
|
({ config, pkgs, ... }: {
|
|
nixpkgs.overlays = [
|
|
overlay-unstable
|
|
nvidia-patch.overlays.default
|
|
];
|
|
})
|
|
{
|
|
environment.systemPackages = [ agenix.packages.${system}.default ];
|
|
}
|
|
agenix.nixosModules.default
|
|
./system/drivers/shitvidia-patch.nix
|
|
./configuration.nix
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
}
|
|
];
|
|
};
|
|
|
|
};
|
|
}
|