Re: Gdm not recognizing window manager

2023-08-10 Thread Mario Forzanini

On 8/7/23 15:15, Patrick Pippen wrote:

Greetings I just installed GUIX 1.4.0 over the weekend with XFCE. Then I 
installed Bspwm and sxhkd. Then I created a .xsession  file with only this 
content: exec bspwm

Restarted laptop tried logging in and it only goes back to login screen. My 
question is with gdm how do I get gdm to allow me to choose between XFCE and 
Bspwm?


Hi,
I think I had a similar problem some time ago, the trick that made it work for 
me was making sure that the .xsession file was executable, i.e.


$ chmod +x $HOME/.xsession

Anyway, if you install the window manager in the system config, an xsession file 
should be installed along with the package in a place where GDM can find it, at 
least this is what other window managers do. Once you've done that you should 
see BSPWM appear among the login options.


Hope this helps!
--
Mario




Re: guix pack: support for something similar to Nix's buildLayeredImage

2023-08-10 Thread Hilton Chain
Hi Simon,

On Wed, 09 Aug 2023 20:59:02 +0800,
Simon Pugnet wrote:
>
> I'm not a Guix or Nix expert but as far as I understand Nix solves
> this problem by using "pkgs.dockerTools.buildLayeredImage" (see
> http://ryantm.github.io/nixpkgs/builders/images/dockertools/#ssec-pkgs-dockerTools-buildLayeredImage)
> and "streamLayeredImage". In this example, this could in theory be
> used to build a coreutils-python image where coreutils exists in its
> own layer. That would mean that the coreutils-rust image could share
> the coreutils layer, saving space.
>
> Is there any way to achieve something similar in Guix? If not then are
> there any plans to support this functionality?

It's currently not available in Guix, but there's a patch series
 for it.

Thanks



Re: Gdm not recognizing window manager

2023-08-10 Thread Patrick Pippen



Sent from my iPhone

> On Aug 9, 2023, at 7:05 PM, Mario Forzanini  wrote:
> 
> On 8/7/23 15:15, Patrick Pippen wrote:
>> Greetings I just installed GUIX 1.4.0 over the weekend with XFCE. Then I 
>> installed Bspwm and sxhkd. Then I created a .xsession  file with only this 
>> content: exec bspwm
>> Restarted laptop tried logging in and it only goes back to login screen. My 
>> question is with gdm how do I get gdm to allow me to choose between XFCE and 
>> Bspwm?
> 
> Hi,
> I think I had a similar problem some time ago, the trick that made it work 
> for me was making sure that the .xsession file was executable, i.e.
Definitely that got things to work for me thanks.
> 
> $ chmod +x $HOME/.xsession
> 
> Anyway, if you install the window manager in the system config, an xsession 
> file should be installed along with the package in a place where GDM can find 
> it, at least this is what other window managers do. Once you've done that you 
> should see BSPWM appear among the login options.
> 
> Hope this helps!
> -- 
> Mario
> 



Re: Putting a file into system image ~user/ but not on reconfigure

2023-08-10 Thread Hartmut Goebel

Am 10.08.23 um 14:12 schrieb wolf:


I guess you could have a script that would use the existence of the key itself
as a marker.  In that case you would likely want to recreate it if the marker
(key) got deleted,


No! The key must not be recreated. The key is expected to be replaced by 
a new one when the box will become a machine. Thus, using the key as a 
marker is not possible, as the would recreate the insecure key on next 
reboot. The key must never ever be put into back into place.



I do not have much experience with Vagrant, but I assumed the general idea for
these kind of systems declarative systems is to just recreate the when updates
are required.  Is it expected to actually run guix reconfigure inside the VM?


This depends on how one uses the virtual machines :-)

And even if it is not expected to run guix reconfigure on it: If one 
does, this but open a front door to the system - which is not what one 
wants.


Anyhow, thanks for sharing thoughts,

