♻️ refactored flake.nix inputs to easily sort them

This commit is contained in:
Ingolf Wagner 2024-08-30 08:47:05 +07:00
parent aed3dbd602
commit 71f9225dc6
Signed by: palo
GPG key ID: 76BF5F1928B9618B

121
flake.nix
View file

@ -1,87 +1,43 @@
{ {
# "git+file:///<full-path>" for fixing an input
inputs = { inputs = {
flake-parts.url = "github:hercules-ci/flake-parts"; clan-core.inputs.flake-parts.follows = "flake-parts";
clan-core.inputs.nixpkgs.follows = "nixpkgs";
clan-core.url = "git+https://git.clan.lol/clan/clan-core";
clan-fact-generators.inputs.clan-core.follows = "clan-core";
clan-fact-generators.url = "github:mrvandalo/clan-fact-generators";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
clan-fact-generators = { home-manager-utils.inputs.home-manager.follows = "home-manager";
url = "github:mrvandalo/clan-fact-generators"; home-manager-utils.url = "github:mrvandalo/home-manager-utils";
inputs.clan-core.follows = "clan-core"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
}; home-manager.url = "github:nix-community/home-manager";
kmonad.inputs.nixpkgs.follows = "nixpkgs"; # fixme: kmonad crashes every now and than and the keyboard is not usable anymore.
clan-core = { kmonad.url = "github:kmonad/kmonad?dir=nix"; # todo: mabye use https://github.com/jtroo/kanata instead
url = "git+https://git.clan.lol/clan/clan-core"; landingpage.url = "github:mrVanDalo/landingpage";
#url = "git+file:///home/palo/dev/clan-core"; nixos-anywhere.url = "github:nix-community/nixos-anywhere";
inputs.nixpkgs.follows = "nixpkgs"; # Needed if your configuration uses nixpkgs unstable. nixos-hardware.url = "github:nixos/nixos-hardware";
inputs.flake-parts.follows = "flake-parts";
};
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
nixpkgs-legacy_2211.url = "github:nixos/nixpkgs/nixos-22.11"; nixpkgs-legacy_2211.url = "github:nixos/nixpkgs/nixos-22.11";
nixpkgs-legacy_2311.url = "github:nixos/nixpkgs/nixos-23.11"; nixpkgs-legacy_2311.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-legacy_2405.url = "github:nixos/nixpkgs/nixos-24.05"; nixpkgs-legacy_2405.url = "github:nixos/nixpkgs/nixos-24.05";
nixos-hardware.url = "github:nixos/nixos-hardware"; nixpkgs-unstable-small.url = "github:nixos/nixpkgs/nixos-unstable-small";
nixos-anywhere.url = "github:nix-community/nixos-anywhere"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
permown.inputs.nixpkgs.follows = "nixpkgs";
home-manager = { permown.url = "github:mrVanDalo/module.permown";
#url = "github:nix-community/home-manager/release-23.11"; polygon-art.url = "git+https://git.ingolf-wagner.de/palo/polygon-art.git";
url = "github:nix-community/home-manager"; private-parts.inputs.nixpkgs.follows = "nixpkgs"; # only private input
#inputs.nixpkgs.follows = "nixpkgs"; private-parts.url = "git+ssh://forgejo@git.ingolf-wagner.de/palo/nixos-private-parts.git?ref=main";
}; retiolum.url = "github:Mic92/retiolum";
polygon-art = {
url = "git+https://git.ingolf-wagner.de/palo/polygon-art.git";
};
home-manager-utils = {
url = "github:mrvandalo/home-manager-utils";
inputs.home-manager.follows = "home-manager";
};
permown = {
url = "github:mrVanDalo/module.permown";
#url = "git+file:///home/palo/dev/nixos/permown";
inputs.nixpkgs.follows = "nixpkgs";
};
# only private input
# you should be able to run `nix flake check` removing this input from this flake.nix
private-parts = {
#url = "git+file:///home/palo/dev/nixos/nixos-private-parts";
url = "git+ssh://forgejo@git.ingolf-wagner.de/palo/nixos-private-parts.git?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
retiolum = {
url = "github:Mic92/retiolum";
#url = "git+file:///home/palo/dev/nixos/retiolum";
};
srvos.url = "github:nix-community/srvos"; srvos.url = "github:nix-community/srvos";
stylix.inputs.home-manager.follows = "home-manager";
treefmt-nix = { stylix.inputs.nixpkgs.follows = "nixpkgs";
url = "github:numtide/treefmt-nix"; stylix.url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs"; taskshell.inputs.nixpkgs.follows = "nixpkgs";
}; taskshell.url = "github:mrvandalo/taskshell";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
landingpage = { treefmt-nix.url = "github:numtide/treefmt-nix";
#url = "git+file:///home/palo/dev/landingpage";
url = "github:mrVanDalo/landingpage";
};
# todo: mabye use https://github.com/jtroo/kanata instead
# fixme: kmonad crashes every now and than and the keyboard is not usable anymore.
kmonad = {
url = "github:kmonad/kmonad?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
# smoke test framwork to trigger tests (enable if I want to use it for real) # smoke test framwork to trigger tests (enable if I want to use it for real)
#smoke = { #smoke = {
@ -89,12 +45,6 @@
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
#}; #};
# had to override it to remove colors
taskshell = {
url = "github:mrvandalo/taskshell";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = outputs =
@ -324,9 +274,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
boot.tmp.useTmpfs = lib.mkDefault true; boot.tmp.useTmpfs = lib.mkDefault true;
environment.systemPackages = [
pkgs.nixpkgs-fmt
];
} }
) )
]; ];
@ -386,11 +333,7 @@
... ...
}: }:
{ {
# We define our own systems below. you can still use this to add system specific outputs to your flake.
# See: https://flake.parts/getting-started
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
# import clan-core modules
imports = [ imports = [
clan-core.flakeModules.default clan-core.flakeModules.default
./nix/formatter.nix ./nix/formatter.nix