2024-05-07 03:23:55 -04:00
|
|
|
{
|
|
|
|
inputs = let
|
2024-05-16 02:40:39 -04:00
|
|
|
mkCustomUrl = url: {
|
|
|
|
inherit url;
|
|
|
|
};
|
|
|
|
|
2024-05-07 03:23:55 -04:00
|
|
|
mkInput = url: {
|
|
|
|
url = "github:${url}";
|
|
|
|
};
|
|
|
|
|
|
|
|
mkFollowingNixpkgs = url: {
|
|
|
|
url = "github:${url}";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
agenix = mkInput "ryantm/agenix";
|
2024-05-16 02:40:39 -04:00
|
|
|
catppuccin = mkInput "catppuccin/nix";
|
2024-05-07 03:23:55 -04:00
|
|
|
chaotic = mkInput "chaotic-cx/nyx/nyxpkgs-unstable";
|
|
|
|
impermanence = mkInput "nix-community/impermanence";
|
2024-05-16 02:40:39 -04:00
|
|
|
nixpkgs = mkInput "arianvp/nixpkgs/soft-reboot";
|
|
|
|
nix-super = mkCustomUrl "git+https://git.privatevoid.net/max/nix-super";
|
2024-05-07 03:23:55 -04:00
|
|
|
nixvim = mkInput "pupbrained/nixvim";
|
2024-05-16 02:40:39 -04:00
|
|
|
schizofox = mkInput "schizofox/schizofox";
|
2024-05-07 03:23:55 -04:00
|
|
|
sops-nix = mkInput "Mic92/sops-nix";
|
|
|
|
treefmt-nix = mkInput "numtide/treefmt-nix";
|
2024-05-16 02:40:39 -04:00
|
|
|
xmonad-contrib = mkInput "xmonad/xmonad-contrib";
|
2024-05-07 03:23:55 -04:00
|
|
|
|
|
|
|
home-manager = mkFollowingNixpkgs "nix-community/home-manager";
|
|
|
|
nix-index-database = mkFollowingNixpkgs "nix-community/nix-index-database";
|
2024-05-16 02:40:39 -04:00
|
|
|
snowfall-flake = mkFollowingNixpkgs "snowfallorg/flake";
|
2024-05-07 03:23:55 -04:00
|
|
|
snowfall-lib = mkFollowingNixpkgs "snowfallorg/lib/dev";
|
|
|
|
};
|
|
|
|
|
2024-05-16 02:40:39 -04:00
|
|
|
outputs = {...} @ inputs:
|
|
|
|
with inputs; let
|
|
|
|
pkgs = import nixpkgs {inherit system;};
|
|
|
|
system = "x86_64-linux";
|
|
|
|
in
|
|
|
|
snowfall-lib.mkFlake {
|
2024-05-07 03:23:55 -04:00
|
|
|
inherit inputs;
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
formatter.${system} = treefmt-nix.lib.mkWrapper pkgs {
|
|
|
|
projectRootFile = "flake.nix";
|
|
|
|
programs = {
|
|
|
|
alejandra.enable = true;
|
|
|
|
deadnix.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-16 02:40:39 -04:00
|
|
|
overlays = [
|
|
|
|
snowfall-flake.overlays.default
|
|
|
|
(_: _: {
|
|
|
|
nixSuper = nix-super.packages.${system}.default;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-05-07 03:23:55 -04:00
|
|
|
channels-config = {
|
2024-05-16 02:40:39 -04:00
|
|
|
allowAliases = true;
|
2024-05-07 03:23:55 -04:00
|
|
|
allowUnfree = true;
|
2024-05-16 02:40:39 -04:00
|
|
|
allowUnsupportedSystem = true;
|
|
|
|
cudaSupport = true;
|
|
|
|
permittedInsecurePackages = ["freeimage-unstable-2021-11-01"];
|
|
|
|
home-manager.useGlobalPkgs = true;
|
2024-05-07 03:23:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
homes.modules = [
|
|
|
|
chaotic.homeManagerModules.default
|
2024-05-16 02:40:39 -04:00
|
|
|
catppuccin.homeManagerModules.catppuccin
|
2024-05-07 03:23:55 -04:00
|
|
|
nix-index-database.hmModules.nix-index
|
2024-05-16 02:40:39 -04:00
|
|
|
schizofox.homeManagerModules.default
|
2024-05-07 03:23:55 -04:00
|
|
|
];
|
|
|
|
|
2024-05-16 02:40:39 -04:00
|
|
|
systems.modules.nixos =
|
|
|
|
[
|
|
|
|
agenix.nixosModules.default
|
|
|
|
catppuccin.nixosModules.catppuccin
|
|
|
|
chaotic.nixosModules.default
|
|
|
|
impermanence.nixosModules.impermanence
|
|
|
|
xmonad-contrib.modernise.${system}
|
|
|
|
]
|
|
|
|
++ xmonad-contrib.nixosModules;
|
2024-05-07 03:23:55 -04:00
|
|
|
|
|
|
|
devShells.${system}.default = with pkgs;
|
|
|
|
mkShellNoCC {
|
|
|
|
packages = [
|
|
|
|
alejandra
|
|
|
|
git
|
2024-05-16 02:40:39 -04:00
|
|
|
nvfetcher
|
2024-05-07 03:23:55 -04:00
|
|
|
statix
|
|
|
|
(writeScriptBin "build" ''
|
|
|
|
nix fmt
|
2024-05-16 02:40:39 -04:00
|
|
|
nh os switch . -- --impure
|
2024-05-07 03:23:55 -04:00
|
|
|
nh home switch
|
|
|
|
'')
|
|
|
|
(writeScriptBin "up" "nix flake update")
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|