Add gh
This commit is contained in:
parent
1cb30eadca
commit
cee415973f
13 changed files with 1747 additions and 1678 deletions
|
|
@ -4,7 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
options,
|
options,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
font_family = "${config.mods.stylix.fonts.monospace.name}";
|
||||||
|
in {
|
||||||
options.mods = {
|
options.mods = {
|
||||||
coding = {
|
coding = {
|
||||||
enable = lib.mkOption {
|
enable = lib.mkOption {
|
||||||
|
|
@ -53,6 +55,80 @@
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
description = "Enables penpot";
|
description = "Enables penpot";
|
||||||
};
|
};
|
||||||
|
neovide = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Enables neovide";
|
||||||
|
};
|
||||||
|
config = lib.mkOption {
|
||||||
|
default = {
|
||||||
|
font = {
|
||||||
|
size = 12;
|
||||||
|
normal = {
|
||||||
|
family = font_family;
|
||||||
|
style = "";
|
||||||
|
};
|
||||||
|
bold = {
|
||||||
|
family = font_family;
|
||||||
|
style = "ExtraBold";
|
||||||
|
};
|
||||||
|
italic = {
|
||||||
|
family = font_family;
|
||||||
|
style = "Italic";
|
||||||
|
};
|
||||||
|
bold_italic = {
|
||||||
|
family = font_family;
|
||||||
|
style = "Bold Italic";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
example = {};
|
||||||
|
type = with lib.types; attrsOf anything;
|
||||||
|
description = "Config for neovide";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
gh = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
default = true;
|
||||||
|
example = false;
|
||||||
|
type = lib.types.bool;
|
||||||
|
description = "Enables and configures gh";
|
||||||
|
};
|
||||||
|
config = lib.mkOption {
|
||||||
|
default = {
|
||||||
|
version = 1;
|
||||||
|
git_protocol = "ssh";
|
||||||
|
editor = "";
|
||||||
|
prompt = "enabled";
|
||||||
|
prefer_editor_prompt = "disabled";
|
||||||
|
pager = "";
|
||||||
|
aliases = {
|
||||||
|
co = "pr checkout";
|
||||||
|
};
|
||||||
|
http_unix_socket = "";
|
||||||
|
browser = "";
|
||||||
|
};
|
||||||
|
example = {};
|
||||||
|
type = with lib.types; attrsOf anything;
|
||||||
|
description = "config for gh. Keep in mind, empty values refer to using environment variables";
|
||||||
|
};
|
||||||
|
hosts = lib.mkOption {
|
||||||
|
default = {
|
||||||
|
"github.com" = {
|
||||||
|
git_protocol = "ssh";
|
||||||
|
users = {
|
||||||
|
${config.mods.git.username} = "";
|
||||||
|
};
|
||||||
|
user = "${config.mods.git.username}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
example = {};
|
||||||
|
type = with lib.types; attrsOf anything;
|
||||||
|
description = "hosts for gh";
|
||||||
|
};
|
||||||
|
};
|
||||||
useDefaultPackages = lib.mkOption {
|
useDefaultPackages = lib.mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
example = false;
|
example = false;
|
||||||
|
|
@ -233,7 +309,6 @@
|
||||||
omnisharp-roslyn
|
omnisharp-roslyn
|
||||||
csharpier
|
csharpier
|
||||||
netcoredbg
|
netcoredbg
|
||||||
#fsharp
|
|
||||||
fsharp
|
fsharp
|
||||||
fsautocomplete
|
fsautocomplete
|
||||||
];
|
];
|
||||||
|
|
@ -255,8 +330,7 @@
|
||||||
};
|
};
|
||||||
packages = lib.mkOption {
|
packages = lib.mkOption {
|
||||||
default = with pkgs; [
|
default = with pkgs; [
|
||||||
# broke
|
bear
|
||||||
#bear
|
|
||||||
gdb
|
gdb
|
||||||
gcc
|
gcc
|
||||||
clang-tools
|
clang-tools
|
||||||
|
|
@ -435,7 +509,6 @@
|
||||||
tmux
|
tmux
|
||||||
tmate
|
tmate
|
||||||
];
|
];
|
||||||
font_family = "${config.mods.stylix.fonts.monospace.name}";
|
|
||||||
in
|
in
|
||||||
lib.mkIf config.mods.coding.enable (
|
lib.mkIf config.mods.coding.enable (
|
||||||
lib.optionalAttrs (options ? home.packages) {
|
lib.optionalAttrs (options ? home.packages) {
|
||||||
|
|
@ -448,34 +521,29 @@
|
||||||
package = pkgs.vscodium;
|
package = pkgs.vscodium;
|
||||||
profiles.default.extensions = config.mods.coding.vscodium.extensions;
|
profiles.default.extensions = config.mods.coding.vscodium.extensions;
|
||||||
};
|
};
|
||||||
xdg.configFile."neovide/config.toml" = lib.mkIf config.mods.coding.dashvim {
|
xdg.configFile."neovide/config.toml" = lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) {
|
||||||
source = (pkgs.formats.toml {}).generate "neovide" {
|
source =
|
||||||
font = {
|
(pkgs.formats.toml {}).generate "neovide"
|
||||||
size = 12;
|
config.mods.coding.neovide.config;
|
||||||
normal = {
|
|
||||||
family = font_family;
|
|
||||||
style = "";
|
|
||||||
};
|
|
||||||
bold = {
|
|
||||||
family = font_family;
|
|
||||||
style = "ExtraBold";
|
|
||||||
};
|
|
||||||
italic = {
|
|
||||||
family = font_family;
|
|
||||||
style = "Italic";
|
|
||||||
};
|
|
||||||
bold_italic = {
|
|
||||||
family = font_family;
|
|
||||||
style = "Bold Italic";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.configFile."gh/config.yml" = lib.mkIf config.mods.coding.gh.enable {
|
||||||
|
source =
|
||||||
|
(pkgs.formats.yaml {}).generate "config"
|
||||||
|
config.mods.coding.gh.config;
|
||||||
};
|
};
|
||||||
|
xdg.configFile."gh/hosts.yml" = lib.mkIf config.mods.coding.gh.enable {
|
||||||
|
source =
|
||||||
|
(pkgs.formats.yaml {}).generate "hosts"
|
||||||
|
config.mods.coding.gh.hosts;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
[
|
[
|
||||||
(lib.mkIf config.mods.coding.dashvim neovide)
|
(lib.mkIf (config.mods.coding.dashvim || config.mods.coding.neovide.enable) neovide)
|
||||||
(lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox)
|
(lib.mkIf config.mods.coding.jetbrains jetbrains-toolbox)
|
||||||
(lib.mkIf config.mods.coding.penpot pkgs.penpot-desktop)
|
(lib.mkIf config.mods.coding.penpot pkgs.penpot-desktop)
|
||||||
|
(lib.mkIf config.mods.coding.gh.enable gh)
|
||||||
]
|
]
|
||||||
++ config.mods.coding.additionalPackages
|
++ config.mods.coding.additionalPackages
|
||||||
++ (lib.lists.optionals config.mods.coding.useDefaultPackages basePackages)
|
++ (lib.lists.optionals config.mods.coding.useDefaultPackages basePackages)
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ in {
|
||||||
|
|
||||||
alias rebuild='nh os switch -- --accept-flake-config'
|
alias rebuild='nh os switch -- --accept-flake-config'
|
||||||
alias update='nix flake update --flake $FLAKE --accept-flake-config'
|
alias update='nix flake update --flake $FLAKE --accept-flake-config'
|
||||||
|
alias gcli='gh'
|
||||||
abbr --add ls 'lsd'
|
abbr --add ls 'lsd'
|
||||||
abbr --add :q 'exit'
|
abbr --add :q 'exit'
|
||||||
abbr --add gh 'git push origin'
|
abbr --add gh 'git push origin'
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@
|
||||||
}: {
|
}: {
|
||||||
options.mods.git = {
|
options.mods.git = {
|
||||||
username = lib.mkOption {
|
username = lib.mkOption {
|
||||||
default = "DashieTM";
|
default = "";
|
||||||
example = "globi";
|
example = "globi";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Git user name";
|
description = "Git user name";
|
||||||
};
|
};
|
||||||
email = lib.mkOption {
|
email = lib.mkOption {
|
||||||
default = "fabio.lenherr@gmail.com";
|
default = "";
|
||||||
example = "globi@globus.glob";
|
example = "globi@globus.glob";
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "Git email";
|
description = "Git email";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue