Re: Setting environment variables (GUIX on foreign distro)

2020-04-07 Thread Leo Famulari
On Wed, Apr 08, 2020 at 01:14:40AM +0200, Zelphir Kaltstahl wrote:
> I already set them in my ~/.profile, but that does not seem to work, as
> they are not seen when starting LyX (or perhaps any GUIX installed
> app?). Would setting them in ~/.bash_profile work? I thought that
> ~/.profile is loaded on login. I also need the variables to be visible,
> when I click a launcher for example, so not only when I open a terminal.
> Not sure bash_profile would be considered in that case?

Check the Bash man page, section INVOCATION, and then FILES. That
explains what files are used and in what situations.

In short, ~/.profile or ~/.bash_profile should both work. Remember, they
are for login shells, so you need to log in again to see the effect.



Re: Setting environment variables (GUIX on foreign distro)

2020-04-07 Thread Zelphir Kaltstahl
I already set them in my ~/.profile, but that does not seem to work, as
they are not seen when starting LyX (or perhaps any GUIX installed
app?). Would setting them in ~/.bash_profile work? I thought that
~/.profile is loaded on login. I also need the variables to be visible,
when I click a launcher for example, so not only when I open a terminal.
Not sure bash_profile would be considered in that case?

I need to try this. Thanks so far!

On 4/6/20 7:11 PM, Leo Famulari wrote:
> On Sun, Apr 05, 2020 at 10:49:54PM +0200, Zelphir Kaltstahl wrote:
>> My question regards setting environment variables, which are considered
>> by applications installed via GUIX on a foreign distro (Trisquel). What
>> is the best practice to set custom environment variables?
> You should set them in the typical way for your operating system and
> shell. In general, you should do it in the initialization files for
> login shells. If you are using Bash, use ~/.bash_profile.



Re: GRUB theming - background

2020-04-07 Thread 白い熊
Apr 7, 2020 21:18:36 Tobias Geerinckx-Rice :

