dotfiles/flake.nix
2024-05-17 21:20:23 +03:00

70 lines
2.4 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs2105.url = "github:NixOS/nixpkgs/nixos-21.05";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
anyrun.url = "github:anyrun-org/anyrun";
anyrun.inputs.nixpkgs.follows = "nixpkgs";
secrets.url = "git+ssh://git@github.com/deltathetawastaken/secrets.git";
nixvim.url = "github:nix-community/nixvim";
shwewo = {
url = "github:shwewo/flake";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-stable.follows = "nixpkgs-stable";
};
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
hyprland-contrib = {
url = "github:hyprwm/contrib";
inputs.nixpkgs.follows = "nixpkgs";
};
#hyprland-plugins = {
# url = "github:hyprwm/hyprland-plugins";
# inputs.hyprland.follows = "hyprland";
#};
};
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
let
pkgs = nixpkgs.legacyPackages."x86_64-linux";
stable = import inputs.nixpkgs-stable {
system = "x86_64-linux";
config = { allowUnfree = true; };
};
unstable = import inputs.nixpkgs-unstable {
system = "x86_64-linux";
config = { allowUnfree = true; };
};
specialArgs = { inherit inputs self stable unstable homeSettings; }; #var coz shared between home and system
homeSettings.home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.delta = import ./home/home.nix;
extraSpecialArgs = specialArgs;
};
makeSystem = name: systemModules: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = specialArgs;
modules = [ ./hosts/generic.nix ] ++ systemModules;
};
in {
devShells."x86_64-linux".default = pkgs.mkShell {
name = "delta";
packages = with pkgs; [ gitleaks pre-commit ];
shellHook = "pre-commit install &> /dev/null && gitleaks detect -v";
};
nixosConfigurations = {
dlaptop = makeSystem "dlaptop" [ ./hosts/dlaptop/system.nix ];
intelnuc = makeSystem "intelnuc" [ ./hosts/intelnuc/system.nix ];
huanan = makeSystem "huanan" [ ./hosts/huanan/system.nix ];
};
};
}