--
Regards
Hartmut Goebel

| Hartmut Goebel  | h.goe...@crazy-compilers.com   |
| www.crazy-compilers.com | compilers which you thought are impossible |




Re: Putting a file into system image ~user/ but not on reconfigure

2023-08-10 Thread wolf
On 2023-08-10 00:11:55 +0200, Hartmut Goebel wrote:
>Hi,
> 
>sorry for the hard to understand subject.
> 
>I need to put a file into a system image (into ~user) which will not be
>recreated or touched when running "system reconfigure" later, even if
>not existent. So this is  some kind of "one-time service", removing
>itself on first boot.
> 
>Any ideas how to do this?
> 
>(One could imagine some self-destructing script creating the file.
>Anyhow AFAIK this script would be recreated on next "system
>reconfigure". Als leaving some "script was run" marker is a bad option,
>as removing the marker would recreate the file, which is to be
>avoided.)

I guess you could have a script that would use the existence of the key itself
as a marker.  In that case you would likely want to recreate it if the marker
(key) got deleted, since the machine would be impossible to get into otherwise.
It would run on every boot, but after the very first one it would not do
anything.

> 
>Background:
> 
>I aim to create Vagrant boxes (machine templates) based on guix system
>images. This works quite well so far, using image format qcow2, putting
>the image and some simple files at the right place and the
>vagrant-libvirt plugin for running the machine. Using a symlink I can
>even avoid copying the boxes disk image out of the store — vagrant will
>create a copy when creating a machine anyway.

I do not have much experience with Vagrant, but I assumed the general idea for
these kind of systems declarative systems is to just recreate the when updates
are required.  Is it expected to actually run guix reconfigure inside the VM?

> 
>Now for vagrant being able to log into the machine when starting it
>(and eventually "provision" the machine = execute some commands) boxes
>are expected to include an "insecure ssh key" in
>~vagrant/.ssh/authorized_keys. Vagrant will replace this key by another
>one when creating a machine. So this behavior is reasonable secure.
> 
>One possible solution I found (not yet tested and tools not yet in
>guix) is to use one of the guestfstools ([1]https://libguestfs.org/) to
>copy the file into the image. Anyhow this would require copying the box
>out of the store to get a writable file.
> --
> Regards
> Hartmut Goebel
> 
> | Hartmut Goebel  | [2]h.goe...@crazy-compilers.com   |
> | [3]www.crazy-compilers.com | compilers which you thought are impossible |
> 
> References
> 
>1. https://libguestfs.org/
>2. mailto:h.goe...@crazy-compilers.com
>3. http://www.crazy-compilers.com/

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


signature.asc
Description: PGP signature


Re: guix pack: support for something similar to Nix's buildLayeredImage

2023-08-10 Thread Simon Pugnet

Hi Hilton,

Hilton Chain  writes:


Hi Simon,

On Wed, 09 Aug 2023 20:59:02 +0800,
Simon Pugnet wrote:


I'm not a Guix or Nix expert but as far as I understand Nix solves
this problem by using "pkgs.dockerTools.buildLayeredImage" (see
http://ryantm.github.io/nixpkgs/builders/images/dockertools/#ssec-pkgs-dockerTools-buildLayeredImage)
and "streamLayeredImage". In this example, this could in theory be
used to build a coreutils-python image where coreutils exists in 
its
own layer. That would mean that the coreutils-rust image could 
share

the coreutils layer, saving space.

Is there any way to achieve something similar in Guix? If not then 
are

there any plans to support this functionality?


It's currently not available in Guix, but there's a patch series
 for it.

Thanks


Excellent, thanks for pointing that out, and sorry for missing it in 
my searches!


Kind regards,

--
Simon Pugnet
https://www.polaris64.net/
PGP key fingerprint: 3BF7 85DE 162C 00C8 FB4D  A6FD BA13 59A8 2C0B 
3EF9


signature.asc
Description: PGP signature