We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

An Introduction to Guix Home

00:00

Formal Metadata

Title
An Introduction to Guix Home
Subtitle
Declarative $HOME configuration with Scheme!
Title of Series
Number of Parts
542
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Guix Home is an exciting new feature of GNU Guix that enables you to apply the same functional configuration style you enjoy from Guix System to your own home directory! If you've ever wondered how to manage your dotfiles with Guix, this is the tool for you. It even works on all Guix-supported GNU/Linux distributions! In this talk, I'll explain how it works and how you can get started with it without fear of breaking your $HOME directory. In this talk, I'll show you how to use the guix home subcommand of Guix for user-level configuration management. We'll discuss how to create an initial configuration, tweak it to taste, and how to find additional "home services" you can use. If we have time, I will briefly discuss how to write your own home services!
Gamma functionInstallation artView (database)Color managementTask (computing)Configuration spaceDeclarative programmingFile formatDistribution (mathematics)EmailSynchronizationRing (mathematics)Physical systemSet (mathematics)Distribution (mathematics)Virtual machineComputer fontSynchronizationWeb serviceConfiguration spaceConfiguration managementMultiplication signComputer programmingComputer fileElectronic mailing listMultiplicationStructural loadDifferent (Kate Ryan album)YouTubeService (economics)Repository (publishing)WebsiteMathematicsDemo (music)Cartesian coordinate systemNumberNumbering schemeVideoconferencingData managementFile formatInsertion lossTheory of relativityLink (knot theory)SoftwareFunctional (mathematics)Declarative programmingWeb pageHome pageCASE <Informatik>Electric generatorMereologyRevision controlSheaf (mathematics)Level (video gaming)Rollback (data management)QuicksortSoftware developerWhiteboardGastropod shellScripting languageDirectory serviceCodePower (physics)Axiom of choiceKnowledge-based configurationFigurate numberRoboticsShared memoryProcess (computing)Decision theoryProjective planeInstance (computer science)Slide ruleDialectInstallation artIntegrated development environmentWordLimit (category theory)Point (geometry)Cycle (graph theory)Medical imagingEndliche ModelltheorieSound effect
Configuration spaceGEDCOMConfiguration managementIntegrated development environmentService (economics)Numbering schemeBuffer solutionComputer fileDemo (music)Game theoryData buffer19 (number)Local ringConfiguration spaceProfil (magazine)Different (Kate Ryan album)Electronic mailing listMereologyComputer fileVirtual machineLoginType theoryService (economics)Field (computer science)Computer programmingSheaf (mathematics)Web serviceDistribution (mathematics)Escape characterLine (geometry)AliasingInstallation artConfiguration managementDefault (computer science)DemonNumberNumbering schemeIntegrated development environmentCombinational logicControl flowQuicksortExpressionNormal (geometry)CodeMobile appDirectory serviceModule (mathematics)ImplementationInstance (computer science)Revision controlEndliche ModelltheorieCASE <Informatik>DemosceneSuite (music)Figurate numberPatch (Unix)Machine visionExistenceLocal ringPosition operatorMaxima and minimaBitGoodness of fitComputer animation
Configuration spaceComputer programmingVirtual machineIntegrated development environmentComputer fileConfiguration spaceHydraulic jumpGastropod shellConfidence intervalMoment (mathematics)
Demo (music)GEDCOMConfiguration spaceGamma functionDirectory serviceScripting languageKeyboard shortcutWeb browserRun time (program lifecycle phase)Variable (mathematics)LoginMaizeTotal S.A.Game theoryComputer fileBuffer solutionFundamental theorem of algebraGastropod shellComputer iconWorld Wide Web ConsortiumSigma-algebraComputer fileComputer programmingQuicksortData storage deviceUniform resource locatorComputer fontBuildingLoginLink (knot theory)NumberConfiguration spaceFunction (mathematics)Hash functionMereologyInstallation artDerivation (linguistics)Data managementProfil (magazine)Configuration managementDirectory serviceRevision controlProcess (computing)BitVideoconferencingPhysical systemElectronic mailing listAliasingGastropod shellContent (media)MathematicsFunctional (mathematics)Line (geometry)Different (Kate Ryan album)Machine visionMilitary baseMaxima and minimaGame controllerIntegrated development environmentDisk read-and-write headFigurate numberGraph coloringPhysical lawGod
Integrated development environmentHydraulic jumpComputer fileMultiplication signVirtual machineConfiguration spaceProfil (magazine)InformationScaling (geometry)Directory servicePoint (geometry)Relief
LoginUser profileDemo (music)Gamma functionStapeldateiConfiguration managementMultiplication signData storage deviceComputer fileProfil (magazine)Configuration spaceLoginIntegrated development environmentDigital photographyMedical imagingSource code
StapeldateiBackupComputer fileConfiguration spaceDirectory serviceMultiplication sign
RootDemonBackupUser profileWeb browserDemo (music)Directory serviceTimestampConfiguration spaceProfil (magazine)Computer filePhysical systemFigurate numberCASE <Informatik>System callControl flowStapeldateiBackupComputer animation
Configuration spaceMoving averageElectric generatorDisk read-and-write headMathematicsPoint (geometry)Latent heatNumberMultiplication signElectronic mailing listDifferent (Kate Ryan album)Rollback (data management)
Data typeBackupGamma functionUser profileDemo (music)Electronic mailing listGastropod shellElectric generatorElectronic mailing listSingle-precision floating-point formatMathematicsIntegrated development environmentType theoryRollback (data management)Negative numberComputer fileMultiplication signVariable (mathematics)Configuration spaceProfil (magazine)Network topologyMoving averageSource codeComputer animation
Integrated development environmentVariable (mathematics)Model-driven engineeringStapeldateiField (computer science)Web serviceMereologyType theoryKey (cryptography)Associative propertyIntegrated development environmentVariable (mathematics)AliasingConfiguration spaceMathematicsProfil (magazine)Electronic mailing listHydraulic jumpFigurate numberCompass (drafting)Expected value
Numbering schemeComputer fileBuffer solutionWeb serviceConfiguration spaceDemo (music)Graphical user interfaceInteractive televisionUser profileVariable (mathematics)LoginIntegrated development environmentPairwise comparisonSource codeInstallation artRollback (data management)Text editorClient (computing)Profil (magazine)Computer fileIntegrated development environmentVariable (mathematics)Electronic mailing listStructural loadMathematicsElectric generatorType theoryVideo game consoleConfiguration spaceHydraulic jumpLoginGastropod shellStapeldateiECosPhysical lawMoment (mathematics)Service (economics)Process (computing)Instance (computer science)Computer-assisted translationFigurate numberMaxima and minimaPower (physics)Source code
Gastropod shellVariable (mathematics)User profileInteractive televisionSource codeDemo (music)Integrated development environmentService (economics)Integrated development environmentType theoryGastropod shell
User profileLoginVariable (mathematics)Game theoryCloud computingGamma functionNormed vector spaceColor managementWorld Wide Web ConsortiumGraph coloringComputer programmingElectronic visual displayService (economics)Cartesian coordinate systemBus (computing)CodeCloningUniform resource locatorSource codeComputer animation
Extension (kinesiology)User profileGame theoryIntegrated development environmentDemo (music)Group actionMachine visionDefault (computer science)Configuration spaceWeb serviceConstructor (object-oriented programming)Gamma functionService (economics)IntegerString (computer science)WebsiteGEDCOMSymbol tableWeb 2.0Computer fileNumbering schemeBuffer solutionLemma (mathematics)InformationGastropod shellMessage passingPairwise comparisonInstallation artComputer programmingMathematicsMereologyUniform resource locatorWeb serviceModule (mathematics)Type theoryInternet service providerComputer fileString (computer science)Multiplication signGraph coloringInformationExtension (kinesiology)Configuration spaceService (economics)Numbering schemeGastropod shellDefault (computer science)LoginPhysical systemElectronic mailing listField (computer science)Profil (magazine)Data managementProcess (computing)VideoconferencingVariable (mathematics)RootkitSelf-organizationState of matterForestBitRight angleEndliche ModelltheorieRange (statistics)Source codeComputer animation
Boom (sailing)InformationSet (mathematics)Physical systemVideoconferencingService (economics)Computer programmingYouTubeHacker (term)Sheaf (mathematics)Numbering scheme
Greatest elementMultiplication signProgram flowchartMeeting/Interview
Virtual machineRepository (publishing)Configuration managementConfiguration spaceComputer fileMultiplication signMeeting/Interview
Meeting/Interview
Computer animation
Program flowchart
Transcript: English(auto-generated)
What's up, Fosm in 2023? I'm David Wilson from the System Crappers YouTube channel, and I'm here today to give a talk called An Introduction to Geeks Home. Here's some links where you can find me online. Definitely subscribe to the System Crappers channel on YouTube or Odyssey if you're interested in learning more about GNU Geeks,
GNU Emacs, and other related tools, especially if you're interested to learn more about Geeks Home because I will be making more videos about it this year. And definitely check me out on the Fediverse. I'm on fosadon.org at Davey Will. So in this talk, I'm gonna show you how to manage your user-level configuration, often called your dot files, in Scheme using a futuristic package manager
and system configuration tool called GNU Geeks. So when you start to care more about configuration, the applications that you use for projects or for your day-to-day work, you inevitably have to find a way to store those configuration files so that, number one, you don't lose them, and number two, you can use them on more than one machine or after perhaps you have to do a reinstallation
because your machine got destroyed somehow or whatever. It tends to happen. So it's pretty common for people to use tools to sync their configuration files across machines like Git or some other file synchronization tool and then place those files in their home directory using Gnusto or maybe even a bespoke shell script. But there are some subtle problems with this approach.
First of all, how do you reliably install the software that your configuration depends on? There's probably a number of tools that you need to be installed before you can actually start using your configuration. So maybe you have a shell script that sets those things up, but then what happens if you start using your systems package manager to install more programs and then you forget to add those to your installation script?
The next time you have to install your config somewhere else, you just forget which programs you ever had installed to begin with. Definitely something I've had happen before. Also, how do you customize your configuration files for each of the machines that you use without it all becoming a mess? One thing that I've run into many times is that if I do have my .file stored in a Git repository, maybe on each of the machines I use,
I have subtle tweaks, like maybe font settings or DPI settings that I have locally that I never check in because there's not a good way to delineate those settings between different machines. So that does become a problem whenever you have multiple machines sharing the same .files repository or shared configuration. Also, how do you fix your configuration
after syncing a broken or half-committed change? So maybe you are in the middle of making some major changes to your configuration and then you sync it to another machine and then you start using it and you realize that either your Emacs configuration doesn't load all the way or maybe your shell doesn't work right anymore, things like that. How do you fix that whenever it happens?
Definitely something that you have to consider while sharing your configuration on multiple machines. So I'm here to tell you today that Geeks is the answer to this problem. Yes, I can say that, blanket across the board. I'm being a little bit sarcastic. So if it's your first time hearing about Geeks or perhaps you haven't experimented with it yet, here's a quick primer.
Geeks is a functional package manager and declarative system configuration tool written with Guile's scheme. That probably sounds a little bit vague or maybe not too easy to understand. So more plainly, Geeks manages the installation and configuration of the software that you use in a highly repeatable and resilient way.
First of all, both the software that you install and your configuration is installed in a transactional way, which means no broken half upgrades. Whenever Geeks installs an update to your configuration on your machine, it builds it all and only applies it whenever it knows that the build of the configuration is successful and all the applications can be installed successfully,
which is great because it means that you don't have a half upgraded program or maybe your configuration files, if they're not gonna be applied correctly, then at least they won't get written out to your system. Also, every update that you make to your configuration is remembered and you can roll back. So whenever you install updates to your configuration with Geeks,
they are installed as something called generations where each time you update your configuration, the previous configuration you have is still saved so that in case of any problems, you can always roll back to it very easily with a single command at the command line, which is really, really helpful. It's saved me a number of times. So when you use Geeks to manage your system or user level configuration,
you write the configuration as scheme code using a declarative format. In other words, you declare what your system should look like and then Geeks makes it so. It's really nice to have this capability because it means that your configuration becomes pretty readable because it's code, but it also looks like a document, but you can also use the power of scheme to automate some certain parts of your config
where you need to. So if you're a LISP enthusiast like I am, it's really cool to be able to use scheme to configure your system. So you can gain these benefits either by installing Geeks on your Linux distribution of choice or by using the Geeks system distribution to manage your entire machine. But for the purpose of learning Geeks or Geeks Home,
I would definitely recommend installing it on your existing Linux distribution before you try to jump into installing the full Geeks system because it can be quite challenging. However, I do have a video on the System Crappers YouTube channel that goes through the entire process, both for installing Geeks to package manager and the entire system. So if you want to learn more about that, definitely check out the videos that I made for those.
So you can learn more about Geeks by reading the reference manual, which is really good and really thorough, and the official website for the project. I've also made a number of videos about Geeks on my channel. So if you want the links to the homepage and reference manual, they're here in the slides, which will be available on the page for this talk, and also the link to my playlist
for the Geeks videos that I've made so far. I think I've made about five or six videos. So there's a lot of useful stuff in there in case you've never tried Geeks yet. So let's talk about Geeks Home. Geeks Home is the feature of Geeks which enables you to apply a complete configuration to your home folder for managing your user-level programs and services.
For instance, it enables you to configure important things like your shell, whether you use Bash or Z Shell, maybe Fish, programs that you use regularly, like maybe Emacs or other things for maybe your desktop environment, and also background services like Sync Things or many other programs that maybe you want to run as a user-level service,
not a system-level service. Maybe it's something that's only useful for you as a user. It's much more powerful than other dot files management programs like Shamwah, RCM, or Yadom because it also installs the software that you need for your configuration because it knows which packages are needed for the different parts of your configuration that you're using. And it also enables you to easily roll back
to previous working configurations, which is a big deal whenever you're sharing your configuration across multiple machines. There's always a chance that something can go wrong, or maybe if you install a newer version of a program, even programs you install can be rolled back to previous versions. So there's lots of ways where this rollback functionality can really help you whenever you're trying to manage your system with Geeks. So you can find the documentation
for Geeks Home specifically in the Geeks Reference Manual at this link. Geeks Home actually is a new feature of Geeks that just got released as part of Geeks 1.4, which maybe was like a month ago that that came out. But it's always evolving, so this is a link to the standard manual, but you would probably
also wanna take a look at the development manual as well for the latest details on configuring Geeks Home. So, to get started with Geeks Home, the first thing you need to do is install Geeks. And like I mentioned before, I have a couple videos that explain to you how to install Geeks. Definitely check out either of these to get started.
The installing Geeks in your Linux distribution is kind of the one you probably should use if you've never used Geeks before because it will allow you to just install the Geeks command in your existing distro and the demo I'll do today is actually using Geeks inside of Ubuntu. So that is certainly one way to do that. And you can easily get started with Geeks Home
by generating a home configuration from your existing home folder with the following command, Geeks Home import and then a folder path where it will write out this new home configuration for you. So, what it will do is take a look at your home folder and if it notices that you're using Bash
as your primary shell, it will take all of your sort of Bash configuration files and take a look at them and then create a section in your Geeks Home config based on that. It also, if you've already been using Geeks to install packages on your machine, it will take a look at all the installed packages that you have and then put them together into a list in your home configuration. At the end, which is running,
I believe this is Ubuntu 22.04 and I've already installed Geeks. It's actually kind of nice and Ubuntu 22 and also the latest versions of Debian, I think Debian Bullseye. You can install Geeks from the app repository, so this is another easy way to get Geeks installed. But I have Geeks installed here, so what I'm gonna do is run Geeks, if I can type, Geeks Home import,
home-configuration or home config, let's put it that way. And it's really quickly just looked over my home folder, my Geeks profile, and created a configuration file for me. So I'm gonna pull up Emacs so we can take a look at what it created. In fact, let's just look at the folder first, so home-config.
Let's do lsal because I know there's some other files in here. So in this folder, what it actually did is it copied the Bash logout and Bashrc files that were installed originally by Ubuntu in my home folder and then it also created this home-configuration file. So now I can use Emacs and W and then look at the home-config
slash home-configuration.scm file. So like I said before, this is all written in scheme and this is normal Guile scheme code. If you've never looked at Guile before, it's a very nice scheme of implementation. So this Use Module section just pulls in the relevant modules from Geeks that we need for writing our home-config. And then we have this one
home environment expression at the top. This is a special syntax provided by Geeks which lets you describe your home environment which would be applied to your home folder. It's made out of, or I guess the two constituent parts are the, wow, I keep hitting escape because of my configuration that I'm used to.
Anyway, it has two parts, packages and services. So here it's got the packages list and you can see here there's a list of two packages. There's HTOP and Emacs and that's because I had already used Geeks install to install those packages after I set up Geeks on this machine. If you've never used Geeks before, this list may be empty
but if you've already been using Geeks then you will see the packages you already have installed listed here. Also there's the services list and this is the more interesting part of the configuration because it is where the various different parts or programs that you use get configured and usually these sections all have their own special configuration types.
Like here we have one service called the home bash service type and then it has its own home bash configuration and this configuration has its own fields like the aliases that you want to set in your bash configuration, your bashrc file, your bash logout file, et cetera. So we have a list of aliases here already
and that's because the Geeks home import command scanned over our existing files and found all these aliases that were there and just added it to this list. One thing I'm gonna do here though, this alert alias that gets added to the Ubuntu profile by default seems to result in some buggy behavior so I'm just gonna delete that one really quick
and then just pull this line up. But you can see that it did put some things in here already. It's very easy for you to go ahead and add more aliases if you want to. Also for the bashrc and bash logout files, it has a local file reference to those files that it copied over for us from our home directory. So I recommend definitely keeping these files
in your home config if you're using an existing Linux distribution like Ubuntu because sometimes those profile files have important things that might make Geeks home sort of break your desktop session so make sure that you sort of keep whatever is put here from the existing bash files.
So that's a quick look at what a home configuration looks like. I definitely recommend taking a look at the Geeks reference manual for more in-depth detail about what all this stuff means but the last thing I'll say is that there are a number of services that you can use that already exist in Geeks that you can try out different programs and features that you may want to pull into your configuration.
I'll show you a way to find more of those in just a little bit. One more important thing to mention here, this concept of a service actually does not correlate directly to a background service or a daemon that's installed. A service is actually a combination of different configuration aspects like for instance the programs that need to be installed for a particular feature,
the actual configuration files that need to be written out to the machine and also it could be background services as well but an individual service can provide multiple things to your configuration, not just a background service. So we can try out this configuration right now without actually harming our home folder
by using the following command, Geeks home container and then the path to that home configuration.scm file that Geeks home import had written out for us. Now the nice thing about this is that this allows you to take a look at what files and programs that Geeks home will apply to your home folder before you ever actually apply it to your home folder. You can just go into a shell environment
and explore what files are there, what programs are there to make sure that the configuration that you're gonna write to your machine is actually what you expect it to be. So let's go jump into the folder really quickly or sorry, jump into the VM and we'll give that a shot. So I'm gonna run Geeks home container, a home config, home configuration.scm
and this may take just a second because it has to take a look at that configuration file and build everything up but it seems to be done already. So now we are in this container environment. The only way you can really tell that the shell is different is because the original shell has a color prompt
and this one doesn't. Not really a big deal but if we were to use LSAL, we could see now that there are a number of files here that are linked to or symbolic links to paths under slash GNU slash store. Now slash GNU slash store is the store location for all of the files and programs that Geeks installs for your system.
It's just a huge folder with a bunch of these folders that have hashes for the first part of the path and then the name of the file or folder that is being placed there. And this is part of what makes Geeks a functional package manager. For every file or program needs to install, it creates a derivation which creates an output
that goes into this store and anytime you update your configuration, if you've changed the configuration file or maybe updated a program that you're using, there will be a new folder that gets produced in this GNU store folder and then your actual configuration will be linked to whatever the newer version of the folder in GNU store relevant to the configuration file
or the program that you're using. It's a little bit hard to understand without more detail which I'm not gonna go into right now but I will make a lot more videos about this and also the GNU Geeks reference manual does a pretty good job of explaining it so take a look at that too if you wanna learn more. But we can see that we do have the bash logout and bashrc files which we did mention directly
in our home configuration. We also have bash profile which is being placed there by something else which we can take a look at in a bit. We have a Geeks home folder which is related to our home profile which is in the GNU store. That's not something you really need to deal with directly but we can take a look at that too and then a profile file. There's also some other things
probably in the .config folder if I do lsal. Yeah, there's like font config also gets generated. So lots of things are being generated by Geeks home and we can take a look at what all those files have in them. Let's look at what's in the bashrc file. So the bashrc file is basically the same contents
as it had before but I believe some of this stuff at the very beginning is actually being generated by Geeks home. All these early aliases here, they believe these are all coming from those alias lines that we have in our Geeks home configuration and the rest of this comes from the file that originally was there in our home directory. So the other interesting thing to note about these files is that they're actually read only.
If I were to open up Emacs for bashrc, let's see if this works. Okay, let's use Control X, Control F, bashrc. Now, I can't actually edit this file. Yes, it says it's read only and that's another interesting thing about Geeks home is that whenever you apply a configuration
with Geeks home into your home folder, any of the files that are placed there are read only because they are meant to be immutable in the sense that you should only be able to make changes to those files whenever you're using Geeks home to do it. If you were to look at the Geeks home folder and I believe it's profile slash bin,
you can see what programs get installed. So this is the only programs that have been installed. We have Emacs and we have some other things that are sort of just basic, things that are needed for fonts and desktop environment, et cetera, your bash as well. So this list obviously will be longer if you have more programs installed but you can see that it did set up all these programs in your home path and with a Geeks home setup,
these will just be accessible like any other program in your system. Okay, now that we've taken a look at our configuration applied to this container environment and we've made sure that everything that we see there is what we expected to see, we could actually apply this to our home folder using the Geeks home reconfigure command, just pointing it at that same home configuration.scm file.
So once we do that, we're gonna end up seeing a .geeks home folder in our home directory, especially since this is the first time we're gonna run Geeks home reconfigure on this machine and then it will store your profile information there and then you will be able to use Geeks home from that point forward. So let's jump back into our VM and we can run this command, geeks home,
oops, actually let's get out of the container environment first, geeks home reconfigure home config home configuration.scm and this will run the same profile that we had just used in the container environment, doesn't take any extra time
because it's already been built and now we can take a look at our own home folder to see that our Batch RC, Batch profile and Batch logout files have been linked into the GNU store. We also have this new Geeks home folder that I mentioned before. Geeks profile was the original profile whenever I was installing Emacs and HTOP myself before I started using Geeks home
so that will also still be there but all the Geeks home related things are in this Geeks home folder and also the profile file is there as well. So what happens to my old files? Like when you do this the first time, you already had that .bashrc file, .bash profile, .bash logout, what happens to those files? So if you're applying a Geeks home configuration
for the first time, you will probably overwrite existing files in your home directory, specifically those Batch files. But don't panic though, Geeks home actually made a backup of any file that it replaces. And this happens anytime that you run Geeks home. Whenever you run Geeks home and a file exists where Geeks home would be placing a file,
it will create a folder for you in your home directory called, well, it has a timestamp at the beginning versus the timestamp when the profile was applied, Geeks home legacy configs backup. And if you were to go look at that folder, LSAL, let's see, that's the one, we can see there's this Batch logout,
.bashrc and .profile files that it has saved for you so that if in any case that Geeks has broken your configuration and you really need to get your original files back, you can go find them in one of these folders. So definitely nice to know that you won't lose things that you have painstakingly put together on your system
or things that might cause your configuration to break once you start using Geeks home. Also, what if I made a change that broke my configuration? Well, Geeks was built to solve this problem and Geeks home is no different. You can run the following command to inspect your old home configuration generations. And like I said before, the generation is like one point in time
of your configuration or one execution of Geeks home reconfigure. And then you can roll back to an earlier generation with the Geeks home, well, you use Geeks home list generations to list all the generations of your configuration and then Geeks home switch generation to go to a specific generation number. And also, you can just use Geeks home rollback
to go back to the previous one. So let's just try it out really fast. I don't know if it's gonna work the way that we hoped for, if we run it just with a single change, but let's just see what happens. Let's look at the Geeks home list generations first and you'll see that there's only one. It says when I installed it
and then it says where all the files are, basically what the channels were at the time, et cetera. If you had other times where you ran Geeks home reconfigure, this list would be even longer. Let's see what happens when I type Geeks home rollback. Okay, cannot switch to home environment generation negative one. That makes sense because this is the first one, but we will make another change in just a second
when you'll be able to see what that might look like. So let's try making a change to our home configuration to see what it does. Let's say we wanna set an environment variable in our batch profile that gets applied to all future sessions. We can do that by adding an environment variables entry to our home batch configuration. Now I've got an example here where we already have a home batch service type
with our home batch configuration. We have the aliases part that we've seen already. We have batch RC, batch profile, things like that we've seen already, but we've got this extra thing here called environment variables. Now environment variables is a known field for the home batch configuration type and what it expects to see is, actually this is wrong, is an A list or an association list
of key value pairs for the environment variable and the value to be placed there. And when we put this here, it should actually affect our batch profile to add more environment variables to that list. Let's jump back over to our VM and give that a try. We're gonna jump back into the home configuration file
that we started with and I've already typed it out here. We'll just uncomment it, but we have this environment variables list. We're gonna set our editor to Emacs client. I'll save this file, jump back out of the console and then go back to run geeks home reconfigure. So actually before I do that, let's take a look at our .bash profile file
and you can see that there is no editor environment variable in this list. So now when we go run the, let's see, geeks home reconfigure command. I know I just keep rolling up in this list. Then it will apply that new configuration change and then we should be able to go look at our .bash profile file
and see that now we have the editor environment variable pointing to Emacs client. And if we were to log in to a new .bash login session, or in fact, let's take a look now. It's actually kind of useful. Echo editor. The change does not get applied to the current shell. You have to actually start a new .bash session before you see this. It has to actually be a new login session. Otherwise in environments like Ubuntu,
it doesn't actually load your profile unless you log out, log back in. So let's run bash dash dash login. And now that I do that, I can use echo editor and we can see that that Emacs client variable is now set there correctly. Now, as I was saying before, you can say geeks, let's see, home list generations.
We see now that we have two generations here and I can type geeks home rollback. And if I were to use cat on profile, you'll see that that, whoops, it was bash profile, bash profile, that the environment variable that we added is now gone. So it actually just rolled back to the old configuration
that we had before we added that environment variable and everything's just fine. And the thing that we had there before is now gone. So that's great. We can generate a configuration and apply it. But how do you find more services to use? Thankfully, there's a nice command that you can use to find home services that you might be interested to try and that's called geeks home search.
For instance, if you wanna find services that are relevant to your desktop environment, just run geeks home search desktop. And that will give you back all the services that are relevant to desktop environments. So if I were to go back to the shell and type in, let's see, once again, geeks home search desktop,
we can see a few different services here, Redshift, Dbus, and this XG MIME applications. I think that one you don't use directly, but this Redshift one seems interesting. It says run Redshift, a program that adjusts the color temperature of display according to the time of day. So how do we use it? It doesn't really tell us much,
except for the fact that you can go look at a location in the geeks code, but we don't have the repository cloned down ourselves, or at least we don't think we do. So we're not sure exactly how to do that. What you can actually do is use the geeks home edit command to edit a particular service. And actually it will open up the file
relating to that service so you can take a look at it. So let's look at this home Redshift service. So we're gonna use geeks home edit home dash Redshift. And now it seems to have opened nano to look at this, which is fine. But we can see that it's the home Redshift service type,
and it has an extensions list. Now we're not gonna go into how exactly home services work, but I will make a video about this soon. But you can see that it has one service extension, which is the home Shepherd service type. Shepherd is a service management tool written in guile scheme. And what this is basically telling us is that this Redshift service
is actually gonna have a background process that gets spawned inside of your profile. And also you can tell that there's this default value, which says home Redshift configuration. That actually tells us there's a configuration type that's been defined for configuring Redshift. So if we would just kind of cruise up in this file a little bit, we should be able to see right here,
the defined configuration, home Redshift configuration. Each field in this configuration is gonna tell you what the type of the field should be, like a file like Redshift, and then a documentation string that says what the field is for. So this is one way to go see what fields are available to configure for a given service. But also a lot of this stuff gets generated
into the Geeks reference manual. So you can go take a look at the actual generated documentation for these services, and you might get some more information on how to use it. But what if we wanted to configure the home Redshift service to have the latitude and longitude of Brussels so that we can have Redshift
change the color temperature relative to that location on the planet whenever it gets dark outside. So I've gone ahead and typed in the configuration for the home Redshift service so that you don't have to sit here and watch me type. Two things to point out. One is that I had to pull in the GNU home services desktop module to find this. We can actually take a look at that by, let's see,
the Geeks home search desktop. You can see that it's in the file path GNU home services desktop. That's actually the module path where this service is defined. So that's how I knew I had to go pull in this GNU home services desktop module path. Then we added to the front of our services list
this home Redshift service type with our home Redshift configuration. I'm telling it I want the location provider to be manual because I don't want it to try to use GPS to find my location. Then I give it an explicit latitude and longitude for determining the time of day and when it should change its color temperature.
So we can go back into our shell and use Geeks home reconfigure to run this new configuration change. And then we can see here at the very end service Redshift has been started. If I use the herd status command that will actually tell me which Shepherd services are currently running in my system. Oh, it's not letting me do it.
Let me do this actually. Bash dash dash login. So herd status. Now it says that we have two services that are started. The root service which is just part of Shepherd and then the Redshift service. We didn't have to tell it what program to install. We just said we want Redshift and we wanna give these configuration variables and it just installed it
and started that for us automatically. And then every time you log into your system that service will be started up again. So once you try to use Geeks home you'll quickly find that there aren't a whole lot of home services in the Geeks repo just yet. And that's because Geeks home is still relatively new and it needs more user adoption so that we can have more people contributing new services.
So please try Geeks home and consider contributing new home services for the programs that you use regularly because that's the only way that the set of services is gonna grow. So more information on contributing to Geeks can be found in the reference manual. Really good section there. And within the next couple of months I'm gonna publish a video explaining how to write your own home services. So make sure to subscribe to the System Crafter channel
on YouTube or Odyssey to be notified when that gets released. Thank you very much for sitting through this talk. I hope you learned something about Geeks home today. I'll be available in the virtual chat for the talk to answer questions. So please feel free to drop by and ask anything there or find me online. I'll be happy to answer your questions there as well. Thanks so much.
We'll see you next time. Happy hacking. You should be live now. Hopefully that was a decent introduction to Geeks home.
I don't know if we'll have much time to discuss anything, but if there's any questions I can try to answer them. Yeah, I had a question about how you synchronize the configure across machines. Yeah, I definitely use Git for that. I just have a dot files repository. I have all of my Git home configuration files there.
And then I synchronize this between machines. And the nice thing is that Geeks home makes it really easy to apply the same configuration after I've synced them across machines. It's a lot easier than having to make sure that I have all my files in the right place. If you try to use like Gnusto or something like that, you have to make sure that you run Gnusto every time after you sync. Obviously you have to run Geeks home every time
after you sync, but at least, you know, it's more obvious that you need to do that when using Geeks home. So it's been a lot of fun. I enjoy this approach. Yeah, definitely. I'm Geeks from Geeks home, so. Okay. Okay, I think, yeah, we're up there.
Chase, your talk is ended. So if people have any questions, they might come here and post it in this group. Cool. So, yeah. So thanks for speaking with us, Tom. Yeah. I'll catch you later, then. Thanks, sir. No problem. Bye.