nix-config/flake.nix

101 lines
2.9 KiB
Nix
Raw Normal View History

{
description = "tacocat's nix configuration";
2023-11-05 03:06:38 +00:00
nixConfig = {
experimental-features = ["nix-command" "flakes"];
extra-substituters = [
# Nix community's cache server
"https://nix-community.cachix.org"
"https://helix.cachix.org"
2023-11-05 03:06:38 +00:00
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
2023-11-05 03:06:38 +00:00
];
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
helix = {
url = "github:helix-editor/helix/master";
2023-11-22 04:23:41 +00:00
# inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-10-30 01:48:09 +00:00
nixos-hardware.url = "github:NixOs/nixos-hardware/master";
2023-11-05 06:32:53 +00:00
nur.url = "github:nix-community/nur";
2023-11-22 04:23:41 +00:00
sops-nix.url = "github:Mic92/sops-nix";
};
# pass in the urls defined above
# the @ syntax stores the arguments in the inputs variable
2023-11-10 18:03:26 +00:00
outputs = {
self,
nixpkgs,
home-manager,
2023-10-21 00:06:56 +00:00
helix,
2023-10-30 01:48:09 +00:00
nixos-hardware,
2023-11-05 06:32:53 +00:00
nur,
2023-11-22 04:23:41 +00:00
sops-nix,
...
2023-11-10 18:03:26 +00:00
} @ inputs: let
system = "x86_64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system};
2023-11-10 18:03:26 +00:00
overlays = [
nur.overlay
];
in {
2023-11-05 02:44:54 +00:00
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;
2023-10-29 18:11:54 +00:00
specialArgs = {inherit inputs;};
modules = [
./hosts/JWST/configuration.nix
2023-11-22 04:23:41 +00:00
sops-nix.nixosModules.sops
nixos-hardware.nixosModules.dell-xps-15-9520
2023-10-30 01:48:09 +00:00
nixos-hardware.nixosModules.common-gpu-nvidia-disable
2023-11-20 05:52:13 +00:00
{nixpkgs.overlays = overlays;}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.users."tacocat" = {
imports = [./users/tacocat/home.nix];
_module.args.theme = import ./modules/themes;
};
2023-10-29 18:11:54 +00:00
home-manager.extraSpecialArgs = {inherit inputs;};
}
];
};
#homeConfigurations: define options for different users
2023-11-22 04:23:41 +00:00
# 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;
};
}