nix-config/flake.nix
2024-06-13 02:30:20 -04:00

126 lines
3 KiB
Nix

{
inputs = {
catppuccin.url = "github:catppuccin/nix";
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
nix-colors.url = "github:Misterio77/nix-colors";
nix-super.url = "git+https://git.privatevoid.net/max/nix-super.git";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixvim.url = "github:pupbrained/nixvim";
schizofox.url = "github:schizofox/schizofox";
treefmt-nix.url = "github:numtide/treefmt-nix";
asahi = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager";
};
hyprland = {
submodules = true;
type = "git";
url = "https://github.com/hyprwm/Hyprland";
};
hyprland-plugins = {
inputs.hyprland.follows = "hyprland";
url = "github:hyprwm/hyprland-plugins";
};
nix-index-database = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nix-index-database";
};
snowfall-flake = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:snowfallorg/flake";
};
snowfall-lib = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:snowfallorg/lib/dev";
};
};
outputs = {
asahi,
catppuccin,
chaotic,
hyprland,
nix-colors,
nixpkgs,
nix-super,
schizofox,
nix-index-database,
treefmt-nix,
snowfall-lib,
snowfall-flake,
...
} @ inputs: let
pkgs = import nixpkgs {inherit system;};
system = "aarch64-linux";
in
snowfall-lib.mkFlake {
inherit inputs;
src = ./.;
formatter.${system} = treefmt-nix.lib.mkWrapper pkgs {
projectRootFile = "flake.nix";
programs = {
alejandra.enable = true;
deadnix.enable = true;
};
};
overlays = [
snowfall-flake.overlays.default
(_final: _prev: {
nixSuper = nix-super.packages.${system}.default;
})
];
channels-config = {
allowAliases = true;
allowUnfree = true;
home-manager.useGlobalPkgs = true;
};
homes.modules = [
catppuccin.homeManagerModules.catppuccin
chaotic.homeManagerModules.default
hyprland.homeManagerModules.default
nix-colors.homeManagerModules.default
nix-index-database.hmModules.nix-index
schizofox.homeManagerModules.default
];
systems.modules.nixos = [
asahi.nixosModules.apple-silicon-support
catppuccin.nixosModules.catppuccin
chaotic.nixosModules.default
];
devShells.${system}.default = with pkgs;
mkShellNoCC {
packages = [
alejandra
git
nh
nvfetcher
statix
(writeScriptBin "build" ''
nix fmt
nh os switch . -- --impure
nh home switch
'')
(writeScriptBin "up" "nix flake update")
];
};
};
}