diff --git a/common/variables.nix b/common/variables.nix index 58b1ed1..a890e3a 100644 --- a/common/variables.nix +++ b/common/variables.nix @@ -22,7 +22,7 @@ myUserName = "stvnliu"; myHostName = "nixos-msi"; displayScale = 1; - myWallPaperPathString = "/home/${myUserName}/wallpaper.png"; + myWallPaperPathString = "/home/${myUserName}/wallpaper.jpg"; myDisplayName = "Zhongheng Liu"; myEmail = "z.liu@outlook.com.gr"; myAutostartCommands = [ diff --git a/flake.nix b/flake.nix index 017a9b9..44e241e 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,10 @@ home-manager.inputs.nixpkgs.follows = "nixpkgs"; stylix.url = "github:danth/stylix"; + spicetify-nix = { + url = "github:Gerg-L/spicetify-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { @@ -20,6 +24,7 @@ nixpkgs, home-manager, stylix, + spicetify-nix, ... } @ inputs: let inherit (self) outputs; @@ -47,6 +52,7 @@ ./home-manager/${stevenUserName}/home.nix inputs.nixvim.homeManagerModules.nixvim inputs.stylix.homeManagerModules.stylix + inputs.spicetify-nix.homeManagerModules.default ]; }; }; diff --git a/home-manager/stvnliu/assets/nixos-wallpaper.jpg b/home-manager/stvnliu/assets/nixos-wallpaper.jpg index 46975c2..96fa2f4 100644 Binary files a/home-manager/stvnliu/assets/nixos-wallpaper.jpg and b/home-manager/stvnliu/assets/nixos-wallpaper.jpg differ diff --git a/home-manager/stvnliu/home.nix b/home-manager/stvnliu/home.nix index 607c4b1..03bd842 100644 --- a/home-manager/stvnliu/home.nix +++ b/home-manager/stvnliu/home.nix @@ -24,6 +24,8 @@ ./ags ./xdg.nix ./stylix.nix + ./spicetify.nix + ./scripts ]; nixpkgs = { @@ -57,7 +59,7 @@ username = "${config.myUserName}"; homeDirectory = "/home/${config.myUserName}"; # copy wallpaper from assets - file = {"wallpaper.png".source = ./assets/gruvbox-wallpaper.png;}; + file = {"wallpaper.jpg".source = ./assets/nixos-wallpaper.jpg;}; }; home.packages = with pkgs; [ protonvpn-gui @@ -91,6 +93,10 @@ ]; programs = { + obs-studio = { + enable = true; + plugins = [pkgs.obs-studio-plugins.wlrobs]; + }; home-manager.enable = true; firefox.enable = true; thunderbird = { diff --git a/home-manager/stvnliu/hypr/hyprland.nix b/home-manager/stvnliu/hypr/hyprland.nix index 7b4e5fd..b9af76a 100644 --- a/home-manager/stvnliu/hypr/hyprland.nix +++ b/home-manager/stvnliu/hypr/hyprland.nix @@ -38,8 +38,12 @@ # Example volume button that will activate even while an input inhibitor is active ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" ]; - bind = + bind = let + terminalCmd = "${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=12' -o colors.alpha=0.85 ${config.myShells.defaultShell}"; + in [ + "$mod SHIFT, L, exec, ${pkgs.hyprlock}/bin/hyprlock --immediate" + ", Print, exec, ${pkgs.grimblast}/bin/grimblast copy area" # special workspace keybinds @@ -54,7 +58,14 @@ "$mod, F, exec, ${pkgs.firefox}/bin/firefox" "$mod, E, exec, ${pkgs.pcmanfm}/bin/pcmanfm" # foot terminal - "$mod, Return, exec, ${pkgs.foot}/bin/foot -f 'BlexMono Nerd Font:size=12' -o colors.alpha=0.85 ${config.myShells.defaultShell}" + "$mod, Return, exec, ${terminalCmd}" + "$mod SHIFT, Return, exec, [float] ${terminalCmd}" + + # vimkeys navigation + "$mod, H, movefocus, l" + "$mod, J, movefocus, d" + "$mod, K, movefocus, u" + "$mod, L, movefocus, r" ] ++ ( # workspaces diff --git a/home-manager/stvnliu/scripts/default.nix b/home-manager/stvnliu/scripts/default.nix new file mode 100644 index 0000000..f51f039 --- /dev/null +++ b/home-manager/stvnliu/scripts/default.nix @@ -0,0 +1,7 @@ +{ + config, + pkgs, + ... +}: { + home.packages = [(import ./heic-to-jpg.script.nix {inherit pkgs;})]; +} diff --git a/home-manager/stvnliu/scripts/heic-to-jpg.script.nix b/home-manager/stvnliu/scripts/heic-to-jpg.script.nix new file mode 100644 index 0000000..c247474 --- /dev/null +++ b/home-manager/stvnliu/scripts/heic-to-jpg.script.nix @@ -0,0 +1,5 @@ +{pkgs}: +pkgs.writeShellScriptBin "heic-to-jpg" '' + mkdir -p ./heic-to-jpg-out + ${pkgs.findutils}/bin/find . -type f -print0 | ${pkgs.findutils}/bin/xargs -0 -I "{}" ${pkgs.imagemagick}/bin/magick "{}" -quality 100% ./jpg-out/"{}.conv.jpg" +'' diff --git a/home-manager/stvnliu/spicetify.nix b/home-manager/stvnliu/spicetify.nix new file mode 100644 index 0000000..d8b2d9b --- /dev/null +++ b/home-manager/stvnliu/spicetify.nix @@ -0,0 +1,26 @@ +{ + pkgs, + lib, + inputs, + ... +}: let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; +in { + # allow spotify to be installed if you don't have unfree enabled already + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "spotify" + ]; + programs.spicetify = { + enable = true; + theme = spicePkgs.themes.onepunch; + colorScheme = "Dark"; + + enabledExtensions = with spicePkgs.extensions; [ + adblock + fullAppDisplay + shuffle # shuffle+ (special characters are sanitized out of ext names) + hidePodcasts + ]; + }; +} diff --git a/home-manager/stvnliu/stylix.nix b/home-manager/stvnliu/stylix.nix index e5c6c67..f672668 100644 --- a/home-manager/stvnliu/stylix.nix +++ b/home-manager/stvnliu/stylix.nix @@ -2,7 +2,7 @@ stylix = { enable = true; base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml"; - image = ./assets/gruvbox-wallpaper.png; + image = ./assets/nixos-wallpaper.jpg; fonts = { sansSerif = { name = "Aileron";