> OK, can you be more specific? ‘Invalid field specifier’ on its own doesn't 
> tell us anything.
>
> I pasted my previous example into my own system.scm and it built fine:
>
> (operating-system
> …
> (bootloader (bootloader-configuration
> (bootloader grub-efi-bootloader)
> (target "/boot/efi")
> (theme (grub-theme
> ;; This probably makes little sense in practice,
> ;; unless your image suits the default colours:
> (inherit %default-theme)
> (images (list (grub-image
> (aspect-ratio 4/3)
> (file (local-file "/home/…")))
> (timeout (seconds 1)))
> …)
>
> What does your operating-system's (bootloader …) field look like, and what 
> did Guix actually say?

I'm sorry, Tobias, I was mistaken — I thought it had to go in the 
“(grub-configuration” section under “(bootloader”. Thanks for posting your 
config — I saw the mistake.

Anyhow, now “system reconfigure” still won't finish.

With the bootloader section like:

(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")))

… it reconfigures fine.

If I change to:

(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")
(theme (grub-theme
(inherit %default-theme)
(images (list (grub-image
(aspect-ratio 4/3) ; or 16/9, , to match…
(file (local-file "/home/shiroikuma/0/pictures/grub/gnu-grub.jpg")

… the reconfigure fails with:

substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
/gnu/store/sn21yqw850b1kwlqkph9pkzl5wkdhcb7-system.drv
/gnu/store/m5rlvm9c15k0z89yk3af2786kfpwm07g-provenance.drv
/gnu/store/f6pnyki0nigyxkx0kg4jir7jds1l175m-grub.cfg.drv
/gnu/store/z2b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv
building /gnu/store/z2b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv...
\builder for `/gnu/store/z2b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv' 
failed with exit code 1
build of /gnu/store/z2b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv failed
View build log at 
'/var/log/guix/drvs/z2/b3prcifgswnc00ybvan9s65prky1lv-grub-image.png.drv.bz2'.
cannot build derivation 
`/gnu/store/f6pnyki0nigyxkx0kg4jir7jds1l175m-grub.cfg.drv': 1 dependencies 
couldn't be built
guix system: error: build of 
`/gnu/store/f6pnyki0nigyxkx0kg4jir7jds1l175m-grub.cfg.drv' failed

The build log contains:

Backtrace:
2 (primitive-load "/gnu/store/8xhx6nv3dy9y1gkpn1884bwclvj?")
In gnu/build/svg.scm:
46:4 1 (svg->png "/gnu/store/srr4fpapz69jz4p5y0f8b81iyf8spsrj?" ?)
In unknown file:
0 (rsvg-handle-new-from-file "/gnu/store/srr4fpapz69jz4p5?")

ERROR: In procedure rsvg-handle-new-from-file:
Throw to key `rsvg-error' with args `("rsvg-handle-new-from-file" "" () ())'.

Thanks for helping. :@)

-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊






Re: Emacs not seeing newer packages after pull

2020-04-07 Thread Ivan Vilata i Balaguer
Konrad Hinsen (2020-04-07 10:16:28 +0200) wrote:

> > and behold, the files are under my pulled Guix.  Yay!  However, `guix-pull` 
> > in
> > Emacs still fails with a bunch of "incompatible bytecode kind" errors then
> > "guix: pull: command not found".
> 
> The "incompatible byte code" messages are due to emacs-guix using Guile
> 2.2 whereas Guix is using Guile 3. They will disappear in the ongoing
> transition of everything to Guile 3. And they don't signal any real
> problem. It's the last message that is critical.

Indeed.  I see that someone already reported Guile 3 incompatibilities in
.  I'll keep an eye on that.

> > So I guess the proper way to go now is to report why `emacs-guix` on a 
> > foreign
> > distro doesn't really work.  I'll look at the archives and open a new thread
> > if needed.
> 
> Emacs-guix is a project separate from Guix, so it's best to open an
> issue at https://gitlab.com/emacs-guix.

Thanks for the pointer!  I see that after GitHub issues #28 and #29, Alex
added an explicit warning for foreign distro users here:
.
I'll report that they result in `emacs-guix` seeing packages from the previous
pull instead.

Thanks again!

-- 
Ivan Vilata i Balaguer -- https://elvil.net/



Re: GRUB theming - background

2020-04-07 Thread Tobias Geerinckx-Rice

白い熊,

白い熊 写道:

(grub-theme
(inherit %default-theme)
(images
(list (grub-image
(aspect-ratio 4/3) ; or 16/9, , to match…
(file (local-file
"/home/shiroikuma/0/pictures/grub/gnu-grub.jpg"))


This unfortunately also gives me “invalid field specifier”.


OK, can you be more specific?  ‘Invalid field specifier’ on its 
own doesn't tell us anything.


I pasted my previous example into my own system.scm and it built 
fine:


(operating-system
…
(bootloader (bootloader-configuration
 (bootloader grub-efi-bootloader)
 (target "/boot/efi")
 (theme (grub-theme
 ;; This probably makes little sense in 
 practice,
 ;; unless your image suits the default 
 colours:

 (inherit %default-theme)
 (images (list (grub-image
(aspect-ratio 4/3)
(file (local-file 
"/home/…")))

 (timeout (seconds 1)))
…)

What does your operating-system's (bootloader …) field look like, 
and what did Guix actually say?


Kind regards,

T G-R


signature.asc
Description: PGP signature


Re: GRUB theming - background

2020-04-07 Thread 白い熊
Apr 7, 2020 19:40:56 Tobias Geerinckx-Rice :

> Try something roughly like (unfortunately untested):
>
> (grub-theme
> (inherit %default-theme)
> (images
> (list (grub-image
> (aspect-ratio 4/3) ; or 16/9, , to match…
> (file (local-file
> "/home/shiroikuma/0/pictures/grub/gnu-grub.jpg"))

This unfortunately also gives me “invalid field specifier”.

-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊






Re: GRUB theming - background

2020-04-07 Thread Tobias Geerinckx-Rice

白い熊,

白い熊 写道:
(background_image 
'("/home/shiroikuma/0/pictures/grub/gnu-grub.jpg")


The ‘invalid field specifier’ is ‘background_image’, which isn't 
part of the (undocumented) grub-theme record.


Try something roughly like (unfortunately untested):

(grub-theme
(inherit %default-theme)
(images
 (list (grub-image
(aspect-ratio 4/3) ; or 16/9, , to match…
(file (local-file
   "/home/shiroikuma/0/pictures/grub/gnu-grub.jpg"))

‘local-file’ takes care of creating an immutable copy of 
gnu-grub.jpg in the store, where it can be seen and safely used by 
the sandboxed build environment.


Kind regards,

T G-R


signature.asc
Description: PGP signature


GNU artwork configuration from SLIM in GDM

2020-04-07 Thread 白い熊
Hi Guix:

I've long had this nice GNU blue artwork configured as background in SLIM login 
- thanks to help here thus:

(define %old-artwork
(origin
(method git-fetch)
(uri (git-reference
(url "git://git.savannah.gnu.org/guix/guix-artwork.git")
(commit "94e6111"))) ;pre-GuixSD branding
(sha256
(base32
"0aax85mygpq4lbyn8sriafikyg54yss3lisin6pwkvlvp23a3v1j"
(define %old-slim-theme
#~(string-append #$%old-artwork "/slim"))
(define %old-slim-theme-name
"0.8")

and in the bootloader section:

(service slim-service-type (slim-configuration (auto-login-session (file-append 
stumpwm "/run/current-system/profile/bin/stumpwm"))
(default-user "shiroikuma")
(theme %old-slim-theme)
(theme-name %old-slim-theme-name)))
%base-services))

The problem with this is I can only use it with %base-services

If I try to substitute the last line, in line with the manual, with:

(remove (lambda (service)
(eq? (service-kind service) slim-service))
%desktop-services)))

it won't configure — says xorg-server provided more once.

In principle, I'd like to use gdm - so I'd like to ask:

How to configure gdm with the above artwork?

or

How to use the above config, but with %desktop-services so full desktop 
services are provided upon login?

Many thanks. :@)

-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊






GRUB theming - background

2020-04-07 Thread 白い熊
Hi Guix:

I have this nice GNU hacker background that ages ago some system installed as 
the GRUB background then. I'd like to use it as GRUB background in Guix System 
now.

I tried to set it thus, along the lines of GRUB theming instruction in the 
manual:

(grub-configuration
(theme (grub-theme
(inherit %default-theme)
(background_image '("/home/shiroikuma/0/pictures/grub/gnu-grub.jpg")

But it doesn't work — gives me an invalid field specifier — so
I guess “background_image” cannot be specified this way. Any other way to do it?

-- 
Best regards / 宜しく御願い致します / S pozdravem / C уважением / Z poważaniem /
Mit freundlichen Grüßen
白い熊






Re: about basic operation of guix sd

2020-04-07 Thread Julien Lepiller
Le 7 avril 2020 11:16:12 GMT-04:00, Satoru KURASHIKI  a écrit 
:
>hi,
>
>I happen to know Guix SD recently, and trying to tinkering it.

Hi, welcome to the guix project :) btw, we call it the Guix System now, not SD 
anymore ;)

>I've just managed to "guix init" on my new box, and have questions
>about its operations.
># excuse: I looked over the guix manual, but may be overlooking
>clues...

Nice, well done :)

>Please tell me any of FAQ, Howto, list thread, blog, sample code, or
>gist, which would answer:
>
>- How to unify personal substitutes?
>  - "guix publish" will serve the substitutes built on that host, and
>I want to add substitutes
>of another host's
>  - Is this work as expected? : rsync /gnu/store to repository host to
>merge substitutes

I think this is a bad idea, because it might break assumptions of the 
mathematical model guix relies on. Not sure how to sync two stores 
automatically. The "guix copy" command can be used to do that manually. Note 
that guix publish will publish your whole /gnu/store, independently of how 
items were obtained.

If you use guix publish for things that were not built on the official build 
farm, you need to have a look at guix --archive to generate key pairs and 
authorize your personal substitute server. For items that were built on the 
official build farm, it is enough to authorize the build farm, because these 
items will be detected as identical, even if they come from a different source.

>- The right way of treating guix code (or guile code structure?)
>  - I have to clone guix repo into my home directory?
>- Though "guix pull" should have source tree anywhere (in
>/gnu/store?), so are there any interfaces
>  to access them through guix-daemon?
>  - I want to tweak existing code (package definition)
>- I should copy target file to somewhere working directory to edit
>  or edit target file in the project tree?

The manual has a section "the perfect setup" that should explain everything if 
you want to contribute.

Guix pull is indeed more or less a wrapper around git pull. The repository is 
available in the store, but because of the mathematical model, it is read-only 
and must not be modified. You can still use "guix edit foo" to open the package 
definition of foo in your favorite editor.

If this is not for a contribution, the next best thing you can do is create a 
channel that allows you to share your modifications (or you can keep them 
private, but share them between your computers). 

Note that the guix-daemon is only there to build and download packages, it 
doesn't know anything about available packages, etc. Your guix command does. 
That allows each user on your system to customize the set of available packages.

As a vim user, I will leave the following question unanswered :). I hope I 
could help a little.

>- Emacs setup (to edit guix configuration)
>  - I want something like:
>- i.e. M-x guix-describe-variables to view document of guix
>keywords and jump to its definition
>- C-x C-e to evaluate variables (to confirm its values)
>- guix keyword completion
>- Some linter (flymake/flycheck thing)
>  - emacs-guix seems to be "guix" command wrapper, so I guess
>configuring geiser will make it?
>
>regards,




Re: about basic operation of guix sd

2020-04-07 Thread Marius Bakke
Hi Satoru, and welcome to Guix!  I hope you will enjoy your stay.  :-)

Satoru KURASHIKI  writes:

> hi,
>
> I happen to know Guix SD recently, and trying to tinkering it.

FYI the 'SD' name has been deprecated in favor of 'Guix System'.

> I've just managed to "guix init" on my new box, and have questions
> about its operations.
> # excuse: I looked over the guix manual, but may be overlooking clues...
>
> Please tell me any of FAQ, Howto, list thread, blog, sample code, or
> gist, which would answer:
>
> - How to unify personal substitutes?
>   - "guix publish" will serve the substitutes built on that host, and
> I want to add substitutes
> of another host's
>   - Is this work as expected? : rsync /gnu/store to repository host to
> merge substitutes

Syncing /gnu/store will not work without also syncing /var/guix/db.  I
think what you want to do is on host1 run 'guix publish' as you already
found, and on host2 you can then use 'guix install foo
--substitute-urls="https://host1 https://ci.guix.gnu.org;' to get
substitutes from both host1 and the Guix CI infrastructure.

See https://guix.gnu.org/manual/en/guix.html#Invoking-guix-publish for a
more complete explanation.

To do this through the configuration system, you need
'guix-publish-service-type' and adjusting the 'substitute-urls' field of
'guix-service-type'.

> - The right way of treating guix code (or guile code structure?)
>   - I have to clone guix repo into my home directory?
> - Though "guix pull" should have source tree anywhere (in
> /gnu/store?), so are there any interfaces
>   to access them through guix-daemon?
>   - I want to tweak existing code (package definition)
> - I should copy target file to somewhere working directory to edit
>   or edit target file in the project tree?

After cloning the Guix repository, you can run Guix directly from the
checkout using the "./pre-inst-env" script: see the Contributing
section of the manual for how to configure a development environment:

https://guix.gnu.org/manual/en/guix.html#Contributing 

Another alternative is to use 'guix pull --url=/your/cloned/repository'.

> - Emacs setup (to edit guix configuration)
>   - I want something like:
> - i.e. M-x guix-describe-variables to view document of guix
> keywords and jump to its definition
> - C-x C-e to evaluate variables (to confirm its values)
> - guix keyword completion
> - Some linter (flymake/flycheck thing)
>   - emacs-guix seems to be "guix" command wrapper, so I guess
> configuring geiser will make it?

You can get completion and jumping through Geiser, but I don't have
instructions at hand.  Hopefully some of the Emacs gurus can chime in
here.  :-)


signature.asc
Description: PGP signature


about basic operation of guix sd

2020-04-07 Thread Satoru KURASHIKI
hi,

I happen to know Guix SD recently, and trying to tinkering it.

I've just managed to "guix init" on my new box, and have questions
about its operations.
# excuse: I looked over the guix manual, but may be overlooking clues...

Please tell me any of FAQ, Howto, list thread, blog, sample code, or
gist, which would answer:

- How to unify personal substitutes?
  - "guix publish" will serve the substitutes built on that host, and
I want to add substitutes
of another host's
  - Is this work as expected? : rsync /gnu/store to repository host to
merge substitutes

- The right way of treating guix code (or guile code structure?)
  - I have to clone guix repo into my home directory?
- Though "guix pull" should have source tree anywhere (in
/gnu/store?), so are there any interfaces
  to access them through guix-daemon?
  - I want to tweak existing code (package definition)
- I should copy target file to somewhere working directory to edit
  or edit target file in the project tree?

- Emacs setup (to edit guix configuration)
  - I want something like:
- i.e. M-x guix-describe-variables to view document of guix
keywords and jump to its definition
- C-x C-e to evaluate variables (to confirm its values)
- guix keyword completion
- Some linter (flymake/flycheck thing)
  - emacs-guix seems to be "guix" command wrapper, so I guess
configuring geiser will make it?

regards,
-- 
KURASHIKI Satoru



Re: Setting environment variables (GUIX on foreign distro)

2020-04-07 Thread Joshua Branson


Is there a way to set environmental variables in your config.scm file?
That way that information is stored in Guix System?  I'd like to put all
information about my OS inside my config if possible.

-- 
Joshua Branson
Sent from Emacs and Gnus

P.S. I am subscribed to help-guix.  Please do not send email to my
inbox.



ffmpeg and alsa/pulseaudio

2020-04-07 Thread Ekaitz Zarraga
Hi,

I'm trying to make a screencast with ffmpeg and I'm having issues.

I had a screen recording script on the past, based on alsa, but it's not 
working in guix because it looks like ffmpeg wasn't compiled with alsa. Is that 
true? Is there something I missing to activate alsa on ffmpeg?


This is the command I was running:

ffmpeg \
-y -f x11grab -draw_mouse 1 -framerate 25 -video_size 1920x1080 -i $DISPLAY 
\
-f alsa -ac 2 -i default \
-pix_fmt yuv420p -c:v libx264 -preset veryfast \
-c:a libmp3lame -q:v 1 -s 1920x1080 -f matroska \
output.mkv




I tried to make it with pulseaudio replacing alsa by pulse in the command but 
the audio is distorted. It sounds very fast.

Any idea? Do you use ffmpeg for screen recording too?

Thanks




Re: keyboard layout

2020-04-07 Thread pelzflorian (Florian Pelz)
On Thu, Mar 19, 2020 at 01:52:28PM +0100, Adam Kandur via wrote:
> 
> Hi guixers! i have a question. Sometimes i need to switch keyboard layout for 
> writing messages. Currently i'm using this command 
> setxkbmap -layout 'us,ru' -option 'grp:alt_shift_toggle,grp_led:scroll'
> 
> How i can do something similar with config.scm definition?
> 

Ludo fixed support for such layouts last week with commit
2729cb406d9f3e9eb22cc660f887138134edb3a8.  He added an example to the
manual:

;; Arabic layout with "Alt-Shift" to switch to US layout.
(keyboard-layout "ar,us" #:options '("grp:alt_shift_toggle"))

Regards,
Florian



Re: Guixsd and meshlab ?

2020-04-07 Thread Ekaitz Zarraga


‐‐‐ Original Message ‐‐‐
On Tuesday, April 7, 2020 1:25 AM, Olivier Farges 
 wrote:

> Hi Guix,
>
> has anyone ever had the opportunity to install meshlab and could possibly 
> provide a corresponding .scm file?
>
> Regards,
>
> -
>
> Olivier Farges

Hi Olivier,

I didn't but I'm interested on it and I would take the time to make one.

If you are not in a hurry and can wait a couple of days I can make the package 
for you.

Regards




Re: How to specify custom remappings with keyboard-layout?

2020-04-07 Thread pelzflorian (Florian Pelz)
On Mon, Apr 06, 2020 at 03:22:29AM +0200, pelzflorian (Florian Pelz) wrote:
> That is, instead of patching xorg-server, you would patch
> xkeyboard-config’s xkb/symbols.

I believe patching the keymaps in xkeyboard-config is the best
solution.

Regards,
Florian



Re: Emacs not seeing newer packages after pull

2020-04-07 Thread Konrad Hinsen
Hi Ivan,

> and behold, the files are under my pulled Guix.  Yay!  However, `guix-pull` in
> Emacs still fails with a bunch of "incompatible bytecode kind" errors then
> "guix: pull: command not found".

The "incompatible byte code" messages are due to emacs-guix using Guile
2.2 whereas Guix is using Guile 3. They will disappear in the ongoing
transition of everything to Guile 3. And they don't signal any real
problem. It's the last message that is critical.

> So I guess the proper way to go now is to report why `emacs-guix` on a foreign
> distro doesn't really work.  I'll look at the archives and open a new thread
> if needed.

Emacs-guix is a project separate from Guix, so it's best to open an
issue at https://gitlab.com/emacs-guix.

Cheers,
  Konrad