jj, fish, better kanata, etc

This commit is contained in:
Jonathan Dönszelmann 2024-12-30 09:33:16 +01:00
parent 52b1728e2e
commit d030ebe744
No known key found for this signature in database
17 changed files with 1642 additions and 938 deletions

View file

@ -13,55 +13,92 @@
};
t.url = "github:jdonszelmann/t-rs";
dumpasm.url = "github:jdonszelmann/dumpasm";
kitty-search = {
url = "github:trygveaa/kitty-kitten-search";
flake = false;
};
jujutsu = {
url = "github:martinvonz/jj";
inputs.nixpkgs.follows = "nixpkgs";
};
ghostty = {
url = "github:ghostty-org/ghostty";
inputs.nixpkgs-stable.follows = "nixpkgs";
inputs.nixpkgs-unstable.follows = "nixpkgs";
};
};
outputs = { home-manager, nixpkgs, flake-utils, nixvim, t, ... }@inputs:
outputs =
{
home-manager,
nixpkgs,
flake-utils,
nixvim,
t,
dumpasm,
jujutsu,
ghostty,
...
}@inputs:
let
homeManagerModules = [ nixvim.homeManagerModules.nixvim ];
pkgsForSystem = system:
pkgsForSystem =
system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [
(_: _: { custom = { t = t.packages.${system}.default; }; })
(_: _: {
custom = {
t = t.packages.${system}.default;
inherit (dumpasm.packages.${system}) dumpasm;
inherit (jujutsu.packages.${system}) jujutsu;
inherit (ghostty.packages.${system}) ghostty;
};
})
];
};
mkHomeConfiguration = root: args:
home-manager.lib.homeManagerConfiguration ({
modules = [ root ] ++ homeManagerModules ++ (args.modules or [ ]);
pkgs = pkgsForSystem (args.system or "x86_64-linux");
} // {
inherit (args) extraSpecialArgs;
});
mkHomeConfiguration =
root: args:
home-manager.lib.homeManagerConfiguration (
{
modules = [ root ] ++ homeManagerModules ++ (args.modules or [ ]);
pkgs = pkgsForSystem (args.system or "x86_64-linux");
}
// {
inherit (args) extraSpecialArgs;
}
);
in
flake-utils.lib.eachDefaultSystem
(system: rec {
formatter = legacyPackages.nixfmt-classic;
legacyPackages = pkgsForSystem system;
pkgs = legacyPackages;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
(pkgs.writeShellScriptBin "fast-repl" ''
source /etc/set-environment
nix repl --file "${./.}/repl.nix" $@
'')
flake-utils.lib.eachDefaultSystem (system: rec {
formatter = legacyPackages.nixfmt-classic;
legacyPackages = pkgsForSystem system;
pkgs = legacyPackages;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
(pkgs.writeShellScriptBin "fast-repl" ''
source /etc/set-environment
nix repl --file "${./.}/repl.nix" $@
'')
(pkgs.writeShellScriptBin "apply-home" ''
nix run .#home-manager -- switch --flake .#$@
'')
(pkgs.writeShellScriptBin "apply-home" ''
nix run .#home-manager -- switch --flake .#$@
'')
(pkgs.writeShellScriptBin "apply" ''
apply-home $(hostname -f)
'')
];
};
}) // {
(pkgs.writeShellScriptBin "apply" ''
apply-home $(hostname -f)
'')
];
};
})
// {
homeConfigurations = {
kili = mkHomeConfiguration (import ./hosts/kili/home.nix) {