summaryrefslogtreecommitdiff
path: root/home/baseline
diff options
context:
space:
mode:
Diffstat (limited to 'home/baseline')
-rw-r--r--home/baseline/default.nix67
-rw-r--r--home/baseline/git.nix16
-rw-r--r--home/baseline/graphics.nix84
-rw-r--r--home/baseline/nvim.nix29
-rw-r--r--home/baseline/zsh.nix20
-rw-r--r--home/baseline/zshrc.nix73
6 files changed, 289 insertions, 0 deletions
diff --git a/home/baseline/default.nix b/home/baseline/default.nix
new file mode 100644
index 0000000..046a475
--- /dev/null
+++ b/home/baseline/default.nix
@@ -0,0 +1,67 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib; let
+ cfg = config.local.baseline;
+in {
+ imports = [
+ ./git.nix
+ ./graphics.nix
+ ./nvim.nix
+ ./zsh.nix
+ ];
+
+ options.local = {
+ hostname = mkOption {
+ type = types.str;
+ };
+
+ uid = mkOption {
+ type = types.int;
+ };
+
+ gecos = mkOption {
+ type = types.str;
+ };
+
+ email = mkOption {
+ type = types.str;
+ };
+ };
+
+ config = {
+ home = {
+ # This value determines the Home Manager release that your
+ # configuration is compatible with. This helps avoid breakage
+ # when a new Home Manager release introduces backwards
+ # incompatible changes.
+ #
+ # You can update Home Manager without changing this value. See
+ # the Home Manager release notes for a list of state version
+ # changes in each release.
+ stateVersion = "21.11";
+
+ homeDirectory = "/home/${config.home.username}";
+
+ packages = [
+ pkgs.file
+ pkgs.killall
+ pkgs.man-pages
+ pkgs.man-pages-posix
+ pkgs.tree
+ pkgs.unzip
+ pkgs.wget
+ pkgs.zip
+ ];
+
+ sessionVariables = {
+ LESSHISTFILE = "/dev/null";
+ };
+ };
+
+ xdg.enable = true;
+ };
+}
diff --git a/home/baseline/git.nix b/home/baseline/git.nix
new file mode 100644
index 0000000..9707f44
--- /dev/null
+++ b/home/baseline/git.nix
@@ -0,0 +1,16 @@
+{
+ config,
+ lib,
+ ...
+}:
+with lib; let
+ cfg = config.local;
+in {
+ config = {
+ programs.git = {
+ enable = true;
+ userName = cfg.gecos;
+ userEmail = cfg.email;
+ };
+ };
+}
diff --git a/home/baseline/graphics.nix b/home/baseline/graphics.nix
new file mode 100644
index 0000000..c31e18a
--- /dev/null
+++ b/home/baseline/graphics.nix
@@ -0,0 +1,84 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib; {
+ config = {
+ dconf.settings = {
+ "org/gtk/settings/file-chooser".startup-mode = "cwd";
+ "org/gtk/gtk4/settings/file-chooser".startup-mode = "cwd";
+
+ "org/gnome/desktop/interface" = {
+ gtk-theme = config.gtk.theme.name;
+ color-scheme = "prefer-dark";
+ };
+ };
+
+ fonts.fontconfig.enable = true;
+
+ gtk = {
+ enable = true;
+
+ gtk2.extraConfig = ''
+ gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
+ gtk-menu-images=1
+ gtk-button-images=1
+ '';
+
+ gtk3.extraConfig = {
+ gtk-recent-files-enabled = 0;
+ gtk-application-prefer-dark-theme = true;
+ };
+
+ gtk4.extraConfig = {
+ gtk-recent-files-enabled = 0;
+ };
+
+ font = {
+ package = pkgs.noto-fonts;
+ name = "Noto Sans Regular";
+ #size = 14; <- caga layout de páginas
+ };
+
+ theme = {
+ package = pkgs.materia-theme;
+ name = "Materia-dark";
+ };
+ };
+
+ home = {
+ pointerCursor = {
+ enable = true;
+
+ name = "Adwaita";
+ size = 48;
+
+ package = pkgs.adwaita-icon-theme;
+
+ gtk.enable = true;
+ x11.enable = true;
+ sway.enable = true;
+ dotIcons.enable = true;
+ };
+
+ sessionVariables = {
+ GTK_THEME = config.gtk.theme.name;
+
+ # Usar gtk en aplicaciones de jvm
+ _JAVA_OPTIONS = concatStringsSep " " [
+ "-Dawt.useSystemAAFontSettings=on"
+ "-Dswing.aatext=true"
+ "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
+ "-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
+ ];
+ };
+ };
+
+ qt = {
+ enable = true;
+ platformTheme.name = "gtk";
+ };
+ };
+}
diff --git a/home/baseline/nvim.nix b/home/baseline/nvim.nix
new file mode 100644
index 0000000..edcabe8
--- /dev/null
+++ b/home/baseline/nvim.nix
@@ -0,0 +1,29 @@
+{
+ config,
+ lib,
+ ...
+}:
+with lib; let
+ cfg = config.local.baseline;
+in {
+ config = {
+ home.sessionVariables.EDITOR = "nvim";
+
+ programs.neovim = {
+ enable = true;
+
+ viAlias = true;
+ vimAlias = true;
+ withRuby = false;
+ withPython3 = false;
+
+ extraConfig = ''
+ set number " Enable line numbering
+ set relativenumber " Enable relative line numbering
+ set tabstop=4 " Set tap stop to 4
+ set shiftwidth=4 " Set shift width to 4 (same as tabstop)
+ set viminfo= " No tracking
+ '';
+ };
+ };
+}
diff --git a/home/baseline/zsh.nix b/home/baseline/zsh.nix
new file mode 100644
index 0000000..2be24b7
--- /dev/null
+++ b/home/baseline/zsh.nix
@@ -0,0 +1,20 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}:
+with lib; let
+ cfg = config.local.baseline;
+in {
+ config = {
+ programs.zsh = {
+ enable = true;
+
+ autosuggestion.enable = true;
+ syntaxHighlighting.enable = true;
+
+ initContent = lib.mkAfter (import ./zshrc.nix pkgs);
+ };
+ };
+}
diff --git a/home/baseline/zshrc.nix b/home/baseline/zshrc.nix
new file mode 100644
index 0000000..9181159
--- /dev/null
+++ b/home/baseline/zshrc.nix
@@ -0,0 +1,73 @@
+{
+ grml-zsh-config,
+ local,
+ ...
+}: ''
+ source ${grml-zsh-config}/etc/zsh/zshrc
+
+ export PATH="$PATH:$HOME/.cargo/bin"
+
+ alias gpicview='loupe'
+ alias reset='tput reset'
+ alias reload='exec zsh'
+ alias this-date='date +%b%d | sed "s/^\w/\U&/g"'
+
+ function spawn() {
+ if [ ! -x "$(command -v $1)" ]; then
+ echo "spawn: no such command: $1" >&2
+ return 1
+ fi
+
+ $@ >/dev/null 0>&1 2>&1 &
+ disown
+ }
+
+ function xseli() {
+ T=$(mktemp)
+ $EDITOR -n $T
+ xsel -b <$T
+ rm $T
+ }
+
+ autoload -Uz up-line-or-beginning-search
+ zle -N up-line-or-beginning-search
+ autoload -Uz down-line-or-beginning-search
+ zle -N down-line-or-beginning-search
+ bindkey '\eOA' up-line-or-beginning-search
+ bindkey '\e[A' up-line-or-beginning-search
+ bindkey '\eOB' down-line-or-beginning-search
+ bindkey '\e[B' down-line-or-beginning-search
+
+ INSTALLABLES=()
+ while read -d: PATH_ITEM; do
+ if [[ "$PATH_ITEM" =~ "^(/nix/store/[a-z0-9]+-([a-zA-Z][a-zA-Z0-9_]*(-[a-zA-Z][a-zA-Z0-9_]*)*)(-[^/]+)?)/" ]]; then
+ INSTALLABLES+=("''${match[2]}")
+ fi
+ done <<<"$PATH"
+
+ if [ "''${#INSTALLABLES[@]}" -gt 0 ]; then
+ _GRML_NIX_SHELL="{''${INSTALLABLES[@]}} "
+ fi
+
+ unset INSTALLABLES PATH_ITEM
+
+ function grml_nix_shell() {
+ REPLY="$_GRML_NIX_SHELL"
+ }
+
+ grml_theme_add_token nix-shell -f grml_nix_shell '%F{red}' '%f'
+
+ if [ -n "$SSH_CONNECTION" ]; then
+ USERATHOST=1
+ fi
+
+ zstyle ':prompt:grml:left:setup' items time $([ ''${USERATHOST:-0} -eq 0 ] || echo user at host) path nix-shell percent
+ zstyle ':prompt:grml:right:setup' items sad-smiley vcs $([ ''${BATTERY:-0} -eq 0 ] || echo battery)
+ zstyle ':prompt:grml:right:items:time' pre ' %F{yellow}'
+
+ unsetopt sharehistory
+ setopt appendhistory
+ setopt extendedhistory
+
+ source ${local.git-aliases}
+''