nix fmt rfc
This commit is contained in:
parent
3a8003e671
commit
56df50bdc1
41 changed files with 430 additions and 351 deletions
|
@ -6,44 +6,43 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard; let
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.apps.cli-apps.fish;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.wyrdgard.apps.cli-apps.fish = with types; {
|
||||
enable = mkBoolOpt true "Whether or not to enable the fish shell";
|
||||
};
|
||||
|
||||
config =
|
||||
mkIf cfg.enable {
|
||||
home.packages = with pkgs.fishPlugins; [
|
||||
forgit
|
||||
sponge
|
||||
];
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs.fishPlugins; [
|
||||
forgit
|
||||
sponge
|
||||
];
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = "
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellInit = "
|
||||
zoxide init fish | source
|
||||
direnv hook fish | source
|
||||
source ~/.config/op/plugins.sh
|
||||
";
|
||||
shellAliases = {
|
||||
vim = "nvim";
|
||||
ls = "colorls --gs";
|
||||
l = "ls -l";
|
||||
la = "ls -a";
|
||||
lla = "ls -la";
|
||||
lt = "ls --tree";
|
||||
};
|
||||
};
|
||||
|
||||
zoxide = {
|
||||
enable = true;
|
||||
options = [
|
||||
"--cmd cd"
|
||||
];
|
||||
shellAliases = {
|
||||
vim = "nvim";
|
||||
ls = "colorls --gs";
|
||||
l = "ls -l";
|
||||
la = "ls -a";
|
||||
lla = "ls -la";
|
||||
lt = "ls --tree";
|
||||
};
|
||||
};
|
||||
|
||||
zoxide = {
|
||||
enable = true;
|
||||
options = [ "--cmd cd" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,17 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
with lib.wyrdgard; let
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.apps.cli-apps.home-manager;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.wyrdgard.apps.cli-apps.home-manager = {
|
||||
enable = mkBoolOpt true "Enable home-manager";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.home-manager = enabled;
|
||||
};
|
||||
config = mkIf cfg.enable { programs.home-manager = enabled; };
|
||||
}
|
||||
|
|
|
@ -6,69 +6,70 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard; let
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.apps.cli-apps.starship;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.wyrdgard.apps.cli-apps.starship = with types; {
|
||||
enable = mkBoolOpt true "Whether or not to enable starship shell";
|
||||
};
|
||||
|
||||
config =
|
||||
mkIf cfg.enable {
|
||||
programs = {
|
||||
fish.shellInit = "
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
fish.shellInit = "
|
||||
|
||||
starship init fish | source
|
||||
";
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
enableTransience = true;
|
||||
settings = {
|
||||
character = {
|
||||
error_symbol = "[ ](bold red)";
|
||||
};
|
||||
time = {
|
||||
disabled = false;
|
||||
time_format = "%T";
|
||||
utc_time_offset = "+1";
|
||||
};
|
||||
username = {
|
||||
style_user = "#00de00";
|
||||
style_root = "red";
|
||||
format = "[$user]($style) ";
|
||||
disabled = false;
|
||||
show_always = true;
|
||||
};
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
format = "@ [$hostname](bold yellow) ";
|
||||
disabled = false;
|
||||
};
|
||||
directory = {
|
||||
home_symbol = " ~";
|
||||
read_only_style = "197";
|
||||
read_only = " ";
|
||||
format = "at [$path]($style)[$read_only]($read_only_style) ";
|
||||
};
|
||||
git_metrics = {
|
||||
disabled = false;
|
||||
added_style = "bold blue";
|
||||
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
|
||||
};
|
||||
git_status = {
|
||||
format = "([$all_status$ahead_behind]($style) )";
|
||||
ahead = "[↑$count](bold green)";
|
||||
behind = "[↓$count](bold red)";
|
||||
diverged = "[↕↓$ahead_count↑$behind_count](red)";
|
||||
deleted = "[✘$count](red) ";
|
||||
modified = "[!$count](yellow) ";
|
||||
staged = "[+$count](green) ";
|
||||
renamed = "[➜$count](green) ";
|
||||
untracked = "[?$count](blue) ";
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
enableTransience = true;
|
||||
settings = {
|
||||
character = {
|
||||
error_symbol = "[ ](bold red)";
|
||||
};
|
||||
time = {
|
||||
disabled = false;
|
||||
time_format = "%T";
|
||||
utc_time_offset = "+1";
|
||||
};
|
||||
username = {
|
||||
style_user = "#00de00";
|
||||
style_root = "red";
|
||||
format = "[$user]($style) ";
|
||||
disabled = false;
|
||||
show_always = true;
|
||||
};
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
format = "@ [$hostname](bold yellow) ";
|
||||
disabled = false;
|
||||
};
|
||||
directory = {
|
||||
home_symbol = " ~";
|
||||
read_only_style = "197";
|
||||
read_only = " ";
|
||||
format = "at [$path]($style)[$read_only]($read_only_style) ";
|
||||
};
|
||||
git_metrics = {
|
||||
disabled = false;
|
||||
added_style = "bold blue";
|
||||
format = "[+$added]($added_style)/[-$deleted]($deleted_style) ";
|
||||
};
|
||||
git_status = {
|
||||
format = "([$all_status$ahead_behind]($style) )";
|
||||
ahead = "[↑$count](bold green)";
|
||||
behind = "[↓$count](bold red)";
|
||||
diverged = "[↕↓$ahead_count↑$behind_count](red)";
|
||||
deleted = "[✘$count](red) ";
|
||||
modified = "[!$count](yellow) ";
|
||||
staged = "[+$count](green) ";
|
||||
renamed = "[➜$count](green) ";
|
||||
untracked = "[?$count](blue) ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard; let
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.apps.graphviz;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.wyrdgard.apps.graphviz = {
|
||||
enable = mkBoolOpt true "Whether or not you want to install graphviz";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
graphviz
|
||||
];
|
||||
home.packages = with pkgs; [ graphviz ];
|
||||
|
||||
home.shellAliases = {
|
||||
nixsize = "nix-du -n=50 | dot -Tsvg > ~/Pictures/store.svg";
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard; let
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.apps.kitty;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.wyrdgard.apps.kitty = {
|
||||
enable = mkEnableOption "Kity";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
kitty
|
||||
];
|
||||
home.packages = with pkgs; [ kitty ];
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
|
|
@ -6,9 +6,11 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard; let
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.tools.direnv;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.wyrdgard.tools.direnv = with types; {
|
||||
enable = mkBoolOpt false "Whether or not to enable direnv.";
|
||||
};
|
||||
|
|
|
@ -6,10 +6,12 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.wyrdgard; let
|
||||
with lib.wyrdgard;
|
||||
let
|
||||
cfg = config.wyrdgard.tools.git;
|
||||
user = config.wyrdgard.user;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.wyrdgard.tools.git = {
|
||||
enable = mkBoolOpt true "Enable Git (Default true)";
|
||||
userName = mkOpt types.str user.fullName "The name to configure git with.";
|
||||
|
@ -22,9 +24,15 @@ in {
|
|||
inherit (cfg) userName userEmail;
|
||||
lfs = enabled;
|
||||
extraConfig = {
|
||||
init = {defaultBranch = "main";};
|
||||
pull = {rebase = false;};
|
||||
push = {autoSetupRemote = true;};
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
pull = {
|
||||
rebase = false;
|
||||
};
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -2,10 +2,16 @@
|
|||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
osConfig ? {},
|
||||
osConfig ? { },
|
||||
...
|
||||
}: let
|
||||
inherit (lib) types mkIf mkDefault mkMerge;
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
types
|
||||
mkIf
|
||||
mkDefault
|
||||
mkMerge
|
||||
;
|
||||
inherit (lib.wyrdgard) mkOpt;
|
||||
|
||||
cfg = config.wyrdgard.user;
|
||||
|
@ -14,15 +20,18 @@
|
|||
is-darwin = pkgs.stdenv.isDarwin;
|
||||
|
||||
home-directory =
|
||||
if cfg.name == null
|
||||
then null
|
||||
else if is-darwin
|
||||
then "/Users/${cfg.name}"
|
||||
else "/home/${cfg.name}";
|
||||
in {
|
||||
if cfg.name == null then
|
||||
null
|
||||
else if is-darwin then
|
||||
"/Users/${cfg.name}"
|
||||
else
|
||||
"/home/${cfg.name}";
|
||||
in
|
||||
{
|
||||
options.wyrdgard.user = {
|
||||
enable = mkOpt types.bool true "Whether to configure the user account.";
|
||||
name = mkOpt (types.nullOr types.str) (config.snowfallorg.user.name or "cholli") "The user account.";
|
||||
name = mkOpt (types.nullOr types.str) (config.snowfallorg.user.name or "cholli"
|
||||
) "The user account.";
|
||||
|
||||
fullName = mkOpt types.str "Christoph Hollizeck" "The full name of the user.";
|
||||
email = mkOpt types.str "christoph.hollizeck@hey.com" "The email of the user.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue