diff options
| author | Alejandro Soto <alejandro@34project.org> | 2024-12-03 21:19:39 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2024-12-03 21:49:54 -0600 |
| commit | 61f3db56410f41d5249c88e44db60d9713dae26d (patch) | |
| tree | 49c2d5d5e4da331d139cfdc6034c0dba5980271b /home/baseline | |
| parent | 854f5ee287eb66db5a0713e2f4fac56794e3d735 (diff) | |
home: big refactor
Diffstat (limited to '')
| -rw-r--r-- | home/baseline/default.nix | 63 | ||||
| -rw-r--r-- | home/baseline/git.nix | 13 | ||||
| -rw-r--r-- | home/baseline/graphics.nix | 52 | ||||
| -rw-r--r-- | home/baseline/nvim.nix | 26 | ||||
| -rw-r--r-- | home/baseline/zsh.nix | 14 | ||||
| -rw-r--r-- | home/baseline/zshrc.nix (renamed from home/zshrc.nix) | 0 |
6 files changed, 168 insertions, 0 deletions
diff --git a/home/baseline/default.nix b/home/baseline/default.nix new file mode 100644 index 0000000..a859fb7 --- /dev/null +++ b/home/baseline/default.nix @@ -0,0 +1,63 @@ +{ 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..faad082 --- /dev/null +++ b/home/baseline/git.nix @@ -0,0 +1,13 @@ +{ 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..072acb7 --- /dev/null +++ b/home/baseline/graphics.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ... }: +with lib; { + config = { + fonts.fontconfig.enable = true; + + gtk = { + enable = true; + + gtk2.extraConfig = '' + gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ + gtk-menu-images=1 + gtk-button-images=1 + ''; + + 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 = { + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + + gtk.enable = true; + x11.enable = true; + }; + + sessionVariables = { + # 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..882788d --- /dev/null +++ b/home/baseline/nvim.nix @@ -0,0 +1,26 @@ +{ 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..8dd169c --- /dev/null +++ b/home/baseline/zsh.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: +with lib; let + cfg = config.local.baseline; +in +{ + config = { + programs.zsh = { + enable = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + initExtra = import ./zshrc.nix pkgs; + }; + }; +} diff --git a/home/zshrc.nix b/home/baseline/zshrc.nix index a82ab7a..a82ab7a 100644 --- a/home/zshrc.nix +++ b/home/baseline/zshrc.nix |
