diff --git a/README.md b/README.md index 627c2cc..51192e3 100644 --- a/README.md +++ b/README.md @@ -44,8 +44,6 @@ It just works™ │ ├──  nixos │ │ │ ├──  home-manager ### (User-specific) Home Manager configuration -│ │ ├──  darwin -│ │ └──  nixos │ │ │ └──  secrets ### User's secrets managed through sops-nix │ diff --git a/flake.nix b/flake.nix index 0fdc1ff..82fe36d 100755 --- a/flake.nix +++ b/flake.nix @@ -198,6 +198,8 @@ # User ./users/guanranwang/nixos/presets/desktop.nix ./users/guanranwang/nixos/presets/core/clash-meta-client.nix + ./users/guanranwang/nixos/presets/desktop/gaming.nix + ./users/guanranwang/nixos/presets/desktop/torrenting.nix # Hardware ./machines/nixos/81fw-lenovo-legion-y7000 @@ -207,13 +209,6 @@ networking.hostName = "81FW-NixOS"; # Hostname time.timeZone = "Asia/Shanghai"; # Timezone - ### Home-Manager - home-manager.users.guanranwang.imports = [ - ./users/guanranwang/home-manager/nixos/presets/desktop/gaming.nix - ./users/guanranwang/home-manager/nixos/presets/desktop/torrenting.nix - ]; - home-manager.extraSpecialArgs = {inherit spicetify-nix;}; # im consfused - ### Options myFlake.nixos.boot.noLoaderMenu = true; myFlake.nixos.networking.dns = "alidns"; @@ -234,8 +229,6 @@ ./machines/darwin/imac-2017 { - #home-manager.users.guanranwang = import ./users/guanranwang/home-manager/darwin/presets/desktop/gaming.nix; - networking.hostName = "iMac-macOS"; time.timeZone = "Asia/Shanghai"; } diff --git a/users/guanranwang/darwin/presets/core.nix b/users/guanranwang/darwin/presets/core.nix index e219d59..8600731 100644 --- a/users/guanranwang/darwin/presets/core.nix +++ b/users/guanranwang/darwin/presets/core.nix @@ -9,4 +9,13 @@ uid = 501; }; }; + + imports = [ + ../../../../flakes/darwin/home-manager.nix + ]; + + home-manager.users.guanranwang.imports = [ + ../.. + ../../profiles/command-line/darwin + ]; } diff --git a/users/guanranwang/darwin/presets/desktop.nix b/users/guanranwang/darwin/presets/desktop.nix index a189508..a7a8b68 100644 --- a/users/guanranwang/darwin/presets/desktop.nix +++ b/users/guanranwang/darwin/presets/desktop.nix @@ -1,10 +1,19 @@ {...}: { imports = [ ./core.nix - - ### Flakes - ../../../../flakes/darwin/home-manager.nix ]; + ### home-manager - home-manager.users.guanranwang = import ../../home-manager/darwin/presets/desktop.nix; # NOTE: using flakes + home-manager.users.guanranwang.imports = [ + ./core.nix + + ../../modules/terms/alacritty.nix + ../../modules/shell/fish.nix + ../../modules/shell/bash.nix + ../../modules/editor/helix.nix + ../../modules/editor/neovim.nix + ../../modules/editor/vscode.nix + + ../home.nix + ]; # NOTE: using flakes } diff --git a/users/guanranwang/darwin/presets/desktop/gaming.nix b/users/guanranwang/darwin/presets/desktop/gaming.nix new file mode 100644 index 0000000..ceee5c3 --- /dev/null +++ b/users/guanranwang/darwin/presets/desktop/gaming.nix @@ -0,0 +1,5 @@ +{...}: { + home-manager.users.guanranwang.imports = [ + ../../../profiles/gaming/darwin + ]; +} diff --git a/users/guanranwang/home-manager/darwin/presets/desktop.nix b/users/guanranwang/home-manager/darwin/presets/desktop.nix deleted file mode 100644 index 8e95318..0000000 --- a/users/guanranwang/home-manager/darwin/presets/desktop.nix +++ /dev/null @@ -1,13 +0,0 @@ -{...}: { - imports = [ - ../.. - ../../resources/terms/alacritty.nix - ../../resources/shell/fish.nix - ../../resources/shell/bash.nix - ../../resources/editor/helix.nix - ../../resources/editor/neovim.nix - ../../resources/editor/vscode.nix - - ../home.nix - ]; -} diff --git a/users/guanranwang/home-manager/default.nix b/users/guanranwang/home-manager/default.nix index 530656e..97138e5 100644 --- a/users/guanranwang/home-manager/default.nix +++ b/users/guanranwang/home-manager/default.nix @@ -1,5 +1,15 @@ -{pkgs, ...}: { +{ + pkgs, + config, + ... +}: { home = { + username = "guanranwang"; + homeDirectory = + if pkgs.stdenv.hostPlatform.isDarwin + then "/Users/${config.home.username}" + else "/home/${config.home.username}"; + # 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 @@ -9,75 +19,8 @@ # the Home Manager release notes for a list of state version # changes in each release. stateVersion = "23.05"; - - shellAliases = { - # navigation - "l" = "${pkgs.eza}/bin/eza -Fhl --icons --git"; - "ll" = "${pkgs.eza}/bin/eza -Fahl --icons --git"; - "ls" = "${pkgs.eza}/bin/eza -F --icons --git"; - "la" = "${pkgs.eza}/bin/eza -Fa --icons --git"; - "tree" = "${pkgs.eza}/bin/eza --icons --git --tree"; - ".." = "cd .."; - - # replacements - #"code" = "codium"; - #"neofetch" = "fastfetch"; - #"ranger" = "joshuto"; # rust - #"grep" = "rg"; - #"top" = "btm -b"; - #"htop" = "btm -b"; - #"btop" = "btm"; - - "yd" = "ydict -c"; - "farsee" = "curl -F 'c=@-' 'https://fars.ee/'"; # pb - "clock" = "tty-clock -5Ccs"; - - # proxy - "setproxy" = let - proxy = "http://127.0.0.1:7890/"; - in "export http_proxy=${proxy} https_proxy=${proxy} ftp_proxy=${proxy} rsync_proxy=${proxy}"; - "unsetproxy" = "set -e http_proxy https_proxy all_proxy"; # fish syntax (?) - }; - sessionVariables = { - # misc - "MANPAGER" = "sh -c 'col -bx | bat -l man -p'"; # man: use bat as man's pager - "MANROFFOPT" = "-c"; # man: fix formatting issue with bat - "SKIM_DEFAULT_COMMAND" = "fd --type f || git ls-tree -r --name-only head || rg --files || find ."; # skim: use fd by default - }; }; - programs = { - # Let Home Manager install and manage itself. - home-manager.enable = true; - tealdeer.enable = true; - zoxide.enable = true; - starship = { - enable = true; - settings = { - add_newline = false; - aws.disabled = true; - gcloud.disabled = true; - line_break.disabled = true; - }; - }; - - #eza = { - # enable = true; - # git = true; - # icons = true; - #}; - - git = { - enable = true; - userName = "Guanran Wang"; - userEmail = "guanran928@outlook.com"; - delta.enable = true; - signing.signByDefault = true; - signing.key = "~/.ssh/id_github_signing"; - extraConfig = { - gpg.format = "ssh"; - pull.rebase = true; - }; - }; - }; + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; } diff --git a/users/guanranwang/home-manager/resources/dotfiles/.drirc b/users/guanranwang/home-manager/dotfiles/.drirc similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/.drirc rename to users/guanranwang/home-manager/dotfiles/.drirc diff --git a/users/guanranwang/home-manager/resources/dotfiles/.xinitrc b/users/guanranwang/home-manager/dotfiles/.xinitrc similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/.xinitrc rename to users/guanranwang/home-manager/dotfiles/.xinitrc diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/batterynotify b/users/guanranwang/home-manager/dotfiles/bin/batterynotify similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/batterynotify rename to users/guanranwang/home-manager/dotfiles/bin/batterynotify diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/chargingnotify b/users/guanranwang/home-manager/dotfiles/bin/chargingnotify similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/chargingnotify rename to users/guanranwang/home-manager/dotfiles/bin/chargingnotify diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/hyprland-autostart b/users/guanranwang/home-manager/dotfiles/bin/hyprland-autostart similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/hyprland-autostart rename to users/guanranwang/home-manager/dotfiles/bin/hyprland-autostart diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/hyprland-gamemode b/users/guanranwang/home-manager/dotfiles/bin/hyprland-gamemode similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/hyprland-gamemode rename to users/guanranwang/home-manager/dotfiles/bin/hyprland-gamemode diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/lofi b/users/guanranwang/home-manager/dotfiles/bin/lofi similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/lofi rename to users/guanranwang/home-manager/dotfiles/bin/lofi diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/minecraft-inputfix b/users/guanranwang/home-manager/dotfiles/bin/minecraft-inputfix similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/minecraft-inputfix rename to users/guanranwang/home-manager/dotfiles/bin/minecraft-inputfix diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/update-hosts b/users/guanranwang/home-manager/dotfiles/bin/update-hosts similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/update-hosts rename to users/guanranwang/home-manager/dotfiles/bin/update-hosts diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-brightnessctl b/users/guanranwang/home-manager/dotfiles/bin/wrapped-brightnessctl similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-brightnessctl rename to users/guanranwang/home-manager/dotfiles/bin/wrapped-brightnessctl diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-grim b/users/guanranwang/home-manager/dotfiles/bin/wrapped-grim similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-grim rename to users/guanranwang/home-manager/dotfiles/bin/wrapped-grim diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-mpvpaper b/users/guanranwang/home-manager/dotfiles/bin/wrapped-mpvpaper similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-mpvpaper rename to users/guanranwang/home-manager/dotfiles/bin/wrapped-mpvpaper diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-pamixer b/users/guanranwang/home-manager/dotfiles/bin/wrapped-pamixer similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-pamixer rename to users/guanranwang/home-manager/dotfiles/bin/wrapped-pamixer diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-swww b/users/guanranwang/home-manager/dotfiles/bin/wrapped-swww similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-swww rename to users/guanranwang/home-manager/dotfiles/bin/wrapped-swww diff --git a/users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-wayshot b/users/guanranwang/home-manager/dotfiles/bin/wrapped-wayshot similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/bin/wrapped-wayshot rename to users/guanranwang/home-manager/dotfiles/bin/wrapped-wayshot diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/alsoft.conf b/users/guanranwang/home-manager/dotfiles/config/alsoft.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/alsoft.conf rename to users/guanranwang/home-manager/dotfiles/config/alsoft.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/nixos-fonts.conf b/users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/nixos-fonts.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/nixos-fonts.conf rename to users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/nixos-fonts.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/old-chinese-fonts.conf b/users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/old-chinese-fonts.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/old-chinese-fonts.conf rename to users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/old-chinese-fonts.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/qt-fonts.conf b/users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/qt-fonts.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/qt-fonts.conf rename to users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/qt-fonts.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/unliked-fonts.conf b/users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/unliked-fonts.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/unliked-fonts.conf rename to users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/unliked-fonts.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/web-ui-fonts.conf b/users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/web-ui-fonts.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/web-ui-fonts.conf rename to users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/web-ui-fonts.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/windows-fonts.conf b/users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/windows-fonts.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/conf.d/windows-fonts.conf rename to users/guanranwang/home-manager/dotfiles/config/fontconfig/conf.d/windows-fonts.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/fonts.conf b/users/guanranwang/home-manager/dotfiles/config/fontconfig/fonts.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/fontconfig/fonts.conf rename to users/guanranwang/home-manager/dotfiles/config/fontconfig/fonts.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/autostart.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/autostart.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/autostart.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/autostart.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/env.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/env.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/env.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/env.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/hyprpaper.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/hyprpaper.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/hyprpaper.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/hyprpaper.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/keybinds.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/keybinds.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/keybinds.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/keybinds.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/main.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/main.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/main.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/main.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/plugins.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/plugins.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/plugins.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/plugins.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/colors.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/themes/colors.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/colors.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/themes/colors.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/frappe.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/themes/frappe.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/frappe.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/themes/frappe.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/latte.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/themes/latte.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/latte.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/themes/latte.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/macchiato.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/themes/macchiato.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/macchiato.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/themes/macchiato.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/mocha.conf b/users/guanranwang/home-manager/dotfiles/config/hyprland/themes/mocha.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/hyprland/themes/mocha.conf rename to users/guanranwang/home-manager/dotfiles/config/hyprland/themes/mocha.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/makepkgs.conf b/users/guanranwang/home-manager/dotfiles/config/makepkgs.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/makepkgs.conf rename to users/guanranwang/home-manager/dotfiles/config/makepkgs.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/rofi/colors.rasi b/users/guanranwang/home-manager/dotfiles/config/rofi/colors.rasi similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/rofi/colors.rasi rename to users/guanranwang/home-manager/dotfiles/config/rofi/colors.rasi diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/rofi/config.rasi b/users/guanranwang/home-manager/dotfiles/config/rofi/config.rasi similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/rofi/config.rasi rename to users/guanranwang/home-manager/dotfiles/config/rofi/config.rasi diff --git a/users/guanranwang/home-manager/resources/dotfiles/config/user-tmpfiles.d/discord-rpc.conf b/users/guanranwang/home-manager/dotfiles/config/user-tmpfiles.d/discord-rpc.conf similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/config/user-tmpfiles.d/discord-rpc.conf rename to users/guanranwang/home-manager/dotfiles/config/user-tmpfiles.d/discord-rpc.conf diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/applications/ca.desrt.dconf-editor.desktop b/users/guanranwang/home-manager/dotfiles/data/applications/ca.desrt.dconf-editor.desktop similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/applications/ca.desrt.dconf-editor.desktop rename to users/guanranwang/home-manager/dotfiles/data/applications/ca.desrt.dconf-editor.desktop diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/applications/com.github.wwmm.easyeffects.desktop b/users/guanranwang/home-manager/dotfiles/data/applications/com.github.wwmm.easyeffects.desktop similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/applications/com.github.wwmm.easyeffects.desktop rename to users/guanranwang/home-manager/dotfiles/data/applications/com.github.wwmm.easyeffects.desktop diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/applications/io.bassi.Amberol.desktop b/users/guanranwang/home-manager/dotfiles/data/applications/io.bassi.Amberol.desktop similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/applications/io.bassi.Amberol.desktop rename to users/guanranwang/home-manager/dotfiles/data/applications/io.bassi.Amberol.desktop diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/applications/org.gnome.Calendar.desktop b/users/guanranwang/home-manager/dotfiles/data/applications/org.gnome.Calendar.desktop similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/applications/org.gnome.Calendar.desktop rename to users/guanranwang/home-manager/dotfiles/data/applications/org.gnome.Calendar.desktop diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/applications/org.gnome.Characters.desktop b/users/guanranwang/home-manager/dotfiles/data/applications/org.gnome.Characters.desktop similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/applications/org.gnome.Characters.desktop rename to users/guanranwang/home-manager/dotfiles/data/applications/org.gnome.Characters.desktop diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/applications/org.gnome.baobab.desktop b/users/guanranwang/home-manager/dotfiles/data/applications/org.gnome.baobab.desktop similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/applications/org.gnome.baobab.desktop rename to users/guanranwang/home-manager/dotfiles/data/applications/org.gnome.baobab.desktop diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/applications/org.telegram.desktop.desktop b/users/guanranwang/home-manager/dotfiles/data/applications/org.telegram.desktop.desktop similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/applications/org.telegram.desktop.desktop rename to users/guanranwang/home-manager/dotfiles/data/applications/org.telegram.desktop.desktop diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/Mojave Night.jpg b/users/guanranwang/home-manager/dotfiles/data/backgrounds/Mojave Night.jpg similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/Mojave Night.jpg rename to users/guanranwang/home-manager/dotfiles/data/backgrounds/Mojave Night.jpg diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper1.png b/users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper1.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper1.png rename to users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper1.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper2.jpg b/users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper2.jpg similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper2.jpg rename to users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper2.jpg diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper3.jpg b/users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper3.jpg similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper3.jpg rename to users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper3.jpg diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper4.png b/users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper4.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper4.png rename to users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper4.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper5.png b/users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper5.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/backgrounds/wallpaper5.png rename to users/guanranwang/home-manager/dotfiles/data/backgrounds/wallpaper5.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.github.Eloston.UngoogledChromium b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.github.Eloston.UngoogledChromium similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.github.Eloston.UngoogledChromium rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.github.Eloston.UngoogledChromium diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.google.Chrome b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.google.Chrome similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.google.Chrome rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.google.Chrome diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.lunarclient.LunarClient b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.lunarclient.LunarClient similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.lunarclient.LunarClient rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.lunarclient.LunarClient diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.mojang.Minecraft b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.mojang.Minecraft similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.mojang.Minecraft rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.mojang.Minecraft diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.valvesoftware.Steam b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.valvesoftware.Steam similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/com.valvesoftware.Steam rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/com.valvesoftware.Steam diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/global b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/global similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/global rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/global diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/im.riot.Riot b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/im.riot.Riot similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/im.riot.Riot rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/im.riot.Riot diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/org.mozilla.firefox b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/org.mozilla.firefox similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/org.mozilla.firefox rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/org.mozilla.firefox diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/org.prismlauncher.PrismLauncher b/users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/org.prismlauncher.PrismLauncher similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/flatpak/overrides/org.prismlauncher.PrismLauncher rename to users/guanranwang/home-manager/dotfiles/data/flatpak/overrides/org.prismlauncher.PrismLauncher diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/battery-alert.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/battery-alert.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/battery-alert.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/battery-alert.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/battery-charging.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/battery-charging.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/battery-charging.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/battery-charging.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/battery.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/battery.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/battery.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/battery.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-high.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-high.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-high.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-high.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-minus.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-minus.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-minus.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-minus.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-mute.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-mute.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-mute.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-mute.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-off.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-off.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-off.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-off.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-plus.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-plus.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-plus.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-plus.png diff --git a/users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-source.png b/users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-source.png similarity index 100% rename from users/guanranwang/home-manager/resources/dotfiles/data/icons/dunst/volume-source.png rename to users/guanranwang/home-manager/dotfiles/data/icons/dunst/volume-source.png diff --git a/users/guanranwang/home-manager/resources/browser/chromium.nix b/users/guanranwang/home-manager/modules/browser/chromium.nix similarity index 100% rename from users/guanranwang/home-manager/resources/browser/chromium.nix rename to users/guanranwang/home-manager/modules/browser/chromium.nix diff --git a/users/guanranwang/home-manager/resources/browser/firefox.nix b/users/guanranwang/home-manager/modules/browser/firefox.nix similarity index 100% rename from users/guanranwang/home-manager/resources/browser/firefox.nix rename to users/guanranwang/home-manager/modules/browser/firefox.nix diff --git a/users/guanranwang/home-manager/resources/browser/librewolf.nix b/users/guanranwang/home-manager/modules/browser/librewolf.nix similarity index 100% rename from users/guanranwang/home-manager/resources/browser/librewolf.nix rename to users/guanranwang/home-manager/modules/browser/librewolf.nix diff --git a/users/guanranwang/home-manager/resources/editor/helix.nix b/users/guanranwang/home-manager/modules/editor/helix.nix similarity index 100% rename from users/guanranwang/home-manager/resources/editor/helix.nix rename to users/guanranwang/home-manager/modules/editor/helix.nix diff --git a/users/guanranwang/home-manager/resources/editor/neovim.nix b/users/guanranwang/home-manager/modules/editor/neovim.nix similarity index 100% rename from users/guanranwang/home-manager/resources/editor/neovim.nix rename to users/guanranwang/home-manager/modules/editor/neovim.nix diff --git a/users/guanranwang/home-manager/resources/editor/vscode.nix b/users/guanranwang/home-manager/modules/editor/vscode.nix similarity index 100% rename from users/guanranwang/home-manager/resources/editor/vscode.nix rename to users/guanranwang/home-manager/modules/editor/vscode.nix diff --git a/users/guanranwang/home-manager/resources/lang/go.nix b/users/guanranwang/home-manager/modules/lang/go.nix similarity index 100% rename from users/guanranwang/home-manager/resources/lang/go.nix rename to users/guanranwang/home-manager/modules/lang/go.nix diff --git a/users/guanranwang/home-manager/resources/lang/nix.nix b/users/guanranwang/home-manager/modules/lang/nix.nix similarity index 100% rename from users/guanranwang/home-manager/resources/lang/nix.nix rename to users/guanranwang/home-manager/modules/lang/nix.nix diff --git a/users/guanranwang/home-manager/resources/shell/bash.nix b/users/guanranwang/home-manager/modules/shell/bash.nix similarity index 100% rename from users/guanranwang/home-manager/resources/shell/bash.nix rename to users/guanranwang/home-manager/modules/shell/bash.nix diff --git a/users/guanranwang/home-manager/resources/shell/fish.nix b/users/guanranwang/home-manager/modules/shell/fish.nix similarity index 93% rename from users/guanranwang/home-manager/resources/shell/fish.nix rename to users/guanranwang/home-manager/modules/shell/fish.nix index 297d389..da2388e 100644 --- a/users/guanranwang/home-manager/resources/shell/fish.nix +++ b/users/guanranwang/home-manager/modules/shell/fish.nix @@ -18,10 +18,10 @@ name = "done"; src = pkgs.fishPlugins.done.src; } - { - name = "tide"; - src = pkgs.fishPlugins.tide.src; - } + #{ + # name = "tide"; + # src = pkgs.fishPlugins.tide.src; + #} { name = "sponge"; src = pkgs.fishPlugins.sponge.src; diff --git a/users/guanranwang/home-manager/resources/shell/zsh.nix b/users/guanranwang/home-manager/modules/shell/zsh.nix similarity index 100% rename from users/guanranwang/home-manager/resources/shell/zsh.nix rename to users/guanranwang/home-manager/modules/shell/zsh.nix diff --git a/users/guanranwang/home-manager/resources/terms/alacritty.nix b/users/guanranwang/home-manager/modules/terms/alacritty.nix similarity index 100% rename from users/guanranwang/home-manager/resources/terms/alacritty.nix rename to users/guanranwang/home-manager/modules/terms/alacritty.nix diff --git a/users/guanranwang/home-manager/resources/terms/foot.nix b/users/guanranwang/home-manager/modules/terms/foot.nix similarity index 100% rename from users/guanranwang/home-manager/resources/terms/foot.nix rename to users/guanranwang/home-manager/modules/terms/foot.nix diff --git a/users/guanranwang/home-manager/resources/terms/kitty.nix b/users/guanranwang/home-manager/modules/terms/kitty.nix similarity index 100% rename from users/guanranwang/home-manager/resources/terms/kitty.nix rename to users/guanranwang/home-manager/modules/terms/kitty.nix diff --git a/users/guanranwang/home-manager/resources/wm/bspwm.nix b/users/guanranwang/home-manager/modules/wm/bspwm.nix similarity index 88% rename from users/guanranwang/home-manager/resources/wm/bspwm.nix rename to users/guanranwang/home-manager/modules/wm/bspwm.nix index 6309d8e..47e3975 100644 --- a/users/guanranwang/home-manager/resources/wm/bspwm.nix +++ b/users/guanranwang/home-manager/modules/wm/bspwm.nix @@ -32,10 +32,8 @@ }; }; - home.file = { - ".xinitrc" = { - source = "../dotfiles/.xinitrc"; - recursive = true; - }; + home.file.".xinitrc" = { + source = ../../dotfiles/.xinitrc; + recursive = true; }; } diff --git a/users/guanranwang/home-manager/resources/wm/components/dunst.nix b/users/guanranwang/home-manager/modules/wm/components/dunst.nix similarity index 92% rename from users/guanranwang/home-manager/resources/wm/components/dunst.nix rename to users/guanranwang/home-manager/modules/wm/components/dunst.nix index da58dcd..9659ebb 100644 --- a/users/guanranwang/home-manager/resources/wm/components/dunst.nix +++ b/users/guanranwang/home-manager/modules/wm/components/dunst.nix @@ -25,7 +25,7 @@ }; xdg.dataFile."icons/dunst" = { - source = ../../dotfiles/data/icons/dunst; + source = ../../../dotfiles/data/icons/dunst; recursive = true; }; } diff --git a/users/guanranwang/home-manager/resources/wm/components/feh.nix b/users/guanranwang/home-manager/modules/wm/components/feh.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/feh.nix rename to users/guanranwang/home-manager/modules/wm/components/feh.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/flameshot.nix b/users/guanranwang/home-manager/modules/wm/components/flameshot.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/flameshot.nix rename to users/guanranwang/home-manager/modules/wm/components/flameshot.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/picom.nix b/users/guanranwang/home-manager/modules/wm/components/picom.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/picom.nix rename to users/guanranwang/home-manager/modules/wm/components/picom.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/polybar.nix b/users/guanranwang/home-manager/modules/wm/components/polybar.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/polybar.nix rename to users/guanranwang/home-manager/modules/wm/components/polybar.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/rofi.nix b/users/guanranwang/home-manager/modules/wm/components/rofi.nix similarity index 88% rename from users/guanranwang/home-manager/resources/wm/components/rofi.nix rename to users/guanranwang/home-manager/modules/wm/components/rofi.nix index 5a4402e..2d7866a 100644 --- a/users/guanranwang/home-manager/resources/wm/components/rofi.nix +++ b/users/guanranwang/home-manager/modules/wm/components/rofi.nix @@ -10,7 +10,7 @@ # Yes, because I have no idea how to use programs.rofi.theme xdg.configFile."rofi" = { - source = ../../dotfiles/config/rofi; + source = ../../../dotfiles/config/rofi; recursive = true; }; } diff --git a/users/guanranwang/home-manager/resources/wm/components/scripts.nix b/users/guanranwang/home-manager/modules/wm/components/scripts.nix similarity index 62% rename from users/guanranwang/home-manager/resources/wm/components/scripts.nix rename to users/guanranwang/home-manager/modules/wm/components/scripts.nix index d9e0d98..5afc570 100644 --- a/users/guanranwang/home-manager/resources/wm/components/scripts.nix +++ b/users/guanranwang/home-manager/modules/wm/components/scripts.nix @@ -1,8 +1,9 @@ {...}: { + # TODO: remove unnecessary scripts home.sessionPath = ["$HOME/.local/bin"]; home.file = { ".local/bin" = { - source = ../../dotfiles/bin; + source = ../../../dotfiles/bin; recursive = true; }; }; diff --git a/users/guanranwang/home-manager/resources/wm/components/swayidle.nix b/users/guanranwang/home-manager/modules/wm/components/swayidle.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/swayidle.nix rename to users/guanranwang/home-manager/modules/wm/components/swayidle.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/swaylock.nix b/users/guanranwang/home-manager/modules/wm/components/swaylock.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/swaylock.nix rename to users/guanranwang/home-manager/modules/wm/components/swaylock.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/swww.nix b/users/guanranwang/home-manager/modules/wm/components/swww.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/swww.nix rename to users/guanranwang/home-manager/modules/wm/components/swww.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/sxhkd.nix b/users/guanranwang/home-manager/modules/wm/components/sxhkd.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/sxhkd.nix rename to users/guanranwang/home-manager/modules/wm/components/sxhkd.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/udiskie.nix b/users/guanranwang/home-manager/modules/wm/components/udiskie.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/udiskie.nix rename to users/guanranwang/home-manager/modules/wm/components/udiskie.nix diff --git a/users/guanranwang/home-manager/modules/wm/components/wallpaper.nix b/users/guanranwang/home-manager/modules/wm/components/wallpaper.nix new file mode 100644 index 0000000..55abf4b --- /dev/null +++ b/users/guanranwang/home-manager/modules/wm/components/wallpaper.nix @@ -0,0 +1,6 @@ +{...}: { + xdg.dataFile."backgrounds" = { + source = ../../../dotfiles/data/backgrounds; + recursive = true; + }; +} diff --git a/users/guanranwang/home-manager/resources/wm/components/waybar.nix b/users/guanranwang/home-manager/modules/wm/components/waybar.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/components/waybar.nix rename to users/guanranwang/home-manager/modules/wm/components/waybar.nix diff --git a/users/guanranwang/home-manager/resources/wm/gnome.nix b/users/guanranwang/home-manager/modules/wm/gnome.nix similarity index 100% rename from users/guanranwang/home-manager/resources/wm/gnome.nix rename to users/guanranwang/home-manager/modules/wm/gnome.nix diff --git a/users/guanranwang/home-manager/resources/wm/hyprland.nix b/users/guanranwang/home-manager/modules/wm/hyprland.nix similarity index 95% rename from users/guanranwang/home-manager/resources/wm/hyprland.nix rename to users/guanranwang/home-manager/modules/wm/hyprland.nix index 608dbc2..b942088 100644 --- a/users/guanranwang/home-manager/resources/wm/hyprland.nix +++ b/users/guanranwang/home-manager/modules/wm/hyprland.nix @@ -36,7 +36,7 @@ }; xdg.configFile."hypr" = { - source = ../dotfiles/config/hyprland; + source = ../../dotfiles/config/hyprland; recursive = true; }; } diff --git a/users/guanranwang/home-manager/resources/wm/sway.nix b/users/guanranwang/home-manager/modules/wm/sway.nix similarity index 96% rename from users/guanranwang/home-manager/resources/wm/sway.nix rename to users/guanranwang/home-manager/modules/wm/sway.nix index ca54ef5..e7f5b25 100644 --- a/users/guanranwang/home-manager/resources/wm/sway.nix +++ b/users/guanranwang/home-manager/modules/wm/sway.nix @@ -22,8 +22,7 @@ ''; home.sessionVariables = { - # TODO: what is the correct way to unset this - GTK_IM_MODULE = lib.mkForce ""; # use text-input-v3 + GTK_IM_MODULE = lib.mkForce "wayland"; # use text-input-v3 }; home.packages = with pkgs; [ @@ -139,7 +138,7 @@ # Rofi "${modifier}+d" = "exec ${config.wayland.windowManager.sway.config.menu} -show drun -show-icons -icon-theme ${config.gtk.iconTheme.name}"; - "${modifier}+Shift+d" = "exec ${pkgs.cliphist}/bin/cliphist list | ${config.wayland.windowManager.sway.config.menu} -dmenu | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy"; + "${modifier}+Shift+d" = "exec ${pkgs.cliphist}/bin/cliphist list | ${config.wayland.windowManager.sway.config.menu} -dmenu | ${pkgs.cliphist}/bin/cliphist decode | ${pkgs.wl-clipboard}/bin/wl-copy"; "${modifier}+Shift+l" = "exec ${config.wayland.windowManager.sway.config.menu} -modi \"power-menu:rofi-power-menu --confirm=reboot/shutdown\" -show power-menu"; # Screenshot diff --git a/users/guanranwang/home-manager/nixos/home.nix b/users/guanranwang/home-manager/nixos/home.nix deleted file mode 100644 index 5cc364c..0000000 --- a/users/guanranwang/home-manager/nixos/home.nix +++ /dev/null @@ -1,76 +0,0 @@ -{pkgs, ...}: { - home = { - username = "guanranwang"; - homeDirectory = "/home/guanranwang"; - - packages = - (with pkgs; [ - # Messaging - ### Matrix - neochat # kinda buggy with window resizing, but it works and its not electron - #nheko # wont let me login for some reason - #fractal # does not work with Mozilla's SAML login - - ## # vvv 3 UI libraries I dislike vvv - #cinny-desktop # # Tauri - #element-desktop # # Electron - #fluffychat # # Flutter - - ### Misc - telegram-desktop - #discord - #qq - - # Misc - bitwarden - obs-studio - gparted - timeshift - #tuba - #piper - #gradience - #dippi - - ### Terminal - # TUI - joshuto - bottom - helix - skim - bat - - # CLI - sops - nix-output-monitor - fastfetch - wget - ydict - skim - fd - ripgrep - eza - zoxide - trashy - freshfetch - hyperfine - ]) - ++ (with pkgs.gnome; [ - nautilus - zenity - seahorse - file-roller - gnome-weather - gnome-calculator - dconf-editor - ]); - }; - - services.ssh-agent.enable = true; - - #programs.boxxy = { - # enable = true; - # #rules = { - # # - # #}; - #}; -} diff --git a/users/guanranwang/home-manager/nixos/presets/desktop.nix b/users/guanranwang/home-manager/nixos/presets/desktop.nix deleted file mode 100644 index 407c081..0000000 --- a/users/guanranwang/home-manager/nixos/presets/desktop.nix +++ /dev/null @@ -1,23 +0,0 @@ -{...}: { - imports = [ - ../.. - ../../resources/terms/alacritty.nix - ../../resources/shell/fish.nix - ../../resources/shell/bash.nix - ../../resources/editor/helix.nix - ../../resources/editor/neovim.nix - ../../resources/editor/vscode.nix - ../../resources/browser/chromium.nix - ../../resources/browser/librewolf.nix - ../../resources/lang/nix.nix - ../../resources/lang/go.nix - ../../resources/media/nixos - ../../resources/wm/sway.nix - - ../xdg - ../home.nix - ../fonts.nix - ../i18n.nix - ../theme.nix - ]; -} diff --git a/users/guanranwang/home-manager/nixos/xdg/default.nix b/users/guanranwang/home-manager/nixos/xdg/default.nix deleted file mode 100644 index c893b86..0000000 --- a/users/guanranwang/home-manager/nixos/xdg/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{...}: { - imports = [ - ./xdg.nix - - ./xdg-mime.nix - ]; -} diff --git a/users/guanranwang/home-manager/nixos/xdg/xdg.nix b/users/guanranwang/home-manager/nixos/xdg/xdg.nix deleted file mode 100644 index 05fccec..0000000 --- a/users/guanranwang/home-manager/nixos/xdg/xdg.nix +++ /dev/null @@ -1,14 +0,0 @@ -{config, ...}: { - xdg.enable = true; - - home = { - sessionVariables = { - "CUDA_CACHE_PATH" = "${config.xdg.cacheHome}/nv"; - "GNUPGHOME" = "${config.xdg.dataHome}/gnupg"; - }; - - shellAliases = { - "irssi" = "irssi -- config=${config.xdg.configHome}/irssi/config -- home=${config.xdg.dataHome}/irssi"; - }; - }; -} diff --git a/users/guanranwang/home-manager/profiles/command-line/darwin/default.nix b/users/guanranwang/home-manager/profiles/command-line/darwin/default.nix new file mode 100644 index 0000000..2953c2e --- /dev/null +++ b/users/guanranwang/home-manager/profiles/command-line/darwin/default.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + imports = [../resources/common]; + home.packages = with pkgs; [ + ### Outdated macOS components + coreutils + vim + gnugrep + openssh + screen + ]; +} diff --git a/users/guanranwang/home-manager/resources/media/nixos/video.nix b/users/guanranwang/home-manager/profiles/command-line/nixos/default.nix similarity index 53% rename from users/guanranwang/home-manager/resources/media/nixos/video.nix rename to users/guanranwang/home-manager/profiles/command-line/nixos/default.nix index 38566c0..558d079 100644 --- a/users/guanranwang/home-manager/resources/media/nixos/video.nix +++ b/users/guanranwang/home-manager/profiles/command-line/nixos/default.nix @@ -1,5 +1,6 @@ {pkgs, ...}: { + imports = [../resources/common]; home.packages = with pkgs; [ - mpv + trashy ]; } diff --git a/users/guanranwang/home-manager/profiles/command-line/nixos/fancy-stuff.nix b/users/guanranwang/home-manager/profiles/command-line/nixos/fancy-stuff.nix new file mode 100644 index 0000000..a61f99c --- /dev/null +++ b/users/guanranwang/home-manager/profiles/command-line/nixos/fancy-stuff.nix @@ -0,0 +1,3 @@ +{...}: { + imports = [../resources/fancy-stuff]; +} diff --git a/users/guanranwang/home-manager/profiles/command-line/resources/common/default.nix b/users/guanranwang/home-manager/profiles/command-line/resources/common/default.nix new file mode 100644 index 0000000..11db03c --- /dev/null +++ b/users/guanranwang/home-manager/profiles/command-line/resources/common/default.nix @@ -0,0 +1,89 @@ +{pkgs, ...}: { + home = { + shellAliases = { + # navigation + "ls" = "eza"; + "tree" = "ls --tree"; + ".." = "cd .."; + + "farsee" = "curl -F 'c=@-' 'https://fars.ee/'"; # pb + + # proxy + "setproxy" = let + proxy = "http://127.0.0.1:7890/"; + in "export http_proxy=${proxy} https_proxy=${proxy} ftp_proxy=${proxy} rsync_proxy=${proxy}"; + "unsetproxy" = "set -e http_proxy https_proxy all_proxy"; # fish syntax (?) + }; + sessionVariables = { + # Bat + "MANPAGER" = "sh -c 'col -bx | bat -l man -p'"; + "MANROFFOPT" = "-c"; + }; + + packages = with pkgs; [ + ### Nix + sops + nix-output-monitor + + ### Misc + wget + fd + hyperfine + ]; + }; + programs = { + tealdeer.enable = true; + zoxide.enable = true; + bat.enable = true; + bottom.enable = true; + joshuto.enable = true; + ripgrep.enable = true; + + starship = { + enable = true; + settings = { + add_newline = false; + line_break.disabled = true; + + character = { + success_symbol = "[>](bold green)"; + error_symbol = "[>](bold red)"; + vimcmd_symbol = "[<](bold green)"; + vimcmd_replace_one_symbol = "[<](bold purple)"; + vimcmd_replace_symbol = "[<](bold purple)"; + vimcmd_visual_symbol = "[<](bold yellow)"; + }; + }; + }; + + eza = { + enable = true; + git = true; + icons = true; + extraOptions = ["--header"]; + # Fish have builtin aliases for `ls`, alias `ls` to `eza` is the only thing we want to do + #enableAliases = true; + }; + + skim = { + enable = true; + defaultCommand = "rg --files || fd --type f || find ."; + # rg --files ran + # 4.40 ± 0.44 times faster than fd --type f + # 60.39 ± 5.80 times faster than find . + }; + + git = { + enable = true; + userName = "Guanran Wang"; + userEmail = "guanran928@outlook.com"; + delta.enable = true; + signing.signByDefault = true; + signing.key = "~/.ssh/id_github_signing"; + extraConfig = { + gpg.format = "ssh"; + pull.rebase = true; + }; + }; + }; +} diff --git a/users/guanranwang/home-manager/profiles/command-line/resources/fancy-stuff/default.nix b/users/guanranwang/home-manager/profiles/command-line/resources/fancy-stuff/default.nix new file mode 100644 index 0000000..5d47319 --- /dev/null +++ b/users/guanranwang/home-manager/profiles/command-line/resources/fancy-stuff/default.nix @@ -0,0 +1,14 @@ +{pkgs, ...}: { + home.shellAliases = { + "yd" = "ydict -c"; + }; + home.packages = with pkgs; [ + ### Fancy stuff + fastfetch + freshfetch + ydict + yt-dlp + aria2 + android-tools + ]; +} diff --git a/users/guanranwang/home-manager/darwin/presets/desktop/gaming.nix b/users/guanranwang/home-manager/profiles/gaming/darwin/default.nix similarity index 100% rename from users/guanranwang/home-manager/darwin/presets/desktop/gaming.nix rename to users/guanranwang/home-manager/profiles/gaming/darwin/default.nix diff --git a/users/guanranwang/home-manager/nixos/presets/desktop/gaming.nix b/users/guanranwang/home-manager/profiles/gaming/nixos/default.nix similarity index 100% rename from users/guanranwang/home-manager/nixos/presets/desktop/gaming.nix rename to users/guanranwang/home-manager/profiles/gaming/nixos/default.nix diff --git a/users/guanranwang/home-manager/darwin/home.nix b/users/guanranwang/home-manager/profiles/graphical-stuff/darwin/home.nix similarity index 66% rename from users/guanranwang/home-manager/darwin/home.nix rename to users/guanranwang/home-manager/profiles/graphical-stuff/darwin/home.nix index 8ffd344..0d992d8 100644 --- a/users/guanranwang/home-manager/darwin/home.nix +++ b/users/guanranwang/home-manager/profiles/graphical-stuff/darwin/home.nix @@ -5,9 +5,6 @@ ... }: { home = { - username = "guanranwang"; - homeDirectory = "/Users/guanranwang"; - activation = { # Workaround for spotlight indexing # https://github.com/nix-community/home-manager/issues/1341#issuecomment-1705731962_ @@ -42,33 +39,7 @@ }; packages = with pkgs; [ - ## CLI - ### outdated macOS components - coreutils - vim - gnugrep - openssh - screen - ### Misc - eza - bottom - bat - fd - git - ripgrep - yt-dlp - aria2 - android-tools - skim - ydict - nix-output-monitor - ## GUI - ### Music - spotify - spicetify-cli - yesplaymusic - mpv ### Tools keka # un-archive-r iterm2 @@ -81,23 +52,15 @@ programs = let monospace = "JetBrainsMono Nerd Font"; in { - vscode.userSettings = { - "editor.fontFamily" = "${monospace}"; - }; + ### VSCode + vscode.userSettings."editor.fontFamily" = "${monospace}"; + ### Alacritty alacritty.settings.font = { - normal = { - family = "${monospace}"; - }; - bold = { - family = "${monospace}"; - }; - bold_italic = { - family = "${monospace}"; - }; - italic = { - family = "${monospace}"; - }; + normal.family = "${monospace}"; + bold.family = "${monospace}"; + bold_italic.family = "${monospace}"; + italic.family = "${monospace}"; }; }; } diff --git a/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/default.nix b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/default.nix new file mode 100644 index 0000000..e6710c7 --- /dev/null +++ b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/default.nix @@ -0,0 +1,9 @@ +{...}: { + imports = [ + ./fonts.nix + ./packages.nix + ./input-method.nix + ./theme.nix + ./xdg-mime.nix + ]; +} diff --git a/users/guanranwang/home-manager/nixos/fonts.nix b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/fonts.nix similarity index 89% rename from users/guanranwang/home-manager/nixos/fonts.nix rename to users/guanranwang/home-manager/profiles/graphical-stuff/nixos/fonts.nix index dd34271..2be6638 100644 --- a/users/guanranwang/home-manager/nixos/fonts.nix +++ b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/fonts.nix @@ -1,9 +1,10 @@ {pkgs, ...}: { fonts.fontconfig.enable = true; xdg.configFile."fontconfig" = { - source = ../resources/dotfiles/config/fontconfig; + source = ../../../dotfiles/config/fontconfig; recursive = true; }; + home.packages = with pkgs; [ ### Sans inter diff --git a/users/guanranwang/home-manager/nixos/i18n.nix b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/input-method.nix similarity index 72% rename from users/guanranwang/home-manager/nixos/i18n.nix rename to users/guanranwang/home-manager/profiles/graphical-stuff/nixos/input-method.nix index 660d1c2..3b38a3c 100644 --- a/users/guanranwang/home-manager/nixos/i18n.nix +++ b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/input-method.nix @@ -13,9 +13,5 @@ home.sessionVariables = { "FCITX_NO_PREEDIT_APPS" = "gvim.*,wps.*,wpp.*,et.*,cinny,epiphany"; - #GLFW_IM_MODULE = "ibus"; # IME support in kitty - #GTK_IM_MODULE = "fcitx"; - #QT_IM_MODULE = "fcitx"; - #XMODIFIERS = "@im=fcitx"; }; } diff --git a/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/packages.nix b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/packages.nix new file mode 100644 index 0000000..45174d7 --- /dev/null +++ b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/packages.nix @@ -0,0 +1,53 @@ +{pkgs, ...}: { + home.packages = + (with pkgs; [ + # Messaging + ### Matrix + neochat # kinda buggy with window resizing, but it works and its not electron + #nheko # wont let me login for some reason + #fractal # does not work with Mozilla's SAML login + + ## # vvv 3 UI libraries I dislike vvv + #cinny-desktop # # Tauri + #element-desktop # # Electron + #fluffychat # # Flutter + + ### Misc + telegram-desktop + #discord + #qq + + # Misc + bitwarden + #gparted + #timeshift + #tuba + #piper + #gradience + #dippi + ]) + ++ (with pkgs.gnome; [ + nautilus + zenity + seahorse + file-roller + gnome-weather + gnome-calculator + dconf-editor + ]); + + programs = { + obs-studio.enable = true; + }; + + services = { + ssh-agent.enable = true; + }; + + #programs.boxxy = { + # enable = true; + # #rules = { + # # + # #}; + #}; +} diff --git a/users/guanranwang/home-manager/nixos/theme.nix b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/theme.nix similarity index 100% rename from users/guanranwang/home-manager/nixos/theme.nix rename to users/guanranwang/home-manager/profiles/graphical-stuff/nixos/theme.nix diff --git a/users/guanranwang/home-manager/nixos/xdg/xdg-mime.nix b/users/guanranwang/home-manager/profiles/graphical-stuff/nixos/xdg-mime.nix similarity index 100% rename from users/guanranwang/home-manager/nixos/xdg/xdg-mime.nix rename to users/guanranwang/home-manager/profiles/graphical-stuff/nixos/xdg-mime.nix diff --git a/users/guanranwang/home-manager/profiles/media/darwin/default.nix b/users/guanranwang/home-manager/profiles/media/darwin/default.nix new file mode 100644 index 0000000..c03ff85 --- /dev/null +++ b/users/guanranwang/home-manager/profiles/media/darwin/default.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ./music.nix + ./video.nix + ]; +} diff --git a/users/guanranwang/home-manager/profiles/media/darwin/music.nix b/users/guanranwang/home-manager/profiles/media/darwin/music.nix new file mode 100644 index 0000000..d6481f8 --- /dev/null +++ b/users/guanranwang/home-manager/profiles/media/darwin/music.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + imports = [./spicetify.nix]; + programs.mpv.enable = true; + home.packages = with pkgs; [ + ### Streaming + spotify + yesplaymusic + ]; +} diff --git a/users/guanranwang/home-manager/profiles/media/darwin/video.nix b/users/guanranwang/home-manager/profiles/media/darwin/video.nix new file mode 100644 index 0000000..fc16fb4 --- /dev/null +++ b/users/guanranwang/home-manager/profiles/media/darwin/video.nix @@ -0,0 +1,3 @@ +{...}: { + programs.mpv.enable = true; +} diff --git a/users/guanranwang/home-manager/resources/media/nixos/default.nix b/users/guanranwang/home-manager/profiles/media/nixos/default.nix similarity index 82% rename from users/guanranwang/home-manager/resources/media/nixos/default.nix rename to users/guanranwang/home-manager/profiles/media/nixos/default.nix index 43557a3..cce827f 100644 --- a/users/guanranwang/home-manager/resources/media/nixos/default.nix +++ b/users/guanranwang/home-manager/profiles/media/nixos/default.nix @@ -1,5 +1,4 @@ {...}: { - ### For NixOS imports = [ ./music.nix ./photo.nix diff --git a/users/guanranwang/home-manager/resources/media/nixos/music.nix b/users/guanranwang/home-manager/profiles/media/nixos/music.nix similarity index 88% rename from users/guanranwang/home-manager/resources/media/nixos/music.nix rename to users/guanranwang/home-manager/profiles/media/nixos/music.nix index 1c18d0b..82e0733 100644 --- a/users/guanranwang/home-manager/resources/media/nixos/music.nix +++ b/users/guanranwang/home-manager/profiles/media/nixos/music.nix @@ -1,8 +1,8 @@ {pkgs, ...}: { imports = [./spicetify.nix]; + programs.mpv.enable = true; home.packages = with pkgs; [ ### Local - mpv amberol ### Streaming diff --git a/users/guanranwang/home-manager/resources/media/nixos/photo.nix b/users/guanranwang/home-manager/profiles/media/nixos/photo.nix similarity index 100% rename from users/guanranwang/home-manager/resources/media/nixos/photo.nix rename to users/guanranwang/home-manager/profiles/media/nixos/photo.nix diff --git a/users/guanranwang/home-manager/resources/media/nixos/spicetify.nix b/users/guanranwang/home-manager/profiles/media/nixos/spicetify.nix similarity index 76% rename from users/guanranwang/home-manager/resources/media/nixos/spicetify.nix rename to users/guanranwang/home-manager/profiles/media/nixos/spicetify.nix index d2685e8..a8c7645 100644 --- a/users/guanranwang/home-manager/resources/media/nixos/spicetify.nix +++ b/users/guanranwang/home-manager/profiles/media/nixos/spicetify.nix @@ -1,10 +1,10 @@ { pkgs, lib, - spicetify-nix, + inputs, ... }: let - spicePkgs = spicetify-nix.packages.${pkgs.system}.default; + spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default; in { # allow spotify to be installed if you don't have unfree enabled already nixpkgs.config.allowUnfreePredicate = pkg: @@ -13,7 +13,7 @@ in { ]; # import the flake's module for your system - imports = [spicetify-nix.homeManagerModule]; + imports = [inputs.spicetify-nix.homeManagerModule]; # configure spicetify :) programs.spicetify = { diff --git a/users/guanranwang/home-manager/profiles/media/nixos/video.nix b/users/guanranwang/home-manager/profiles/media/nixos/video.nix new file mode 100644 index 0000000..fc16fb4 --- /dev/null +++ b/users/guanranwang/home-manager/profiles/media/nixos/video.nix @@ -0,0 +1,3 @@ +{...}: { + programs.mpv.enable = true; +} diff --git a/users/guanranwang/home-manager/nixos/presets/desktop/torrenting.nix b/users/guanranwang/home-manager/profiles/torrenting/nixos/default.nix similarity index 100% rename from users/guanranwang/home-manager/nixos/presets/desktop/torrenting.nix rename to users/guanranwang/home-manager/profiles/torrenting/nixos/default.nix diff --git a/users/guanranwang/home-manager/resources/wm/components/wallpaper.nix b/users/guanranwang/home-manager/resources/wm/components/wallpaper.nix deleted file mode 100644 index b20f70f..0000000 --- a/users/guanranwang/home-manager/resources/wm/components/wallpaper.nix +++ /dev/null @@ -1,8 +0,0 @@ -{...}: { - xdg.dataFile = { - "backgrounds" = { - source = ../../dotfiles/data/backgrounds; - recursive = true; - }; - }; -} diff --git a/users/guanranwang/nixos/presets/core.nix b/users/guanranwang/nixos/presets/core.nix index e7181ee..72670ca 100644 --- a/users/guanranwang/nixos/presets/core.nix +++ b/users/guanranwang/nixos/presets/core.nix @@ -27,6 +27,7 @@ ../../../../flakes/nixos/sops-nix.nix ../../../../flakes/nixos/hosts.nix ]; + ### sops-nix nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}"; users.groups."nix-access-tokens" = {}; @@ -43,4 +44,10 @@ }; }; }; + + ### home-manager + home-manager.users.guanranwang.imports = [ + ../../home-manager + ../../home-manager/profiles/command-line/nixos + ]; } diff --git a/users/guanranwang/nixos/presets/desktop.nix b/users/guanranwang/nixos/presets/desktop.nix index 84e827f..21c74c8 100644 --- a/users/guanranwang/nixos/presets/desktop.nix +++ b/users/guanranwang/nixos/presets/desktop.nix @@ -8,7 +8,23 @@ ]; ### home-manager - home-manager.users.guanranwang = import ../../home-manager/nixos/presets/desktop.nix; + home-manager.users.guanranwang.imports = [ + ../../home-manager/profiles/command-line/nixos/fancy-stuff.nix + ../../home-manager/profiles/graphical-stuff/nixos + ../../home-manager/profiles/media/nixos + ../../home-manager/modules/terms/alacritty.nix + ../../home-manager/modules/shell/fish.nix + ../../home-manager/modules/shell/bash.nix + ../../home-manager/modules/editor/helix.nix + ../../home-manager/modules/editor/neovim.nix + ../../home-manager/modules/editor/vscode.nix + ../../home-manager/modules/browser/chromium.nix + ../../home-manager/modules/browser/librewolf.nix + ../../home-manager/modules/lang/nix.nix + ../../home-manager/modules/lang/go.nix + ../../home-manager/modules/wm/sway.nix + ]; + fonts.enableDefaultPackages = false; security.pam.services.swaylock = {}; xdg.portal = { diff --git a/users/guanranwang/nixos/presets/desktop/gaming.nix b/users/guanranwang/nixos/presets/desktop/gaming.nix new file mode 100644 index 0000000..375e5d8 --- /dev/null +++ b/users/guanranwang/nixos/presets/desktop/gaming.nix @@ -0,0 +1,5 @@ +{...}: { + home-manager.users.guanranwang.imports = [ + ../../../home-manager/profiles/gaming/nixos + ]; +} diff --git a/users/guanranwang/nixos/presets/desktop/torrenting.nix b/users/guanranwang/nixos/presets/desktop/torrenting.nix new file mode 100644 index 0000000..e817bc7 --- /dev/null +++ b/users/guanranwang/nixos/presets/desktop/torrenting.nix @@ -0,0 +1,5 @@ +{...}: { + home-manager.users.guanranwang.imports = [ + ../../../home-manager/profiles/torrenting/nixos + ]; +}