nix-config/flake.nix

126 lines
3 KiB
Nix
Raw Normal View History

2024-05-07 03:23:55 -04:00
{
inputs = {
2024-05-16 02:40:39 -04:00
catppuccin.url = "github:catppuccin/nix";
2024-05-07 03:23:55 -04:00
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
2024-06-13 02:30:20 -04:00
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";
};
2024-05-07 03:23:55 -04:00
home-manager = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager";
};
2024-06-13 02:30:20 -04:00
2024-05-28 04:08:06 -04:00
hyprland = {
submodules = true;
type = "git";
url = "https://github.com/hyprwm/Hyprland";
};
2024-06-13 02:30:20 -04:00
2024-05-28 04:08:06 -04:00
hyprland-plugins = {
inputs.hyprland.follows = "hyprland";
url = "github:hyprwm/hyprland-plugins";
};
2024-06-13 02:30:20 -04:00
2024-05-07 03:23:55 -04:00
nix-index-database = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nix-index-database";
};
2024-06-13 02:30:20 -04:00
2024-05-16 02:40:39 -04:00
snowfall-flake = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:snowfallorg/flake";
};
2024-05-07 03:23:55 -04:00
snowfall-lib = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:snowfallorg/lib/dev";
};
};
2024-06-13 02:30:20 -04:00
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")
];
};
};
}