diff --git a/users/guanranwang/home-manager/nixos/dotfiles.nix b/users/guanranwang/home-manager/nixos/dotfiles.nix deleted file mode 100644 index bedf4ad..0000000 --- a/users/guanranwang/home-manager/nixos/dotfiles.nix +++ /dev/null @@ -1,50 +0,0 @@ -{...}: let - homePath = ../resources/dotfiles; - binPath = ../resources/dotfiles/bin; - configPath = ../resources/dotfiles/config; - dataPath = ../resources/dotfiles/data; -in { - xdg.configFile = { - "fontconfig" = { - source = "${configPath}/fontconfig"; - recursive = true; - }; - #"picom" = { - # source = "${configPath}/picom"; - # recursive = true; - #}; - #"makepkgs.conf" = { - # source = "${configPath}/makepkgs.conf"; - #}; - #"alsoft.conf" = { - # source = "${configPath}/alsoft.conf"; - #}; - }; - - xdg.dataFile = { - "backgrounds" = { - source = "${dataPath}/backgrounds"; - recursive = true; - }; - #"flatpak" = { - # source = "${dataPath}/flatpak"; - # recursive = true; - #}; - }; - - home.sessionPath = ["$HOME/.local/bin"]; - home.file = { - ".local/bin" = { - source = "${binPath}"; - recursive = true; - }; - ".drirc" = { - source = "${homePath}/.drirc"; - recursive = true; - }; - ".xinitrc" = { - source = "${homePath}/.xinitrc"; - recursive = true; - }; - }; -} diff --git a/users/guanranwang/home-manager/nixos/fonts.nix b/users/guanranwang/home-manager/nixos/fonts.nix index 8a24a9f..dd34271 100644 --- a/users/guanranwang/home-manager/nixos/fonts.nix +++ b/users/guanranwang/home-manager/nixos/fonts.nix @@ -1,5 +1,9 @@ {pkgs, ...}: { fonts.fontconfig.enable = true; + xdg.configFile."fontconfig" = { + source = ../resources/dotfiles/config/fontconfig; + recursive = true; + }; home.packages = with pkgs; [ ### Sans inter diff --git a/users/guanranwang/home-manager/nixos/presets/desktop.nix b/users/guanranwang/home-manager/nixos/presets/desktop.nix index e09a88a..80b6c7d 100644 --- a/users/guanranwang/home-manager/nixos/presets/desktop.nix +++ b/users/guanranwang/home-manager/nixos/presets/desktop.nix @@ -16,7 +16,6 @@ ../xdg ../home.nix - ../dotfiles.nix ../fonts.nix ../i18n.nix ../spicetify.nix diff --git a/users/guanranwang/home-manager/resources/wm/bspwm.nix b/users/guanranwang/home-manager/resources/wm/bspwm.nix index d886b93..6309d8e 100644 --- a/users/guanranwang/home-manager/resources/wm/bspwm.nix +++ b/users/guanranwang/home-manager/resources/wm/bspwm.nix @@ -4,6 +4,8 @@ ./components/feh.nix ./components/picom.nix ./components/polybar.nix + ./components/rofi.nix + ./components/scripts.nix ./components/sxhkd.nix ./components/udiskie.nix ]; @@ -29,4 +31,11 @@ }; }; }; + + home.file = { + ".xinitrc" = { + source = "../dotfiles/.xinitrc"; + recursive = true; + }; + }; } diff --git a/users/guanranwang/home-manager/resources/wm/components/feh.nix b/users/guanranwang/home-manager/resources/wm/components/feh.nix index dccfbf4..32c9d1b 100644 --- a/users/guanranwang/home-manager/resources/wm/components/feh.nix +++ b/users/guanranwang/home-manager/resources/wm/components/feh.nix @@ -1,3 +1,4 @@ {pkgs, ...}: { + imports = [./wallpaper.nix]; home.packages = with pkgs; [feh]; } diff --git a/users/guanranwang/home-manager/resources/wm/components/scripts.nix b/users/guanranwang/home-manager/resources/wm/components/scripts.nix new file mode 100644 index 0000000..d9e0d98 --- /dev/null +++ b/users/guanranwang/home-manager/resources/wm/components/scripts.nix @@ -0,0 +1,9 @@ +{...}: { + home.sessionPath = ["$HOME/.local/bin"]; + home.file = { + ".local/bin" = { + source = ../../dotfiles/bin; + recursive = true; + }; + }; +} diff --git a/users/guanranwang/home-manager/resources/wm/components/swww.nix b/users/guanranwang/home-manager/resources/wm/components/swww.nix index 089d0e7..68f580d 100644 --- a/users/guanranwang/home-manager/resources/wm/components/swww.nix +++ b/users/guanranwang/home-manager/resources/wm/components/swww.nix @@ -1,3 +1,4 @@ {pkgs, ...}: { + imports = [./wallpaper.nix]; home.packages = with pkgs; [swww]; } diff --git a/users/guanranwang/home-manager/resources/wm/components/wallpaper.nix b/users/guanranwang/home-manager/resources/wm/components/wallpaper.nix new file mode 100644 index 0000000..b20f70f --- /dev/null +++ b/users/guanranwang/home-manager/resources/wm/components/wallpaper.nix @@ -0,0 +1,8 @@ +{...}: { + xdg.dataFile = { + "backgrounds" = { + source = ../../dotfiles/data/backgrounds; + recursive = true; + }; + }; +} diff --git a/users/guanranwang/home-manager/resources/wm/gnome.nix b/users/guanranwang/home-manager/resources/wm/gnome.nix index 0b15508..e34654a 100644 --- a/users/guanranwang/home-manager/resources/wm/gnome.nix +++ b/users/guanranwang/home-manager/resources/wm/gnome.nix @@ -1,5 +1,8 @@ # why is this placed in ./wm {pkgs, ...}: { + imports = [ + ./components/wallpaper.nix + ]; home.packages = with pkgs.gnomeExtensions; [ # GNOME extensions arcmenu diff --git a/users/guanranwang/home-manager/resources/wm/hyprland.nix b/users/guanranwang/home-manager/resources/wm/hyprland.nix index ccc4568..608dbc2 100644 --- a/users/guanranwang/home-manager/resources/wm/hyprland.nix +++ b/users/guanranwang/home-manager/resources/wm/hyprland.nix @@ -6,6 +6,7 @@ imports = [ ./components/dunst.nix ./components/rofi.nix + ./components/scripts.nix ./components/swayidle.nix ./components/swaylock.nix ./components/swww.nix diff --git a/users/guanranwang/home-manager/resources/wm/sway.nix b/users/guanranwang/home-manager/resources/wm/sway.nix index e453109..ca54ef5 100644 --- a/users/guanranwang/home-manager/resources/wm/sway.nix +++ b/users/guanranwang/home-manager/resources/wm/sway.nix @@ -7,9 +7,11 @@ imports = [ ./components/dunst.nix ./components/rofi.nix + ./components/scripts.nix ./components/swayidle.nix ./components/swaylock.nix ./components/udiskie.nix + ./components/wallpaper.nix ./components/waybar.nix ];