From b81d52cc8bc8671b68075b863c396e2cb511be97 Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Thu, 27 Jul 2023 23:36:46 +0200 Subject: [PATCH 1/4] REMOVE STARSHIP --- hosts/d2nix/nixos/configuration.nix | 3 +- modules/starship.nix | 127 ++++++++++++++++------------ 2 files changed, 75 insertions(+), 55 deletions(-) diff --git a/hosts/d2nix/nixos/configuration.nix b/hosts/d2nix/nixos/configuration.nix index 6e3acad..1f00914 100644 --- a/hosts/d2nix/nixos/configuration.nix +++ b/hosts/d2nix/nixos/configuration.nix @@ -13,7 +13,8 @@ ./network.nix modules/common.nix modules/smtp.nix - modules/starship.nix +# modules/starship.nix + modules/syncthing.nix # modules/powermanagement.nix ]; diff --git a/modules/starship.nix b/modules/starship.nix index 7cceaea..397a8eb 100644 --- a/modules/starship.nix +++ b/modules/starship.nix @@ -4,64 +4,83 @@ enable = true; # Configuration écrite dans ~/.config/starship.toml settings = { - add_newline = false; - format = "$shlvl$shell$username$hostname$nix_shell$git_branch$git_commit$git_state$git_status$directory$jobs$cmd_duration$character"; - shlvl = { - disabled = false; - symbol = "ﰬ"; - style = "bright-red bold"; +# add_newline = false; +# format = "$shlvl$shell$username$hostname$nix_shell$git_branch$git_commit$git_state$git_status$directory$jobs$cmd_duration$character"; +# shlvl = { +# disabled = false; +# symbol = "ﰬ"; +# style = "bright-red bold"; +# }; +# shell = { +# disabled = false; +# format = "$indicator"; +# fish_indicator = ""; +# bash_indicator = "[BASH](bright-white) "; +# }; +# username = { +# style_user = "bright-white bold"; +# style_root = "bright-red bold"; +# }; +# hostname = { +# style = "bright-green bold"; +# ssh_only = true; +# }; +# nix_shell = { +# symbol = ""; +# format = "[$symbol$name]($style) "; +# style = "bright-purple bold"; +# }; +# git_branch = { +# only_attached = true; +# format = "[$symbol$branch]($style) "; +# symbol = "שׂ"; +# style = "bright-yellow bold"; +# }; +# git_commit = { +# only_detached = true; +# format = "[ﰖ$hash]($style) "; +# style = "bright-yellow bold"; +# }; +# git_state = { +# style = "bright-purple bold"; +# }; +# git_status = { +# style = "bright-green bold"; +# }; +# directory = { +# read_only = " "; +# truncation_length = 0; +# }; +# cmd_duration = { +# format = "[$duration]($style) "; +# style = "bright-blue"; +# }; +# jobs = { +# style = "bright-green bold"; +# }; +# character = { +# success_symbol = "[\\$](bright-green bold)"; +# error_symbol = "[\\$](bright-red bold)"; +# }; +# }; + format = "[░▒▓](#a3aed2) [](bg:#769ff0 fg:#a3aed2) $directory [](fg:#769ff0 bg:#394260) $git_branch $git_status [](fg:#394260 bg:#212736) $time [ ](fg:#1d2230)$character"; + directory = { + style = "fg:#e3e5e5 bg:#769ff0"; + format = "[ $path ]($style)"; + truncation_length = 3; + truncation_symbol = "…/"; }; - shell = { - disabled = false; - format = "$indicator"; - fish_indicator = ""; - bash_indicator = "[BASH](bright-white) "; - }; - username = { - style_user = "bright-white bold"; - style_root = "bright-red bold"; - }; - hostname = { - style = "bright-green bold"; - ssh_only = true; - }; - nix_shell = { - symbol = ""; - format = "[$symbol$name]($style) "; - style = "bright-purple bold"; + directory.substitutions = { + "Documents" = "󰈙 "; + "Downloads" = " "; + "Music" = " "; + "Pictures" = " "; }; git_branch = { - only_attached = true; - format = "[$symbol$branch]($style) "; - symbol = "שׂ"; - style = "bright-yellow bold"; + symbol = ""; + style = "bg:#394260"; + format = "[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)"; }; - git_commit = { - only_detached = true; - format = "[ﰖ$hash]($style) "; - style = "bright-yellow bold"; }; - git_state = { - style = "bright-purple bold"; - }; - git_status = { - style = "bright-green bold"; - }; - directory = { - read_only = " "; - truncation_length = 0; - }; - cmd_duration = { - format = "[$duration]($style) "; - style = "bright-blue"; - }; - jobs = { - style = "bright-green bold"; - }; - character = { - success_symbol = "[\\$](bright-green bold)"; - error_symbol = "[\\$](bright-red bold)"; - }; - }; }; } From 07a61cc3d3ec687cb9cb16c2c269dc644c1b0b5c Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Fri, 28 Jul 2023 00:23:23 +0200 Subject: [PATCH 2/4] ACTIVATE Flake on d2nix --- hosts/d2nix/nixos/configuration.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/d2nix/nixos/configuration.nix b/hosts/d2nix/nixos/configuration.nix index 1f00914..3ef9f50 100644 --- a/hosts/d2nix/nixos/configuration.nix +++ b/hosts/d2nix/nixos/configuration.nix @@ -117,5 +117,7 @@ latitude = 47.77; longitude = -1.164; }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; } From 12fc483e17a415f301755b3f91e8b93eb3ff7c73 Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Fri, 28 Jul 2023 18:10:45 +0000 Subject: [PATCH 3/4] ADD neovim to std install --- modules/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/common.nix b/modules/common.nix index a4e65ba..d732972 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -8,7 +8,7 @@ tmux lshw bc - #neovim + neovim ncdu nixos-option bat From 3d6b171a432b4d5e832328a016c8e598876c4df0 Mon Sep 17 00:00:00 2001 From: Alexandre LUCAZEAU Date: Fri, 28 Jul 2023 18:11:10 +0000 Subject: [PATCH 4/4] ADD syncthing to web server --- hosts/web/configuration.nix | 1 + hosts/web/webserver.nix | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/hosts/web/configuration.nix b/hosts/web/configuration.nix index 823b9e1..0943802 100644 --- a/hosts/web/configuration.nix +++ b/hosts/web/configuration.nix @@ -10,6 +10,7 @@ ../modules/users.nix # ../docker/appsmith.nix ../docker/kuma.nix + ../modules/syncthing.nix ]; system.stateVersion = "21.11"; diff --git a/hosts/web/webserver.nix b/hosts/web/webserver.nix index 65bec40..4d14ce8 100644 --- a/hosts/web/webserver.nix +++ b/hosts/web/webserver.nix @@ -35,6 +35,11 @@ in atlanticaweb.fr:2021 { metrics } + https://sync.atlanticaweb.fr { + reverse_proxy http://localhost:8384 { + header_up Host {upstream_hostport} +} + } www.atlanticaweb.fr { redir https://atlanticaweb.fr{uri} }