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

style: switch to nixfmt-rfc-style

This commit is contained in:
Ryan Cao 2024-06-17 10:52:56 +08:00
parent 3404601a4a
commit 02e3e3a7ac
Signed by: ryanccn
SSH key fingerprint: SHA256:NtP/BlVhoQq4xU6BEcZeT8nIPvHntkJ3lIc2yB+F09E
17 changed files with 117 additions and 112 deletions

View file

@ -1,3 +1,4 @@
{config, ...}: {
{ config, ... }:
{
home.file."${config.xdg.configHome}/ghostty/config".source = ./ghostty.conf;
}

View file

@ -3,7 +3,8 @@
lib,
self,
...
}: let
}:
let
extensions = [
# "antfu.icons-carbon"
"antfu.unocss"
@ -52,7 +53,8 @@
# "xaver.clang-format"
"yoavbls.pretty-ts-errors"
];
in {
in
{
programs.vscode = {
enable = true;
package = pkgs.stdenvNoCC.mkDerivation {
@ -64,7 +66,7 @@ in {
'';
};
extensions = [];
extensions = [ ];
mutableExtensionsDir = true;
userSettings = {
@ -197,7 +199,7 @@ in {
"nix.serverPath" = lib.getExe pkgs.nixd;
"nix.serverSettings" = {
nixd = {
formatting.command = [(lib.getExe pkgs.alejandra)];
formatting.command = [ (lib.getExe pkgs.alejandra) ];
nixpkgs.expr = "(builtins.getFlake \"${self}\").pkgs";
};
};
@ -209,7 +211,7 @@ in {
};
home.activation = {
vscodeExtensions = lib.hm.dag.entryAfter ["writeBoundary"] ''
vscodeExtensions = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
code_bin="/usr/local/bin/code"
if ! command -v "$code_bin" &> /dev/null; then
@ -222,19 +224,15 @@ in {
currentExtensions["$extension"]=1;
done
${builtins.concatStringsSep
"\n"
(
builtins.map
(ext: ''
if [[ -z "''${currentExtensions[${ext}]+unset}" ]]; then
echo "installing ${ext}"
$DRY_RUN_CMD "$code_bin" --install-extension ${ext} &> /dev/null
fi
unset 'currentExtensions[${ext}]'
'')
extensions
)}
${builtins.concatStringsSep "\n" (
builtins.map (ext: ''
if [[ -z "''${currentExtensions[${ext}]+unset}" ]]; then
echo "installing ${ext}"
$DRY_RUN_CMD "$code_bin" --install-extension ${ext} &> /dev/null
fi
unset 'currentExtensions[${ext}]'
'') extensions
)}
for ext in "''${!currentExtensions[@]}"; do
echo "uninstalling $ext"

View file

@ -1,8 +1,5 @@
{ config, inputs, ... }:
{
config,
inputs,
...
}: {
programs.home-manager.enable = true;
imports = [

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.packages = with pkgs; [
inter
public-sans
@ -16,8 +17,6 @@
'';
})
(nerdfonts.override {
fonts = ["NerdFontsSymbolsOnly"];
})
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
];
}

View file

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

View file

@ -1,8 +1,14 @@
{lib, ...}: let
{ lib, ... }:
let
aliases = import ./aliases.nix;
shellAbbrs = builtins.mapAttrs (_: a: a.command) (lib.filterAttrs (_: b: !(b.fishAlias or false)) aliases);
shellAliases = builtins.mapAttrs (_: a: a.command) (lib.filterAttrs (_: b: builtins.hasAttr "fishAlias" b && b.fishAlias) aliases);
in {
shellAbbrs = builtins.mapAttrs (_: a: a.command) (
lib.filterAttrs (_: b: !(b.fishAlias or false)) aliases
);
shellAliases = builtins.mapAttrs (_: a: a.command) (
lib.filterAttrs (_: b: builtins.hasAttr "fishAlias" b && b.fishAlias) aliases
);
in
{
programs.fish = {
enable = true;
catppuccin.enable = true;

View file

@ -1,3 +1 @@
_: {
programs.glamour.catppuccin.enable = true;
}
_: { programs.glamour.catppuccin.enable = true; }

View file

@ -3,18 +3,21 @@
lib,
config,
...
}: let
toml = pkgs.formats.toml {};
in {
}:
let
toml = pkgs.formats.toml { };
in
{
home.file."${config.xdg.dataHome}/cargo/config.toml".source = toml.generate "config.toml" {
linker = "${lib.getExe pkgs.clang}";
rustflags = ["-C" "link-arg=-fuse-ld=${lib.getExe pkgs.mold}"];
rustflags = [
"-C"
"link-arg=-fuse-ld=${lib.getExe pkgs.mold}"
];
};
home.packages = with pkgs; [
(rust-bin.stable.latest.default.override {
extensions = ["llvm-tools-preview"];
})
(rust-bin.stable.latest.default.override { extensions = [ "llvm-tools-preview" ]; })
cargo-bloat
cargo-cache

View file

@ -1,10 +1,8 @@
{
config,
inputs,
...
}: let
{ config, inputs, ... }:
let
shellAliases = builtins.mapAttrs (_: alias: alias.command) (import ./aliases.nix);
in {
in
{
programs.zsh = {
enable = true;
dotDir = ".config/zsh";

View file

@ -1,4 +1,5 @@
{config, ...}: {
{ config, ... }:
{
home.sessionVariables = {
NEXT_TELEMETRY_DISABLED = "1";
NUXT_TELEMETRY_DISABLED = "1";