A video covering home-manager lib functions(and how to extend them) next would be very useful, by perhaps using an existing flake that extends the lib as an example. I'll look into this as home-manager missed lib.nixGL wrapper which seems to be essential for non-nixOS systems running packages like alacritty, Hyprland, GNOME etc. Btw, ironbar seems to be the best compared to waybar and eww already :P
Also I'd love to run GNOME on a non-nixOS system(for my arch computer, samsung z fold 5 or viture XR neckband) via home-manager afterwards. Seems particularly complicated. I got "$ dbus-run-session -- gnome-shell --display-server --wayland" running but it misses many things including files/folders, default applications etc.
Another thing that confuses me is rofi and rofi-unwrapped and the corresponding rofi-wayland and rofi-wayland-unwrapped. These packages seem to install programs with the same names, namely rofi, rofi-theme-selector, and rofi-sensible-terminal. Would this mean that NixOS could not install both rofi and rofi-wayland, for example, for the case a user would want to switch between a Wayland session and an X11 session? It seems the trend for Gnome and KDE is to move away from X11 and move to Wayland, and true, I would like to use waybar, but it seems there's a reason why I am on X11. I feel there must be some program or application I am using that requires X11. It seems like it must be possible with Home Manager to set up a test--- IF session = Wayland, THEN load Wayland-specific environment and load Wayland-specific packages ELSE # session is X11 load X11 environment and X11-specific packages Is it too difficult to master, or is this easy to do, Sir?
It's extremely easy to conditionally add packages with home-manager or NixOS. Just create a module that exposes a bool option for you, and then use lib.mkIf with packages to add one or the other. Another way is to use NixOS specialisations, and get multiple slightly different variants of your system get added to your version history on every rebuild.
On the topic of multi monitor support, what would be the best way to define different monitors for different machines while still keeping the rest of the hyprland config the same without just copying and pasting to create different hyprland configs? In a similar vein, for wallpapers, what would be the best way to define different wallpapers dependent on what monitors are available? Say for a 1440p monitor have one wallpaper and for 1080p monitors have a different one?
Create a main home-manager module that will contain all of your other modules that you want to import on all machines. Then, make multiple 'home.nix' files, such as 'laptop.nix' and 'workmachine.nix'. Import the main module in both of those files and add them to your flake. This way, you will have two files with little to no differences, except for your wallpapers and monitors, for example. All other hyprland preferences will still be in the main nix file or one of its imports.
There's a stylistic set of iosevka available. I want to use ss08 stylistic set. I'm trying to follow your instructions perhaps from another video on how to import a package not available in the nix store (repository). I understand how to find the sha256 string for the package. I just need to get it done.
There are many ways to fetch something: 1.Use nix-prefetch to get the sha hash. 2. Let it run with any random hash, and nix will fail and give you the correct one. 3. Let flakes fetch the source and manage the hash for you. and some more
@@vimjoyeryes, I can fetch it. I just need to decide whether to install it for all users or use home manager for a user-by-user case basis. I think I'd like it available for all users, so I'll put the code into /etc/nixos/configuration.nix or have that file import the module from a separate file. By the way, I'd like to pass you a compliment that I hope passes from my mouth to God's ears. Your teaching style is perfect for me. You go fast and don't treat us as elementary users, but as intelligent people. Well, that didn't come out very elegant, but your teaching style meshes well with my teaching and learning styles. You also have an amazing, soothing voice I can listen to for hours. 🙂
For me there are two issues: 1. rebuild complains about config being undefined 2. swww daemon would need to be initiated first, right? I solved this by putting '/path/to/swww init && ...' before setting the wallpaper but for now, the path only works hardcoded :[
I personally don't use any terminal email clients, but I know that home-manager includes a very nice way to configure neomutt by default. I'll think about it. Nice PFP btw.
@@vimjoyer ty so much king, if you don't use any terminal email clients, then what email client do you use? I used to use mu4e emacs before I switched over to NixOS and decided to go full vim and terminal for text editing, but the one thing I miss from emacs is that sweet email client that I could navigate utilizing just the keyboard.
Mabye you can help me. I made a home.nix file in /etx/nixos and then imported into my configuration.nix. But When I try nixos-rebuild switch, it give me an error that says : The option 'home' does not exist. In the home.nix. I specify to enable the home-manager and also specify some home.packages [ ]. What am I missing?
A video covering home-manager lib functions(and how to extend them) next would be very useful, by perhaps using an existing flake that extends the lib as an example. I'll look into this as home-manager missed lib.nixGL wrapper which seems to be essential for non-nixOS systems running packages like alacritty, Hyprland, GNOME etc. Btw, ironbar seems to be the best compared to waybar and eww already :P
Also I'd love to run GNOME on a non-nixOS system(for my arch computer, samsung z fold 5 or viture XR neckband) via home-manager afterwards. Seems particularly complicated. I got "$ dbus-run-session -- gnome-shell --display-server --wayland" running but it misses many things including files/folders, default applications etc.
Comically, I was just trying to do this and you released a video for it. Thank you!
fr... i too yesterday trying to do the same...
Love your videos ! Recently switched to nix and I'm completly lost so your channel helps a lot.
Switching to NixOS when I finally have time (high school...)!
Really well done video 🚀 so clear and concise. Thank you.
This is 🔥 !! Thank you!
Brilliant!
can you do a video on running binaries with external dependencies?
make a video on the nix language syntax or just how to use it
Sure will, that video idea is already on the list
Another thing that confuses me is rofi and rofi-unwrapped and the corresponding rofi-wayland and rofi-wayland-unwrapped. These packages seem to install programs with the same names, namely rofi, rofi-theme-selector, and rofi-sensible-terminal.
Would this mean that NixOS could not install both rofi and rofi-wayland, for example, for the case a user would want to switch between a Wayland session and an X11 session?
It seems the trend for Gnome and KDE is to move away from X11 and move to Wayland, and true, I would like to use waybar, but it seems there's a reason why I am on X11. I feel there must be some program or application I am using that requires X11.
It seems like it must be possible with Home Manager to set up a test---
IF session = Wayland, THEN
load Wayland-specific environment and load Wayland-specific packages
ELSE # session is X11
load X11 environment and X11-specific packages
Is it too difficult to master, or is this easy to do, Sir?
It's extremely easy to conditionally add packages with home-manager or NixOS. Just create a module that exposes a bool option for you, and then use lib.mkIf with packages to add one or the other. Another way is to use NixOS specialisations, and get multiple slightly different variants of your system get added to your version history on every rebuild.
On the topic of multi monitor support, what would be the best way to define different monitors for different machines while still keeping the rest of the hyprland config the same without just copying and pasting to create different hyprland configs? In a similar vein, for wallpapers, what would be the best way to define different wallpapers dependent on what monitors are available? Say for a 1440p monitor have one wallpaper and for 1080p monitors have a different one?
Create a main home-manager module that will contain all of your other modules that you want to import on all machines. Then, make multiple 'home.nix' files, such as 'laptop.nix' and 'workmachine.nix'. Import the main module in both of those files and add them to your flake. This way, you will have two files with little to no differences, except for your wallpapers and monitors, for example. All other hyprland preferences will still be in the main nix file or one of its imports.
There's a stylistic set of iosevka available. I want to use ss08 stylistic set. I'm trying to follow your instructions perhaps from another video on how to import a package not available in the nix store (repository). I understand how to find the sha256 string for the package. I just need to get it done.
There are many ways to fetch something:
1.Use nix-prefetch to get the sha hash.
2. Let it run with any random hash, and nix will fail and give you the correct one.
3. Let flakes fetch the source and manage the hash for you.
and some more
@@vimjoyeryes, I can fetch it. I just need to decide whether to install it for all users or use home manager for a user-by-user case basis. I think I'd like it available for all users, so I'll put the code into /etc/nixos/configuration.nix or have that file import the module from a separate file.
By the way, I'd like to pass you a compliment that I hope passes from my mouth to God's ears. Your teaching style is perfect for me. You go fast and don't treat us as elementary users, but as intelligent people. Well, that didn't come out very elegant, but your teaching style meshes well with my teaching and learning styles. You also have an amazing, soothing voice I can listen to for hours. 🙂
can you make a video on how to add our own package to nixpkgs for public use?
For me there are two issues:
1. rebuild complains about config being undefined
2. swww daemon would need to be initiated first, right? I solved this by putting '/path/to/swww init && ...' before setting the wallpaper
but for now, the path only works hardcoded :[
Good video! I was wondering if you could make a video about setting up some sort of terminal email client like neomutt using NixOS?
I personally don't use any terminal email clients, but I know that home-manager includes a very nice way to configure neomutt by default. I'll think about it.
Nice PFP btw.
@@vimjoyer ty so much king, if you don't use any terminal email clients, then what email client do you use? I used to use mu4e emacs before I switched over to NixOS and decided to go full vim and terminal for text editing, but the one thing I miss from emacs is that sweet email client that I could navigate utilizing just the keyboard.
Mabye you can help me. I made a home.nix file in /etx/nixos and then imported into my configuration.nix. But When I try nixos-rebuild switch, it give me an error that says : The option 'home' does not exist. In the home.nix. I specify to enable the home-manager and also specify some home.packages [ ]. What am I missing?
The option home does not exist because you have to import home-manager nixos module. You can do it with a flake or with channels.
That was the part I was missing. I found it evenutally was needed in the configuration.nix. @@vimjoyer
please share how you make this kind of animated video
this: motioncanvas.io/
instalike, will watch later
Common vimjoyer W :D