🎨 style(fmt): Switch to nixfmt; add treesitter hints

Switch to nixfmt as when I was adding treesitter injected lang hints,
Alejandra was not formatting those comments in a way I liked. Turns out
I like the nixfmt style in general better.
This commit is contained in:
punkfairie 2024-11-02 15:35:48 -07:00
parent 2b9fdf0629
commit 5bffc52df8
22 changed files with 183 additions and 148 deletions

View file

@ -9,28 +9,24 @@
inputs.nixpkgs.follows = "nixpkgs";
};
alejandra = {
url = "github:kamadorueda/alejandra/3.0.0";
inputs.nixpkgs.follows = "nixpkgs";
};
rose-pine.url = "git+https://git.punkfairie.net/punkfairie/rose-pine-nix";
};
outputs = {
outputs =
{
nixpkgs,
home-manager,
...
} @ inputs: {
homeConfigurations."marley" = let
}@inputs:
{
homeConfigurations."marley" =
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {inherit system inputs;};
modules = [
./home
inputs.rose-pine.homeManagerModules.rose-pine

View file

@ -3,7 +3,8 @@
config,
lib,
...
}: {
}:
{
programs.bat = {
enable = true;
@ -27,12 +28,14 @@
functions = {
cat = {
wraps = "bat";
body = "bat $argv";
body = # fish
"bat $argv";
};
cath = {
wraps = "bat";
body = "bat --plain --language=help $argv";
body = # fish
"bat --plain --language=help $argv";
};
};
@ -40,22 +43,26 @@
B = {
position = "anywhere";
setCursor = true;
expansion = "% | bat";
expansion = # fish
"% | bat";
};
"-h" = {
position = "anywhere";
expansion = "-h | cath";
expansion = # fish
"-h | cath";
};
"--help" = {
position = "anywhere";
expansion = "--help | cath";
expansion = # fish
"--help | cath";
};
help = {
position = "anywhere";
expansion = "help | cath";
expansion = # fish
"help | cath";
};
};
};

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.btop = {
enable = true;

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.cava = {
enable = true;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.packages = with pkgs; [
curl
];

View file

@ -1,9 +1,8 @@
{
system,
pkgs,
inputs,
...
}: {
}:
{
home.username = "marley";
home.homeDirectory = "/home/marley";
@ -13,7 +12,10 @@
nix.package = pkgs.nix;
# Enable flakes.
nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
targets.genericLinux.enable = true;
@ -21,7 +23,7 @@
systemd.user.startServices = true;
home.packages = with pkgs; [
inputs.alejandra.defaultPackage.${system}
nixfmt-rfc-style
nil
just
maple-mono-NF

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.eza = {
enable = true;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.packages = with pkgs; [
babelfish
];

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.gh = {
enable = true;
gitCredentialHelper.enable = true;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
# TODO: Switch to fastfetch
home.packages = with pkgs; [
neofetch

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.lazygit = {
enable = true;

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.less.enable = true;
home.sessionVariables = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.man.enable = true;
home.sessionVariables = {

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
nixpkgs.overlays = [
(final: prev: {
ncmpcpp = prev.ncmpcpp.override {

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
services.syncthing = {
enable = true;

View file

@ -2,13 +2,15 @@
pkgs,
config,
...
}: {
}:
{
programs.tmux = {
enable = true;
rose-pine = {
enable = true;
extraConfig = ''
extraConfig = # tmux
''
set -g @rose_pine_host 'on'
set -g @rose_pine_directory 'on'
'';
@ -33,21 +35,24 @@
plugins = with pkgs.tmuxPlugins; [
{
plugin = resurrect;
extraConfig = ''
extraConfig = # tmux
''
set -g @resurrect-capture-pane-contents 'on'
'';
}
{
plugin = continuum;
extraConfig = ''
extraConfig = # tmux
''
set -g @continuum-restore 'on'
'';
}
{
plugin = tilish;
extraConfig = ''
extraConfig = # tmux
''
# Don't enforce the layout.
set -g @tilish-enforce 'none'
@ -64,27 +69,31 @@
{
plugin = jump;
extraConfig = ''
extraConfig = # tmux
''
set -g @jump-key 's'
'';
}
{
plugin = fingers;
extraConfig = ''
extraConfig = # tmux
''
set -g @fingers-jump-key 's'
'';
}
{
plugin = tmux-floax;
extraConfig = ''
extraConfig = # tmux
''
set -g @floax-bind 'i'
'';
}
];
extraConfig = ''
extraConfig = # tmux
''
# Set repeat timeout so keys can be repeated without the prefix.
set -g repeat-time 1000

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.topgrade = {
enable = true;

View file

@ -3,7 +3,8 @@
lib,
config,
...
}: {
}:
{
home.packages = with pkgs; [
wget
];

View file

@ -1,9 +1,12 @@
{config, ...}: {
{ config, ... }:
{
home.preferXdgDirectories = true;
xdg = let
xdg =
let
homeDir = config.home.homeDirectory;
in {
in
{
enable = true;
cacheHome = "${homeDir}/.cache";

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
home.keyboard.options = [ "apple:alupckeys" ];
xsession = {
@ -6,7 +7,8 @@
numlock.enable = true;
# TODO: Switch to autorandr
profileExtra = ''
profileExtra = # sh
''
sudo mount -a
"$HOME/.config/xrandr/desktop.sh"
copyq &

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.zathura = {
enable = true;

View file

@ -1,4 +1,5 @@
{...}: {
{ ... }:
{
programs.zoxide = {
enable = true;