Format everything with alejandra
This commit is contained in:
parent
82bbd7ce87
commit
7888103b1e
100 changed files with 2827 additions and 2756 deletions
|
|
@ -1,10 +1,8 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.toast = { config, ... }: {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableVteIntegration = true;
|
||||
};
|
||||
};
|
||||
{config, ...}: {
|
||||
home-manager.users.toast = {config, ...}: {
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableVteIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,25 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
themeName = if config.system.nixos.release == "23.11" then "Catppuccin-mocha" else "Catppuccin Mocha";
|
||||
in
|
||||
{
|
||||
home-manager = {
|
||||
users.toast.programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "catppuccin-mocha";
|
||||
};
|
||||
themes = {
|
||||
catppuccin-mocha = {
|
||||
src = pkgs.catppuccin;
|
||||
file = "bat/${themeName}.tmTheme";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
themeName =
|
||||
if config.system.nixos.release == "23.11"
|
||||
then "Catppuccin-mocha"
|
||||
else "Catppuccin Mocha";
|
||||
in {
|
||||
home-manager = {
|
||||
users.toast.programs.bat = {
|
||||
enable = true;
|
||||
config = {
|
||||
theme = "catppuccin-mocha";
|
||||
};
|
||||
themes = {
|
||||
catppuccin-mocha = {
|
||||
src = pkgs.catppuccin;
|
||||
file = "bat/${themeName}.tmTheme";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
home-manager = {
|
||||
users.toast = {
|
||||
programs.btop = {
|
||||
|
|
@ -14,4 +12,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Use nix-index-database's comma wrapper
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
# Run programs from the system's nixpkgs
|
||||
environment.variables = { COMMA_NIXPKGS_FLAKE="system"; };
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Use nix-index-database's comma wrapper
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
# Run programs from the system's nixpkgs
|
||||
environment.variables = {COMMA_NIXPKGS_FLAKE = "system";};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
# The nixpkgs command-not-found script does not work with flakes, so I disable it
|
||||
programs.command-not-found.enable = false;
|
||||
{config, ...}: {
|
||||
# The nixpkgs command-not-found script does not work with flakes, so I disable it
|
||||
programs.command-not-found.enable = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,34 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./htop.nix
|
||||
./nix.nix
|
||||
./micro.nix
|
||||
./nix-index.nix
|
||||
./command-not-found.nix
|
||||
./comma.nix
|
||||
./bash.nix
|
||||
./git.nix
|
||||
./starship.nix
|
||||
./bat.nix
|
||||
./btop.nix
|
||||
./helix.nix
|
||||
./direnv.nix
|
||||
];
|
||||
# Some programs dont have a programs.*.enable option, so I install their package here
|
||||
environment.systemPackages = with pkgs; [
|
||||
speedtest-cli
|
||||
# Bat has a home manager module, but I want it to be available system wide
|
||||
bat
|
||||
file
|
||||
nvd
|
||||
ncdu
|
||||
tree
|
||||
btdu
|
||||
iperf3
|
||||
restic
|
||||
];
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./htop.nix
|
||||
./nix.nix
|
||||
./micro.nix
|
||||
./nix-index.nix
|
||||
./command-not-found.nix
|
||||
./comma.nix
|
||||
./bash.nix
|
||||
./git.nix
|
||||
./starship.nix
|
||||
./bat.nix
|
||||
./btop.nix
|
||||
./helix.nix
|
||||
./direnv.nix
|
||||
];
|
||||
# Some programs dont have a programs.*.enable option, so I install their package here
|
||||
environment.systemPackages = with pkgs; [
|
||||
speedtest-cli
|
||||
# Bat has a home manager module, but I want it to be available system wide
|
||||
bat
|
||||
file
|
||||
nvd
|
||||
ncdu
|
||||
tree
|
||||
btdu
|
||||
iperf3
|
||||
restic
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv = {
|
||||
|
|
|
|||
|
|
@ -1,34 +1,33 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
catppuccinDelta = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "delta";
|
||||
rev = "main";
|
||||
hash = "sha256-0QQLkfLBVuB2re6tjtPNuOQZNK0MDBAIFgNGHZM8afs=";
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
home-manager.users.toast = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Toast";
|
||||
userEmail = "toast003@tutamail.com";
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
syntax-theme = "catppuccin-mocha";
|
||||
features = "catppuccin-mocha";
|
||||
};
|
||||
};
|
||||
includes = [{ path = "${catppuccinDelta}/themes/mocha.gitconfig"; }];
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
diff.colorMoved = "default";
|
||||
commit.verbose = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
catppuccinDelta = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "delta";
|
||||
rev = "main";
|
||||
hash = "sha256-0QQLkfLBVuB2re6tjtPNuOQZNK0MDBAIFgNGHZM8afs=";
|
||||
};
|
||||
in {
|
||||
home-manager.users.toast = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Toast";
|
||||
userEmail = "toast003@tutamail.com";
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
syntax-theme = "catppuccin-mocha";
|
||||
features = "catppuccin-mocha";
|
||||
};
|
||||
};
|
||||
includes = [{path = "${catppuccinDelta}/themes/mocha.gitconfig";}];
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
diff.colorMoved = "default";
|
||||
commit.verbose = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
home-manager.users.toast = {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
|
|
@ -9,7 +7,7 @@
|
|||
nixpkgs-fmt
|
||||
nil
|
||||
];
|
||||
settings = {
|
||||
settings = {
|
||||
theme = "catppuccin_mocha";
|
||||
editor = {
|
||||
mouse = true;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
tree_view = 1;
|
||||
highlight_base_name = 1;
|
||||
show_program_path = 0;
|
||||
show_cpu_frequency = 1;
|
||||
show_cpu_temperature = 1;
|
||||
hide_userland_threads = 1;
|
||||
};
|
||||
};
|
||||
{config, ...}: {
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
tree_view = 1;
|
||||
highlight_base_name = 1;
|
||||
show_program_path = 0;
|
||||
show_cpu_frequency = 1;
|
||||
show_cpu_temperature = 1;
|
||||
hide_userland_threads = 1;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,22 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
users.toast = { config, pkgs, ... }:
|
||||
{
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
settings = {
|
||||
clipboard = "internal";
|
||||
indentchar = "|";
|
||||
softwrap = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home-manager = {
|
||||
users.toast = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.micro = {
|
||||
enable = true;
|
||||
settings = {
|
||||
clipboard = "internal";
|
||||
indentchar = "|";
|
||||
softwrap = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
/* environment.systemPackages = [ pkgs.nix-index ];
|
||||
programs.bash.interactiveShellInit = ''
|
||||
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
||||
''; */
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
# I don't use zsh or fish (yet)
|
||||
enableZshIntegration = false;
|
||||
enableFishIntegration = false;
|
||||
};
|
||||
{config, ...}: {
|
||||
/*
|
||||
environment.systemPackages = [ pkgs.nix-index ];
|
||||
programs.bash.interactiveShellInit = ''
|
||||
source ${pkgs.nix-index}/etc/profile.d/command-not-found.sh
|
||||
'';
|
||||
*/
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
# I don't use zsh or fish (yet)
|
||||
enableZshIntegration = false;
|
||||
enableFishIntegration = false;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,34 @@
|
|||
{ config, systemPkgs, ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = [ "weekly" ];
|
||||
};
|
||||
registry = {
|
||||
agenix = {
|
||||
from = { id = "agenix"; type = "indirect"; };
|
||||
to = { owner = "ryantm"; repo = "agenix"; type = "github"; };
|
||||
};
|
||||
# Write the system's nixpkgs into the registry to avoid mixing nixpkgs versions
|
||||
# https://dataswamp.org/~solene/2022-07-20-nixos-flakes-command-sync-with-system.html
|
||||
system.flake = systemPkgs;
|
||||
};
|
||||
# I removed this in the past since I thought that I didn't need it, but turns out comma does :)
|
||||
nixPath = [ "nixpkgs=${systemPkgs}" ];
|
||||
};
|
||||
config,
|
||||
systemPkgs,
|
||||
...
|
||||
}: {
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = ["weekly"];
|
||||
};
|
||||
registry = {
|
||||
agenix = {
|
||||
from = {
|
||||
id = "agenix";
|
||||
type = "indirect";
|
||||
};
|
||||
to = {
|
||||
owner = "ryantm";
|
||||
repo = "agenix";
|
||||
type = "github";
|
||||
};
|
||||
};
|
||||
# Write the system's nixpkgs into the registry to avoid mixing nixpkgs versions
|
||||
# https://dataswamp.org/~solene/2022-07-20-nixos-flakes-command-sync-with-system.html
|
||||
system.flake = systemPkgs;
|
||||
};
|
||||
# I removed this in the past since I thought that I didn't need it, but turns out comma does :)
|
||||
nixPath = ["nixpkgs=${systemPkgs}"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,53 +1,52 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
with builtins;
|
||||
|
||||
let
|
||||
catppuccinFlavour = "mocha";
|
||||
catppuccinStarship = pkgs.catppuccin + /starship/${catppuccinFlavour}.toml;
|
||||
|
||||
presets = {
|
||||
nerdFontSymbols = pkgs.fetchurl {
|
||||
url = "https://starship.rs/presets/toml/nerd-font-symbols.toml";
|
||||
hash = "sha256-BVe5JMSIa3CoY2Wf9pvcF1EUtDVCWCLhW3IyKuwfHug=";
|
||||
};
|
||||
};
|
||||
# -------------------------------- F U N C T I O N S --------------------------------
|
||||
|
||||
/*
|
||||
Gonna be honest, I have no idea how this works, although it seems to work
|
||||
Stolen from https://gist.github.com/pdalpra/daf339f59288201a6c8ba7dc84e9060e
|
||||
*/
|
||||
# Takes a list of attrSets and merges them
|
||||
mergeAllAttrSets = attrsSets:
|
||||
foldl' (recursiveUpdate) {} attrsSets;
|
||||
|
||||
# Reads a TOML file and parses it
|
||||
readTomlPreset = file: (fromTOML (readFile file));
|
||||
|
||||
in
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = mergeAllAttrSets [
|
||||
(readTomlPreset presets.nerdFontSymbols)
|
||||
(readTomlPreset catppuccinStarship)
|
||||
{
|
||||
nix_shell = {
|
||||
disabled = false;
|
||||
heuristic = true;
|
||||
};
|
||||
os = {
|
||||
disabled = false;
|
||||
};
|
||||
directory = {
|
||||
disabled = false;
|
||||
truncation_length = 6;
|
||||
truncation_symbol = ".../";
|
||||
};
|
||||
palette = "catppuccin_${catppuccinFlavour}";
|
||||
}
|
||||
];
|
||||
};
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
catppuccinFlavour = "mocha";
|
||||
catppuccinStarship = pkgs.catppuccin + /starship/${catppuccinFlavour}.toml;
|
||||
|
||||
presets = {
|
||||
nerdFontSymbols = pkgs.fetchurl {
|
||||
url = "https://starship.rs/presets/toml/nerd-font-symbols.toml";
|
||||
hash = "sha256-BVe5JMSIa3CoY2Wf9pvcF1EUtDVCWCLhW3IyKuwfHug=";
|
||||
};
|
||||
};
|
||||
# -------------------------------- F U N C T I O N S --------------------------------
|
||||
|
||||
/*
|
||||
Gonna be honest, I have no idea how this works, although it seems to work
|
||||
Stolen from https://gist.github.com/pdalpra/daf339f59288201a6c8ba7dc84e9060e
|
||||
*/
|
||||
# Takes a list of attrSets and merges them
|
||||
mergeAllAttrSets = attrsSets:
|
||||
foldl' recursiveUpdate {} attrsSets;
|
||||
|
||||
# Reads a TOML file and parses it
|
||||
readTomlPreset = file: (fromTOML (readFile file));
|
||||
in {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = mergeAllAttrSets [
|
||||
(readTomlPreset presets.nerdFontSymbols)
|
||||
(readTomlPreset catppuccinStarship)
|
||||
{
|
||||
nix_shell = {
|
||||
disabled = false;
|
||||
heuristic = true;
|
||||
};
|
||||
os = {
|
||||
disabled = false;
|
||||
};
|
||||
directory = {
|
||||
disabled = false;
|
||||
truncation_length = 6;
|
||||
truncation_symbol = ".../";
|
||||
};
|
||||
palette = "catppuccin_${catppuccinFlavour}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue