1
0
Fork 0
mirror of https://github.com/ryanccn/flake.git synced 2025-12-06 08:10:43 +01:00

treewide: refactor, nix, overlays -> packages

This commit is contained in:
Ryan Cao 2024-11-12 13:56:54 +08:00
parent d6238e12af
commit eb6b664802
Signed by: ryanccn
GPG key ID: 48C96B2057D71CB1
23 changed files with 240 additions and 308 deletions

View file

@ -1,7 +1,7 @@
_: {
programs.eza = {
enable = true;
icons = true;
icons = "auto";
extraOptions = [ "--all" ];
};
}

View file

@ -1,11 +1,12 @@
{ lib, ... }:
let
aliases = import ./aliases.nix;
shellAbbrs = builtins.mapAttrs (_: a: a.command) (
lib.filterAttrs (_: b: !(b.fishAlias or false)) aliases
shellAbbrs = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (
lib.filterAttrs (_: a: !(lib.maybeAttr "fishAlias" false a)) aliases
);
shellAliases = builtins.mapAttrs (_: a: a.command) (
lib.filterAttrs (_: b: builtins.hasAttr "fishAlias" b && b.fishAlias) aliases
shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (
lib.filterAttrs (_: a: lib.maybeAttr "fishAlias" false a) aliases
);
in
{

View file

@ -29,8 +29,6 @@ _: {
fetch.fsckObjects = true;
receive.fsckObjects = true;
blame.ignoreRevsFile = ".git-blame-ignore-revs";
fetch.prune = true;
fetch.pruneTags = true;

View file

@ -1,11 +1,13 @@
{
pkgs,
inputs,
lib,
config,
...
}:
let
toml = pkgs.formats.toml { };
rust-bin = inputs.rust-overlay.lib.mkRustBin { } pkgs;
in
{
home.file."${config.xdg.dataHome}/cargo/config.toml".source = toml.generate "config.toml" {

View file

@ -1,6 +1,11 @@
{ config, inputs, ... }:
{
config,
inputs,
lib,
...
}:
let
shellAliases = builtins.mapAttrs (_: alias: alias.command) (import ./aliases.nix);
shellAliases = builtins.mapAttrs (lib.const (builtins.getAttr "command")) (import ./aliases.nix);
in
{
programs.zsh = {