Custom NIX Home-Manager Modules For Personalized Setup

  Рет қаралды 7,567

Vimjoyer

Vimjoyer

8 ай бұрын

Discord server: / discord
Donations: ko-fi.com/vimjoyer
code from the video: github.com/vimjoyer/hm-module...
full monitor module by Misterio77: github.com/Misterio77/nix-con...

Пікірлер: 32
@izelnakri
@izelnakri 8 ай бұрын
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
@izelnakri
@izelnakri 8 ай бұрын
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.
@ImAnInsect
@ImAnInsect 8 ай бұрын
Love your videos ! Recently switched to nix and I'm completly lost so your channel helps a lot.
@patomackcodes4093
@patomackcodes4093 8 ай бұрын
Comically, I was just trying to do this and you released a video for it. Thank you!
@vaisakhkm783
@vaisakhkm783 8 ай бұрын
fr... i too yesterday trying to do the same...
@jaydelux2086
@jaydelux2086 8 ай бұрын
Really well done video 🚀 so clear and concise. Thank you.
@elpitbullhouse
@elpitbullhouse 8 ай бұрын
This is 🔥 !! Thank you!
@francoisrobbertze
@francoisrobbertze 8 ай бұрын
Brilliant!
@ggorg0
@ggorg0 8 ай бұрын
Switching to NixOS when I finally have time (high school...)!
@Aditya-ny8ur
@Aditya-ny8ur 8 ай бұрын
Common vimjoyer W :D
@hotdog2c
@hotdog2c 8 ай бұрын
can you do a video on running binaries with external dependencies?
@starving207
@starving207 8 ай бұрын
@minatonamikaze2637
@minatonamikaze2637 8 ай бұрын
can you make a video on how to add our own package to nixpkgs for public use?
@scottiecondon
@scottiecondon 8 ай бұрын
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?
@vimjoyer
@vimjoyer 8 ай бұрын
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.
@richardbennett4365
@richardbennett4365 8 ай бұрын
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.
@vimjoyer
@vimjoyer 8 ай бұрын
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
@richardbennett4365
@richardbennett4365 8 ай бұрын
​​@@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. 🙂
@richardbennett4365
@richardbennett4365 8 ай бұрын
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?
@vimjoyer
@vimjoyer 8 ай бұрын
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.
@aimpizza6823
@aimpizza6823 5 ай бұрын
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 :[
@braaitongs
@braaitongs 5 ай бұрын
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?
@vimjoyer
@vimjoyer 5 ай бұрын
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.
@braaitongs
@braaitongs 5 ай бұрын
That was the part I was missing. I found it evenutally was needed in the configuration.nix. @@vimjoyer
@Philopater-Phoneix
@Philopater-Phoneix 8 ай бұрын
make a video on the nix language syntax or just how to use it
@vimjoyer
@vimjoyer 8 ай бұрын
Sure will, that video idea is already on the list
@doozku450
@doozku450 8 ай бұрын
Good video! I was wondering if you could make a video about setting up some sort of terminal email client like neomutt using NixOS?
@vimjoyer
@vimjoyer 8 ай бұрын
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.
@doozku450
@doozku450 8 ай бұрын
@@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.
@prodiptushar6680
@prodiptushar6680 8 ай бұрын
please share how you make this kind of animated video
@vimjoyer
@vimjoyer 8 ай бұрын
this: motioncanvas.io/
@QWERD195
@QWERD195 8 ай бұрын
instalike, will watch later
Ultimate NixOS Guide | Flakes | Home-manager
15:30
Vimjoyer
Рет қаралды 117 М.
The ULTIMATE guide to Nixpkgs
7:43
IogaMaster
Рет қаралды 2,2 М.
I wish I could change THIS fast! 🤣
00:33
America's Got Talent
Рет қаралды 91 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 2,1 МЛН
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Nix and NeoVim
13:38
ThePrimeTime
Рет қаралды 121 М.
I was WRONG! This is the BEST Package Manager.
10:25
Chris Titus Tech
Рет қаралды 135 М.
Nix flakes explained
7:22
Vimjoyer
Рет қаралды 65 М.
Modularize NixOS and Home Manager | Great Practices
8:07
Vimjoyer
Рет қаралды 16 М.
Writing your own NixOS modules for fun and (hopefully) profit
23:25
All Systems Go!
Рет қаралды 10 М.
The standard library now has all you need for advanced routing in Go.
13:52
Nerding out about Nix and NixOS with Jon Seager, Canonical
57:05
Nerding Out With Viktor
Рет қаралды 6 М.
NixOS Has One BIG Problem
17:48
The Linux Cast
Рет қаралды 62 М.
HOW to REALLY learn NixOS
4:49
IogaMaster
Рет қаралды 40 М.
Ricing Linux Has Never Been Easier | NixOS + Stylix
6:19
Vimjoyer
Рет қаралды 16 М.
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,7 МЛН