diff --git a/.sops.yaml b/.sops.yaml index b0eef49..89c4817 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -8,7 +8,7 @@ keys: - &hosts: - &aristotle age1hm6pkvt4d640wmjhxg5wxfwkp9zhcqre9klr4zg5kx2qx7vyhuuqlytmnp creation_rules: - - path_regex: users/guanranwang/secrets.yaml$ + - path_regex: secrets.yaml$ key_groups: - age: - *guanranwang diff --git a/darwin/hosts/Plato/default.nix b/darwin/hosts/Plato/default.nix index 68f14fa..d6a815b 100644 --- a/darwin/hosts/Plato/default.nix +++ b/darwin/hosts/Plato/default.nix @@ -2,9 +2,7 @@ {...}: { imports = [ ../../profiles/desktop - - ../../../users/guanranwang/darwin/profiles/desktop - ../../../users/guanranwang/darwin/profiles/common/opt-in/clash-meta-client.nix + ../../profiles/common/opt-in/clash-meta-client.nix ./hardware-configuration.nix ]; diff --git a/darwin/profiles/common/core/default.nix b/darwin/profiles/common/core/default.nix index f64240c..ec1e996 100644 --- a/darwin/profiles/common/core/default.nix +++ b/darwin/profiles/common/core/default.nix @@ -1,4 +1,11 @@ -{inputs, ...}: { +{ + inputs, + pkgs, + ... +}: { + ### Options + home-manager.users.guanranwang = import ./home; + imports = [ ./nix ./anti-features.nix @@ -8,6 +15,17 @@ inputs.home-manager.darwinModules.home-manager ]; + users = { + knownUsers = ["guanranwang"]; + users."guanranwang" = { + createHome = true; + description = "Guanran Wang"; + home = "/Users/guanranwang"; + shell = pkgs.fish; + uid = 501; + }; + }; + home-manager = { useGlobalPkgs = true; useUserPackages = true; diff --git a/users/guanranwang/darwin/profiles/common/core/home/default.nix b/darwin/profiles/common/core/home/default.nix similarity index 96% rename from users/guanranwang/darwin/profiles/common/core/home/default.nix rename to darwin/profiles/common/core/home/default.nix index 7e66247..810e5bc 100644 --- a/users/guanranwang/darwin/profiles/common/core/home/default.nix +++ b/darwin/profiles/common/core/home/default.nix @@ -1,6 +1,6 @@ {...}: { imports = [ - ../../../../../home-manager + ../../../../../home ]; # https://github.com/mathiasbynens/dotfiles/blob/main/.macos diff --git a/users/guanranwang/darwin/profiles/common/opt-in/clash-meta-client.nix b/darwin/profiles/common/opt-in/clash-meta-client.nix similarity index 100% rename from users/guanranwang/darwin/profiles/common/opt-in/clash-meta-client.nix rename to darwin/profiles/common/opt-in/clash-meta-client.nix diff --git a/darwin/profiles/common/opt-in/gaming.nix b/darwin/profiles/common/opt-in/gaming.nix deleted file mode 100644 index 8669e65..0000000 --- a/darwin/profiles/common/opt-in/gaming.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - homebrew.casks = [ - "steam" - ]; -} diff --git a/users/guanranwang/darwin/profiles/desktop/default.nix b/darwin/profiles/common/opt-in/gaming/default.nix similarity index 69% rename from users/guanranwang/darwin/profiles/desktop/default.nix rename to darwin/profiles/common/opt-in/gaming/default.nix index 44e2bfd..fbfae40 100644 --- a/users/guanranwang/darwin/profiles/desktop/default.nix +++ b/darwin/profiles/common/opt-in/gaming/default.nix @@ -1,7 +1,8 @@ { - imports = [ - ../common/core - ]; ### home-manager home-manager.users.guanranwang = import ./home; + + homebrew.casks = [ + "steam" + ]; } diff --git a/darwin/profiles/common/opt-in/gaming/home/default.nix b/darwin/profiles/common/opt-in/gaming/home/default.nix new file mode 100644 index 0000000..f27edd8 --- /dev/null +++ b/darwin/profiles/common/opt-in/gaming/home/default.nix @@ -0,0 +1,5 @@ +{...}: { + imports = [ + ../../../../../home/applications/prismlauncher + ]; +} diff --git a/users/guanranwang/home-manager/applications/alacritty/default.nix b/home/applications/alacritty/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/alacritty/default.nix rename to home/applications/alacritty/default.nix diff --git a/users/guanranwang/home-manager/applications/amberol/default.nix b/home/applications/amberol/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/amberol/default.nix rename to home/applications/amberol/default.nix diff --git a/users/guanranwang/home-manager/applications/android-tools/default.nix b/home/applications/android-tools/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/android-tools/default.nix rename to home/applications/android-tools/default.nix diff --git a/users/guanranwang/home-manager/applications/bash/default.nix b/home/applications/bash/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/bash/default.nix rename to home/applications/bash/default.nix diff --git a/users/guanranwang/home-manager/applications/bat/default.nix b/home/applications/bat/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/bat/default.nix rename to home/applications/bat/default.nix diff --git a/users/guanranwang/home-manager/applications/batsignal/default.nix b/home/applications/batsignal/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/batsignal/default.nix rename to home/applications/batsignal/default.nix diff --git a/users/guanranwang/home-manager/applications/blackbox-terminal/default.nix b/home/applications/blackbox-terminal/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/blackbox-terminal/default.nix rename to home/applications/blackbox-terminal/default.nix diff --git a/users/guanranwang/home-manager/applications/bottom/default.nix b/home/applications/bottom/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/bottom/default.nix rename to home/applications/bottom/default.nix diff --git a/users/guanranwang/home-manager/applications/bspwm/default.nix b/home/applications/bspwm/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/bspwm/default.nix rename to home/applications/bspwm/default.nix diff --git a/users/guanranwang/home-manager/applications/cava/default.nix b/home/applications/cava/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/cava/default.nix rename to home/applications/cava/default.nix diff --git a/users/guanranwang/home-manager/applications/chromium/default.nix b/home/applications/chromium/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/chromium/default.nix rename to home/applications/chromium/default.nix diff --git a/users/guanranwang/home-manager/applications/cliphist/default.nix b/home/applications/cliphist/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/cliphist/default.nix rename to home/applications/cliphist/default.nix diff --git a/users/guanranwang/home-manager/applications/common/wayland.nix b/home/applications/common/wayland.nix similarity index 100% rename from users/guanranwang/home-manager/applications/common/wayland.nix rename to home/applications/common/wayland.nix diff --git a/users/guanranwang/home-manager/applications/common/wm.nix b/home/applications/common/wm.nix similarity index 100% rename from users/guanranwang/home-manager/applications/common/wm.nix rename to home/applications/common/wm.nix diff --git a/users/guanranwang/home-manager/applications/dunst/default.nix b/home/applications/dunst/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/default.nix rename to home/applications/dunst/default.nix diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/battery-alert.png b/home/applications/dunst/dunst/battery-alert.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/battery-alert.png rename to home/applications/dunst/dunst/battery-alert.png diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/battery-charging.png b/home/applications/dunst/dunst/battery-charging.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/battery-charging.png rename to home/applications/dunst/dunst/battery-charging.png diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/battery.png b/home/applications/dunst/dunst/battery.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/battery.png rename to home/applications/dunst/dunst/battery.png diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/volume-high.png b/home/applications/dunst/dunst/volume-high.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/volume-high.png rename to home/applications/dunst/dunst/volume-high.png diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/volume-minus.png b/home/applications/dunst/dunst/volume-minus.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/volume-minus.png rename to home/applications/dunst/dunst/volume-minus.png diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/volume-mute.png b/home/applications/dunst/dunst/volume-mute.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/volume-mute.png rename to home/applications/dunst/dunst/volume-mute.png diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/volume-off.png b/home/applications/dunst/dunst/volume-off.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/volume-off.png rename to home/applications/dunst/dunst/volume-off.png diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/volume-plus.png b/home/applications/dunst/dunst/volume-plus.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/volume-plus.png rename to home/applications/dunst/dunst/volume-plus.png diff --git a/users/guanranwang/home-manager/applications/dunst/dunst/volume-source.png b/home/applications/dunst/dunst/volume-source.png similarity index 100% rename from users/guanranwang/home-manager/applications/dunst/dunst/volume-source.png rename to home/applications/dunst/dunst/volume-source.png diff --git a/users/guanranwang/home-manager/applications/easyeffects/default.nix b/home/applications/easyeffects/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/easyeffects/default.nix rename to home/applications/easyeffects/default.nix diff --git a/users/guanranwang/home-manager/applications/eza/default.nix b/home/applications/eza/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/eza/default.nix rename to home/applications/eza/default.nix diff --git a/users/guanranwang/home-manager/applications/fastfetch/default.nix b/home/applications/fastfetch/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/fastfetch/default.nix rename to home/applications/fastfetch/default.nix diff --git a/users/guanranwang/home-manager/applications/fcitx5/default.nix b/home/applications/fcitx5/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/fcitx5/default.nix rename to home/applications/fcitx5/default.nix diff --git a/users/guanranwang/home-manager/applications/fd/default.nix b/home/applications/fd/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/fd/default.nix rename to home/applications/fd/default.nix diff --git a/users/guanranwang/home-manager/applications/firefox/default.nix b/home/applications/firefox/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/firefox/default.nix rename to home/applications/firefox/default.nix diff --git a/users/guanranwang/home-manager/applications/fish/default.nix b/home/applications/fish/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/fish/default.nix rename to home/applications/fish/default.nix diff --git a/users/guanranwang/home-manager/applications/foot/default.nix b/home/applications/foot/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/foot/default.nix rename to home/applications/foot/default.nix diff --git a/users/guanranwang/home-manager/applications/git/default.nix b/home/applications/git/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/git/default.nix rename to home/applications/git/default.nix diff --git a/users/guanranwang/home-manager/applications/gnome/default.nix b/home/applications/gnome/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/gnome/default.nix rename to home/applications/gnome/default.nix diff --git a/users/guanranwang/home-manager/applications/go/default.nix b/home/applications/go/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/go/default.nix rename to home/applications/go/default.nix diff --git a/users/guanranwang/home-manager/applications/gpg/default.nix b/home/applications/gpg/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/gpg/default.nix rename to home/applications/gpg/default.nix diff --git a/users/guanranwang/home-manager/applications/helix/default.nix b/home/applications/helix/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/helix/default.nix rename to home/applications/helix/default.nix diff --git a/users/guanranwang/home-manager/applications/hyperfine/default.nix b/home/applications/hyperfine/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/hyperfine/default.nix rename to home/applications/hyperfine/default.nix diff --git a/users/guanranwang/home-manager/applications/hyprland/default.nix b/home/applications/hyprland/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/default.nix rename to home/applications/hyprland/default.nix diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/autostart.conf b/home/applications/hyprland/hypr/autostart.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/autostart.conf rename to home/applications/hyprland/hypr/autostart.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/hyprpaper.conf b/home/applications/hyprland/hypr/hyprpaper.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/hyprpaper.conf rename to home/applications/hyprland/hypr/hyprpaper.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/keybinds.conf b/home/applications/hyprland/hypr/keybinds.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/keybinds.conf rename to home/applications/hyprland/hypr/keybinds.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/main.conf b/home/applications/hyprland/hypr/main.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/main.conf rename to home/applications/hyprland/hypr/main.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/plugins.conf b/home/applications/hyprland/hypr/plugins.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/plugins.conf rename to home/applications/hyprland/hypr/plugins.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/themes/colors.conf b/home/applications/hyprland/hypr/themes/colors.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/themes/colors.conf rename to home/applications/hyprland/hypr/themes/colors.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/themes/frappe.conf b/home/applications/hyprland/hypr/themes/frappe.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/themes/frappe.conf rename to home/applications/hyprland/hypr/themes/frappe.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/themes/latte.conf b/home/applications/hyprland/hypr/themes/latte.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/themes/latte.conf rename to home/applications/hyprland/hypr/themes/latte.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/themes/macchiato.conf b/home/applications/hyprland/hypr/themes/macchiato.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/themes/macchiato.conf rename to home/applications/hyprland/hypr/themes/macchiato.conf diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/themes/mocha.conf b/home/applications/hyprland/hypr/themes/mocha.conf similarity index 100% rename from users/guanranwang/home-manager/applications/hyprland/hypr/themes/mocha.conf rename to home/applications/hyprland/hypr/themes/mocha.conf diff --git a/users/guanranwang/home-manager/applications/i3status-rust/default.nix b/home/applications/i3status-rust/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/i3status-rust/default.nix rename to home/applications/i3status-rust/default.nix diff --git a/users/guanranwang/home-manager/applications/irssi/default.nix b/home/applications/irssi/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/irssi/default.nix rename to home/applications/irssi/default.nix diff --git a/users/guanranwang/home-manager/applications/joshuto/default.nix b/home/applications/joshuto/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/joshuto/default.nix rename to home/applications/joshuto/default.nix diff --git a/users/guanranwang/home-manager/applications/kitty/default.nix b/home/applications/kitty/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/kitty/default.nix rename to home/applications/kitty/default.nix diff --git a/users/guanranwang/home-manager/applications/librewolf/default.nix b/home/applications/librewolf/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/librewolf/default.nix rename to home/applications/librewolf/default.nix diff --git a/users/guanranwang/home-manager/applications/loupe/default.nix b/home/applications/loupe/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/loupe/default.nix rename to home/applications/loupe/default.nix diff --git a/users/guanranwang/home-manager/applications/lunar-client/default.nix b/home/applications/lunar-client/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/lunar-client/default.nix rename to home/applications/lunar-client/default.nix diff --git a/users/guanranwang/home-manager/applications/mangohud/default.nix b/home/applications/mangohud/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/mangohud/default.nix rename to home/applications/mangohud/default.nix diff --git a/users/guanranwang/home-manager/applications/mousai/default.nix b/home/applications/mousai/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/mousai/default.nix rename to home/applications/mousai/default.nix diff --git a/users/guanranwang/home-manager/applications/mpv/default.nix b/home/applications/mpv/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/mpv/default.nix rename to home/applications/mpv/default.nix diff --git a/users/guanranwang/home-manager/applications/mumble/default.nix b/home/applications/mumble/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/mumble/default.nix rename to home/applications/mumble/default.nix diff --git a/users/guanranwang/home-manager/applications/nautilus/default.nix b/home/applications/nautilus/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/nautilus/default.nix rename to home/applications/nautilus/default.nix diff --git a/users/guanranwang/home-manager/applications/neovim/default.nix b/home/applications/neovim/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/neovim/default.nix rename to home/applications/neovim/default.nix diff --git a/users/guanranwang/home-manager/applications/netease-cloud-music-gtk/default.nix b/home/applications/netease-cloud-music-gtk/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/netease-cloud-music-gtk/default.nix rename to home/applications/netease-cloud-music-gtk/default.nix diff --git a/users/guanranwang/home-manager/applications/nix/default.nix b/home/applications/nix/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/nix/default.nix rename to home/applications/nix/default.nix diff --git a/users/guanranwang/home-manager/applications/osu-lazer/default.nix b/home/applications/osu-lazer/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/osu-lazer/default.nix rename to home/applications/osu-lazer/default.nix diff --git a/users/guanranwang/home-manager/applications/osu-stable/default.nix b/home/applications/osu-stable/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/osu-stable/default.nix rename to home/applications/osu-stable/default.nix diff --git a/users/guanranwang/home-manager/applications/picom/default.nix b/home/applications/picom/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/picom/default.nix rename to home/applications/picom/default.nix diff --git a/users/guanranwang/home-manager/applications/polybar/default.nix b/home/applications/polybar/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/polybar/default.nix rename to home/applications/polybar/default.nix diff --git a/users/guanranwang/home-manager/applications/prismlauncher/default.nix b/home/applications/prismlauncher/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/prismlauncher/default.nix rename to home/applications/prismlauncher/default.nix diff --git a/users/guanranwang/home-manager/applications/protonup-qt/default.nix b/home/applications/protonup-qt/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/protonup-qt/default.nix rename to home/applications/protonup-qt/default.nix diff --git a/users/guanranwang/home-manager/applications/qbittorrent/default.nix b/home/applications/qbittorrent/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/qbittorrent/default.nix rename to home/applications/qbittorrent/default.nix diff --git a/users/guanranwang/home-manager/applications/ripgrep/default.nix b/home/applications/ripgrep/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/ripgrep/default.nix rename to home/applications/ripgrep/default.nix diff --git a/users/guanranwang/home-manager/applications/rofi/default.nix b/home/applications/rofi/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/rofi/default.nix rename to home/applications/rofi/default.nix diff --git a/users/guanranwang/home-manager/applications/rofi/rofi/colors.rasi b/home/applications/rofi/rofi/colors.rasi similarity index 100% rename from users/guanranwang/home-manager/applications/rofi/rofi/colors.rasi rename to home/applications/rofi/rofi/colors.rasi diff --git a/users/guanranwang/home-manager/applications/rofi/rofi/config.rasi b/home/applications/rofi/rofi/config.rasi similarity index 100% rename from users/guanranwang/home-manager/applications/rofi/rofi/config.rasi rename to home/applications/rofi/rofi/config.rasi diff --git a/users/guanranwang/home-manager/applications/skim/default.nix b/home/applications/skim/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/skim/default.nix rename to home/applications/skim/default.nix diff --git a/users/guanranwang/home-manager/applications/spotify/default.nix b/home/applications/spotify/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/spotify/default.nix rename to home/applications/spotify/default.nix diff --git a/users/guanranwang/home-manager/applications/spotify/spicetify.nix b/home/applications/spotify/spicetify.nix similarity index 100% rename from users/guanranwang/home-manager/applications/spotify/spicetify.nix rename to home/applications/spotify/spicetify.nix diff --git a/users/guanranwang/home-manager/applications/starship/default.nix b/home/applications/starship/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/starship/default.nix rename to home/applications/starship/default.nix diff --git a/users/guanranwang/home-manager/applications/steam/default.nix b/home/applications/steam/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/steam/default.nix rename to home/applications/steam/default.nix diff --git a/users/guanranwang/home-manager/applications/sway/default.nix b/home/applications/sway/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/sway/default.nix rename to home/applications/sway/default.nix diff --git a/users/guanranwang/home-manager/applications/swayidle/default.nix b/home/applications/swayidle/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/swayidle/default.nix rename to home/applications/swayidle/default.nix diff --git a/users/guanranwang/home-manager/applications/swaylock/default.nix b/home/applications/swaylock/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/swaylock/default.nix rename to home/applications/swaylock/default.nix diff --git a/users/guanranwang/home-manager/applications/swww/default.nix b/home/applications/swww/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/swww/default.nix rename to home/applications/swww/default.nix diff --git a/users/guanranwang/home-manager/applications/sxhkd/default.nix b/home/applications/sxhkd/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/sxhkd/default.nix rename to home/applications/sxhkd/default.nix diff --git a/users/guanranwang/home-manager/applications/tealdeer/default.nix b/home/applications/tealdeer/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/tealdeer/default.nix rename to home/applications/tealdeer/default.nix diff --git a/users/guanranwang/home-manager/applications/telegram-desktop/default.nix b/home/applications/telegram-desktop/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/telegram-desktop/default.nix rename to home/applications/telegram-desktop/default.nix diff --git a/users/guanranwang/home-manager/applications/thunderbird/default.nix b/home/applications/thunderbird/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/thunderbird/default.nix rename to home/applications/thunderbird/default.nix diff --git a/users/guanranwang/home-manager/applications/thunderbird/user-overrides.js b/home/applications/thunderbird/user-overrides.js similarity index 100% rename from users/guanranwang/home-manager/applications/thunderbird/user-overrides.js rename to home/applications/thunderbird/user-overrides.js diff --git a/users/guanranwang/home-manager/applications/trashy/default.nix b/home/applications/trashy/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/trashy/default.nix rename to home/applications/trashy/default.nix diff --git a/users/guanranwang/home-manager/applications/udiskie/default.nix b/home/applications/udiskie/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/udiskie/default.nix rename to home/applications/udiskie/default.nix diff --git a/users/guanranwang/home-manager/applications/vscode/default.nix b/home/applications/vscode/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/vscode/default.nix rename to home/applications/vscode/default.nix diff --git a/users/guanranwang/home-manager/applications/waybar/default.nix b/home/applications/waybar/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/waybar/default.nix rename to home/applications/waybar/default.nix diff --git a/users/guanranwang/home-manager/applications/wezterm/default.nix b/home/applications/wezterm/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/wezterm/default.nix rename to home/applications/wezterm/default.nix diff --git a/users/guanranwang/home-manager/applications/wget/default.nix b/home/applications/wget/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/wget/default.nix rename to home/applications/wget/default.nix diff --git a/users/guanranwang/home-manager/applications/ydict/default.nix b/home/applications/ydict/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/ydict/default.nix rename to home/applications/ydict/default.nix diff --git a/users/guanranwang/home-manager/applications/yesplaymusic/yesplaymusic.nix b/home/applications/yesplaymusic/yesplaymusic.nix similarity index 100% rename from users/guanranwang/home-manager/applications/yesplaymusic/yesplaymusic.nix rename to home/applications/yesplaymusic/yesplaymusic.nix diff --git a/users/guanranwang/home-manager/applications/zellij/default.nix b/home/applications/zellij/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/zellij/default.nix rename to home/applications/zellij/default.nix diff --git a/users/guanranwang/home-manager/applications/zoxide/default.nix b/home/applications/zoxide/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/zoxide/default.nix rename to home/applications/zoxide/default.nix diff --git a/users/guanranwang/home-manager/applications/zsh/default.nix b/home/applications/zsh/default.nix similarity index 100% rename from users/guanranwang/home-manager/applications/zsh/default.nix rename to home/applications/zsh/default.nix diff --git a/users/guanranwang/home-manager/default.nix b/home/default.nix similarity index 100% rename from users/guanranwang/home-manager/default.nix rename to home/default.nix diff --git a/users/guanranwang/home-manager/modules/color-scheme.nix b/home/modules/color-scheme.nix similarity index 100% rename from users/guanranwang/home-manager/modules/color-scheme.nix rename to home/modules/color-scheme.nix diff --git a/users/guanranwang/home-manager/modules/default.nix b/home/modules/default.nix similarity index 100% rename from users/guanranwang/home-manager/modules/default.nix rename to home/modules/default.nix diff --git a/users/guanranwang/home-manager/modules/terminal.nix b/home/modules/terminal.nix similarity index 100% rename from users/guanranwang/home-manager/modules/terminal.nix rename to home/modules/terminal.nix diff --git a/nixos/hosts/Aristotle/default.nix b/nixos/hosts/Aristotle/default.nix index 46a4cb4..6aec996 100644 --- a/nixos/hosts/Aristotle/default.nix +++ b/nixos/hosts/Aristotle/default.nix @@ -3,13 +3,9 @@ # OS ../../profiles/laptop ../../profiles/common/opt-in/zram-generator.nix - ../../profiles/common/opt-in/gaming.nix - - # User - ../../../users/guanranwang/nixos/profiles/laptop - ../../../users/guanranwang/nixos/profiles/common/opt-in/clash-meta-client - ../../../users/guanranwang/nixos/profiles/common/opt-in/gaming - ../../../users/guanranwang/nixos/profiles/common/opt-in/torrenting + ../../profiles/common/opt-in/clash-meta-client + ../../profiles/common/opt-in/gaming + ../../profiles/common/opt-in/torrenting # Hardware ./hardware-configuration.nix diff --git a/nixos/profiles/common/core/default.nix b/nixos/profiles/common/core/default.nix index 6899f13..efd2c22 100644 --- a/nixos/profiles/common/core/default.nix +++ b/nixos/profiles/common/core/default.nix @@ -21,6 +21,9 @@ inputs.nix-gaming.nixosModules.pipewireLowLatency ]; + ### home-manager + home-manager.users.guanranwang = import ./home; + users.mutableUsers = false; home-manager = { useGlobalPkgs = true; @@ -78,4 +81,40 @@ # this shouldn't affect non-nvidia machines. hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production; hardware.nvidia.nvidiaSettings = false; + + users.users."guanranwang" = { + isNormalUser = true; + description = "Guanran Wang"; + extraGroups = [ + "wheel" # administrator + "networkmanager" # access to networkmanager + "tss" # access to tpm devices + "vboxusers" # access to virtualbox + "nix-access-tokens" # access to github tokens + "libvirtd" # access to virt-manager + ]; + hashedPasswordFile = config.sops.secrets."hashed-passwd".path; + shell = pkgs.fish; + packages = []; + }; + + programs.fish.enable = true; + users.groups."nix-access-tokens" = {}; + nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}"; + + ### sops-nix + sops = { + defaultSopsFile = ../../../../secrets.yaml; + age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; + gnupg.sshKeyPaths = []; + secrets = { + "hashed-passwd" = { + neededForUsers = true; + }; + "nix-access-tokens" = { + group = config.users.groups."nix-access-tokens".name; + mode = "0440"; + }; + }; + }; } diff --git a/nixos/profiles/common/core/home/default.nix b/nixos/profiles/common/core/home/default.nix new file mode 100644 index 0000000..91af935 --- /dev/null +++ b/nixos/profiles/common/core/home/default.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ../../../../../home + ../../../../../home/applications/trashy + ]; +} diff --git a/nixos/profiles/common/graphical/default.nix b/nixos/profiles/common/graphical/default.nix index d212125..9fd3323 100755 --- a/nixos/profiles/common/graphical/default.nix +++ b/nixos/profiles/common/graphical/default.nix @@ -1,4 +1,11 @@ -{pkgs, ...}: { +{ + pkgs, + lib, + ... +}: { + ### home-manager + home-manager.users.guanranwang = import ./home; + # plymouth boot.plymouth.enable = true; @@ -10,7 +17,6 @@ }; # gnome keyring - services.gnome.gnome-keyring.enable = true; programs.seahorse.enable = true; # polkit @@ -29,4 +35,63 @@ TimeoutStopSec = 10; }; }; + + ### Options + myFlake.boot.noLoaderMenu = lib.mkDefault true; + + ### sops-nix + sops.secrets."wireless/wangxiaobo".path = "/var/lib/iwd/wangxiaobo.psk"; + sops.secrets."wireless/OpenWrt".path = "/var/lib/iwd/OpenWrt.psk"; + + fonts.enableDefaultPackages = false; + security.pam.services.swaylock = {}; + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = with pkgs; [xdg-desktop-portal-gtk]; + config = { + # from Arch Linux + # https://gitlab.archlinux.org/archlinux/packaging/packages/sway/-/blob/main/sway-portals.conf + sway = { + default = "gtk"; + "org.freedesktop.impl.portal.ScreenCast" = "wlr"; + "org.freedesktop.impl.portal.Screenshot" = "wlr"; + }; + }; + }; + services = { + gvfs.enable = true; + gnome = { + gnome-keyring.enable = true; + sushi.enable = true; + gnome-online-accounts.enable = true; + }; + }; + programs = { + kdeconnect = { + enable = true; + #package = pkgs.gnomeExtensions.gsconnect; + package = pkgs.valent; + }; + }; + services.xserver.libinput = { + touchpad = { + accelProfile = "flat"; + naturalScrolling = true; + middleEmulation = false; + }; + mouse = { + accelProfile = "flat"; + naturalScrolling = true; + middleEmulation = false; + }; + }; + + ### Removes debounce time + # https://www.reddit.com/r/linux_gaming/comments/ku6gth + environment.etc."libinput/local-overrides.quirks".text = '' + [Never Debounce] + MatchUdevType=mouse + ModelBouncingKeys=1 + ''; } diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/default.nix b/nixos/profiles/common/graphical/home/default.nix similarity index 92% rename from users/guanranwang/nixos/profiles/common/graphical/home/default.nix rename to nixos/profiles/common/graphical/home/default.nix index 44a5fdc..a8072c0 100644 --- a/users/guanranwang/nixos/profiles/common/graphical/home/default.nix +++ b/nixos/profiles/common/graphical/home/default.nix @@ -9,7 +9,7 @@ ./theme.nix ./xdg-mime.nix ] - ++ map (n: ../../../../../home-manager/applications/${n}) [ + ++ map (n: ../../../../../home/applications/${n}) [ # Terminal "alacritty" diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/fonts/default.nix b/nixos/profiles/common/graphical/home/fonts/default.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/fonts/default.nix rename to nixos/profiles/common/graphical/home/fonts/default.nix diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/nixos-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/nixos-fonts.conf similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/nixos-fonts.conf rename to nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/nixos-fonts.conf diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/old-chinese-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/old-chinese-fonts.conf similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/old-chinese-fonts.conf rename to nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/old-chinese-fonts.conf diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/qt-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/qt-fonts.conf similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/qt-fonts.conf rename to nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/qt-fonts.conf diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/unliked-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/unliked-fonts.conf similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/unliked-fonts.conf rename to nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/unliked-fonts.conf diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/windows-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/windows-fonts.conf similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/windows-fonts.conf rename to nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/windows-fonts.conf diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/fonts.conf similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/fonts/fontconfig/fonts.conf rename to nixos/profiles/common/graphical/home/fonts/fontconfig/fonts.conf diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/packages.nix b/nixos/profiles/common/graphical/home/packages.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/packages.nix rename to nixos/profiles/common/graphical/home/packages.nix diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/scripts/bin/wrapped-brightnessctl b/nixos/profiles/common/graphical/home/scripts/bin/wrapped-brightnessctl similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/scripts/bin/wrapped-brightnessctl rename to nixos/profiles/common/graphical/home/scripts/bin/wrapped-brightnessctl diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/scripts/bin/wrapped-mpvpaper b/nixos/profiles/common/graphical/home/scripts/bin/wrapped-mpvpaper similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/scripts/bin/wrapped-mpvpaper rename to nixos/profiles/common/graphical/home/scripts/bin/wrapped-mpvpaper diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/scripts/bin/wrapped-pamixer b/nixos/profiles/common/graphical/home/scripts/bin/wrapped-pamixer similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/scripts/bin/wrapped-pamixer rename to nixos/profiles/common/graphical/home/scripts/bin/wrapped-pamixer diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/scripts/bin/wrapped-swww b/nixos/profiles/common/graphical/home/scripts/bin/wrapped-swww similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/scripts/bin/wrapped-swww rename to nixos/profiles/common/graphical/home/scripts/bin/wrapped-swww diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/scripts/default.nix b/nixos/profiles/common/graphical/home/scripts/default.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/scripts/default.nix rename to nixos/profiles/common/graphical/home/scripts/default.nix diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/theme.nix b/nixos/profiles/common/graphical/home/theme.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/theme.nix rename to nixos/profiles/common/graphical/home/theme.nix diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/wallpapers/default.nix b/nixos/profiles/common/graphical/home/wallpapers/default.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/wallpapers/default.nix rename to nixos/profiles/common/graphical/home/wallpapers/default.nix diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/wallpapers/wallpapers/Minato-Aqua-Dark.png b/nixos/profiles/common/graphical/home/wallpapers/wallpapers/Minato-Aqua-Dark.png similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/wallpapers/wallpapers/Minato-Aqua-Dark.png rename to nixos/profiles/common/graphical/home/wallpapers/wallpapers/Minato-Aqua-Dark.png diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/wallpapers/wallpapers/Minato-Aqua.png b/nixos/profiles/common/graphical/home/wallpapers/wallpapers/Minato-Aqua.png similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/wallpapers/wallpapers/Minato-Aqua.png rename to nixos/profiles/common/graphical/home/wallpapers/wallpapers/Minato-Aqua.png diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/wallpapers/wallpapers/unixcloud.jpg b/nixos/profiles/common/graphical/home/wallpapers/wallpapers/unixcloud.jpg similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/wallpapers/wallpapers/unixcloud.jpg rename to nixos/profiles/common/graphical/home/wallpapers/wallpapers/unixcloud.jpg diff --git a/users/guanranwang/nixos/profiles/common/graphical/home/xdg-mime.nix b/nixos/profiles/common/graphical/home/xdg-mime.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/graphical/home/xdg-mime.nix rename to nixos/profiles/common/graphical/home/xdg-mime.nix diff --git a/users/guanranwang/nixos/profiles/common/mobile/default.nix b/nixos/profiles/common/mobile/default.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/mobile/default.nix rename to nixos/profiles/common/mobile/default.nix diff --git a/users/guanranwang/nixos/profiles/common/mobile/home/default.nix b/nixos/profiles/common/mobile/home/default.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/mobile/home/default.nix rename to nixos/profiles/common/mobile/home/default.nix diff --git a/users/guanranwang/nixos/profiles/common/opt-in/_hysteria2-server.nix b/nixos/profiles/common/opt-in/_hysteria2-server.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/opt-in/_hysteria2-server.nix rename to nixos/profiles/common/opt-in/_hysteria2-server.nix diff --git a/users/guanranwang/nixos/profiles/common/opt-in/_juicity-server.nix b/nixos/profiles/common/opt-in/_juicity-server.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/opt-in/_juicity-server.nix rename to nixos/profiles/common/opt-in/_juicity-server.nix diff --git a/users/guanranwang/nixos/profiles/common/opt-in/clash-meta-client/config.yaml b/nixos/profiles/common/opt-in/clash-meta-client/config.yaml similarity index 100% rename from users/guanranwang/nixos/profiles/common/opt-in/clash-meta-client/config.yaml rename to nixos/profiles/common/opt-in/clash-meta-client/config.yaml diff --git a/users/guanranwang/nixos/profiles/common/opt-in/clash-meta-client/default.nix b/nixos/profiles/common/opt-in/clash-meta-client/default.nix similarity index 100% rename from users/guanranwang/nixos/profiles/common/opt-in/clash-meta-client/default.nix rename to nixos/profiles/common/opt-in/clash-meta-client/default.nix diff --git a/nixos/profiles/common/opt-in/gaming.nix b/nixos/profiles/common/opt-in/gaming/default.nix similarity index 91% rename from nixos/profiles/common/opt-in/gaming.nix rename to nixos/profiles/common/opt-in/gaming/default.nix index cdd51fc..0f151b8 100644 --- a/nixos/profiles/common/opt-in/gaming.nix +++ b/nixos/profiles/common/opt-in/gaming/default.nix @@ -4,6 +4,13 @@ config, ... }: { + ### home-manager + home-manager.users.guanranwang.imports = [./home]; + + ### for steam + # https://github.com/NixOS/nixpkgs/issues/47932 + hardware.opengl.driSupport32Bit = true; + myFlake.hardware.accessories.xboxOneController.enable = lib.mkDefault true; programs.gamemode = { diff --git a/users/guanranwang/nixos/profiles/common/opt-in/gaming/home/default.nix b/nixos/profiles/common/opt-in/gaming/home/default.nix similarity index 57% rename from users/guanranwang/nixos/profiles/common/opt-in/gaming/home/default.nix rename to nixos/profiles/common/opt-in/gaming/home/default.nix index a15ae85..ec8f9ec 100644 --- a/users/guanranwang/nixos/profiles/common/opt-in/gaming/home/default.nix +++ b/nixos/profiles/common/opt-in/gaming/home/default.nix @@ -1,5 +1,5 @@ {...}: { - imports = map (n: ../../../../../../home-manager/applications/${n}) [ + imports = map (n: ../../../../../../home/applications/${n}) [ "steam" "prismlauncher" "osu-lazer" diff --git a/users/guanranwang/darwin/profiles/common/opt-in/gaming/default.nix b/nixos/profiles/common/opt-in/torrenting/default.nix similarity index 100% rename from users/guanranwang/darwin/profiles/common/opt-in/gaming/default.nix rename to nixos/profiles/common/opt-in/torrenting/default.nix diff --git a/nixos/profiles/common/opt-in/torrenting/home/default.nix b/nixos/profiles/common/opt-in/torrenting/home/default.nix new file mode 100644 index 0000000..c02f3a9 --- /dev/null +++ b/nixos/profiles/common/opt-in/torrenting/home/default.nix @@ -0,0 +1,5 @@ +{...}: { + imports = [ + ../../../../../../home/applications/qbittorrent + ]; +} diff --git a/nixos/profiles/laptop/default.nix b/nixos/profiles/laptop/default.nix index e0618bf..31fc56e 100644 --- a/nixos/profiles/laptop/default.nix +++ b/nixos/profiles/laptop/default.nix @@ -3,5 +3,6 @@ ../common/core ../common/graphical ../common/physical + ../common/mobile ]; } diff --git a/users/guanranwang/secrets.yaml b/secrets.yaml similarity index 100% rename from users/guanranwang/secrets.yaml rename to secrets.yaml diff --git a/users/guanranwang/darwin/profiles/common/core/default.nix b/users/guanranwang/darwin/profiles/common/core/default.nix deleted file mode 100644 index 6a1441f..0000000 --- a/users/guanranwang/darwin/profiles/common/core/default.nix +++ /dev/null @@ -1,15 +0,0 @@ -{pkgs, ...}: { - users = { - knownUsers = ["guanranwang"]; - users."guanranwang" = { - createHome = true; - description = "Guanran Wang"; - home = "/Users/guanranwang"; - shell = pkgs.fish; - uid = 501; - }; - }; - - ### Options - home-manager.users.guanranwang = import ./home; -} diff --git a/users/guanranwang/darwin/profiles/common/opt-in/gaming/home/default.nix b/users/guanranwang/darwin/profiles/common/opt-in/gaming/home/default.nix deleted file mode 100644 index 0ba1cbe..0000000 --- a/users/guanranwang/darwin/profiles/common/opt-in/gaming/home/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - imports = [ - ../../../../../home-manager/applications/prismlauncher - ]; -} diff --git a/users/guanranwang/darwin/profiles/desktop/home/default.nix b/users/guanranwang/darwin/profiles/desktop/home/default.nix deleted file mode 100644 index e94603d..0000000 --- a/users/guanranwang/darwin/profiles/desktop/home/default.nix +++ /dev/null @@ -1,92 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - imports = map (n: ../../../../home-manager/applications/${n}) [ - # Terminal - "alacritty" - - # Shell - "fish" - "bash" - - # Editor - "helix" - "neovim" - "vscode" - - # Language - "nix" - "go" - - # Media - "mpv" - "spotify" - - # Misc - "telegram-desktop" - ]; - - home = { - activation = { - # Workaround for spotlight indexing - # https://github.com/nix-community/home-manager/issues/1341#issuecomment-1705731962_ - trampolineApps = let - apps = pkgs.buildEnv { - name = "home-manager-applications"; - paths = config.home.packages; - pathsToLink = "/Applications"; - }; - in - lib.hm.dag.entryAfter ["writeBoundary"] '' - toDir="$HOME/Applications/Home Manager Trampolines" - fromDir="${apps}/Applications/" - rm -rf "$toDir" - mkdir "$toDir" - ( - cd "$fromDir" - for app in *.app; do - /usr/bin/osacompile -o "$toDir/$app" -e 'do shell script "open '$fromDir/$app'"' - done - ) - ''; - setSystemProxy = let - networksetup = /usr/sbin/networksetup; - in - lib.hm.dag.entryAfter ["writeBoundary"] '' - ${networksetup} -setwebproxystate "Wi-fi" on - ${networksetup} -setwebproxy "Wi-fi" 127.0.0.1 7890 - ${networksetup} -setwebproxystate "Ethernet" on - ${networksetup} -setwebproxy "Ethernet" 127.0.0.1 7890 - ''; - }; - - packages = with pkgs; [ - ## GUI - ### Tools - keka # un-archive-r - iterm2 - ### Misc - element-desktop - ]; - }; - - # macOS don't have fontconfig - programs = let - monospace = "JetBrainsMono Nerd Font"; - in { - ### VSCode - vscode.userSettings.editor.fontFamily = monospace; - vscode.userSettings.terminal.external.osxExec = "Alacritty.app"; - - ### Alacritty - alacritty.settings.font = { - normal.family = monospace; - bold.family = monospace; - bold_italic.family = monospace; - italic.family = monospace; - }; - }; -} diff --git a/users/guanranwang/nixos/profiles/common/core/default.nix b/users/guanranwang/nixos/profiles/common/core/default.nix deleted file mode 100644 index a8b9b0f..0000000 --- a/users/guanranwang/nixos/profiles/common/core/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - pkgs, - config, - ... -}: { - users.users."guanranwang" = { - isNormalUser = true; - description = "Guanran Wang"; - extraGroups = [ - "wheel" # administrator - "networkmanager" # access to networkmanager - "tss" # access to tpm devices - "vboxusers" # access to virtualbox - "nix-access-tokens" # access to github tokens - "libvirtd" # access to virt-manager - ]; - hashedPasswordFile = config.sops.secrets."hashed-passwd".path; - shell = pkgs.fish; - packages = []; - }; - - programs.fish.enable = true; - users.groups."nix-access-tokens" = {}; - nix.extraOptions = "!include ${config.sops.secrets.nix-access-tokens.path}"; - - ### sops-nix - sops = { - defaultSopsFile = ../../../../secrets.yaml; - age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; - gnupg.sshKeyPaths = []; - secrets = { - "hashed-passwd" = { - neededForUsers = true; - }; - "nix-access-tokens" = { - group = config.users.groups."nix-access-tokens".name; - mode = "0440"; - }; - }; - }; - - ### home-manager - home-manager.users.guanranwang = import ./home; -} diff --git a/users/guanranwang/nixos/profiles/common/core/home/default.nix b/users/guanranwang/nixos/profiles/common/core/home/default.nix deleted file mode 100644 index 248eceb..0000000 --- a/users/guanranwang/nixos/profiles/common/core/home/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - imports = [ - ../../../../../home-manager - ../../../../../home-manager/applications/trashy - ]; -} diff --git a/users/guanranwang/nixos/profiles/common/graphical/default.nix b/users/guanranwang/nixos/profiles/common/graphical/default.nix deleted file mode 100644 index 7cfd885..0000000 --- a/users/guanranwang/nixos/profiles/common/graphical/default.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - ### Options - myFlake.boot.noLoaderMenu = lib.mkDefault true; - - ### sops-nix - sops.secrets."wireless/wangxiaobo".path = "/var/lib/iwd/wangxiaobo.psk"; - sops.secrets."wireless/OpenWrt".path = "/var/lib/iwd/OpenWrt.psk"; - - ### home-manager - home-manager.users.guanranwang = import ./home; - - fonts.enableDefaultPackages = false; - security.pam.services.swaylock = {}; - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = with pkgs; [xdg-desktop-portal-gtk]; - config = { - # from Arch Linux - # https://gitlab.archlinux.org/archlinux/packaging/packages/sway/-/blob/main/sway-portals.conf - sway = { - default = "gtk"; - "org.freedesktop.impl.portal.ScreenCast" = "wlr"; - "org.freedesktop.impl.portal.Screenshot" = "wlr"; - }; - }; - }; - services = { - gvfs.enable = true; - gnome = { - sushi.enable = true; - gnome-online-accounts.enable = true; - }; - }; - programs = { - kdeconnect = { - enable = true; - #package = pkgs.gnomeExtensions.gsconnect; - package = pkgs.valent; - }; - }; - services.xserver.libinput = { - touchpad = { - accelProfile = "flat"; - naturalScrolling = true; - middleEmulation = false; - }; - mouse = { - accelProfile = "flat"; - naturalScrolling = true; - middleEmulation = false; - }; - }; - - ### Removes debounce time - # https://www.reddit.com/r/linux_gaming/comments/ku6gth - environment.etc."libinput/local-overrides.quirks".text = '' - [Never Debounce] - MatchUdevType=mouse - ModelBouncingKeys=1 - ''; -} diff --git a/users/guanranwang/nixos/profiles/common/opt-in/gaming/default.nix b/users/guanranwang/nixos/profiles/common/opt-in/gaming/default.nix deleted file mode 100644 index fb90e23..0000000 --- a/users/guanranwang/nixos/profiles/common/opt-in/gaming/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - ### home-manager - home-manager.users.guanranwang.imports = [./home]; - - ### for steam - # https://github.com/NixOS/nixpkgs/issues/47932 - hardware.opengl.driSupport32Bit = true; -} diff --git a/users/guanranwang/nixos/profiles/common/opt-in/torrenting/default.nix b/users/guanranwang/nixos/profiles/common/opt-in/torrenting/default.nix deleted file mode 100644 index 534d82f..0000000 --- a/users/guanranwang/nixos/profiles/common/opt-in/torrenting/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ - ### home-manager - home-manager.users.guanranwang = import ./home; -} diff --git a/users/guanranwang/nixos/profiles/common/opt-in/torrenting/home/default.nix b/users/guanranwang/nixos/profiles/common/opt-in/torrenting/home/default.nix deleted file mode 100644 index cb3a063..0000000 --- a/users/guanranwang/nixos/profiles/common/opt-in/torrenting/home/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - imports = [ - ../../../../../../home-manager/applications/qbittorrent - ]; -} diff --git a/users/guanranwang/nixos/profiles/desktop/default.nix b/users/guanranwang/nixos/profiles/desktop/default.nix deleted file mode 100644 index 321c287..0000000 --- a/users/guanranwang/nixos/profiles/desktop/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - imports = [ - ../common/core - ../common/graphical - ]; -} diff --git a/users/guanranwang/nixos/profiles/laptop/default.nix b/users/guanranwang/nixos/profiles/laptop/default.nix deleted file mode 100644 index fbd7c26..0000000 --- a/users/guanranwang/nixos/profiles/laptop/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{...}: { - imports = [ - ../common/core - ../common/graphical - ../common/mobile - ]; -}