diff --git a/README.md b/README.md index 82072fc7..0e8050a7 100644 --- a/README.md +++ b/README.md @@ -37,4 +37,4 @@ Other configurations from where I learned and copied: - [fufexan/dotfiles](https://github.com/fufexan/dotfiles) - [davidak/nixos-config](https://codeberg.org/davidak/nixos-config) - [davidtwco/veritas](https://github.com/davidtwco/veritas) - +- [NixOS-CN/NixOS-CN-telegram](https://github.com/NixOS-CN/NixOS-CN-telegram) diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 88df3021..aafe431c 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -27,14 +27,16 @@ swayidle # for setting the idle timeout swaylock # for locking the screen wl-clipboard # for copying and pasting + wf-recorder # for screen recording + grim # for taking screenshots + slurp # for selecting a region to screenshot + # TODO replace by `flameshot gui --raw | wl-copy` xfce.xfce4-appfinder # for the application launcher wofi # for the application launcher mako # for the notification daemon - grim # for taking screenshots - slurp # for selecting a region to screenshot light # for changing the screen brightness yad # for the brightness popup @@ -48,6 +50,8 @@ # if use vscode in wayland, uncomment those line systemd.user.sessionVariables = { "NIXOS_OZONE_WL" = "1"; # for vscode + "MOZ_ENABLE_WAYLAND" = "1"; + # for hyprland with nvidia gpu, ref https://wiki.hyprland.org/Nvidia/ "LIBVA_DRIVER_NAME" = "nvidia"; "XDG_SESSION_TYPE" = "wayland"; diff --git a/home/programs/browsers.nix b/home/programs/browsers.nix index d33c37ff..89205d68 100644 --- a/home/programs/browsers.nix +++ b/home/programs/browsers.nix @@ -3,18 +3,22 @@ config, ... }: { - programs = { - chromium = { - enable = true; - commandLineArgs = ["--enable-features=TouchpadOverscrollHistoryNavigation"]; - extensions = [ - # {id = "";} // extension id, query from chrome web store - ]; - }; + home.packages = with pkgs; [ + # use wayland version of firefox + firefox-wayland + ]; - firefox = { - enable = true; - profiles.ryan = {}; + programs = { + let commandLineArgs = [ "--enable-wayland-ime" "--ozone-platform=wayland" ]; + in { + chromium = { + enable = true; + inherit commandLineArgs; + }; + google-chrome = { + enable = true; + inherit commandLineArgs; + }; }; }; } \ No newline at end of file diff --git a/home/programs/common.nix b/home/programs/common.nix index 54d33fc8..c589f05f 100644 --- a/home/programs/common.nix +++ b/home/programs/common.nix @@ -10,23 +10,74 @@ yq-go # https://github.com/mikefarah/yq htop + ## networking tools + wireshark + wireguard-tools # manage wireguard vpn manually, via wg-quick + # misc libnotify wineWowPackages.wayland xdg-utils - graphviz # productivity obsidian + hugo # IDE insomnia + jetbrains.pycharm-community + # jetbrains.idea-community # cloud native docker-compose kubectl + kubernetes-helm + terraform + pulumi + + # cloud provider + awscli + + # python + conda + + # C + clang-tools + clang-analyzer + lldb + gnumake + cmake + autoconf + automake + bison + cppcheck + fakeroot + flex + gettext + groff + libtool + m4 + patch + pkgconf + texinfo + binutils + # Golang + delve + go + go-outline + go-tools + go2nix + gomodifytags + gopls + gotests + impl + + # Rust + rustup + + # nodejs nodejs nodePackages.npm nodePackages.pnpm @@ -36,6 +87,10 @@ dbeaver mycli pgcli + + # desktop + tdesktop + discord ]; programs = { @@ -65,6 +120,7 @@ jq.enable = true; # A lightweight and flexible command-line JSON processor ssh.enable = true; aria2.enable = true; + adb.enable = true; skim = { enable = true; @@ -75,6 +131,11 @@ "--exact" ]; }; + + direnv = { + enable = true; + nix-direnv.enable = true; + }; }; services = { diff --git a/home/programs/media.nix b/home/programs/media.nix index ef061113..b3c277bf 100644 --- a/home/programs/media.nix +++ b/home/programs/media.nix @@ -20,7 +20,17 @@ viu # terminal image viewer imv # simple image viewer imagemagick - deepin.image-editor + graphviz + + # creative + blender # 3d modeling + gimp # image editing + inkscape # vector graphics + krita # digital painting + + # 3d printing, eletrical engineering + kicad + ]; programs = { diff --git a/home/programs/nixos-cn.nix b/home/programs/nixos-cn.nix index 8879816a..185814cf 100644 --- a/home/programs/nixos-cn.nix +++ b/home/programs/nixos-cn.nix @@ -7,6 +7,7 @@ { home.packages = with nixos-cn; [ + qq wechat-uos netease-cloud-music ]; diff --git a/home/programs/xdg.nix b/home/programs/xdg.nix index e326e7e6..e009f85b 100644 --- a/home/programs/xdg.nix +++ b/home/programs/xdg.nix @@ -43,5 +43,15 @@ in { XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots"; }; }; + + # https://github.com/flatpak/xdg-desktop-portal + # enable wayland wlroots support + portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + ]; + }; }; } \ No newline at end of file diff --git a/home/shell/starship.nix b/home/shell/starship.nix index 9f4565c6..9f758a93 100644 --- a/home/shell/starship.nix +++ b/home/shell/starship.nix @@ -1,5 +1,5 @@ {config, ...}: { - home.sessionVariables.STARSHIP_CACHE = "${config.xdg.cacheHome}/starship"; + systemd.user.sessionVariables.STARSHIP_CACHE = "${config.xdg.cacheHome}/starship"; programs.starship = { enable = true; diff --git a/modules/system.nix b/modules/system.nix index f6a3108c..e76eb4b2 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -89,9 +89,32 @@ wget curl git + + # networking tools + ethtool + iperf3 + nmap + socat + + # system tools sysstat lm_sensors # for `sensors` command + # misc + findutils + file + which + tree + gnused + gnutar + gawk + p7zip + xz + zstd + + # video/audio tools + libva-utils + # minimal screen capture tool, used by i3 blur lock to take a screenshot # print screen key is also bound to this tool in i3 config scrot @@ -133,14 +156,17 @@ #media-session.enable = true; }; - udev.packages = with pkgs; [ gnome.gnome-settings-daemon ]; + udev.packages = with pkgs; [ + gnome.gnome-settings-daemon + platformio # udev rules for platformio + ]; }; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.ryan = { isNormalUser = true; description = "ryan"; - extraGroups = [ "networkmanager" "wheel" "docker" ]; + extraGroups = [ "networkmanager" "wheel" "docker" "wireshark" ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJx3Sk20pLL1b2PPKZey2oTyioODrErq83xG78YpFBoj admin@ryan-MBP" ];