93 lines
2.6 KiB
Nix
93 lines
2.6 KiB
Nix
{
|
|
description = "tacocat's nix configuration";
|
|
|
|
nixConfig = {
|
|
experimental-features = ["nix-command" "flakes"];
|
|
extra-substituters = [
|
|
# Nix community's cache server
|
|
"https://nix-community.cachix.org"
|
|
];
|
|
extra-trusted-public-keys = [
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
];
|
|
};
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
helix = {
|
|
url = "github:helix-editor/helix/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixos-hardware.url = "github:NixOs/nixos-hardware/master";
|
|
nur.url = "github:nix-community/nur";
|
|
};
|
|
|
|
# pass in the urls defined above
|
|
# the @ syntax stores the arguments in the inputs variable
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
home-manager,
|
|
helix,
|
|
nixos-hardware,
|
|
nur,
|
|
...
|
|
} @ inputs: let
|
|
system = "x86_64-linux";
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
|
overlays = [
|
|
nur.overlay
|
|
];
|
|
in {
|
|
formatter.${system} = pkgs.alejandra;
|
|
|
|
# nixosConfigurations: define options for different systems
|
|
# desktop
|
|
nixosConfigurations."BICEP" = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules = [
|
|
./hosts/BICEP/configuration.nix
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.users."tacocat" = ./users/tacocat/home.nix;
|
|
}
|
|
];
|
|
};
|
|
|
|
# laptop
|
|
nixosConfigurations."JWST" = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
specialArgs = {inherit inputs;};
|
|
modules = [
|
|
./hosts/JWST/configuration.nix
|
|
nixos-hardware.nixosModules.dell-xps-15-9520
|
|
nixos-hardware.nixosModules.common-gpu-nvidia-disable
|
|
{ nixpkgs.overlays = overlays; }
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.users."tacocat" = ./users/tacocat/home.nix;
|
|
home-manager.extraSpecialArgs = {inherit inputs;};
|
|
}
|
|
];
|
|
};
|
|
|
|
#homeConfigurations: define options for different users
|
|
homeConfigurations."tacocat" = inputs.home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
extraSpecialArgs = {inherit inputs;}; # Pass flake inputs to our config
|
|
modules = [
|
|
{ nixpkgs.overlays = overlays; }
|
|
./users/tacocat/home.nix
|
|
];
|
|
};
|
|
|
|
packages.${system}."tacocat" = self.homeConfigurations."tacocat".activationPackage;
|
|
};
|
|
}
|