diff --git a/README.md b/README.md index 3617ea1..a0f4871 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,14 @@ * `nix-shell -p nixFlakes` * `sudo _NIXOS_REBUILD_REEXEC=1 nixos-install --no-root-passwd --flake .#hostname` * ~~`nixos-install --no-root-passwd --flake .#hostname`~~ + + +# redesign checklist +- [ ] lorri or similar +- [ ] whole home manager stuff +- [ ] baseconfiguration handled +- [ ] programs handled +- [X] locale/fonts +- [X] zsh +- [ ] gnupg agent + diff --git a/modules/base.nix b/modules/base.nix new file mode 100644 index 0000000..bbef289 --- /dev/null +++ b/modules/base.nix @@ -0,0 +1,52 @@ +{ config, lib, pkgs, ...} : +with lib; { + options.elss.base.enable = mkEnableOption "Set the base configuration for the system"; + config = mkIf config.elss.base.enable { + services = { + dbus = { + enable = true; + packages = with pkgs; [ gnome3.dconf ]; + }; + }; + + programs = { + mtr.enable = true; + dconf.enable = true; + }; + + documentation = { + enable = true; + man.enable = true; + dev.enable = true; + }; + + environment.systemPackages = with pkgs; [ + alacritty.terminfo + bintools + clang + elfutils + emacs-all-the-icon-fonts + gdb + git + procs + rnis-lsp + sysstat + tcpdump + unzip + wget + ]; + + elss = { + locale.enable = mkDefault true; + zsh.enable = mkdDefault true; + }; + + boot = { + loader = { + systemd-boot.enable = mkDefault true; + efi.canTouchEfiVariables = mkDefault true; + }; + kernelPackages = mkDefault pkgs.linuxPackages_latest; + }; + }; +} diff --git a/modules/locale.nix b/modules/locale.nix new file mode 100644 index 0000000..ac3b009 --- /dev/null +++ b/modules/locale.nix @@ -0,0 +1,40 @@ +{ config, pkgs, lib, ...}: +with lib; { + options.elss.locale.enable = mkEnableOption "setup default locale and font-handling"; + + config = mkIf config.elss.locale.enable { + time.timeZone = "Europe/Berlin"; + i18n.defaultLocale = "en_GB.UTF-8"; + + fonts = { + enableDefaultFonts = true; + fonts = with pkgs; [ + hasklig + # corefonts # not free + liberation_ttf + comic-relief + dejavu_fonts + gyre-fonts + open-sans + noto-fonts + noto-fonts-emoji + noto-fonts-extra + roboto + roboto-mono + (nerdfonts.override { fonts = [ "Hasklig" ]; }) + material-icons + weather-icons + ]; + + fontconfig = { + enable = true; + # defaultFonts = { + # serif = [ "TeX Gyre Heros" ]; + # emoji = [ "Noto Color Emoji" ]; + # sansSerif = [ "TeX Gyre Pagella" ]; + # monospace = [ "Hasklug Nerd Font Mono" ]; + # }; + }; + }; + }; +} diff --git a/modules/zsh.nix b/modules/zsh.nix new file mode 100644 index 0000000..66ed343 --- /dev/null +++ b/modules/zsh.nix @@ -0,0 +1,34 @@ +{ config, pkgs, lib, ...}: +with lib; { + options.elss.zsh.enable = mkEnableOption "Setup systemwide zsh"; + config = { + environment = { + shells = [ pkgs.zsh ]; + pathsToLink = [ "/share/zsh/" ]; + sessionVariables = rec { + XDG_CACHE_HOME = "\${HOME}/.cache"; + XDG_CONFIG_HOME = "\${HOME}/.config"; + XDG_BIN_HOME = "\${HOME}/.local/bin"; + XDG_DATA_HOME = "\${HOME}/.local/share"; + + PATH = [ + "\${XDG_BIN_HOME}" + ]; + }; + }; + programs = { + zsh = { + enable = true; + enableCompletion = true; + enableGlobalCompInit = true; + autosuggestions.enable = true; + syntaxHighlighting = { + enable = true; + highlighters = [ "main" "brackets" "root" "line" ]; + #styles = { cursor = "standout,underline"; }; + }; + setOptions = [ "auto_pushd" "correct" "nocaseglob" "rcexpandparam" "numericglobsort" "nobeep" "appendhistory" ]; + }; + }; + }; +}