Re: How to declare symlinks in the configuration?

2023-05-23 Thread Gary Johnson
Marek Paśnikowski  writes:

> Thank you Gary.
>
> This is the kind of answer I was hoping for. Could you also share with
> me the corresponding service-type for the system configuration?

Hi Marek,

  In the system configuration, most of the files that you would edit by
hand on another distro (e.g., config files under /etc) are not managed
directly by a single service in Guix System. Instead, you typically add
services (e.g., `postgresql-service-type`, `cups-service-type`,
`strongswan-service-type`) to your `operating-system` definition and
declare their configurations within each service's scheme code.

For example, here is how you might edit the config files for a
Postgresql server:

```scheme
(use-modules
 ((gnu packages databases) #:select (postgresql))
 ((gnu packages geo)   #:select (postgis))
 ((gnu services)   #:select (service))
 ((gnu services databases) #:select (postgresql-service-type 
postgresql-configuration postgresql-config-file))
 ((gnu services desktop)   #:select (%desktop-services))
 ((gnu system) #:select (operating-system))
 ((guix gexp)  #:select (local-file)))

(operating-system
 ;; ...Eliding all the fields except `services`...
 (services (cons (service postgresql-service-type
  (postgresql-configuration
   (postgresql postgresql)
   (extension-packages (list postgis))
   (config-file
(postgresql-config-file
 (hba-file (local-file "etcfiles/pg_hba.conf"))
 (extra-config '(("max_worker_processes" "12")
 ("max_parallel_workers" "40")
 
("max_parallel_maintenance_workers" "8")
 ("max_parallel_workers_per_gather" 
"4")
 ("parallel_leader_participation"
 "on")))
 %desktop-services)))
```

In this example, I showed two ways of specifying the contents of a
config file for this service:

1. Using `local-file` to pull in the contents of a text file somewhere
   on disk. In this case, I keep my system-wide service config files
   under a directory called "etcfiles" (in my home directory). For
   config files referenced in my `guix home` configuration, I use a
   directory called "dotfiles".

2. Including the contents of these files directly in the
   `operating-system` declaration. In this case, you see me specifying
   key-value pairs for the main Postgresql config file in a nested list
   under the `extra-config` record parameter.

===

Now...having provided the above explanation as the typical usage pattern
for configuring services on Guix System, I will add that there is an
escape hatch that you can use (as a last resort if there isn't an
existing service that controls the files you want to edit).

This is the service called `etc-service-type`. You can use it to declare
any arbitrary files that would like added immutably under the top level
"/etc" directory. You can use it like so:

```scheme
(use-modules
 ((gnu services)   #:select (service etc-service-type))
 ((gnu services desktop)   #:select (%desktop-services))
 ((gnu system) #:select (operating-system))
 ((guix gexp)  #:select (local-file)))

(operating-system
 ;; ...Eliding all the fields except `services`...
 (services (cons (service etc-service-type
  `(("resolv.conf" ,(local-file 
"etcfiles/resolv.conf"
 %desktop-services)))
```

Now you know, and knowing is half the battle. ;)
Have fun and happy hacking on Guix!

  ~Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: How to declare symlinks in the configuration?

2023-05-17 Thread Gary Johnson
Marek Paśnikowski  writes:

> How can I declare symbolic links in the system configuration?
> In this specific case, I wish to be able to declare the following link:
> ~/.config/guix/channels.scm -> ~/src/izumi/channels.scm

Hi Marek,

`guix system` is meant to declare the immutable state of your filesystem
*outside* of your home directory as well as packages and services
installed at the system level.

`guix home` is meant to declare the immutable state of your filesystem
*within* your home directory as well as packages and services installed at
the user level.

Used together, they allow you to declare the immutable state of your
entire filesystem. Then you will just need to back up those parts which
are not immutable in order to be able to recover your system after a
failure or transfer the same configuration to another machine.

Since your question is about creating a symlink to a file in your home
directory, you will want to use `guix home` for this task. First place
this code into a file called `home-config.scm`:

```scheme
(use-modules
 ((gnu home)  #:select (home-environment))
 ((gnu home services) #:select (service home-files-service-type))
 ((guix gexp) #:select (local-file)))

(home-environment
 (services
  (list
   (service home-files-service-type
`((".config/guix/channels.scm" ,(local-file 
"/home/your_username/src/izumi/channels.scm")))
```

Next, run this command from your shell (do not use `sudo`):

```sh
guix home reconfigure home-config.scm
```

Once this command exits, you should find a symlink at
`~/.config/guix/channels.scm` that points to a copy of your
`channels.scm` file located under the system-wide immutable `/gnu/store`
directory. Each time you want to update this file, simply edit
`~/src/izumi/channels.scm` and re-run the `guix home` command above.

Good luck and happy hacking!
  Gary

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Help-Guix Digest, Vol 88, Issue 4

2023-03-21 Thread Gary Johnson
Gottfried  writes:

> I have got now 3 profiles: EmacsManifest, Musescore, Musik
> in:  home/gfp/Projekte/
>
> Now I want them to be activated at login time.
>
> I still am not sure how to do that.

To activate multiple profiles at login time, I created a shell script
called `~/sys/scripts/activate-profiles.sh`, containing the following code:

```
#!/bin/sh

GUIX_PROFILES=/home/gjohnson/sys/guix/profiles

for dir in $GUIX_PROFILES/*
do
name=$(basename "$dir")
profile=$dir/$name
if [ -f "$profile"/etc/profile ]
then
GUIX_PROFILE="$profile"
. "$GUIX_PROFILE"/etc/profile
export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH"
export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH"
fi
unset profile
unset name
done
```

Next, I added a `source` line to my `~/.bash_profile` file, which loads
the `activate-profiles.sh` script when I enter a login shell. This
script is also run when you log in to your graphical desktop session in
Guix.

```
# Activate all of my Guix profiles
source ~/sys/scripts/activate-profiles.sh
```

For you to use this approach, you should do the following:

1. Replace `GUIX_PROFILES=/home/gjohnson/sys/guix/profiles` in my
   `activate-profiles.sh` script with your profile directory, which
   seems to be this:

   `GUIX_PROFILES=/home/gfp/Projekte`

2. Place the `activate-profiles.sh` script somewhere in your home
   directory.

3. Replace `~/sys/scripts/activate-profiles.sh` in `~/.bash_profile`
   with the path to `activate-profiles.sh` on your system.

If you use `guix home`, you can certainly add the `source` line to
`~/.bash_profile` that way.

> 2. after that, could I uninstall the package emacs in my main profile?
> Will my Emacs-manifest profile still be usable/is it independent, or
> it will suffer through uninstalling emacs in my main profile?

With this code in place, whenever you log in to your machine, you will
have access to all the packages in your main user profile as well as all
the packages in your /home/gfp/Projekte profiles. Note that this may
lead to unpredictable behavior if you have the same package installed
into multiple profiles that are all activated simultaneously. My
recommendation is that you install each package into only one profile
when using this approach.

> My aim was to uninstall packages in my main profile and put them in
> separate profiles, so in updating my main profile with less packages
> it doesn’t take so much time.

Yes, that is precisely the purpose of this approach.

Happy hacking!
  Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Setting link file permission in home-files-service-type

2023-03-21 Thread Gary Johnson
c4droid  writes:

> I'm changing my mailing workflow from fetchmail + procmail + msmtp +
> mutt to fdm + msmtp + mutt, configuration file is already prepared, the
> fdm and msmtp configuration file need 600 permission, guix home
> home-files-service-type give 644 default, have workaround for when
> symlinking change permission for target file.
>
> My home.scm configuration cut:
> ``` scheme
> (home-environment
>  (services
>   (list
>(service home-files-service-type
> `((".fdm.conf" ,(local-file "dotfiles/fdm.conf"))
>   (".msmtprc" ,(local-file "dotfiles/msmtprc")))
> ```

As mentioned on another thread recently, you need to pass the
`#:recursive? #t` option to `local-file` if you want to preserve your
file permissions.

``` scheme
(home-environment
 (services
  (list
   (service home-files-service-type
`((".fdm.conf" ,(local-file "dotfiles/fdm.conf" #:recursive? #t))
  (".msmtprc" ,(local-file "dotfiles/msmtprc" #:recursive? #t)))
```

Happy hacking!
  Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: display manager doesn't read ~/.xsession when it is a symlink

2023-03-21 Thread Gary Johnson
> Rodrigo Morales  writes:
>
>> [...]
>>   I've symlinked `~/my/guix-config/xdg/xsession' to `~/.xsession' by
>>   using the following instruction in
>>   `~/my/guix-config/home-configuration.scm' (see appendix for my
>>   complete configuration)
>>
>>   ,
>>   | (... some omitted lines ...)
>>   |(service
>>   | home-files-service-type
>>   | `((".xsession"
>>   |,(local-file "xdg/xsession"))
>>   | (... some omitted lines ...)
>>   | #+END_SRC scheme
>
> Hello, you can use (local-file "xdg/xsession" recursive? #t) to make the
> store file kept the permission bits, which would lead to a executable
> ~/.xsession.

Exactly right. In order to preserve the executable bit on your xsession
file when running it through `guix home`, you have to set the
#:recursive? option to #t in `local-file`. Here's an update to your
example service in `~/my/guix-config/home-configuration.scm`:

(... some omitted lines ...)
(simple-service 'rodrigo-dotfiles
(home-files-service-type
 `((".xsession" ,(local-file "xdg/xsession" #:recursive? #t)
(... some omitted lines ...)

Happy hacking!
  Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Unable to find wireless printer/scanner (Canon Pixma MG2950) on Guix.

2023-03-13 Thread Gary Johnson
Hi Luigi,

  If you need to edit files under /etc, the first place to look is in
the configuration settings for the service you expect to read/write
those files.

  However, if those settings don't exist, a possible fallback is to use
Guix's `etc-service`.

```scheme
(use-modules ((gnu services) #:select (etc-service))
 ((guix gexp)#:select (plain-file)))

(define my-resolv.conf "nameserver 192.168.foo.bar")

...
(operating-system
 ...
 (services (cons*
;; Add files under /etc
(etc-service `(("resolv.conf" ,(plain-file "resolv.conf" 
my-resolv.conf)))
```

Happy hacking!
  Gary

Luigi Salamone  writes:

> Thanks!
>
> Yes, I have '(name-service-switch %mdns-host-lookup-nss)' in my
> /etc/config.scm.
>
> Now...as for the scanner:
> On Parabola I need to edit the file /etc/sane/pixma.conf (not present in
> Guix) to add such a line: bjnp://MyPixmaPrinter.local. See
> https://wiki.archlinux.org/title/SANE/Scanner-specific_problems#Canon
> I also edit the file /etc/nsswitch.conf as indicated here:
> https://wiki.archlinux.org/title/Avahi#Using_Avahi.
>
> As for the printer:
> I need the gutenprint drivers, which are not packaged for Guix. I've seen a
> patch for this: https://issues.guix.gnu.org/45725
> But unfortunately I have no idea which file to patch.
>
> Greetings!
> Luigi
>
> On Sat, Mar 11, 2023 at 8:55 AM Guillaume Le Vaillant 
> wrote:
>
>> Luigi Salamone  skribis:
>>
>> > Hi!
>> >
>> > My Canon Pixma MG2950 works fine on Parabola, after configuring avahi
>> with
>> > nss-mdns. But on Guix I can't find neither the printer nor the scanner.
>> > Tried with "system-config-printer" and via "lpinfo". What can I do? Here
>> > the salient lines of my /etc/config.scm:
>> >
>> > ...
>> > (use-package-modules cups scanner)
>> > 
>> >
>> >  (packages (append (list (specification->package "cups")
>> >  (specification->package "cups-filters")
>> >  (specification->package "cups-filters")
>> >  (specification->package "cups-pk-helper")
>> >  (specification->package "foomatic-filters")
>> >  (specification->package "ghostscript")
>> >  (specification->package "sane-backends")
>> >  (specification->package "simple-scan")
>> >  (specification->package "nss-mdns")
>> >  (specification->package "avahi")
>> > 
>> > (services
>> >   (const* (service cups-service-type
>> > (cups-configuration
>> >   (extensions
>> > (list cups-filters foomatic-filters hplip))
>> >   (web-interface? #t)
>> >   (default-paper-size "A4")))
>> >  (modify-services %desktop-services
>> > (sane-service-type _ =>
>> >sane-backends)
>> >
>> > Thanks!
>> >
>> > Luigi
>>
>> Hi,
>>
>> Did you put '(name-service-switch %mdns-host-lookup-nss)' in your
>> 'operating-system' definition to activate name resolution using mDNS?
>>
>> There's a chapter about it in the manual:
>> https://guix.gnu.org/manual/en/html_node/Name-Service-Switch.html
>>


-- 
GPG Key ID: C4FBEDBD
Use `gpg --search-keys trac...@disroot.org' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Help-Guix Digest, Vol 88, Issue 4

2023-03-05 Thread Gary Johnson
Gottfried  writes:

> thank you very much for sharing your Emacs manifest.
>
> I tried to do what you said.
>
> I created a manifest for Emacs only.
>
> After doing it, Guix asked me to set the PATH.
>
> I did it and after that this Emacs Manifest changed my general profile.
> It became my general profile.
> I couldn’t use my other programmes any more.
> So I had to do a rollback.
>
> 1. I don’t know what I did wrong.

You didn't do anything wrong. The command I provided will create the
next generation of your profile from the manifest file. Any packages not
included in the manifest will be missing from that generation. It sounds
like that's what happened in this case. If you want other packages
installed into your profile as well, you could add them to your manifest
file.

> 2. AFAIK to create a manifest is not yet a profile.
> I have to create a manifest and then to create a profile with it.
> Am I right?

Correct. A manifest is a file of Scheme code that lists the packages
which you would like to install into a profile (or environment).

(Well, technically the manifest is the Scheme object produced by that
code, but in practice we can think of the file as the manifest with
little loss of information.)

You can create a temporary environment which contains the packages in a
manifest with this command:

```
guix shell -m manifest.scm
```

To make this environment persistent, you have to create a profile like
so:

```
guix package -m manifest.scm
```

> 2. If so, after creating a manifest, which commands do I have to use to
> make it a separate profile?
>
> Probably to generate a manifest and make it a separate profile goes
> together, but I don’t know how to do it.

Note that `guix package` will create a new profile generation in your
user profile by default. To override this, you can specify a different
profile that you want the generation added to instead:

```
guix package -m manifest.scm -p $YOUR_NEW_PROFILE_DIR
```

One of the perhaps slightly odd things to remember with this command is
that $YOUR_NEW_PROFILE_DIR should repeat its final directory name twice.

Here's an example for creating a new emacs profile. In this setup, we
assume that you have the following directory structure in your home
directory:

~/
├── guix-manifests/
│   ├── emacs.scm
├── guix-profiles/
│   ├── emacs/

You would issue the following command to install a new profile
generation under the ~/guix-profiles/emacs/ directory, containing all
the packages defined in ~/guix-manifests/emacs.scm:

```
guix package -m ~/guix-manifests/emacs.scm -p ~/guix-profiles/emacs/emacs
```

To activate this profile (thereby making its contents available in your
shell environment), you would issue these commands:

```
GUIX_PROFILE="~/guix-profiles/emacs/emacs"
. "$GUIX_PROFILE"/etc/profile
export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH"
export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH"
```

For ease of use, you should place this code in your ~/.bash_profile. In
this way, the profile will be activated at login time (for example,
through GDM) and will then be available in all of your shells as well as
any other programs that respect the environment variables you set (e.g.,
emacs).

Have fun and happy hacking!
  ~Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Newbie user: Feedback on custom package definition

2023-03-02 Thread Gary Johnson
Rodrigo Morales  writes:

> 8<---
> 8<...Text elided...
> 8<---
>
>
> 3 The questions
> ===
>
>   + What changes would you do to improve the definition of the package
> that I wrote?

Whenever possible, you should not be using the `trivial-build-system`.
Guix comes with a wealth of built-in build systems that will take care
of building and installing packages written in many different languages.
For Emacs Lisp packages, you should use the `emacs-build-system`. Here
is an example:

```
(define-public emacs-vcard
  (package
   (name "emacs-vcard")
   (version "0.2.1")
   (source
(origin
 (method url-fetch)
 (uri (string-append
   "https://elpa.gnu.org/packages/vcard-;
   version
   ".tar"))
 (sha256
  (base32 "0nfrh1mz2h7h259kf7sj13z30kmjywfvs83ax5qjkfwxhqm03abf"
   (build-system emacs-build-system)
   (home-page "https://elpa.gnu.org/packages/vcard.html;)
   (synopsis "Package for handling vCard files")
   (description
"This file contains `vcard-mode', for viewing vCard files.  Other files in 
this
package contain functions for parsing and writing vCard data.")
   (license gpl3+)))
```

This will download and validate the source, build the package, install
it under /gnu/store, and symlink it into the profile that you installed
it into. It will take care of adding these directories to these
environment variables, which ensure that Emacs can require them later:

- EMACSLOADPATH
- EMACSNATIVELOADPATH

>   + Do you manage your Emacs packages with GUIX? Could you briefly
> describe your workflow or point me to references/documentation?

I do manage all of my Emacs packages with Guix. I list `emacs` and all
of its packages in a manifest file (emacs.scm). It looks like this with
my custom packages elided:

```
(use-modules ((gnu packages) #:select (specifications->manifest)))

(specifications->manifest
 (list "emacs"
   "emacs-adoc-mode"
   "emacs-alsamixer-el"
   "emacs-async"
   "emacs-calibredb"
   "emacs-cider"
   "emacs-clojure-mode"
   "emacs-company"
   "emacs-crdt"
   "emacs-csv-mode"
   "emacs-elpher"
   "emacs-emms"
   "emacs-eww-lnum"
   "emacs-exwm"
   "emacs-flycheck"
   "emacs-flymake-kondor"
   "emacs-flyspell-correct"
   "emacs-forge"
   "emacs-geiser"
   "emacs-geiser-guile"
   "emacs-gnuplot"
   "emacs-google-translate"
   "emacs-helm"
   "emacs-helm-ag"
   "emacs-helm-descbinds"
   "emacs-helm-swoop"
   "emacs-htmlize"
   "emacs-magit"
   "emacs-markdown-mode"
   "emacs-nov-el"
   "emacs-ob-async"
   "emacs-org"
   "emacs-org-pomodoro"
   "emacs-ox-gfm"
   "emacs-paredit"
   "emacs-pdf-tools"
   "emacs-pinentry"
   "emacs-rjsx-mode"
   "emacs-shroud"
   "emacs-telephone-line"
   "emacs-treemacs"
   "emacs-vterm"
   "emacs-web-mode"
   "emacs-which-key"
   "mu"))
```

I actually split up all the user packages on my system into manifests
and isntall each one into its own profile, which I then activate on
startup. However, that's not really necessary for this example. You can
install the manifest packages above into your user profile with this
command:

```
guix package -m emacs.scm
```

If you want to include packages that you wrote yourself, you can either
add them to your GUIX_PACKAGE_PATH environment variable or you can
create your own Guix channel, add it to your ~/.config/guix/channels.scm
file, and run `guix pull`.

To get help in writing new Guix packages for Emacs, try out the `guix
import elpa` command like so:

```
guix import elpa --archive=melpa gemini-mode
```

Alright. That's it for now. Good luck and happy hacking!

 ~Gary

-- 
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Problems with Gnome Authenticator 2FA

2023-02-26 Thread Gary Johnson
Wojtek Kosior  writes:

> I recall keepassxc, beside being a password manager (and one I am
> satisfied with), can also generate authentication codes :)
>
> guix show keepassxc

Thanks, Wojtek! I was able to use keepassxc to create a TOTP code for
Gitlab 2FA.

I wonder if anyone is planning on fixing the broken GNOME Authenticator
package though?

Cheers,
  Gary

-- 
GPG Key ID: C4FBEDBD
Use `gpg --search-keys trac...@disroot.org' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Problems with Gnome Authenticator 2FA

2023-02-22 Thread Gary Johnson
Hi Guix,

  I'm being required to setup a 2FA application to create
one-time-passwords for a self-managed Gitlab instance. The wrinkle is
that I don't own a smartphone. Up until now I've been able to use 2FA
over SMS for most systems I interact with, but Gitlab doesn't support
this option. Instead, there is a hard requirement on using a dedicated
application for this purpose. The recommended choices are Google
Authenticator and Microsoft Authenticator for either iOS or Android.
Again, I don't have access to either of these operating systems, nor do
I want to use these proprietary applications for (what should be) such a
basic task.

In digging through the Guix package list, I found `authenticator`:

==
name: authenticator
version: 3.32.2
outputs:
+ out: everything
systems: x86_64-linux
dependencies: desktop-file-utils@0.26 gettext-minimal@0.21 glib@2.70.2 
gobject-introspection@1.66.1 gsettings-desktop-schemas@41.0 gtk+@3.24.30 
libhandy@0.0.13
+ libsecret@0.20.5 pkg-config@0.29.2 python-beautifulsoup4@4.11.1 
python-pillow@9.2.0 python-pyfavicon@0.1.1 python-pygobject@3.40.1 
python-pyotp@2.7.0
+ python-pyzbar@0.1.8 python@3.9.9 yoyo-migrations@7.2.0 zbar@0.23.90
location: gnu/packages/gnome.scm:10394:2
homepage: https://gitlab.gnome.org/World/Authenticator/
license: GPL 3+
synopsis: Two-factor authentication application built for GNOME  
description: Authenticator is a two-factor authentication (2FA) application 
built for the GNOME desktop environment.
+ 
+ Features:
+ 
+* QR code scanner
+ 
+* Beautiful UI
+ 
+* Huge database of more than 560 supported services
+ 
+* Keep your PIN tokens secure by locking the application with a password
+ 
+* Automatically fetch an image for services using their favicon
+ 
+* The possibility to add new services
==

It looks like a reasonable FOSS option, so I tried it out via `guix
shell`:

```
$ guix shell authenticator -- authenticator
```

Unfortunately, I just get a program crash and a stacktrace:

==
Traceback (most recent call last):
  File 
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/application.py",
 line 59, in do_startup
self._setup_actions()
  File 
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/application.py",
 line 142, in _setup_actions
Keyring.get_default().connect("notify::can-be-locked",
  File 
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/models/keyring.py",
 line 49, in get_default
Keyring.instance = Keyring()
  File 
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/models/keyring.py",
 line 44, in __init__
self.props.can_be_locked = self.is_password_enabled() and 
self.has_password()
  File 
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/models/keyring.py",
 line 136, in is_password_enabled
state = Secret.password_lookup_sync(schema, {}, None)
gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets 
was not provided by any .service files (2)
Traceback (most recent call last):
  File 
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/application.py",
 line 77, in do_activate
window = Window.get_default()
  File 
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/widgets/window.py",
 line 70, in get_default
Window.instance = Window()
  File 
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/widgets/window.py",
 line 55, in __init__
self.init_template('Window')
TypeError: () takes 0 positional arguments but 1 was given
==

The line that stuck out to me was this one:

```
gi.repository.GLib.GError: g-dbus-error-quark: The name
org.freedesktop.secrets was not provided by any .service files (2)
```

A little web searching led me to understand that I need to have the
`gnome-keyring` daemon running. (I wish that had been in the package
documentation.)

Okay, so I reviewed the Guix manual, and I found this info:

==
 -- Variable: gnome-keyring-service-type
 This is the type of the service that adds the GNOME Keyring
 (https://wiki.gnome.org/Projects/GnomeKeyring).  Its value is a
 ‘gnome-keyring-configuration’ object (see below).

 This service adds the ‘gnome-keyring’ package to the system profile
 and extends PAM with entries using 

Re: Examples of local-host-entries or hosts-service-type?

2023-02-21 Thread Gary Johnson
2023/02/10 23:40, Sergiu Ivanov:

> I am reconfiguring my system right now, and guix system reconfigure
> /etc/config.scm tells me this:
>
> /etc/config.scm:126:27: warning: 'local-host-aliases' is deprecated, use 
> 'local-host-entries' instead
> /etc/config.scm:126:27: warning: 'local-host-aliases' is deprecated, use 
> 'local-host-entries' instead
> /etc/config.scm:124:14: warning: the 'hosts-file' field is deprecated, please 
> use 'hosts-service-type' instead
>
> For the record, here are the lines guix system reconfigure is
> complaining about:
>
> (hosts-file (plain-file "hosts"
>   (string-append
>(local-host-aliases host-name)
>"some.ip.address.1 machine1\n"
>"some.other.ip.address machine2\n")))
>
> I spent quite some time trying to find some examples of using
> local-host-entries or hosts-service-type, but I don't seem to find any
> mention of these.  Quite on the contrary, the Guix manual actually seems
> to advice declarations similar to those which I have in my
> /etc/config.scm.
>
> Could someone point me to an example of how I should update
> my configuration?

Hi Sergiu et al,

  I just went through this exercise myself, and I decided to keep my
extra /etc/hosts entries in a separate text file using the original
hosts format. This makes them much easier for me to read and edit. To
provide them to the `hosts-service-type` service, I went ahead and wrote
a little importer function in Scheme that I thought some other folks
might benefit from. Here it is along with how to use it in your
`operating-system` declaration:

```scheme
(use-modules
 ((gnu services base)#:select (hosts-service-type host))
 ((gnu services desktop) #:select (%desktop-services))
 ((gnu services) #:select (simple-service))
 ((gnu system)   #:select (operating-system))
 ((ice-9 ports)  #:select (call-with-input-file))
 ((ice-9 textual-ports)  #:select (get-string-all)))

(define (load-hosts-entries)
  (call-with-input-file "etcfiles/extra-hosts"
(lambda (p)
  (let* ((text   (get-string-all p))
 (lines  (string-split text #\newline))
 (lines* (filter (lambda (l) (not (or (string-null? l) 
(string-prefix? "#" l lines)))
(map (lambda (l)
   (let* ((tokens  (string-split l #\space))
  (tokens* (filter (lambda (t) (not (string-null? t))) 
tokens))
  (ip  (car tokens*))
  (alias   (cadr tokens*)))
 (host ip alias)))
 lines*)

(operating-system
  ...
  (services (cons* (simple-service 'add-extra-hosts hosts-service-type 
(load-hosts-entries))
   ...
   %desktop-services)))
```

To make this work, I have my additional hosts entries in a file called
"etcfiles/extra-hosts" relative to the location of my `system.scm` file
(which contains the `operating-system` declaration above).

That file looks like so:

```
# Section Comment 1
10.1.30.1 name1# Maybe a comment for myself
10.1.30.2 name2
10.1.30.3 name3
10.1.30.4 name4# Another comment

# Section Comment 2
10.6.1.1 name5
10.6.1.2 name6 # And yet another comment
10.6.1.3 name7
10.6.1.4 name8
```

This is, of course, the regular /etc/hosts format. I just leave out the
127.0.0.1 and ::1 entries for localhost since Guix adds those
automatically.

Also, please note that the Guix info pages are incorrect for
`hosts-service-type` and `host`. The docs say they are exported by `(gnu
services)`, but they are actually located in `(gnu services base)`. It
would be great if one of the manual maintainers could fix this mistake
as it was one of the trickiest things I had to figure out to make this
code work.

Thanks and happy hacking!
  Gary

-- 
GPG Key ID: C4FBEDBD
Use `gpg --search-keys trac...@disroot.org' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Changing dns during installation

2023-01-04 Thread Gary Johnson
"Kefir ."  writes:

> Hi guix, is there way to change nameservers during manual installation?

You can set your nameservers in your `operating-system` declaration by
removing `network-manager-service-type` from `%desktop-services` and
then either automatically creating a `resolv.conf` file with
`etc-service` or setting the `name-servers` property in a
`static-networking` configuration. Note that you would use one or the
other, not both here. I've provided examples of both approaches below.

```scheme
(use-modules
 ((gnu services base)   #:select (static-networking-service-type 
static-networking network-address network-route))
 ((gnu services desktop)#:select (%desktop-services))
 ((gnu services networking) #:select (network-manager-service-type))
 ((gnu services)#:select (etc-service modify-services))
 ((gnu system)  #:select (operating-system)))

(operating-system
 ...
 (services (cons*

;; Add files under /etc
(etc-service `(("resolv.conf" ,(plain-file "resolv.conf" 
"nameserver 53.100.82.198"

;; Static Networking
(service static-networking-service-type
 (list (static-networking
(addresses (list (network-address
  (device "enp2s0")
  (value "192.168.1.25/24"
(routes (list (network-route
   (destination "default")
   (gateway "192.168.1.1"
(name-servers '("53.100.82.198")

;; Remove network-manager-service-type from %desktop-services
(modify-services %desktop-services
 (delete network-manager-service-type)
```

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Help request for new Clojure package definition

2022-11-05 Thread Gary Johnson
Fabio Natali  writes:

> I'm trying to package Riddley [0], apparently a dependency for a Clojure
> package I'm interested in.
>
> I haven't done much - I started from one of the existing Clojure
> definitions as an example and I went through a few iterations of
> "build-fail-fix-repeat" until I reached the version below. Then I hit a
> wall.
>
> #+begin_src scheme
> (define-public clojure-riddley
>   (package
> (name "clojure-riddley")
> (version "0.2.0")
> (home-page "https://github.com/ztellman/riddley;)
> (source (origin
>   (method git-fetch)
>   (uri (git-reference
> (url home-page)
> (commit version)))
>   (file-name (git-file-name name version))
>   (sha256
>(base32
> "1wpcjxsryzv36bf7ld0y9dw38dqhgji0wb8gsim6dmkgynbmz3q2"
> (build-system clojure-build-system)
> (arguments
>  '(#:source-dirs '("src/riddley")
>#:java-source-dirs '("src/riddley")
>#:test-dirs '("test/riddley")
>#:doc-dirs '()))
> (synopsis "A Clojure library for walking and transforming code")
> (description "This library provides a correct
> @code{riddley.walk/macroexpand-all}, which preserves the binding information 
> in
> @code{} and expands inlined functions, and @code{riddley.walk/walk-exprs},
> which is a general mechanism for code walking and transformation.")
> (license license:expat)))
> #+end_src
>

Hi Fabio,

You are quite close. Remember that #:source-dirs and #:test-dirs are
added to the Java classpath when building and running your Clojure
programs. Because the Clojure namespaces in the clojure-riddley package
are riddley.compiler and riddley.walk, you have to make sure not to
include "riddley" in the #:source-dirs or #:test-dirs paths. Here is an
updated package definition that successfully builds on my machine with
the current version of Guix:

#+begin_src clojure
(define-public clojure-riddley
  (package
   (name "clojure-riddley")
   (version "0.2.0")
   (home-page "https://github.com/ztellman/riddley;)
   (source (origin
(method git-fetch)
(uri (git-reference
  (url home-page)
  (commit version)))
(file-name (git-file-name name version))
(sha256
 (base32
  "1wpcjxsryzv36bf7ld0y9dw38dqhgji0wb8gsim6dmkgynbmz3q2"
   (build-system clojure-build-system)
   (arguments
'(#:source-dirs '("src")
  #:java-source-dirs '("src/riddley")
  #:test-dirs '("test")
  #:doc-dirs '()))
   (synopsis "A Clojure library for walking and transforming code")
   (description "This library provides a correct
@code{riddley.walk/macroexpand-all}, which preserves the binding information in
@code{} and expands inlined functions, and @code{riddley.walk/walk-exprs},
which is a general mechanism for code walking and transformation.")
   (license expat)))
#+end_src

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Dual booting

2022-10-12 Thread Gary Johnson
July 28, 2022 10:04 AM, "Paul Jewell via"  wrote:

> Could anyone please share a working configuration for dual booting windows 
> and guix? I have to use
> windows for work, but use Linux for everything else. I want to put guix on my 
> work laptop so I can
> stick with Linux when travelling (I am self employed, so there are no IT 
> restrictions on my
> system). I have the necessary skills to put another Linux distribution on, 
> but I want to use my
> spare time in the evenings when travelling to work on guix. Looking at the 
> bootloader information
> in the documentation, it seems that chainloader is not available as an option.

DISCLAIMER: I don't personally use any Windows software, nor do I mean
to advocate for its use on this mailing list. However, the
following recommendations should be sufficiently generic to
apply to any hosted OS that a user wants to install.

Have you considered just installing Guix System as your main OS and then
running Windows in a virtual machine? That way you don't need to reboot
your computer to run non-Linux applications, and you don't have to ever
let Windows out of its little sandbox.

Guix provides numerous options when it comes to setting up virtual
machines. Here are some of the main contenders:

- virt-manager (uses libvirt-service-type)
- qemu
- ganeti
- xen
- bochs

Have fun and happy hacking!
 ~Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: substitute for Skype

2022-08-03 Thread Gary Johnson
I've used Jitsi Meet at work for many of my pair programming sessions on
and off for the past few years. It's really quite simple to use from
Guix.

Step 1. Install `ungoogled-chromium`.

Step 2. Open https://meet.jit.si in Chromium.

Step 3. Type the name of the video chat room that you want to create in
the text box on the Jitsi Meet home page and press the "Start
meeting" button.

Step 4. Grant your browser access to your camera and microphone.

Step 5. Enjoy your call. ;)

Note: On your first visit to the site, you may be prompted to install a
  browser extension for Google Calendar and Office 365 Integration.
  You can simply click the checkbox by "Don't show me this again"
  and close that pop-up. It's completely unnecessary for using Jitsi
  Meet. It's just a call scheduling feature for online calendars.

Happy videoconferencing!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: X11 cursor size

2022-07-18 Thread Gary Johnson
a...@soeven.de writes:

> Thanks for pointing out the Adwaita-Icon-Theme along with the path to
> the system wide icons/pointer directory. Now I'm able to set the pointer
> and size for the X11 session. Unfortunately emacs (when exwm is started)
> seems to override this setting and for all child frames of exwm. Someone
> else reported the same effect using guix installed emacs in arch-linux
> (I'm using guix system). Also a similar (x-pointer) topic was discussed
> in the exwm issues (with no obvious solution (issue was closed
> unsolved)).
>
> So question now is: how do I increase the x-pointer size under exwm in
> guix emacs?

I am also running EXWM under X11 on Guix System. Using `xsetroot` in my
~/.xsession file is all that I have needed to do, and my pointer
settings persist under EXWM as expected. My guess is that you have
overriden your emacs cursor settings somewhere and need to undo that.
Here are the usual places to look:

- ~/.emacs.d/init.el
- ~/.exwm
- ~/.Xresources

Good luck,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: X11 cursor size

2022-07-17 Thread Gary Johnson
a...@soeven.de writes:

> I tried this already an the effect is, that the default pointer (in X11
> outside of any window) changes from a cross to a left_ptr but the size does
> not change. If I understand correctly, I need to have type1 fonts for
> that which I included in my config by adding `font-xfree86-type1` to my
> systems package list (but the corresponding path doesn't show up in the
> X11-fontpath).
>
> Also I'm wondering how to set the cursor size because by just executing
> `xsetroot -cursor_name left_ptr` I set the cursor shape/type but how do
> I specify the size? Recepies from the net suggest to do this via a
> `fonts.alias` but that doesn't seem to have an effect either.

Hi Alex,

In my last message, I suggested that you should read the man page for
xsetroot, as it provides several options for changing your cursor
settings in X. The example I gave was just of the way that I use it.

If you want to use xsetroot to increase your cursor size, try adding
this line to your ~/.xsession file:

xsetroot -xcf /run/current-system/profile/share/icons/Adwaita/cursors/left_ptr 
32

For this Xcursor file to be available, you'll need to make sure that you
have installed the following package into your system profile.

- adwaita-icon-theme

If you would prefer a different cursor than the left_ptr, feel free to
pick any file in the `cursors` directory.

Have fun and happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: X11 cursor size

2022-07-15 Thread Gary Johnson
a...@soeven.de writes:
>
> My problem is the following: I use guix with X11 and EXWM as (only)
> window manager. I have a 13" laptop with 4k screen and therefore the
> X11-pointer/cursor is so small, that most of the time I don't even see
> it. All solutions to increase the cursor size without using gnome or
> similar tools involve the installation of a scalable font and then
> incresing the size of the cursor. However I don't manage to make this
> work on guix.
>
> Does anyone maybe have a working solution for this which they can share?
>
> Cheers, Alex

Hi Alex,

I also run EXWM as my window manager under Guix System. I manage my
keyboard and cursor settings in my ~/.xsession file. For the cursor
settings, I use xsetroot like so:

```
# Change cursor to left arrow
xsetroot -cursor_name left_ptr
```

Take a look at its man page for quite a few options related to setting
the cursor file and size.

Happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Guix home package confusion

2022-06-15 Thread Gary Johnson
Sébastien Rey-Coyrehourcq  writes:

> Hi,
>
> Happy to see i'm not alone, a little lost when jumping into the guix
> home bath ;)
>
> I think there is something to do (a schema, a table ?) to better
> visualize relation between guix home, guix system, guix install, guix
> package for the beginer. That could help a lot when you start your
> workflow from scratch and you don't know how thing relate each others.
>
> A list with dotfile shared by others, like sqrtminus / dominicm could
> also help (copy / pasting and learning from others).
>
> Best regards
>
> Src

This has been an interesting thread, and I'm glad the OP eventually
worked out a solution for using these tools together.

In my setup, I use these three approaches:

1. guix system

   Installs global packages, runs system services, and creates
   everything in my filesystem outside of /home/$USER.

2. guix home

   Installs local packages for $USER, runs user services, and creates
   all of my dotfiles in /home/$USER, including my shell config files
   (i.e., .bashrc, .bash_profile, .bash_logout).

3. guix package w/ manifests

   Installs local packages for $USER in package groups. For example, I
   place emacs and all of its packages into a manifest called emacs.scm,
   which is installed into my emacs profile. I make similar
   manifest/profile pairs for all the groups of packages on my system.
   Here are my current manifests (chromium, emacs, flatpak, matterhorn,
   media, network, programming, qgis, sysutils, texlive, wine). I then
   have a script that loops over all of my manifests and updates each
   profile whenever I run `guix pull`.

   There are (at least) two advantages to this approach over using `guix
   package` without manifests:

   1. If `guix weather` indicates that no binary substitute exists yet
  for a large package like ungoogled-chromium, qgis, texlive, or
  wine, I can simply upgrade all of my other profiles now and wait
  until a substitute is available before upgrading the large
  package's profile.

   2. If one package fails to build, only its profile doesn't get
  upgraded. All of my other profiles can still be upgraded
  successfully. Then I can go about debugging the broken package at
  my leisure (or wait until the next `guix pull` fixes it) and just
  worry about rebuilding the one upgraded profile at that time.

The main thing to remember when working with Guix is that no matter
which method you use to install a package, it will only be built and
installed once into /gnu/store as long as you are using the same guix
revision (or the same revisions of a particular combination of channels)
and the same package definition.

The different installation commands (guix system, guix home, guix
package) just create your profile directory (containing symlinks back to
/gnu/store) in different places on your filesystem.

To see the packages installed via `guix system`, use this:

  guix package --profile=/var/guix/profiles/system/profile -I

To see the packages installed via `guix home`, use this:

  guix package --profile=$HOME/.guix-home/profile -I

To see the packages installed via `guix package` without manifests, use
this:

  guix package -I

  or if you want to be explicit:

  guix package --profile=$HOME/.guix-profile -I

To see the packages installed via `guix package` with manifests, use
this:

  guix package --profile=$PATH_TO_YOUR_PROFILE -I

Hopefully by now the pattern should be apparent. ;)

The truly IMPORTANT thing to keep in mind when using multiple profiles
is that you have to add them to your login shell's PATH, MANPATH, and
INFOPATH environment variables in order to actually be able to use (and
read documentation about) the packages they contain.

I source the following script in my ~/.bash_profile for this purpose:

```
#!/bin/sh

GUIX_PROFILES=$PATH_TO_YOUR_PROFILES_DIRECTORY

for dir in $GUIX_PROFILES/*
do
name=$(basename "$dir")
profile=$dir/$name
if [ -f "$profile"/etc/profile ]
then
GUIX_PROFILE="$profile"
. "$GUIX_PROFILE"/etc/profile
export MANPATH="$GUIX_PROFILE/share/man${MANPATH:+:}$MANPATH"
export INFOPATH="$GUIX_PROFILE/share/info${INFOPATH:+:}$INFOPATH"
fi
unset profile
unset name
done
```

I hope this info helps someone out there improve their Guix
configuration. That's all I've got for now, so have fun and happy
hacking!

~Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Screen sharing ungoogled-chromium

2022-05-04 Thread Gary Johnson
phodina via  writes:

> Jitsi works in chromium and I'm able to share screen.
>
> But I'm trying to switch to Guix as my work laptop but in order to do that 
> the Teams screen share would have to work.
>
> Anyway it's proprietary garbage so if there isn't anybody who got it working 
> let's just close the discussion.

As just one more data point, I use Guix as my work laptop and connect to
my video conferencing meetings through ungoogled-chromium. In my
experience, I can share my screen successfully in Jitsi and Zoom
meetings only. I can attend Google Meet meetings and see other people's
screens but cannot share my own. Microsoft Teams just crashes and burns
when I try to connect.

Fortunately (?) my company mostly uses Zoom for scheduled meetings, and
I can use Jitsi for my personal meetings, so this works out fine for me
at this time.

Best of luck,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Cups Web Interface is Disabled

2022-05-04 Thread Gary Johnson
Les  writes:

> Gary, added the following:
>
> ```
> (service cups-service-type
>  (cups-configuration
>   (web-interface? #t)))
> ```
>
> This did not change the access to cups. The Web Interface still
> remains Disabled.
>

1. Make sure to import `cups-service-type` and `cups-configuration` in your 
`use-modules` declaration at the top of the file.

2. Make sure that your `operating-system` declaration compiles without errors.

3. Remember to run `sudo guix system reconfigure /path/to/your/config.scm` to 
add this service.

4. Make sure the CUPS service is running with `sudo herd status cups`.
   If not, you may need to start it manually or simply reboot your
   computer to bring it up automatically at init time.

Good luck!

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Cups Web Interface is Disabled

2022-04-26 Thread Gary Johnson
Les Campbell  writes:

> When I attempt to load cups at http://local host631/admin the
> following message is displayed:
>
>
>  Web Interface is Disabled
>
> The web interface is currently disabled. Run "cupsctl
> WebInterface=yes" to enable it.
>
> From the terminal I run "cupsctl WebInterface=yes" however I get
> "cupsctl: Internal Server Error".
>
> How can I correct this problem and access the cups menu?

Make sure you have set web-interface? to #t in the cups-service-type
definition in your operating-system record's services field.

```
(service cups-service-type
 (cups-configuration
  (web-interface? #t)))
```

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Nix programs on path but not found

2022-03-02 Thread Gary Johnson
Stefan Baums  writes:

> I am running Guix with EXWM. Prior to Guix, in Ubuntu, I used
> ~/.xinitrc to set some environment variables and run some startup
> programs. Since this is apparently not read in Guix+EXWM, I put
> the following at the top of my ~/.exwm instead:
>
> ...snip...
>
> From ansi-term and from async-shell-command, I am now also able to
> run programs installed in my Nix profile (e.g., onboard), but NOT
> from eshell (even though PATH is there shown as above), and NOT
> from the .xinitrc invoked from my .exwm startup script.
>
> Does anybody what is going on here, and how to fix it?

I'm not sure what is happening in your particular case, but I am also
using Guix with EXWM (and have been doing so for several years now).

What I do for setting up my environment is this:

1. Declare environment variables in ~/.bash_profile (source ~/.bashrc
   from here as well).

2. Declare aliases in ~/.bashrc.

3. Set up my X environment (with xsetroot, xset, setxkbmap, xrdb, etc.)
   in ~/.xsession. End the ~/.xsession file with "exwm" on the final
   line.

4. Put my Emacs configuration in ~/.emacs.d/init.el.

5. Put my EXWM configuration in ~/.exwm.

6. Put my eshell aliases in ~/.emacs.d/eshell/alias.

When I log in via Guix's graphical login prompt, each of the files I
listed above are executed in the order that I named them. All
environment variable settings from my ~/.bash_profile are inherited by
all shells (including eshell) in Emacs.

Have fun and happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: installing a package not from GNU

2022-03-02 Thread Gary Johnson
Gottfried  writes:
> I wanted to install a package "gtkhash" which I could not find in GNU
> packages.
> How can I install it?
> After downloading it and trying to install it, it said: unknown package
>
> guix install gtkhash-1.4
> guix install: Fehler: gtkhash-1.4: Unbekanntes Paket
>
>
> What to do, if I don´t find a package in GNU and I would like to install it?

You need to create a Guix package definition for the package you want to
install. Assuming you have placed your definition in a file called
gtkhash.scm, you can install it with this command:

guix package -f gtkhash.scm

See the Guix manual for instructions on how to write a package definition.

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: printer installed, now scanner ?

2022-02-19 Thread Gary Johnson
Gottfried  writes:

> Next step:
> How can I install a scanner, because my printer can also scan.
> I installed a scanning program: "simple scan" "xsane" "gimp"  in
> hoping to be able to scan. But it doesn't.

Scanning is also a service in Guix, so you will need to configure it in
your config.scm. The Guix info manual is very helpful in answering
questions like this. Here, it looks like the solution is in the manual
on the page called "Printing Services".

The service that you need for scanning is called "sane-service-type". It
looks like it is included by default in the "%desktop-services" list, so
you should already have it installed. However, it looks like you may
need to configure the `sane-backends` variable in your config.scm to
activate scanning for your printer.

Here is the relevant documentation from the manual:



 -- Scheme Variable: sane-service-type
 This service provides access to scanners via SANE
 (http://www.sane-project.org) by installing the necessary udev
 rules.  It is included in ‘%desktop-services’ (*note Desktop
 Services::) and relies by default on ‘sane-backends-minimal’
 package (see below) for hardware support.

 -- Scheme Variable: sane-backends-minimal
 The default package which the ‘sane-service-type’ installs.  It
 supports many recent scanners.

 -- Scheme Variable: sane-backends
 This package includes support for all scanners that
 ‘sane-backends-minimal’ supports, plus older Hewlett-Packard
 scanners supported by ‘hplip’ package.  In order to use this on a
 system which relies on ‘%desktop-services’, you may use
 ‘modify-services’ (*note ‘modify-services’: Service Reference.) as
 illustrated below:

  (use-modules (gnu))
  (use-service-modules
...
desktop)
  (use-package-modules
...
scanner)

  (define %my-desktop-services
;; List of desktop services that supports a broader range of 
scanners.
(modify-services %desktop-services
  (sane-service-type _ => sane-backends)))

  (operating-system
...
(services %my-desktop-services))



You should follow the steps in the "sane-backends" example to update
your config.scm file and then rebuild your OS by running this command as
your regular (non-root) user:

$ sudo guix system reconfigure config.scm

Good luck and happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: install a Printer

2022-02-18 Thread Gary Johnson
Gottfried  writes:

> thanks for Your help, I am one step further, it installed now printer
> settings, I can see a symbol in my MATE Desktop.
>
> But I can`t open it, when clicking on it, nothing happens.
>
> If I click on hplip, also, nothing happens.
>
> In my printer settings, (looked at in Libre Office) there is a generic
> printer available, but I can`t change anything.

Now that you have installed the CUPS service, you should verify that it
is running and then add your printer to it.

1. Verify that the CUPS service is running. Run the command below using
   sudo from your regular (non-root) user account. If you see similar
   output, then CUPS is running.

   $ sudo herd status cups

   Status of cups:
 It is started.
 Running value is 550.
 It is enabled.
 Provides (cups).
 Requires (networking).
 Conflicts with ().
 Will be respawned.

2. Open the CUPS web interface by visiting this URL in your web browser:

   http://localhost:631/

3. Click the "Administration" link in the navbar. You may be prompted to
   log in. You should enter your root user's credentials here. You can
   also reach the same page by simply visiting this URL:

   http://localhost:631/admin

4. Click the "Add Printer" button on this page and follow the prompts to
   install your local printer. Make sure that your printer is turned on
   and plugged into your computer before starting this step.

5. Once you have added your printer, you can click on the "Printers"
   link in the navbar to see it listed. You can also reach this page by
   visiting this URL:

   http://localhost:631/printers/

6. And that's about it. If you want to read more about adding and
   managing printers in CUPS, you can visit the help page at this URL:

   http://localhost:631/help/admin.html


Have fun and happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: installing packages in Guix System

2022-02-17 Thread Gary Johnson
Gottfried  writes:
> When you install a package in an other Linux distro, it will be
> available in the system.
>
> In guix it is different. I installed e.g. hplip,
> system-config-printer,cups, cups-filters, but additionally I have to
> add the printer settings in the /etc/config.scm file.
>
> Could somebody explain it to me why?

These are the standard steps to update your packages on Guix System:

NOTE: You should run all of these commands as your regular (non-root)
  user account. There is no need to install packages as root on Guix
  System. Doing so is usually a sign of confusion by the user.

1. Download and build the latest version of the guix package manager.
   This will also download the most up-to-date collection of package
   recipes to your computer. However, it will not update any of the
   packages that you have already installed. It only updates the guix
   command.

   $ guix pull

2. Update all of the packages that you have already installed in your
   user profile by asking guix to rebuild all of those which have
   updated package recipes. This will also rebuild any packages that you
   have installed whose dependencies have updated package recipes.

   $ guix package -u

3. Update all of the packages and services that you have installed
   system-wide with your config.scm file. This is the file that contains
   your operating-system declaration. Note that you need to use sudo for
   this command, but you should run it as your regular (non-root) user.
   Otherwise, you will not be using the latest version of the guix
   command that you just downloaded in step 1.

   $ sudo guix system reconfigure config.scm

4. Be happy! You are done. ;)

> When I installed printer packages, where do they go? Is the guix
> system on a different level and it needs also to be configured
> additionally?

Every package that you install with the guix command is installed under
/gnu/store. The reason that you can use these commands as though they
were installed in the usual Linux locations (e.g., /bin, /sbin/,
/usr/bin, /usr/local/bin, /opt) is because the guix command creates a
web of symlinks under ~/.config/guix/current and ~/.guix-profile which
point at the files you installed under /gnu/store.

The bin directories within these two symlink directories are
automatically added to your $PATH environment variable on Guix System,
which ensures that your shell will be able to find and use all of these
programs under /gnu/store.

If you want to configure system services (e.g., printing server,
database server, web server, gemini server, tor server, ssh server,
...other servers..., and some other magical, non-server one-shot
things), you have to add entries for these services to your config.scm
file along with the relevant configuration settings for these services.

When you run the command in step 3 above, the packages for these
services will be installed under /gnu/store and then service entries for
each of them will be added to Sheperd, which is Guix System's service
manager.

You can interact with Sheperd services using the herd command like so:

$ sudo herd status

$ sudo herd status cups

I hope this information was clear and helpful.

Have fun and happy hacking!

 ~Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: install a Printer

2022-02-17 Thread Gary Johnson
Lieber Gottfried,

  Schreib genau wie so:


;; This is an operating system configuration generated
;; by the graphical installer.

(use-modules (gnu))
(use-package-modules cups)
(use-service-modules cups desktop networking ssh xorg)

(operating-system
 (locale "de_DE.utf8")
 (timezone "Europe/Berlin")
 (keyboard-layout (keyboard-layout "de"))
 (host-name "Tuxedo")
 (users (cons* (user-account
(name "gfp")
(comment "Gfp")
(group "users")
(home-directory "/home/gfp")
(supplementary-groups
 '("wheel" "netdev" "audio" "video")))
   %base-user-accounts))
 (packages
  (cons* (specification->package "awesome")
 (specification->package "nss-certs")
 %base-packages))
 (services
  (cons* (service mate-desktop-service-type)
 (service enlightenment-desktop-service-type)
 (service cups-service-type
  (cups-configuration
   (web-interface? #t)
   (extensions (list cups-filters hplip
 (service openssh-service-type)
 (service tor-service-type)
 (set-xorg-configuration
  (xorg-configuration
   (keyboard-layout keyboard-layout)))
 %desktop-services))
 (bootloader
  (bootloader-configuration
   (bootloader grub-efi-bootloader)
   (targets '("/boot/efi"))
   (keyboard-layout keyboard-layout)))
 (swap-devices
  (list (uuid "51d5cd20-4513-4a02-9e35-df4338eccaa0")))
 (file-systems
  (cons* (file-system
  (mount-point "/boot/efi")
  (device (uuid "BB77-FE3B" 'fat32))
  (type "vfat"))
 (file-system
  (mount-point "/")
  (device (uuid "4fb0ed7c-61ab-45eb-be0b-ff527b320e6d" 'ext4))
  (type "ext4"))
 %base-file-systems)))


-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: What happened to gfortran-toolchain?

2022-01-10 Thread Gary Johnson
Hi Remco,

  Yes. That appears to have fixed the problem. I pulled and was then
able to once again reinstall gfortran-toolchain.

Cheers,
  Gary


Remco  writes:

>> Could this hidden-package form be the culprit here? Was hiding gfortran
>> an intentional change to Guix System, or was this an accident? If the
>> former, what is the current recommended approach for Fortran programming
>> on Guix?
>
> Just came across this commit which was made about an hour before your
> message:
>
>   
> https://git.savannah.gnu.org/cgit/guix.git/commit/?id=af1b5de6d8a54439ef3f7e1f5fe9a8e7d109972d
>
> Does that fix the problem for you?
>
> Cheers,
> Remco


-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



emacs-shroud package appears to be out of date

2022-01-06 Thread Gary Johnson
Hi Guix,

During my recent `guix pull` + `guix package -u` adventure, the
emacs-shroud package barfed due to what looks like a hard-coded
reference to an older version of gnupg. I uninstalled it in order to
complete my upgrade. Of course, when I try to reinstall it now, I
continue to get the same version conflict error due to gnupg.

```
gjohnson@euclid ~ $ guix package -i emacs-shroud
The following package will be installed:
   emacs-shroud 1.105

guix package: error: profile contains conflicting entries for gnupg
guix package: error:   first entry: gnupg@2.2.30 
/gnu/store/0snfzd41n430ddpq316j9v2z5fn2y62m-gnupg-2.2.30
guix package: error:... propagated from emacs-shroud@1.105
guix package: error:   second entry: gnupg@2.2.32 
/gnu/store/75122spwjdkxxgd32gkkil3n7ifax8i5-gnupg-2.2.32
guix package: error:... propagated from emacs-pinentry@0.1-1.dcc9ba0
hint: Try upgrading both `emacs-shroud' and `emacs-pinentry', or remove one of 
them from the profile.
```

Note, that while the above error message is complaining about
emacs-pinentry, it still barfs even if I remove emacs-pinentry and just
install gnupg directly since the current gnupg is 2.2.32.

Can whoever is maintaining the emacs-shroud package please update it to
gnupg@2.2.32, so it can be installed again?

Thanks,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



What happened to gfortran-toolchain?

2022-01-06 Thread Gary Johnson
Hi Guix,

I finally got around to running `guix pull` and `guix package -u` on my
system now that the holidays are over, and I got a notification that
the gfortran-toolchain package had been removed. Sure enough, running
`guix package -s gfortran-toolchain` and even `guix package -s gfortran`
return no results at all.

After a bit of digging, I managed to track down the gfortran-toolchain
package definition to gnu/packages/commencement.scm, where it looks
perfectly normal to me.

```
(define-public gfortran-toolchain
  (package (inherit (make-gcc-toolchain gfortran))
(synopsis "Complete GCC tool chain for Fortran development")
(description "This package provides a complete GCC tool chain for
Fortran development to be installed in user profiles.  This includes
gfortran, as well as libc (headers and binaries, plus debugging symbols
in the @code{debug} output), and binutils.")))
```

However, when I follow its reference to the
gfortran package over to gnu/packages/gcc.scm, I see this: 

```
(define-public gfortran
  (hidden-package
   (custom-gcc gcc
   "gfortran" '("fortran")
   %generic-search-paths)))
```

Could this hidden-package form be the culprit here? Was hiding gfortran
an intentional change to Guix System, or was this an accident? If the
former, what is the current recommended approach for Fortran programming
on Guix?

Thanks,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Run .deb or .rpm packages

2021-12-08 Thread Gary Johnson
André A. Gomes  writes:

> Hi Guix,
>
> I'm wondering if it's possible to install .deb or .rpm packages on the
> Guix system.
>
> For context, my government only provides me these solutions to install a
> authentication plugin that I use with my ID (smart) card.
>
> Thanks.

Hi André,

You can install the `dpkg` package with `guix package -i dpkg`. Hope
that helps.

Good luck,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: How to put a file in /gnu/store and set its permissions

2021-12-08 Thread Gary Johnson
> Nathan Dehnel  writes:
>
> Thanks. I guess then I need to know how to put a file in /etc/ssh
> without putting it in the store.

> On Sun, Dec 5, 2021 at 8:44 PM Gary Johnson  wrote:
>
> To programmatically add a file to /etc, you can extend the
> etc-service-type in your operating-system's services field like so:
>
> ```
> (use-modules
>  ((gnu services) #:select (simple-service etc-service-type))
>  ((gnu services desktop) #:select (%desktop-services))
>  ((gnu system)   #:select (operating-system))
>  ((guix gexp)#:select (local-file)))
>
> (define guixrig_host_rsa_key
>   (local-file "ssh/guixrig_host_rsa_key" #:recursive? #t))
>
> (operating-system
>  ...
>  (services (cons* (simple-service 'my-secret-service etc-service-type
>   `(("ssh/guixrig_host_rsa_key" 
> ,guixrig_host_rsa_key)))
>   %desktop-services)))
> ```
>
> Have fun and happy hacking!
>   ~Gary

> Nathan Dehnel  writes:
>
> Thanks. Though that code causes "guix system: error: symlink: File
> exists: "/etc/ssh"" when I use it, and by the looks of it, would still
> be putting the key in the store, which is insecure.

Bummer. It works as expected when I run that code on my system with:

```
sudo guix system reconfigure config.scm
```

Maybe you manually created /etc/ssh already, which could be causing the
error on your end? Either way, your file does end up in the store and is
owned by root:root with permissions 444.

I'm not aware of a way to add files to /etc or any other guix-managed
directory without placing a copy in the store. However, once your file
lands in /etc/ssh/guixrig_host_rsa_key, isn't it owned by root:root and
readable as well?

Perhaps one of the other Guix wizards on this mailing list would have
some ideas on how to control the permissions on these auto-generated
files.

Good luck,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: How to put a file in /gnu/store and set its permissions

2021-12-05 Thread Gary Johnson
Nathan Dehnel  writes:

> Thanks. I guess then I need to know how to put a file in /etc/ssh
> without putting it in the store.

To programmatically add a file to /etc, you can extend the
etc-service-type in your operating-system's services field like so:

```
(use-modules
 ((gnu services) #:select (simple-service etc-service-type))
 ((gnu services desktop) #:select (%desktop-services))
 ((gnu system)   #:select (operating-system))
 ((guix gexp)#:select (local-file)))

(define guixrig_host_rsa_key
  (local-file "ssh/guixrig_host_rsa_key" #:recursive? #t))

(operating-system
 ...
 (services (cons* (simple-service 'my-secret-service etc-service-type
  `(("ssh/guixrig_host_rsa_key" 
,guixrig_host_rsa_key)))
  %desktop-services)))
```

Have fun and happy hacking!
  ~Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Help with a GraalVM package?

2021-10-27 Thread Gary Johnson
Ekaitz said:
>>I searched a little bit and I didn't find any guide on how to build
>>GraalVM itself, if you can find me one I can try to guide you in
>>making the package or at least we could evaluate how hard is it.

Julien said:
> This is what I found:
> https://github.com/oracle/graal/blob/master/vm/README.md
>
> That info is not easy to find. Why hide it in a subdirectory?… Also, I
> have no idea what this mx thing is.

Thanks, Ekaitz and Julien.

I did some further digging (why do they make this so hard?), and I
finally found the `mx` command:

  https://github.com/graalvm/mx

It looks like it's their custom build tool written in Python, so we
would need a package for `mx` first to bootstrap the process.

Once again for reference, here are the build instructions that Julien found:

  https://github.com/oracle/graal/blob/master/vm/README.md

In this file, the author says the following:

> In our CI, we build it using:
> 
> the latest JVMCI-enabled JDK8 (pre-built archives; build instructions). The 
> JAVA_HOME environment variable must point to it.
> gcc: 4.9.2
> make: 3.83
> binutils: 2.23.2
> cmake: 3.15.2

I think the closest input packages in the latest guix are probably:

- gcc-toolchain@4.9.4 (which includes binutils@2.34 as a dependency)
- binutils@2.34 (do we need to include this as an input if we already have 
gcc-toolchain?)
- make@4.2.1
- cmake@3.21.1

The build docs reference a JVMCI-enabled JDK8. Of course the repository
pointed to by the "build instructions" link does not actually contain
any build instructions.

  https://github.com/graalvm/openjdk8-jvmci-builder

I dug a bit further into the issues list on that repository and found a
rather involved exchange with various programmers voicing their
frustrations with not being able to easily build a JVMCI-enabled JDK8
based on this repository's sources due to some proprietary components
that the GraalVM developers seemed to have added without any warning.
Eventually, it looked like at least one person on the issue thread
managed to get it to build, but the latest shared instructions were from
Dec 4th, 2020.

  https://github.com/graalvm/openjdk8-jvmci-builder/issues/11

However...I then backed up for a second to wonder what even is this
JVMCI thing and why do we need to add it to JDK8? A quick web search
turned up "JEP 243: Java-Level JVM Compiler Interface", which is a
feature that looks like it was shipped in JDK9.

  https://openjdk.java.net/jeps/243

Okay, so why not just use a newer JDK, right?

Heading back to that issues thread from earlier, I saw that one of the
GraalVM developers did eventually share a link to building a version of
JDK11 that should work as a base for building GraalVM.

  https://github.com/graalvm/labs-openjdk-11/blob/master/README.md

So this got me wondering whether they have done something similar for
newer versions of OpenJDK. Running a quick repository filtering search
under the graalvm Github organization led me here:

  https://github.com/orgs/graalvm/repositories?q=labs

It looks like they have worked on extending four OpenJDK versions to be
usable as the base for building GraalVM:

- labs-openjdk-11
- labs-openjdk-15
- labs-openjdk-16
- labs-openjdk-17

The Github commit graphs indicate that labs-openjdk-11 and
labs-openjdk-17 have seen the most activity in the past few months.
However, labs-openjdk-16 looked like it was getting some attention up
through July 2021.

Which one to try then? I remembered a warning about JDK17-based GraalVM
distributions being "experimental with several known limitations", so
maybe not that version.

  https://www.graalvm.org/docs/introduction/#available-distributions

How about the OpenJDK16-based version then? Perhaps that's a reasonable
path forward, and not too far off base since we already have an
openjdk@16.0.1 package in Guix. Perhaps we could modify it for this
purpose?

Continuing with this line of thinking, perhaps we could also try using
the newer versions of gcc-toolchain, binutils, make, and cmake as well?

...

Whew! So that was a lot of information in one email. I think the path
forward is first to make a package for the `mx` build tool, then to make
a package for `labs-openjdk-16`, and finally(?) to make a package for
`graalvm` that uses the previous two as inputs.

1. mx  https://github.com/graalvm/mx
2. labs-openjdk-16 https://github.com/graalvm/labs-openjdk-16
3. graalvm https://github.com/oracle/graal/blob/master/vm/README.md

I have built a number of rather simple Guix package definitions for my
machine, but the scope of this one is a bit beyond my current
capabilities IMHO. Any and all help from you packaging wizards would be
much appreciated!

Cheers,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  

Help with a GraalVM package?

2021-10-22 Thread Gary Johnson
Hi Guix,

Has anyone had any luck in building a package definition for GraalVM?

https://www.graalvm.org/

I'm a Clojure programmer in my day job, and one of the areas I work in
is (open source) high performance wildland fire modeling. GraalVM could
really help me speed up my existing OpenJDK-based models as well as help
me build other GraalVM-dependent Guix packages like the Clojure linter,
clj-kondo.

Any help with this task (or a pointer to a channel with a working
package definition) would be much appreciated.

Happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: xmodmap doesn't before pressing any button keyboard

2021-07-20 Thread Gary Johnson
Akib Azmain Turja  writes:

> I have setup my Emacs iwth EXWM. I am trying to remap several keys to
> avoid repetitive strain injury (RSI), also known as Emacs pinky. To
> accomplish that, I am using xmodmap. It works perfectly when I invoke
> the command directly. However it doesn't work when I put it in Emacs
> startup files. After several days of research, I discovered that
> xmodmap only works when I have pressed atleast one key in my keyboard.
> Any solutions?

Hi Akib,

I also use Emacs with EXWM. To prevent Emacs pinky, I add the following
lines to my $HOME/.xsession file:

===  

# Set keyboard repeat rate
xset r rate 200 60

# Change Caps Lock to Ctrl
setxkbmap -option "ctrl:nocaps"
setxkbmap -option "terminate:ctrl_alt_bksp"

===  

Remember to put `exwm` at the end of your $HOME/.xsession file to launch
your window manager when X starts up.

Happy hacking,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: My very own Guix System Server in my apartment

2021-06-30 Thread Gary Johnson
Joshua Branson  writes:

> Hello Guix people!
>
> So I will shortly be setting up my very own Guix System server in my
> apartment!
>
> [enthusiasm and a list of services to run on the new server...]
>
> What else should I do with said server?

Run a Gemini server, of course!

https://gemini.circumlunar.space/

Happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Haskell program build and run using Cabal

2021-04-11 Thread Gary Johnson
Bone Baboon  writes:

> I am trying to build a Haskell program from source and run it.  I am
> using Cabal a Haskell build tool to do this.  I am able to build and run
> this program without the following error messages on other Linux
> operating systems.
>
> [snip]
>
> Doing an internet search for this error message shows people dealing
> with it by setting environment variables.
>
> With Cabal's `new-build` and `new-run` commands I am running into issues
> with environment variables.  Are environment variables managed in Guix
> system configurations?  I searched the Guix manual for the search term
> "environment variable" and did not see a prominent section on
> environment variables.  That leads me to guess that in Guix environment
> variables are left to configuration files in the users home directory.

Guix System (unsurprisingly) has a built-in preference for building
packages with Guix. For building Haskell programs, check out the
`haskell-build-system`, which uses cabal and ghc under the hood.

Also, if the package you want to install exists on Hackage
(https://hackage.haskell.org) but doesn't have a corresponding Guix
package, you should check out the Guix hackage importer:

$ guix import hackage -r PACKAGE-NAME@VERSION

This can auto-generate a Guix package definition for the corresponding
Hackage package that you can then use to install it through Guix.

Finally, to answer your question about environment variables, you should
stick them in your home directory under your shell configuration script
(e.g., ~/.bashrc, ~/.bash_profile).

Happy hacking,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Edits to `etc/resolv.conf` being overwritten

2021-04-07 Thread Gary Johnson
Bone Baboon  writes:

> Thank you for the explanation and detailed examples.
>
> I now have my system configuration providing the contents of
> `/etc/resolv.conf` with a service.
>
> However the contents of `/etc/resolv.conf` is still being overwritten
> with entries for my internet service provider's DNS.  After some testing
> it appears to be happening when I run this command `sudo dhclient
> `.

That's unfortunate to hear. Perhaps you could check out the
network-manager-service-type? I believe it includes a parameter that
lets you tell NetworkManager not to overwrite /etc/resolv.conf. The
command-line interface for NetworkManager is called nmtui. This is what
I use on my machine.

> I also appreciate the `hosts-file` example you shared as I am thinking
> about using `https://github.com/StevenBlack/hosts` as a block list.  In
> this case the contents of `my-host-aliases` would be very large.  With
> Guile how would I have the definition of `my-host-aliases` in it's own
> file and import and use it in my system configuration?

(use-modules (ice-9 rdelim))

(define my-host-aliases (with-input-from-file "/path/to/your/file"
   (lambda () (read-delimited ""

Happy hacking,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: How to create a service for contents of arbitrary file

2021-04-07 Thread Gary Johnson
Bone Baboon  writes:

> When I use a virtual terminal or Emacs on a virtual terminal using
> `emacsclient --tty` I have a blinking cursor.  My preference is to not
> have the cursor blink.

In addition to Julien's suggestion, I'll also point out that you can
tell Emacs to not use a blinking cursor by including this line in your
~/.emacs.d/init.el file:

(blink-cursor-mode 0)

Hope that helps,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Edits to `etc/resolv.conf` being overwritten

2021-04-02 Thread Gary Johnson
Bone Baboon  writes:

>> Any suggestion on how to stop my edits of `etc/resolv.conf` from being
>> overwritten?
>>
>> `/etc/resolv.conf` is being overwritten removing changes I save to it.
>> My edits to `etc/resolv.conf` specify some name servers.  Some time
>> after my edits are saved the file is completely rewritten to it's
>> original contents before I made my edits.  The original contents include
>> nameserver, domain and search for my internet service provider's DNS. 

When running Guix System, your OS configuration is meant to be fully
derived from evaluating your `operating-system` definition. This
means, in particular, that you should not manually edit any files
outside of your home directories (i.e., /root and /home/*). This
includes, of course, any files under /etc.

Instead, any custom changes that you want to see under /etc need to be
included in your `operating-system` definition. The way to do this
depends on the change you want to make.

For example, if you want to edit /etc/sudoers, you should include this
field in your `operating-system` definition (on the same level as
`packages`, `services`, and so on):

(sudoers-file (plain-file "sudoers" my-sudoers))

Then remember to define `my-sudoers` somewhere above the
`operating-system` form. Here's an example:

(define my-sudoers
  "root ALL=(ALL) ALL
%wheel ALL=(ALL) ALL
")

Similarly, if you want to modify /etc/hosts, you add this to `operating-system`:

(hosts-file (plain-file "hosts"
 (string-append (local-host-aliases host-name)
my-host-aliases)))

And again define my-host-aliases somewhere above `operating-system`:

(define my-host-aliases
  "
# Some Servers
123.123.123.100 foo
123.123.123.101 bar
123.123.123.102 baz
")

Most other files under /etc are managed by different services. You
should review the "Guix Services" section of the info pages to find
the appropriate service for whatever files you want to modify.

As of today, I'm not aware of a Guix service that modifies
/etc/resolv.conf other than the network-manager-service-type (which is
what I use on my system).

However, if you are not using NetworkManager and want to manually set
the values in /etc/resolv.conf such that they persist across calls to
`guix system reconfigure`, you should add this form to the `services`
list in your `operating-system` definition:

(simple-service 'resolv-service
etc-service-type
`(("resolv.conf" ,(plain-file "resolv.conf" my-resolv.conf

And finally remember to define `my-resolv.conf` above `operating-system`:

(define my-resolv.conf
  "# Generated by Guix!
nameserver 255.255.255.1
nameserver ::::1
")

Have fun and happy hacking!
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: freecad 19.1 / flatpak

2021-04-02 Thread Gary Johnson
Christophe Pisteur  writes:

> Unfortunately there is no git on flathub. There is only gitg, which I
> installed, but the problem remains with the freecad addons. 

That's unfortunate. So...maybe I missed (or forgot) this part of the
discussion, but I see that guix has a package definition for freecad. Is
there a reason you don't want to build and install it through guix
instead of flatpak?

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: freecad 19.1 / flatpak

2021-03-31 Thread Gary Johnson
Christophe Pisteur  writes:

> Thank you for the quick answer.
> I have git installed on my system via 
> guix package -i git
> which is probably with ssl support?
> So I think that the version of flatpak does not use this version of my
> system. 
> From there, I am blocked.
>
> Christophe

The git package for Guix includes SSL support. Since flatpak is kind of
its own world, perhaps you should try installing git through flatpak as
well in hopes that FreeCAD will be able to use that version.

Good luck,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Two more computers unable to start X with GDM

2021-03-29 Thread Gary Johnson
Yasuaki Kudo  writes:

> I read a little bit about the current state of video cards, etc - man
> this seems like an uphill battle Basically no manufacture
> sympathizes with the concept of total transparency.

I've always had good luck using linux-libre with Intel integrated
graphics controllers.

> I was just thinking what the practical end-game of this might be - do
> you think at some point there will be an FPGA+power+various I/O ports
> kit that can be totally programmed to provide CPU and video
> acceleration? Something like that might be the only way to end this
> nonsense

I like to buy my laptops from ThinkPenguin. All of the computers they
sell work out of the box with linux-libre. I'm, of course, running Guix
System on one of their laptops right now.

  https://www.thinkpenguin.com/

Happy hacking,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Start Xorg server using xinit manually

2021-03-28 Thread Gary Johnson
Bone Baboon  writes:

> Here is my operating-system declaration:
>
> 

I don't see anything out of the ordinary here. I don't use the nomodeset
kernel-arguments setting though. Perhaps that's just needed with your
hardware?

> .Xauthority is an empty file.
>
> .Xdefaults has the contents:
> ```
> XTerm*utf8: always
> XTerm*metaSendsEscape: true
>
> ```
> .exwm that contains my EXWM configuration.

Those all sound right to me. My .Xauthority contains a binary magic
cookie. You could delete the file and let X generate it next time it
starts up. Check your file permissions on all those files to make sure
you have read access to them.

> I do not know if the graphics card is supported by Guix?

To me, it sounds like this is still the most likely culprit. Perhaps
your graphics card just doesn't have corresponding drivers in the
linux-libre kernel.

For reference, here's my config.scm. It boots up directly into a
graphical login prompt, and upon logging in, it runs emacs-exwm as my
window manager. My exwm settings are in ~/.exwm, and my general emacs
settings are in ~/.emacs.d/init.el. My ~/.xsession file is a symlink to
my ~/.xinitrc file and ends with a call to exwm.

```
(use-modules ((guix gexp)   #:select (plain-file file-append))
 ((gnu system)  #:select (operating-system 
%base-packages local-host-aliases))
 ((gnu system nss)  #:select (%mdns-host-lookup-nss))
 ((gnu system shadow)   #:select (user-account 
%base-user-accounts))
 ((gnu system file-systems) #:select (file-system file-system-label 
%base-file-systems))
 ((gnu bootloader)  #:select (bootloader-configuration))
 ((gnu bootloader grub) #:select (grub-bootloader))
 ((gnu services)#:select (extra-special-file service))
 ((gnu services databases)  #:select (postgresql-service-type 
postgresql-configuration postgresql-config-file))
 ((gnu services desktop)#:select (%desktop-services))
 ((gnu packages base)   #:select (coreutils))
 ((gnu packages certs)  #:select (nss-certs))
 ((gnu packages databases)  #:select (postgresql))
 ((gnu packages geo)#:select (postgis)))

(operating-system
 (host-name "euclid")
 (timezone "America/New_York")
 (locale "en_US.utf8")

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

 (file-systems (cons* (file-system
   (device (file-system-label "my-root"))
   (mount-point "/")
   (type "ext4"))
  %base-file-systems))

 (swap-devices '("/swapfile"))

 (users (cons* (user-account
(name "gjohnson")
(comment "Just Another Lisp Hacker")
(group "users")
(supplementary-groups '("wheel" "netdev" "audio" "video" "lp"))
(home-directory "/home/gjohnson"))
   %base-user-accounts))

 (packages (cons* nss-certs  ; HTTPS access
  postgresql postgis ; psql, raster2pgsql, shp2pgsql, etc.
  %base-packages))

 ;; Use the "desktop" services, which include the X11
 ;; log-in service, networking with NetworkManager, and more.
 (services (cons* (extra-special-file "/usr/bin/env" (file-append coreutils 
"/bin/env"))
  (service postgresql-service-type (postgresql-configuration
(postgresql postgresql)
(extension-packages (list 
postgis))
(config-file 
(postgresql-config-file
  (hba-file 
(plain-file "pg_hba.conf" "CONTENTS ELIDED"))
  (extra-config 
'(("max_worker_processes" "12")

  ("max_parallel_workers" "40")

  ("max_parallel_maintenance_workers" "8")

  ("max_parallel_workers_per_gather" "4")

  ("parallel_leader_participation" "on")))
  %desktop-services))

 ;; Allow resolution of '.local' host names with mDNS.
 (name-service-switch %mdns-host-lookup-nss)

 (hosts-file (plain-file "hosts"
 (string-append (local-host-aliases host-name)
"CONTENTS ELIDED")))

 (sudoers-file (plain-file "sudoers" "CONTENTS ELIDED")))
```

I actually have emacs and emacs-exwm in my package-manifest.scm file,
which I use for installing all my user profile 

Re: Start Xorg server using xinit manually

2021-03-25 Thread Gary Johnson
Bone Baboon  writes:

>> Looking at my configuration now, I think the problem might be dbus.
>> Do you have dbus-service enabled? I suspect there might be an
>> implicit dependence between X and udev (which is probably what is
>> responsible for creating /dev/dri/card0) on dbus, that might not be
>> producing any log messages.
>>
>> The minimal X configuration I have is:
>> (dbus-service) (service slim-service-type)
>
> If I use `%base-services` and add `dbus-service` this error goes away:
> (EE) dbus-core: error connecting to system bus:
> org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket
> /var/run/dbus/system_bus_socket: No such file or directory)
>
> However the other error messages remain.

Are you including %desktop-services in your (operating-system (services
...)) list? I wonder if your problem is coming from something else in
your operating-system definition that those of us on the mailing list
aren't aware of.

~Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Start Xorg server using xinit manually

2021-03-23 Thread Gary Johnson
Bone Baboon  writes:
>
> Thank you for the detailed instructions.
>
> When I follow the instruction and boot I am taken to vt7 which has only
> a blinking cursor. I never get a graphical login for X. The system is
> responsive and I can switch to other virtual terminals.
>
> On vt1 there is output like this:
>
> New session c1 of user gdm.
> Removed session c1.
> New session c2 of user gdm.
> Removed session c2.
> New session c3 of user gdm.
> Removed session c3.
> ...

Hmm...that's odd. %desktop-services contains both the gdm-service and
the elogind-service, which should bring X along for the ride. It sounds
like something in your configuration is preventing these services from
presenting you with a graphical login screen.

Could you share your operating-system declaration? Have you set up any
custom X configuration files somewhere that might be interfering with
the X launching process? Is your graphics card supported with Guix and
the X server?

Perhaps someone else on the list might have some other ideas?

Perplexed,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Start Xorg server using xinit manually

2021-03-22 Thread Gary Johnson
> March 21, 2021 6:31 PM, "Bone Baboon"  wrote:
>
> I am trying to manually run `xinit` so that I can use Emacs X Window
> Manager (EXWM). I have EXWM configured in my Emacs configuration file.
> I have a small number of important graphical applications I want to
> run in EXWM (web browser, Jami, qTox, ...).

Hi Bone,

  I run EXWM under Guix System. You don't need to manually start Xorg
with xinit, startx, or any other command. First, make sure that you are
installing emacs and emacs-exwm into your packages list. Also make sure
that your services list includes %desktop-services. Here's a skeleton
operating-system definition to build off of:

(operating-system
 ...
 (packages (cons* nss-certs   ; HTTPS access
  emacs
  emacs-exwm
  %base-packages))

 (services (cons* whatever-else
  you-want
  %desktop-services)))

Start by installing this operating-system definition with the usual
`sudo guix system reconfigure my-config.scm`.

Then update your $HOME/.xsession file to include this at the end:

# Start Emacs with the script here: /run/current-system/profile/bin/exwm
exwm

Finally, update $HOME/.exwm to include all your EXWM-specific Emacs Lisp
code.

When you reboot your machine, you'll be presented with a simple
graphical login screen. Just type in your username and password for the
user account with the updated $HOME/.xsession and $HOME/exwm files and
log in. X will start up, your $HOME/.xsession file will be read, which
will launch exwm. This will start up a full screen emacs instance that
evaluates your $HOME/.exwm file and then your $HOME/.emacs.d/init.el
file.

That's all there is to it. Now you've got a fully graphically enabled
Emacs instance running as a tiling window manager over X.

Have fun and happy hacking!
 ~Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: paper book(s) on guix use

2021-03-14 Thread Gary Johnson
Ralph Randall  writes:

> I am new both to GNU/Linux and to 21st century computers, and I have very
> little experience with any graphic user interface.  GUIs are often said to
> be "intuitive", but I never found them so.  But I think I will soon need to
> use Gnome and/or Mate.
>I am also a beginner at internet/web access, depending so far on a cell
> phone.  I've been searching the web for a physical book on how to use
> Guix.   I have yet found only one such book, through the web:  "Mastering
> Gnome", by Bryan Pfaffenberger.  Can anyone steer me to any others?

The definitive and most up-to-date documentation on Guix (both the
package manager and the OS built around it) is the Guix Info Pages. On
any machine with Guix (and the "info" command installed), simply type
this at your terminal (don't type the dollar sign):

$ info guix

Then read away to your heart's content.

Happy hacking,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: EXWM: file or program not found, ls

2021-01-05 Thread Gary Johnson
Hi Olivier,

I'm also on GuixSD, using EXWM as my window manager. It sounds like you
have an issue with your PATH environment variable.

I set my environment variables in ~/.bash_profile, so that they are
automatically set on login and are therefore propagated to Emacs when it
is started by EXWM.

Here's an excerpt from my ~/.bash_profile to get you started:

#
# Shell variables
export MYPROFILE=$HOME/.guix-profile
GUIX_PROFILE=$MYPROFILE source $MYPROFILE/etc/profile
export ASPELL_DICT_DIR=$MYPROFILE/lib/aspell
export GIT_EXEC_PATH=$MYPROFILE/libexec/git-core
export PATH=$MYPROFILE/bin:$MYPROFILE/sbin:$PATH
export CPATH=$MYPROFILE/include${CPATH:+:}$CPATH
export LIBRARY_PATH=$MYPROFILE/lib${LIBRARY_PATH:+:}$LIBRARY_PATH
export LD_LIBRARY_PATH=$MYPROFILE/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
export 
PKG_CONFIG_PATH=$MYPROFILE/lib/pkgconfig:$MYPROFILE/share/pkgconfig${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH
export 
GIO_EXTRA_MODULES=$MYPROFILE/lib/gio/modules${GIO_EXTRA_MODULES:+:}$GIO_EXTRA_MODULES
export ACLOCAL_PATH=$MYPROFILE/share/aclocal${ACLOCAL_PATH:+:}$ACLOCAL_PATH
export NODE_PATH=$MYPROFILE/lib/node_modules${NODE_PATH:+:}$NODE_PATH

# Remove duplicates from *PATH* variables
export PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$PATH`
export INFOPATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$INFOPATH`
export CPATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$CPATH`
export LIBRARY_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$LIBRARY_PATH`
export LD_LIBRARY_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in 
a)){a[$i];printf s$i;s=":"}}}'<<<$LD_LIBRARY_PATH`
export PKG_CONFIG_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in 
a)){a[$i];printf s$i;s=":"}}}'<<<$PKG_CONFIG_PATH`
export GIO_EXTRA_MODULES=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in 
a)){a[$i];printf s$i;s=":"}}}'<<<$GIO_EXTRA_MODULES`
export ACLOCAL_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$ACLOCAL_PATH`
export NODE_PATH=`awk -F: '{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf 
s$i;s=":"}}}'<<<$NODE_PATH`
#

I also make ~/.bashrc a symlink to ~/.bash_profile since these variable
definitions are idempotent. I don't do any other fancy magic with
~/.profile, ~/.xsession, or ~/.xinitrc other than using xsetroot, xset,
setxkbmap, xrdb, and friends to tweak my X setup in .xsession and then
call exwm on its final line.

Hope that helps!
  Gary

Olivier Rojon  writes:

> Hello everyone,
>
> I am on GuixSD, using EXWM as my window manager.  Though I really
> appreciate the way it works, it seems that it does not find many of
> the programs which are required for emacs to function properly.
>
> I would like to, but cannot:
>
>  * use dmenu and see (recently used) programs
>  * open dired in a specific folder
>  * open a file
>  * use run-geiser / geiser / guile / mit-scheme / ...
>
>
> On the surface, most of these problems appear to be of the same
> nature: in many cases, the error message is (translated from german)!
>
> "Searching for program: file or directory not found, $PROGNAME", where
> $PROGNAME is one of the following:
>
>  * ls (in case of dired)
>  * git (open a file)
>  * guile (run-geiser / guile)
>
> dmenu is a bit different, because while I can start it just fine via
> keyboard shortcut, it finds only two programs, "env" and "sh".
>
>
> I have been asking several times on #guix if anyone can help me, but
> was not able to successfully put what I was told into practice.
>
> Essentially, I was told to "source /etc/profile". I tried to do that
> for .bashrc and .profile, but that didnt help, because I dont have
> similar problems in the command-line/shell, only in emacs.
>
> Then I was told to "source /etc/profile" from a file such as .xinitrc
> / .xsessions, which I tried but which also didnt work because gdm
> stayed in place via the system configuration (there has been a helpful
> HOWTO by Alex Kost, which I might try as well if nothing else helps).
>
> Before writing, I have experimented with the (extra-arguments
> '("source /etc/profile")) in the (xorg-configuration), but this led my
> system to not start anymore, so I rolled back.
>
>
> Any help or pointer is greatly appreciated. I hope I have provided the
> necessary information, otherwise feel free to ask.
>
> Thank you guys in advance, so far I am stoked by how great a community
> guix is, and how awesome guix itself is :)
>
> Greetings,
>
> Olivier


-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML 

Re: How do I correctly relocate PostGIS control files?

2020-11-10 Thread Gary Johnson
Carlo Zancanaro  writes:

> I didn't respond initially because I don't have any specialist
> knowledge about this. I had some free time today, so I did a bit 
> of an investigation and I think I've figured out what's gone wrong for
> you here.
>
> In your original email you gave this definition for postgresql-13:
>
> ...
>
> However, this is missing one important line from the original
> postgresql definition, which applies a patch to the source:
>
>(patches (search-patches
>"postgresql-disable-resolve_symlinks.patch"))
>
> ...
>
> I hope that helps!

***

All hail the mighty Carlo Zancanaro!
Applying that patch to my postgresql-13 package does indeed fix the issue!

***

I have also been digging through the code behind
postgresql-service-type, and I worked out what I'm guessing is the
reason that patch actually works.

In gnu/services/databases.scm, postgresql-service-type is declared and
uses the following function to compute the postgresql package to use for
both its database activation (postgresql-activation) and its shepherd
service (postgresql-shepherd-service):

(define (final-postgresql postgresql extension-packages)
  (if (null? extension-packages)
postgresql
(package
  (inherit postgresql)
  (source #f)
  (build-system trivial-build-system)
  (arguments
   `(#:modules ((guix build utils) (guix build union))
 #:builder
 (begin
   (use-modules (guix build utils) (guix build union) (srfi srfi-26))
   (union-build (assoc-ref %outputs "out") (map (lambda (input) (cdr 
input)) %build-inputs))
   #t)))
  (inputs
   `(("postgresql" ,postgresql)
 ,@(map (lambda (extension) (list "extension" extension))
extension-packages))

When extension-packages is (list postgis), then final-postgresql creates
a union-build of both the postgresql and postgis packages, which
essentially just creates a new /gnu/store directory containing the
outputs of both packages.

In exploring my /gnu/store directory, I noticed that even before I
applied Carlo's patch code, there already existed a union-build of my
postgresql-13 and postgis-for-postgresql-13 packages. However, checking
my process table with ps showed that the postgres executable started by
the shepherd service was coming from a /gnu/store directory that ONLY
contained postgresql-13 and NOT from the union-build directory as I
would have expected from the final-postgresql function definition above.

So what gives?

It looks like the individual postgresql-13 and postgis-for-postgresql-13
packages were built correctly and the union-build was also created
correctly (probably either at activation time or at service start time).

HOWEVER, the union-build directory consists primarily of symlinks to the
files in the individual postgresql-13 and postgis-for-postgresql-13
store directories. My guess then is that when the shepherd service fired
up the postgres executable, it was trying to run it from the union-build
directory but after following the symlink, it reported in ps the path to
the target of that symlink rather than the location of the symlink
itself. Then postgres must have taken this symlink target directory as
the actual directory is was being run from, which of course did not
contain any postgis control files.

Long story short, Carlo noticed that the default postgresql package in
gnu/packages/databases.scm, applied this patch to its source code:

postgresql-disable-resolve_symlinks.patch:
***
>From 223c82d1d6ed1f29f26307249827ff679e09c780 Mon Sep 17 00:00:00 2001
From: Julien Lepiller 
Subject: [PATCH] disable resolve_symlink

---
 src/common/exec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/common/exec.c b/src/common/exec.c
index 878fc29..6b3e283 100644
--- a/src/common/exec.c
+++ b/src/common/exec.c
@@ -218,6 +218,8 @@ find_my_exec(const char *argv0, char *retpath)
 static int
 resolve_symlinks(char *path)
 {
+   // On GuixSD we *want* stuff relative to symlinks.
+   return 0;
 #ifdef HAVE_READLINK
struct stat buf;
charorig_wd[MAXPGPATH],
--
2.18.0
***

Based on Julien's code comment, I'm guessing this somehow magically
ensures that the postgres executable is run from the within the
union-build directory where its symlink exists rather than from the
postgresql-13 directory where the symlink is pointing.

So now we appear to have a solution to the missing postgis control file
issue. However, I have a few comments still:

1. The postgresql-11 and postgresql-9.6 packages in
   /gnu/packages/databases.scm are also missing Julien's symlink patch
   and thus do not work in combination with postgis currently.

2. The postgis 

Re: How do I correctly relocate PostGIS control files?

2020-11-09 Thread Gary Johnson
Hi again Guix,

It's been a week since my original post requesting assistance with
getting Postgresql and PostGIS to work together correctly, but
unfortunately I still haven't received any help with this issue.

To summarize the conversation thus far:

1. I can build postgresql-13.0 successfully, and all of its files appear
   in its /gnu/store directory as expected.

2. I can build postgis-3.0.2 succesfully, and all of its files appear in
   its /gnu/store directory as expected.

3. None of the postgis-3.0.2 files are being correctly installed into
   postgresql-13.0's /gnu/store directory, which AFAICT indicates that
   the postgresql-service-type code that processes extensions is not
   working correctly here.

Does anyone know how this code works or how to fix this issue?

Thanks in advance,
  Gary

-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Broken emacs-treemacs package in current Guix

2020-11-09 Thread Gary Johnson
I ran "guix pull", and now the emacs-treemacs package builds
successfully.

Thanks,
  Gary

Nicolas Goaziou  writes:

> Hello,
>
> Gary Johnson  writes:
>
>> If I try to build the emacs-treemacs package that comes with Guix
>> (declared in emacs-xyz.scm), this crashes out due to a failing test
>> during its "make test" phase.
>
> This should be now be fixed. Thank you.
>
> Regards,


-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Why is HTML email a security nightmare? See https://useplaintext.email/

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Guidance required, Using guix or GNU/Linux, for secrecy, privacy.

2020-11-06 Thread Gary Johnson
Aniket Patil  writes:

> I don't know whether is this mailing list is appropriate to talk about this
> subject or not, but I am going forward, please don't get me wrong.

Hi Aniket,

  While computer security and data privacy are topics that I imagine a
number of Guix users are interested in, I imagine the full breadth of
this conversation may be beyond the scope of the help-guix mailing list.
However, insofar as Guix may be able to alleviate some of your concerns,
I would think that's something that folks here could help you with.

> I have been following Richard M. Stallman, Eric S. Raymond, Arron Swartz
> for a long time. I know how to use and secure myself pretty much I would
> say. But I don't feel secure and have that reliance on the internet while
> using it. So I got X200 librebooted it, still using some proprietary wifi
> card, hence non-free distro like arch is my main OS.

Okay, stop right there. You can buy an inexpensive, fully
libre-compliant USB wifi card from ThinkPenguin. Here's the link:

https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-usb-adapter-gnu-linux-tpe-n150usb

Plug it into your X200, and you should hopefully be all set to install a
fully free OS like GNU Guix, which uses the linux-libre kernel and
therefore contains no proprietary firmware or binary blobs.

> I want to get rid of this Google thing, I do have protonmail account,
> but I don't think that is reliable either.

Google mines your data for profit. If this bothers you, don't use their
services. Perform a web search for "degoogle" and get to it.

Protonmail has well-documented security practices. However, their email
servers don't allow access over IMAP or POP3, which means you have to
use their Javascript-based webmail interface. If you want to access your
email locally, you have to install their proprietary protonmail-bridge
application. There is no Guix package for this as its code is not free
software.

There are better free software and privacy-respecting alternatives for
email hosting, such as disroot.org and riseup.net. Or you can install
and administrate your own email server using Guix!

> Recently, I read zimouns vlog
>
> " right, Google is evil, but the storage and the search features are really
> useful. So, I am thinking to switch to notmuch ,
> but not enough time to configure it, yet. "
>
> So, is notmuch is reliable?

For a good free software solution on Guix that gives you control of your
data, I would recommend pairing offlineimap (which stores a local copy
of all your IMAP-accessible emails on your machine in case you lose
access to your email server or decide to bulk migrate your emails to a
new email server) with a local mail indexer like mu or notmuch. I'm
personally a big fan of mu and its Emacs interface mu4e. Of course,
everyone has their favorite email client, so go with whatever makes you
happiest when reading your mail.

> I get paranoid after reading RMS, or Snowden. I think a lot about my
> privacy and others as well. Hence I am asking this, and participating in
> GNU projects and Free Software Projects. So coming to the point.
>
> How to or which email client shall I use or email service?

I provided my suggestion above, but Guix comes with a wide variety of
free software CLI, TUI, and GUI email clients. Pick your favorite and
have fun.

In terms of email security, there are a few simple rules to follow when
setting yourself up:

1. Always connect to your email servers (IMAP, POP, SMTP) with SSL/TLS
   encryption enabled. This will ensure that no one between you and your
   email server can read your messages.

2. Whenever possible (and particularly with any sensitive content), it
   is good practice to encrypt your emails with GPG. This ensures that
   anyone administrating your email server can't read your emails while
   they are sitting in your remote folders. Unfortunately, in order to
   do this, you have to encrypt each such message with the GPG key of
   the person(s) you are sending it to. That means you have to invest
   some effort in collecting other people's GPG keys, and often in
   educating them about the purpose of email security as well. The FSF
   provides a nice introduction to this here:
   https://emailselfdefense.fsf.org

> Recently I was browsing on TOR but I guess even TOR exposes my IP address
> on the internet. So shall I use it with a VPN? If So Which VPN? I know
> about WireGuard but it has a GPL2 license, not GPL3.

TOR routes your network requests through a randomized series of
intermediate servers, which can make it somewhere between very hard and
impossible for your true IP address to be identified by the server you
are connecting to. The first TOR node that you connect through will know
your IP address, of course.

Guix provides the tor, tor-client, and torsocks packages.

Connecting to a VPN allows you to make network connections to remote
servers using an IP address originating from the VPN rather than from
your 

Re: How do I correctly relocate PostGIS control files?

2020-11-03 Thread Gary Johnson
Julien Lepiller  writes:

> The service simply builds a union-build of the postgis and postgresql
> packages, because postgresql looks for its extensions in the directory
> it's run from.
>
> It could be that this behavior changed, or that the postgis package
> doesn't build its extension as expected.
>
> To cgeck these hypothesis: can you check the error message contains
> the store path of the union (as opposed to only postresql). You should
> be able to find some of postgis files there in addition to postgresql
> files.

gjohnson@euclid ~ $ guix package -p /run/current-system/profile -I
...
postgis 3.0.2   out 
/gnu/store/0cb4sf18w2i9f0b79kyrli7fx3i63c4s-postgis-3.0.2
postgresql  13.0out 
/gnu/store/8m48v5132qpmxim9s4g9vca59qgay2d9-postgresql-13.0

gjohnson@euclid ~ $ ls 
/gnu/store/8m48v5132qpmxim9s4g9vca59qgay2d9-postgresql-13.0/share/extension/
adminpack--1.0--1.1.sql   btree_gist--1.3--1.4.sql  dict_int.control
 intagg--1.0--1.1.sql   pageinspect--1.1--1.2.sql  
pg_stat_statements--1.0--1.1.sql  pgcrypto--1.1--1.2.sql seg--1.1--1.2.sql
adminpack--1.0.sqlbtree_gist--1.4--1.5.sql  dict_xsyn--1.0.sql  
 intagg--1.1.sqlpageinspect--1.2--1.3.sql  
pg_stat_statements--1.1--1.2.sql  pgcrypto--1.2--1.3.sql seg--1.1.sql
adminpack--1.1--2.0.sql   btree_gist.controldict_xsyn.control   
 intagg.control pageinspect--1.3--1.4.sql  
pg_stat_statements--1.2--1.3.sql  pgcrypto--1.3.sql  seg--1.2--1.3.sql
adminpack--2.0--2.1.sql   citext--1.0--1.1.sql  earthdistance--1.0--1.1.sql 
 intarray--1.0--1.1.sql pageinspect--1.4--1.5.sql  
pg_stat_statements--1.3--1.4.sql  pgcrypto.control   seg.control
adminpack.control citext--1.1--1.2.sql  earthdistance--1.1.sql  
 intarray--1.1--1.2.sql pageinspect--1.5--1.6.sql  
pg_stat_statements--1.4--1.5.sql  pgrowlocks--1.0--1.1.sql   
sslinfo--1.0--1.1.sql
amcheck--1.0--1.1.sql citext--1.2--1.3.sql  earthdistance.control   
 intarray--1.2--1.3.sql pageinspect--1.5.sql   
pg_stat_statements--1.4.sql   pgrowlocks--1.1--1.2.sql   
sslinfo--1.1--1.2.sql
amcheck--1.0.sql  citext--1.3--1.4.sql  file_fdw--1.0.sql   
 intarray--1.2.sql  pageinspect--1.6--1.7.sql  
pg_stat_statements--1.5--1.6.sql  pgrowlocks--1.2.sqlsslinfo--1.2.sql
amcheck--1.1--1.2.sql citext--1.4--1.5.sql  file_fdw.control
 intarray.control   pageinspect--1.7--1.8.sql  
pg_stat_statements--1.6--1.7.sql  pgrowlocks.control sslinfo.control
amcheck.control   citext--1.4.sql   fuzzystrmatch--1.0--1.1.sql 
 isn--1.0--1.1.sql  pageinspect.control
pg_stat_statements--1.7--1.8.sql  pgstattuple--1.0--1.1.sql  tablefunc--1.0.sql
autoinc--1.0.sql  citext--1.5--1.6.sql  fuzzystrmatch--1.1.sql  
 isn--1.1--1.2.sql  pg_buffercache--1.0--1.1.sql   
pg_stat_statements.controlpgstattuple--1.1--1.2.sql  tablefunc.control
autoinc.control   citext.controlfuzzystrmatch.control   
 isn--1.1.sql   pg_buffercache--1.1--1.2.sql   
pg_trgm--1.0--1.1.sql pgstattuple--1.2--1.3.sql  tcn--1.0.sql
bloom--1.0.sqlcube--1.0--1.1.sqlhstore--1.0--1.1.sql
 isn.controlpg_buffercache--1.2--1.3.sql   
pg_trgm--1.1--1.2.sql pgstattuple--1.3--1.4.sql  tcn.control
bloom.control cube--1.1--1.2.sqlhstore--1.1--1.2.sql
 lo--1.0--1.1.sql   pg_buffercache--1.2.sql
pg_trgm--1.2--1.3.sql pgstattuple--1.4--1.5.sql  
tsm_system_rows--1.0.sql
btree_gin--1.0--1.1.sql   cube--1.2--1.3.sqlhstore--1.2--1.3.sql
 lo--1.1.sqlpg_buffercache.control 
pg_trgm--1.3--1.4.sql pgstattuple--1.4.sql   
tsm_system_rows.control
btree_gin--1.0.sqlcube--1.2.sql hstore--1.3--1.4.sql
 lo.control pg_freespacemap--1.0--1.1.sql  pg_trgm--1.3.sql 
 pgstattuple.controltsm_system_time--1.0.sql
btree_gin--1.1--1.2.sql   cube--1.3--1.4.sqlhstore--1.4--1.5.sql
 ltree--1.0--1.1.sqlpg_freespacemap--1.1--1.2.sql  
pg_trgm--1.4--1.5.sql plpgsql--1.0.sql   
tsm_system_time.control
btree_gin--1.2--1.3.sql   cube.control  hstore--1.4.sql 
 ltree--1.1--1.2.sqlpg_freespacemap--1.1.sql   pg_trgm.control  
 plpgsql.controlunaccent--1.0--1.1.sql
btree_gin.control dblink--1.0--1.1.sql  hstore--1.5--1.6.sql
 ltree--1.1.sql pg_freespacemap.control
pg_visibility--1.0--1.1.sql   postgres_fdw--1.0.sql  unaccent--1.1.sql
btree_gist--1.0--1.1.sql  dblink--1.1--1.2.sql  hstore--1.6--1.7.sql
 ltree.control  pg_prewarm--1.0--1.1.sql   

Broken emacs-treemacs package in current Guix

2020-11-02 Thread Gary Johnson
Hi Guix,

I recently moved my Emacs package management from ELPA to Guix, and
after creating quite a few additional package declarations using the
amazing "guix import elpa" command, I now have a working system that
doesn't have any packages installed through ELPA. Pretty cool stuff.

However, one package is sadly failing to build on my current
installation of Guix: emacs-treemacs

If I try to build the emacs-treemacs package that comes with Guix
(declared in emacs-xyz.scm), this crashes out due to a failing test
during its "make test" phase.

As an alternative, I tried creating a new emacs-treemacs-melpa package
with "guix import elpa". Here's the resulting code once I added in the
necessary module imports:

;;==

(define-module (my-packages emacs-packages)
  #:use-module ((guix packages)   #:select (package origin base32))
  #:use-module ((guix download)   #:select (url-fetch))
  #:use-module ((guix build-system emacs) #:select (emacs-build-system))
  #:use-module ((gnu packages emacs-xyz)  #:select (emacs-dash
emacs-s
emacs-f
emacs-ace-window
emacs-pfuture
emacs-hydra
emacs-ht)))

(define-public emacs-treemacs-melpa
  (package
   (name "emacs-treemacs-melpa")
   (version "20201026.2006")
   (source
(origin
 (method url-fetch)
 (uri (string-append
   "https://melpa.org/packages/treemacs-;
   version
   ".tar"))
 (sha256
  (base32
   "10dlxizx3nhviz5sfbfavsfglpwschkl3z3wwryw8930bp0swh5h"
   (build-system emacs-build-system)
   (propagated-inputs
`(("emacs-dash" ,emacs-dash)
  ("emacs-s" ,emacs-s)
  ("emacs-f" ,emacs-f)
  ("emacs-ace-window" ,emacs-ace-window)
  ("emacs-pfuture" ,emacs-pfuture)
  ("emacs-hydra" ,emacs-hydra)
  ("emacs-ht" ,emacs-ht)))
   (home-page
"https://github.com/Alexander-Miller/treemacs;)
   (synopsis "A tree style file explorer package")
   (description
"A powerful and flexible file tree project explorer.")
   (license #f)))

;;==

This package successfully compiles and installs with "guix package -i".

However, when I open treemacs, none of its icons are available, and my
*Messages* buffer is filled with these error messages:

;;==

Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/root-closed.png’
 [47 times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/dir-closed.png’
 [7 times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/js.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/npm.png’ 
[2 times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/txt.png’ [2 
times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/org.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/license.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/txt.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/git.png’ [2 
times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/js.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/root-closed.png’
 [11 times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/dir-closed.png’
 [7 times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/js.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/npm.png’ 
[2 times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/txt.png’ [2 
times]
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/org.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/vsc/license.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/txt.png’
Cannot find image file 
‘/home/gjohnson/.guix-profile/share/emacs/site-lisp/icons/default/git.png’ [2 
times]
Cannot find image file 

How do I correctly relocate PostGIS control files?

2020-11-02 Thread Gary Johnson
Hi Guix,

I use Postgresql with PostGIS extensively for geospatial software
development. While the default set of postgresql (v10.13) and postgis
(v3.0.2) packages in Guix have worked well for me for some time, I am
now in need of upgrading to the latest version in order to utilize newer
functionality in the database software.

To do this, I created a derivative package for postgresql (v13.0) as
well as a derivative postgis package that uses the new postgresql
package as an input. These packages compile and install correctly with
"guix package -i".

Here's my code:

;;=

(define-module (my-packages postgresql-13)
  #:use-module ((guix packages)  #:select (package origin base32))
  #:use-module ((guix download)  #:select (url-fetch))
  #:use-module ((gnu packages databases) #:select (postgresql))
  #:use-module ((gnu packages geo)   #:select (postgis gdal geos proj))
  #:use-module ((gnu packages image) #:select (giflib))
  #:use-module ((gnu packages web)   #:select (json-c))
  #:use-module ((gnu packages image) #:select (libjpeg-turbo))
  #:use-module ((gnu packages xml)   #:select (libxml2))
  #:use-module ((gnu packages pcre)  #:select (pcre)))

(define-public postgresql-13
  (package
   (inherit postgresql)
   (name "postgresql")
   (version "13.0")
   (source (origin
(method url-fetch)
(uri (string-append "https://ftp.postgresql.org/pub/source/v;
version "/postgresql-" version ".tar.bz2"))
(sha256
 (base32
  "15i2b7m9a9430idqdgvrcyx66cpxz0v2d81nfqcm8ss3inz51rw0"))

(define-public postgis-for-postgresql-13
  (package
   (inherit postgis)
   (name "postgis")
   (version "3.0.2")
   (inputs
`(("gdal" ,gdal)
  ("geos" ,geos)
  ("giflib" ,giflib)
  ("json-c" ,json-c)
  ("libjpeg" ,libjpeg-turbo)
  ("libxml2" ,libxml2)
  ("pcre" ,pcre)
  ("postgresql" ,postgresql-13)
  ("proj" ,proj)

;;=

Next, I moved to my OS config.scm file to set up the Postgresql Shepherd
service and add PostGIS as an extension package for the DB, which should
make its control files available to Postgresql at runtime.

Here are the relevant sections:

;;=

(use-modules ... 
 ((gnu services databases)#:select (postgresql-service-type 
postgresql-configuration postgresql-config-file))
 ((my-packages postgresql-13) #:select (postgresql-13 
postgis-for-postgresql-13)))

(operating-system
 ...
 (packages (cons* ...
  postgresql-13 postgis-for-postgresql-13 ; psql, raster2pgsql, 
shp2pgsql, etc.
  %base-packages))
 (services (cons* ...
  (service postgresql-service-type (postgresql-configuration
(postgresql postgresql-13)
(extension-packages (list 
postgis-for-postgresql-13))
(config-file 
(postgresql-config-file
  (hba-file 
my-postgres-hba)
  (extra-config 
'(("max_worker_processes" "12")

  ("max_parallel_workers" "40")

  ("max_parallel_maintenance_workers" "8")

  ("max_parallel_workers_per_gather" "4")

  ("parallel_leader_participation" "on")))
  %desktop-services)))

;;=

This compiles and installs successfully with "guix system reconfigure".

However, when I connect to the Postgresql server with "psql -U postgres"
and attempt to add the PostGIS extension to a database, I get the
dreaded "could not open extension control file" error:

;;=

db=# create extension postgis;
ERROR:  could not open extension control file

"/gnu/store/8m48v5132qpmxim9s4g9vca59qgay2d9-postgresql-13.0/share/extension/postgis.control":
 No such file or directory


Re: Errors with guix pull

2020-08-17 Thread Gary Johnson
Hi Joshua,

  No, I was just building guix using the standard "guix pull" command.

After quite a lot of experimenting, I was able to solve my own problem a
few weeks ago by uninstalling guile from my user profile. I'm not sure
why that messed up "guix pull", but at least with guile uninstalled, I
was able to upgrade guix successfully.

Lessons learned, I guess.

~Gary

Joshua Branson  writes:

> Are you building guix from git by chance?


-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Installing Guix on Linode: a how-to

2020-07-08 Thread Gary Johnson
Can someone add this tutorial to the Guix Cookbook? I've been wondering
about how to do this for some time now, and it would be great to have it
saved somewhere obvious like that for future reference.

Thanks,
  Gary

Christopher Lemmer Webber  writes:

> Hi!  I finally got Guix running on Linode!  I'm excited about it!
> Here's the process (thanks to jackhill on freenode for helping me figure
> out all the stuff involving the bootloader!).  It's very bullet-point'y,
> but here's the steps I took:
>
>  - Start with a Debian (or whatever) server.  Be sure to add your ssh
>key for easy login.  We'll be using the default distro as a way to
>bootstrap Guix.
>  - Power it down.
>  - In the Disks/Configurations tab, resize the Debian disk to be
>smaller, maybe 30GB or something.
>  - "Add a disk", with the following:
>- Label: "Guix"
>- Filesystem: ext4
>- Set it to the remaining size
>  - Next to the "configuration" that comes with the default image,
>press "..." and select "Edit", then on that menu add to
>/dev/sdc the "Guix" label
>  - Now "Add a Configuration", with the following:
>- Label: Guix
>- VM Mode: Paravirtualization (the default?? don't know if this matters)
>- Kernel: Grub 2 (it's at the bottom!  This step is *IMPORTANT*)
>- Block device assignment:
>  - /dev/sda: Guix
>  - /dev/sdb: swap
>- Root device: /dev/sda
>- Turn off all the filesystem/boot helpers
>  - Now power it back up, picking the Debian configuration
>  - Once it's booted up, ssh root@
>  - Run the "install guix form binary installer" steps:
>- $ sudo apt-get install gpg
>- $ wget https://sv.gnu.org/people/viewgpg.php?user_id=15145 -qO - | gpg 
> --import -
>- $ wget 
> https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh
>- $ chmod +x guix-install.sh
>- $ ./guix-install.sh
>  - $ guix pull
>
>  - Now it's time to write out a config for the server.  The key stuff is
>below, save as guix-config.scm:
>
> #+BEGIN_SRC scheme
> (use-modules (gnu)
>  (guix modules))
> (use-service-modules networking
>  ssh)
> (use-package-modules admin
>  certs
>  package-management
>  ssh
>  tls)
>
> (operating-system
>   (host-name "my-server")
>   (timezone "America/New_York")
>   (locale "en_US.UTF-8")
>   ;; This goofy code will generate the grub.cfg
>   ;; without installing the grub bootloader on disk.
>   (bootloader (bootloader-configuration
>(bootloader
> (bootloader
>  (inherit grub-bootloader)
>  (installer #~(const #t))
>   (file-systems (cons (file-system
> (device "/dev/sda")
> (mount-point "/")
> (type "ext4"))
>   %base-file-systems))
>
>   (initrd-modules (cons "virtio_scsi"; Needed to find the disk
> %base-initrd-modules))
>
>   (users (cons (user-account
> (name "janedoe")
> (group "users")
> ;; Adding the account to the "wheel" group
> ;; makes it a sudoer.
> (supplementary-groups '("wheel"))
> (home-directory "/home/janedoe"))
>%base-user-accounts))
>
>   (packages (cons* nss-certs;for HTTPS access
>openssh-sans-x
>%base-packages))
>
>   (services (cons* 
>  (service dhcp-client-service-type)
>  (service openssh-service-type
>   (openssh-configuration
>(openssh openssh-sans-x)
>(password-authentication? #f)
>(authorized-keys
> `(("janedoe" ,(local-file "janedoe_rsa.pub"))
>   ;; Is this a good idea?  Well if you don't add it
>   ;; you have to manually set your user's password
>   ;; via the glish console...
>   ("root" ,(local-file "janedoe_rsa.pub"))
>  %base-services)))
> #+END_SRC
>
>  - Replace the following fields in the above configuration:
>- (host-name "my-server") ; replace with your server name
>- (name "janedoe"); replace with your username
>- ("janedoe" ,(local-file "janedoe_rsa.pub")) ; here too
>- Note the same above for root, which I don't feel great about, but
>  otherwise you'll need to log in via the linode "glish" console to
>  log in as root and set the user's initial password before you can
>  start using sudo (is there another way around this?)
>
>  - Save your ssh public key (~/.ssh/id_rsa.pub) as
>_rsa.pub or whatever in the same directory
>
>  - Mount the guix drive:
>  $ mkdir /mnt/guix
>  $ mount /dev/sdc /mnt/guix
>
>  - Due to the way we set 

Errors with guix pull

2020-07-03 Thread Gary Johnson
Hi Guix,

  I've been running GuixSD with relatively few issues for the past year
or so, but recently I've started to run into fatal errors when
attempting a `guix pull` as my normal user account. Trying it today, the
command crashes out with an error that I don't understand. Afterwards,
any attempt to run any guix command prints out a huge number of
"incompatible bytecode version" error messages to the console. Please
see the transcript below:

===

gjohnson@euclid ~ $ guix describe
Generation 31   Jun 16 2020 20:05:21(current)
  guix e7a7a48
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: e7a7a483bcda6ec60d9dff3b3aba88dababe035c

===

gjohnson@euclid ~ $ guix pull
Updating channel 'guix' from Git repository at 
'https://git.savannah.gnu.org/git/guix.git'...
Building from this channel:
  guix  https://git.savannah.gnu.org/git/guix.git   026b134
Computing Guix derivation for 'x86_64-linux'... /
Backtrace:
In guix/ui.scm:
  1948:12 19 (run-guix-command _ . _)
662:2 18 (call-with-error-handling _)
In ice-9/boot-9.scm:
  1736:10 17 (with-exception-handler _ _ #:unwind? _ # _)
  1731:15 16 (with-exception-handler # …)
  1731:15 15 (with-exception-handler # …)
  1736:10 14 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   631:22 13 (thunk)
In guix/status.scm:
776:4 12 (call-with-status-report _ _)
In guix/scripts/pull.scm:
   792:20 11 (_)
In guix/store.scm:
   1299:8 10 (call-with-build-handler _ _)
   1299:8  9 (call-with-build-handler # …)
In guix/scripts/pull.scm:
   828:26  8 (_)
In guix/build/syscalls.scm:
   1167:4  7 (call-with-file-lock/no-wait _ _ _)
In guix/store.scm:
  2025:24  6 (run-with-store # …)
In guix/scripts/pull.scm:
   435:26  5 (_ _)
   234:18  4 (display-profile-news "/var/guix/profiles/per-user/gjo…" …)
In guix/memoization.scm:
100:0  3 (_ # "/var/guix/profiles…" …)
In guix/scripts/pull.scm:
   554:21  2 (_)
In ice-9/boot-9.scm:
  1669:16  1 (raise-exception _ #:continuable? _)
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
ERROR:

  1. :
  arguments: (misc-error "load-thunk-from-memory" "incompatible bytecode 
version" () #f)
  inferior: #< pid: pipe socket: # close: # version: (0 1 1) packages: 
#> table: 
#>>
  stack: ((#f ("ice-9/boot-9.scm" 1763 13)) (raise-exception 
("ice-9/boot-9.scm" 1668 16)) (load-compiled/vm (#f #f #f)) (#f 
("gnu/packages.scm" 265 11)) (with-exception-handler ("ice-9/boot-9.scm" 1730 
15)) (#f ("guix/memoization.scm" 99 0)) (fold-available-packages 
("gnu/packages.scm" 206 2)) (#f (#f #f #f)) (#f ("guix/repl.scm" 92 21)) 
(with-exception-handler ("ice-9/boot-9.scm" 1735 10)) (with-exception-handler 
("ice-9/boot-9.scm" 1730 15)) (#f ("guix/repl.scm" 119 7)))

===

gjohnson@euclid ~ $ guix help
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/ui.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode version
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/i18n.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode version
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/colors.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode version
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/memoization.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode version
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/profiling.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode version
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/diagnostics.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode version
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/gexp.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode version
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/store.go
 failed:
;;; In procedure load-thunk-from-memory: incompatible bytecode version
;;; WARNING: loading compiled file 
/gnu/store/i4k1q7kb4z76v0405v3q3hda3ils7phb-guix-module-union/lib/guile/3.0/site-ccache/guix/utils.go
 failed:
;;; In procedure 

Re: How should I be running `npm install …`?

2020-06-16 Thread Gary Johnson
In Guix, all system-level packages and configuration files are created
by the package manager under /gnu/store. The /usr directory is empty on
a Guix system.

~Gary

Dmitry Alexandrov <321...@gmail.com> writes:

> Vivien Kraus  wrote:
>> Le jeudi 30 avril 2020 à 14:59 +, Josh Marshall a écrit :
>>> I’m trying to run `npm install -g browserify` with the output below.
>
>>> npm ERR! path 
>>> /gnu/store/39zkw3a8lxkxs7rmx4238959zc368075-node-10.19.0/lib/node_modules
>>
>> I am a mere guix user, so you may want to have another answer.
>
> I am not even a Guix (the SD) user, but this made me curious.
>
>> You cannot install anything globally with NPM in guix because NPM is 
>> installed in a read-only location (/gnu/store/)
>
> So?  /usr/ in traditional GNU distributions might be read-only as well, but 
> it does not impede npm(1) or pip(1) or whatever install things system-wide 
> (given that operator utilize his superuser powers, of course), as there are 
> plenty other hierarchies available.
>
> Why is npm in Guix built with default ‘prefix’¹ (means, for --global actions) 
> set to package directory under /gnu/store/ instead of, say, /usr/local?
>
> ---
> ¹
>   $ npm config get prefix


-- 
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: GNU Guix 1.1.0 released

2020-04-17 Thread Gary Johnson
I feel likewise. Thank you to Ludovic and the entire Guix team for
creating such an impressively principled and functionally elegant take
on GNU/Linux.

Cheers,
  Gary

Tobias Geerinckx-Rice  writes:

> Everyone,
>
> Ludovic Courtès 写道:
>> 14,078 commits over 11 months by 201 people.
>
> Thank you, thank you, thank you.  All 200 of you.
>
> Andy Tai 写道:
>> GNU Guix is one of the most important project in free software today
>
> This is absolute truth.
>
> Kind regards,
>
> T G-R


--
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: a first question about parallel environments

2020-03-16 Thread Gary Johnson
Hi Ben,

Just another humble Guix user here. I can't speak to your questions
about vagrant, but as far as parallel environments are concerned, you
are right that Guix can handle them.

The general terminology goes like so:

- A user installs packages into a profile.
- A user may combine packages into an environment.
- A profile is a saved environment.
- A user may specify which environments or profiles are active at any time.
- A user has a default profile created for them automatically by Guix,
  into which packages are installed unless specified otherwise.

Now a package is just a Scheme declaration that defines:
1. where to download the source code for a particular version of some software
2. how to patch, compile, and otherwise build it
3. some metadata like name, version, description, copyright, etc.

If you want to install multiple versions of a piece of software onto
your machine, you need a Scheme declaration for each version of that
software. That's it.

Now the trick to this is that when you pull the latest version of Guix
(e.g. "guix pull"), you get the latest version of the Guix build tools
as well as all of the Scheme declarations for every package supported by
that version of Guix. In general, the Guix distribution only provides
one version of each package.

Therefore, if you want multiple versions of something, you will have to
provide the Scheme declarations for the version(s) that are missing from
the current Guix distribution. You can so either by adding them to a
directory on your $GUIX_PACKAGE_PATH or by creating a separate channel
to serve up those packages. (See the Guix info docs about channels.)

For your particular situation, the easiest way to manage two sets of
packages installed on the same machine is just to make two user
accounts. Install one set of packages with the first user and the second
set of packages with the second user. The package files are always
stored in Guix's store directory (usually /gnu/store), so if both users
install the same package, it only exists once under /gnu/store. However,
each user's default profile will contain a set of symlinks that only
point to the packages that they installed. This provides clean isolation
between the different package versions without wasting disk space.

Messing directly with environments is another way to accomplish your
goal, but it wouldn't be nearly as easy to manage. You can create
one-off environments (collections of "installed" packages) using the
`guix environment' command. However, without saving the environments to
profiles, you would have to manually specify all the packages in your
environment each time you wanted to run a command within it. It's still
a perfectly viable path (especially if you hard-coded the long commands
into shell scripts), but using the default profile for multiple user
accounts definitely eliminates the extra DIY aspect of manual
environment/profile activation and deactivation.

Just my 2c,
  Gary

Ben  writes:

> Hi all
> I've watched all the introduction videos (which are really helpful) and red 
> some documentation, but I think I still miss something fundamental.
>
> I run a vagrant vm with a simple node server app behind apache.  The setup is 
> small, but still has a some configuration and packaging (npm) involved. So 
> I'd like to try to introduce guix into this setup. In addition to that I have 
> a second vagrant vm running with the same basic setup, but some minor 
> differences.
>
> Would it be possible to put these two setups from two different vagrant 
> machines into one machine? I don't need strong isolation, but I need the 
> possibility of having different versions of software installed on a single 
> vagrant vm.
>
> If it is possible I would like to keep using vagrant. I know about docker, 
> but in this case the preferred way would be: a vagrant vm with guix installed 
> with a couple of parallel environments (if thats the correct term).
>
> When reading about guix I always imagine the case when you're sitting infront 
> of your linux notebook, something (package, dependency) breaks and now thanks 
> to guix you're able to roll back very easily. So this would be a single user 
> environment. But can guix also be helpful in a case where you have multiple 
> different environments (I hope the term is correct) running in parallel? What 
> is the best way to achieve that? Creating multiple users? Using containers?
>
> Thanks
> Ben


--
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Questions about Development Environments in Emacs (Leiningen, Intero)

2020-02-10 Thread Gary Johnson
Hi Pierre,

You are correct that Clojure development via CIDER is dependent upon
having at least one of the three Clojure build tools installed and on
your PATH. These are your choices (in order of age):

- leinhttps://leiningen.org/
- boothttps://boot-clj.com/
- clojure https://clojure.org/guides/getting_started

All three are simply shell scripts that download their respective JARs
into $HOME/.lein, $HOME/.boot, $HOME/.clojure, and/or
$HOME/.m2/repository.

For lein and boot, I just manually install them into a scripts directory
in my $HOME directory and add that to my $PATH in my ~/.bashrc. For
clojure, I pass the installdir option to its installation script to put
all of its files in $HOME/local (which I add to my PATH instead of using
the global /usr/local).

Creating a Guix package for any of these three tools shouldn't be all
that difficult, but I have unfortunately not yet taken the time to put
them together. If someone does create them though (particularly one for
`clojure`), I would be quite happy indeed.

Happy hacking,
  Gary

Pierre Neidhardt  writes:

> Thanks for sharing, John!
>
> And any one using Clojure?


--
GPG Key ID: 7BC158ED
Use `gpg --search-keys lambdatronic' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
===
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html



Re: Scripting guix in guile (Konrad Hinsen)

2019-09-06 Thread Gary Johnson
Hi Konrad,

Fair enough. I was pleasantly surprised to discover that trick while
digging through the Guix manual several months ago. In the Guix info
pages, the documentation for it can be found under this path:

System Configuration -> Services -> Base Services -> extra-special-file

I'm not one of the Guix developers. I'm just a user, but my guess as to
why it isn't defined by default is that a big part of the GuixSD
mindset/philosophy AFAICT is to ensure that as little as possible is
installed under the usual FHS file tree (e.g., /usr, /bin, /sbin, /etc,
...). Instead as much of the OS as is technically feasible is installed
under /gnu/store.

This makes reproducing the same OS setup on a different machine a matter
of just running a handful of Guix commands on a blank hard drive
partition and feeding them your operating-system definition and package
manifest (both encoded as Scheme objects, of course). It also reduces
the likelihood of any file collisions when using the Guix package
manager on a foreign distro.

Since you're teaching a tutorial on Guix, you no doubt already grok all
of this, so my apologies for any redundancy here. In short, I just guess
/usr/bin/env isn't there because it doesn't need to be there for most
day-to-day Guix usage. If it is useful to a user, they can add the
extra-special-file service to their operating-system definition as per
my example.

That being said, if /usr/bin/env were added by default to the
special-files-service-type (which is part of %base-services), I'd
certainly not complain, and I think it would save quite a few users the
time that I spent digging through the manual for that particular
solution.

Good luck and happy hacking!
  Gary


Konrad Hinsen  writes:

> Hi Gary,
>
>> Just in case you hadn't thought of this yet, you can ensure that
>> /usr/bin/env exists on any Guix system by consing the following entry
>> onto the list of services under your operating-system definition.
>
> I hadn't thought of this for the simple reason that I didn't know about
> this mechanism. It looks very useful, thanks for the pointer!
>
> Is there any reason why this isn't defined by default? That would solve
> portability problems for lots of scripts, and I don't see any
> disadvantage caused by this link.
>
> Cheers,
>   Konrad



Re: Scripting guix in guile (Konrad Hinsen)

2019-09-05 Thread Gary Johnson
Hi Konrad,

Just in case you hadn't thought of this yet, you can ensure that
/usr/bin/env exists on any Guix system by consing the following entry
onto the list of services under your operating-system definition.

(extra-special-file "/usr/bin/env" (file-append coreutils "/bin/env"))

Then your scripts could just use #!/usr/bin/env and work natively
on GuixSD or a foreign distribution.

Here's what the services entry looks like in my operating-system
definition as an example:

(services (cons* (extra-special-file "/usr/bin/env" (file-append coreutils 
"/bin/env"))
 (postgresql-service #:extension-packages (list postgis))
 (service bitlbee-service-type)
 (service docker-service-type)
 %desktop-services))

It's one extra step to explain in your tutorial, but if any of your
students are already curious/brave enough to have installed GuixSD, they
should be capable of adding that one line to the config.scm file
(containing the operating-system definition) that they already had to
create at OS install time. Then they just run `guix system reconfigure
config.scm`, and they've got /usr/bin/env added to their system. No
reboot. No delay. Just on with the show!

YMMV,
  Gary


help-guix-requ...@gnu.org writes:

> Send Help-Guix mailing list submissions to
>   help-guix@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.gnu.org/mailman/listinfo/help-guix
> or, via email, send a message with subject or body 'help' to
>   help-guix-requ...@gnu.org
>
> You can reach the person managing the list at
>   help-guix-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Help-Guix digest..."
>
>
> Today's Topics:
>
>1. Report on environment variable issues (Tirifto)
>2. Re: rust:cargo (libcurl) vs. CURL_CA_BUNDLE (David Loyall)
>3. Re: adding environment variables to /etc/config.scm
>   (Jonathan Lane)
>4. Re: Report on environment variable issues (Mikhail Kryshen)
>5. Re: Scripting guix in guile (Konrad Hinsen)
>6. Re: Help defining a trivial package. (Pierre-Henry F.)
>
>
> --
>
> Message: 1
> Date: Tue, 3 Sep 2019 21:25:50 +0200
> From: Tirifto 
> To: help-guix@gnu.org
> Subject: Report on environment variable issues
> Message-ID: <20190903212550.517db...@posteo.cz>
> Content-Type: text/plain; charset=UTF-8
>
> Hello!
>
> I am running Guix on Parabola GNU+Linux-libre (a libre derivative of
> Arch Linux), and have had issues with environment variables in two
> instances. I'm not asking for help, but I'm not sure if this is
> appropriate for the bug list, either, so here we go.
>
> Firstly, when running GNOME Shell (native on Parabola), I tried
> integrating it with Guix, so that applications installed with Guix
> would be visible to GNOME Shell. I tried doing this by extending the
> environment variable ‘$XDG_DATA_DIRS’, which is empty by default,
> but that made GNOME Shell crash on login.
>
> After some investigation, it turned out that GNOME Shell falls back on
> a certain default value when the variable is empty, which already
> contains paths that GNOME Shell needs to function properly. So when the
> user extends the existing value of ‘$XDG_DATA_DIRS’ with another path,
> the variable is no longer empty, so GNOME Shell never gets to fall back
> to the paths it actually needs, and crashes instead.
>
> The solution was to manually add the paths to the extension/definition.
> I used ‘/usr/local/share:/usr/share’; not sure if that's all there was
> to it, but GNOME Shell could work with it. See also this Parabola bug:
>
> https://labs.parabola.nu/issues/2388
>
> Secondly, I find that the program ‘youtube-dl’ (native on Parabola)
> doesn't work properly when I define environment variables for SSL
> Certificates as advised by the Guix manual, like so:
>
>   export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
>   export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certif\
>   icates.crt"
>
> youtube-dl then complains about being unable to get local issuer
> certificates. On the other hand, when the variables are undefined, Guix
> complains about certificates, for a change (e.g. when running ‘guix
> weather’).
>
> My current solution is to comment the variables out in my ~/.profile,
> and only export them in the terminal when I'm about to use Guix.
>
> I don't know if these are reliably reproducible, and whether they
> should be fixed somewhere, or just better documented, but I hope the
> info can help!
>
> Best wishes
> // Tirifto
>
>
>
> --
>
> Message: 2
> Date: Tue, 3 Sep 2019 19:16:48 -0500
> From: David Loyall 
> To: Ludovic Courtès 
> Cc: help-guix@gnu.org
> Subject: Re: rust:cargo (libcurl) vs. CURL_CA_BUNDLE
> Message-ID:
>   
> Content-Type: text/plain; charset="UTF-8"
>
>> This was discussed recently on IRC:

Re: Need help displaying Unicode fonts in Icecat

2019-08-07 Thread Gary Johnson
> Are you running Guix on top of another distribution? I had to add the
> veriable XDG_DATA_DIRS to the environment, specifically
> XDG_DATA_DIRS=$HOME/.guix-profile/share:/usr/share for Guix running on
> Debian. The variable was set automagically full Guix systems.
>
> HTH,
> jr

Thanks, jr. I'm running GuixSD and I believe XDG_DATA_DIRS is set
correctly:

$ echo $XDG_DATA_DIRS
/gnu/store/daxn8m96wk2d2jnz4mxllhk34iv5gjqp-shared-mime-info-1.9/share:/gnu/store/cgy82g6yv8l1chawgch47zh23b0jll3l-glib-2.56.3/share:/gnu/store/l35xlc0hk86qw7kwli8lkskdkxskxsif-gtk+-3.24.9/share:/gnu/store/fbf0h779z46cl55vdciv00m8s0ccfnyb-emacs-26.2/share:/gnu/store/daxn8m96wk2d2jnz4mxllhk34iv5gjqp-shared-mime-info-1.9/share:/gnu/store/cgy82g6yv8l1chawgch47zh23b0jll3l-glib-2.56.3/share:/gnu/store/l35xlc0hk86qw7kwli8lkskdkxskxsif-gtk+-3.24.9/share:/gnu/store/fbf0h779z46cl55vdciv00m8s0ccfnyb-emacs-26.2/share:/home/gjohnson/.guix-profile/share:/home/gjohnson/.guix-profile/share:/run/current-system/profile/share:/home/gjohnson/.guix-profile/share:/run/current-system/profile/share

I just see boxes in IceCat and Ungoogled-Chromium wherever Unicode
symbols are supposed to appear, so I don't know if there is another font
package that I need to install or some browser-specific configuration
files that I need to edit.



Need help displaying Unicode fonts in Icecat

2019-08-05 Thread Gary Johnson
Hi Guix,

  I can't seem to get Unicode fonts to display in Icecat (and
Emacs...and really everywhere else too). I'm not a font wizard, so I'm
unsure how to resolve this issue. I've installed both of these packages:

- font-dejavu
- font-liberation

Then I ran "fc-cache -f" and rebooted my machine. Still, I'm not seeing
anything change unfortunately. I just get empty boxes where Unicode
symbols should be displayed.

Am I missing the correct font package? Do I need to edit a config file
somewhere? Any advice would be appreciated.

Thanks,
  Gary
  



Still need help installing ProtonMail Bridge

2019-07-14 Thread Gary Johnson
Hi Guix,

I sent an email out a week ago detailing my attempt to create a package
definition that would install the ProtonMail Bridge client
(https://protonmail.com/bridge/) and seeking help from anyone who might
be able to help me debug my Scheme code.

As no one has yet responded, I'm guessing that either no one knows how
to help me or that my message was too long and was therefore skipped
over by most readers.

Let me try again succinctly (TL;DR):

What should I add/change in my propagated-inputs clause so that ldd can
link these two libraries to my package?

   Missing libs:
   - libstdc++.so.6
   - libgcc_s.so.1

   Current package code:
   (propagated-inputs `(("libz"  ,compression:zlib)
("qtbase",qtbase-5.12)
("qtmultimedia"  ,qt:qtmultimedia)
("qtdeclarative" ,qt:qtdeclarative)
("qtsvg" ,qt:qtsvg)
("libsecret" ,gnome:libsecret)
("font-dejavu"   ,fonts:font-dejavu)))

Help?
  Gary



Need help installing ProtonMail Bridge

2019-07-08 Thread Gary Johnson
Hi Guix,

I've been trying to get the ProtonMail Bridge
(https://protonmail.com/bridge/) installed on my GuixSD system for the
past several days, and I'm running into a bit of a wall. I'm hoping that
one of you package wizards can help me figure out what I'm screwing up
here, and help me get my package code working correctly.

So without further ado, here it is (further explanation below):

;;== BEGIN PACKAGE 

(define-module (my-packages protonmail-bridge)
  #:use-module ((guix packages) #:prefix p:)
  #:use-module ((guix licenses) #:prefix l:)
  #:use-module ((guix download) #:prefix d:)
  #:use-module ((guix build-system trivial) #:prefix build:)
  #:use-module ((guix utils)#:prefix utils:)
  #:use-module ((gnu packages)  #:prefix gp:)
  #:use-module ((gnu packages base) #:prefix base:)
  #:use-module ((gnu packages compression)  #:prefix compression:)
  #:use-module ((gnu packages qt)   #:prefix qt:)
  #:use-module ((gnu packages gnome)#:prefix gnome:)
  #:use-module ((gnu packages fonts)#:prefix fonts:))

(define-public qtbase-5.12
  (p:package
   (inherit qt:qtbase)
   (name "qtbase")
   (version "5.12.4")
   (source (p:origin
(method d:url-fetch)
(uri (string-append "https://download.qt.io/official_releases/qt/;
(utils:version-major+minor version) "/" version
"/submodules/" name "-everywhere-src-"
version ".tar.xz"))
(sha256 (p:base32 
"158i0apc3i8bbgrk9j1k34y2b03v0kwwv8m7aaaxpxsglppwgyr0"))
;; Use TZDIR to avoid depending on package "tzdata".
;; (patches (gp:search-patches "qtbase-use-TZDIR.patch"
;; "qtbase-old-kernel.patch"))
(modules '((guix build utils)))
(snippet
 ;; corelib uses bundled harfbuzz, md4, md5, sha3
 '(begin
(with-directory-excursion "src/3rdparty"
  (for-each delete-file-recursively
(list "double-conversion" "freetype" "harfbuzz-ng"
  "libpng" "libjpeg" "pcre2" "sqlite" "xcb"
  "zlib"))
  #t)))

;; FIXME: Update propagated-inputs to address these 2 runtime linking errors:
;; - libstdc++.so.6 => not found
;; - libgcc_s.so.1 => not found
(define-public protonmail-bridge
  (p:package
   (name "protonmail-bridge")
   (version "1.1.6-1")
   (supported-systems '("x86_64-linux"))
   (license l:expat)
   (synopsis "Background service that connects your local mail client to 
ProtonMail's servers.")
   (description "The Bridge is an application that runs on your computer in the 
background and seamlessly encrypts and decrypts your mail as it enters and 
leaves your computer.")
   (home-page "https://www.protonmail.com/bridge;)
   (source (p:origin
(method d:url-fetch)
(uri (string-append 
"https://protonmail.com/download/beta/protonmail-bridge_; version "_amd64.deb"))
(sha256 (p:base32 
"1x9fl6s15d2061y37hrl1yz6f5l6pqfwa895xcm2fr29s8v8b1z8"
   (build-system build:trivial-build-system)
   (inputs `(("binutils" ,base:binutils)
 ("tar"  ,base:tar)
 ("xz"   ,compression:xz)))
   (propagated-inputs `(("libz"  ,compression:zlib)
("qtbase",qtbase-5.12)
("qtmultimedia"  ,qt:qtmultimedia)
("qtdeclarative" ,qt:qtdeclarative)
("qtsvg" ,qt:qtsvg)
("libsecret" ,gnome:libsecret)
("font-dejavu"   ,fonts:font-dejavu)))
   (arguments '(#:builder (let* ((ar (string-append (assoc-ref 
%build-inputs "binutils") "/bin/ar"))
 (tar(string-append (assoc-ref 
%build-inputs "tar")  "/bin/tar"))
 (xz (string-append (assoc-ref 
%build-inputs "xz")   "/bin/xz"))
 (source (assoc-ref %build-inputs 
"source")) ; /gnu/store/...-protonmail-bridge_1.1.6-1_amd64.deb
 (out(assoc-ref %outputs "out"))
 (unpack-deb (string-append ar " p " source " 
data.tar.xz | " xz " --decompress | " tar " x")))
(mkdir out)
(chdir out)
(system unpack-deb)
(rename-file "usr/bin"   "bin")
(rename-file "usr/lib"   "lib")
(rename-file "usr/share" "share")
(rmdir "usr")
(delete-file "bin/protonmail-bridge")
(symlink (string-append out 

Re: PostGIS does not work with Postgresql installation

2019-02-27 Thread Gary Johnson
Hi Guix,

Please disregard my last message. It looks like Julien's patch that adds
#:extension-packages to the operating-system's postgresql-service
function was already merged into master. Excellent!

~Gary

Gábor Boskovits  writes:

> Hello,
>
> Gary Johnson  ezt írta (időpont: 2019. febr.
> 5., K, 19:22):
>>
>> Hi Guix,
>>
>>   I need to install the PostGIS spatial extensions into my local
>> PostgreSQL database. However, due to our unique packaging setup,
>> PostgreSQL cannot find the PostGIS extension directory.
>>
>
> The fix for this is currently on staging, see:
> http://issues.guix.info/issue/32297.
> If needed you can cherry-pick it from there, but this may trigger lot
> of rebuilds.
>
>> Here is the error I'm getting from within a psql session:
>>
>> -
>> postgres=# CREATE EXTENSION postgis;
>>
>> ERROR: could not open extension control file
>> "/gnu/store/1ybw54pgin4b59czcppybzlk6jkqnxik-postgresql-10.6/share/extension/postgis.control":
>> No such file or directory
>> -
>>
>> This file is actually installed here:
>>
>> /gnu/store/nx9lyaia3z8ilxm1z80f7rhg1j3ka1j8-postgis-2.4.4/share/extension/postgis.control
>>
>> So...the issue is, of course, that Guix is installing PostGIS into its
>> own directory under /gnu/store rather then into the PostgreSQL install
>> directory, which is how other package managers do it.
>>
>> Unfortunately, I can't find any environment variables that I can set to
>> tell PostgreSQL where to look from the postgis.control file. Instead, it
>> looks like the *postgis* package under gnu/packages/geo.scm needs to be
>> rewritten to correctly write out symlinks into the postgresql install
>> directory.
>>
>> I don't currently have the Guix programming chops to make this happen.
>> Perhaps someone else on this mailing list can help?
>>
>> Thanks,
>>   Gary
>>
>
> Thank you for your report.
>
> Best regards,
> g_bor



Re: PostGIS does not work with Postgresql installation

2019-02-27 Thread Gary Johnson
Thanks for the pointer to Julien's Postgresql extensions patch.
(http://issues.guix.info/issue/32297) I have a couple of follow-up
questions:

1. Is there any timeline for when this change will be merged into
   master? It seems generally useful to the community since currently
   you can't use any custom Postgresql extensions with the database
   server, and Julien's patch looked pretty complete.

2. How do I go about cherry-picking commits from different guix branches
   into the guix branch that I am building from? How will this interact
   with future calls to guix pull? Do I need to maintain a separate
   branch that merges guix master and guix staging (or commits I
   cherry-pick therefrom)?

Thanks for your help. I really need to get PostGIS operational ASAP.

~Gary

Gábor Boskovits  writes:

> Hello,
>
> Gary Johnson  ezt írta (időpont: 2019. febr.
> 5., K, 19:22):
>>
>> Hi Guix,
>>
>>   I need to install the PostGIS spatial extensions into my local
>> PostgreSQL database. However, due to our unique packaging setup,
>> PostgreSQL cannot find the PostGIS extension directory.
>>
>
> The fix for this is currently on staging, see:
> http://issues.guix.info/issue/32297.
> If needed you can cherry-pick it from there, but this may trigger lot
> of rebuilds.
>
>> Here is the error I'm getting from within a psql session:
>>
>> -
>> postgres=# CREATE EXTENSION postgis;
>>
>> ERROR: could not open extension control file
>> "/gnu/store/1ybw54pgin4b59czcppybzlk6jkqnxik-postgresql-10.6/share/extension/postgis.control":
>> No such file or directory
>> -
>>
>> This file is actually installed here:
>>
>> /gnu/store/nx9lyaia3z8ilxm1z80f7rhg1j3ka1j8-postgis-2.4.4/share/extension/postgis.control
>>
>> So...the issue is, of course, that Guix is installing PostGIS into its
>> own directory under /gnu/store rather then into the PostgreSQL install
>> directory, which is how other package managers do it.
>>
>> Unfortunately, I can't find any environment variables that I can set to
>> tell PostgreSQL where to look from the postgis.control file. Instead, it
>> looks like the *postgis* package under gnu/packages/geo.scm needs to be
>> rewritten to correctly write out symlinks into the postgresql install
>> directory.
>>
>> I don't currently have the Guix programming chops to make this happen.
>> Perhaps someone else on this mailing list can help?
>>
>> Thanks,
>>   Gary
>>
>
> Thank you for your report.
>
> Best regards,
> g_bor



Error building cdrtools and dvd+rw-tools

2019-02-05 Thread Gary Johnson
Hi Guix,

After my latest "guix pull", I tried building dvd+rw-tools, but it is
erroring out when trying to build cdrtools. Attempting to build cdrtools
directly, returns the same fatal error with a rather lengthy log file
associated with the build.

After digging through it, I noticed several possible issues in the build 
process:

- no perl is installed (shouldn't this be in the package's inputs list?)
- warning that GNU make is unmaintained and suggesting that we use s-make 
instead
- broken ext2_fs.h 
(/gnu/store/3c9a43ifhbjm8lsc1s183y8a8874fz01-linux-libre-headers-4.14.67/include/linux/ext2_fs.h
 is broken... yes)

There may be more than this going on, but these were the warnings and
errors and jumped out at me as I went through the log file.

Any help in getting this package (cdrtools) to build correctly would be
much appreciated.

Thanks,
  Gary
  



PostGIS does not work with Postgresql installation

2019-02-05 Thread Gary Johnson
Hi Guix,

  I need to install the PostGIS spatial extensions into my local
PostgreSQL database. However, due to our unique packaging setup,
PostgreSQL cannot find the PostGIS extension directory.

Here is the error I'm getting from within a psql session:

-
postgres=# CREATE EXTENSION postgis;

ERROR: could not open extension control file
"/gnu/store/1ybw54pgin4b59czcppybzlk6jkqnxik-postgresql-10.6/share/extension/postgis.control":
No such file or directory
-

This file is actually installed here:

/gnu/store/nx9lyaia3z8ilxm1z80f7rhg1j3ka1j8-postgis-2.4.4/share/extension/postgis.control

So...the issue is, of course, that Guix is installing PostGIS into its
own directory under /gnu/store rather then into the PostgreSQL install
directory, which is how other package managers do it.

Unfortunately, I can't find any environment variables that I can set to
tell PostgreSQL where to look from the postgis.control file. Instead, it
looks like the *postgis* package under gnu/packages/geo.scm needs to be
rewritten to correctly write out symlinks into the postgresql install
directory.

I don't currently have the Guix programming chops to make this happen.
Perhaps someone else on this mailing list can help?

Thanks,
  Gary



Re: Choose devices according to linux-libre code

2018-10-30 Thread Gary Johnson
My laptop is a ThinkPenguin. All of their laptops and desktops are built
specifically to support the linux-libre kernel and not need any
proprietary drivers or firmware. Check them out here:

https://thinkpenguin.com

Happy hacking,
  Gary

help-guix-requ...@gnu.org writes:

> Send Help-Guix mailing list submissions to
>   help-guix@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>   https://lists.gnu.org/mailman/listinfo/help-guix
> or, via email, send a message with subject or body 'help' to
>   help-guix-requ...@gnu.org
>
> You can reach the person managing the list at
>   help-guix-ow...@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Help-Guix digest..."
>
>
> Today's Topics:
>
>1. Touchpad tap (zna...@tutanota.com)
>2. Choose devices according to linux-libre code (zna...@tutanota.com)
>3. Re: Choose devices according to linux-libre code
>   (zna...@tutanota.com)
>4. Re: Touchpad tap (Pierre Neidhardt)
>5. Re: Guix and Emacs Integration for Polyglot Development
>   (George Clemmer)
>6. Re: Touchpad tap (Luther Thompson)
>7. Re: bug#33189: Touchpad tap (Tobias Geerinckx-Rice)
>
>
> --
>
> Message: 1
> Date: Sun, 28 Oct 2018 19:40:40 +0100 (CET)
> From: 
> To: Help Guix , Bug Guix 
> Subject: Touchpad tap
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"
>
> Hello, Guix Help! I am not able to use tap on my touchpad. Scroll is working, 
> mouse motion is working, left and right buttons are working, but tap and 
> double click are not working on my touchpad.
>
> As described in the Internet need to use 
> /etc/X11/xorg.conf.d/90-synaptics.conf. 
> But GuixSD has own filesystem structure, so there is no /etc/X11.
>
> Here it is configuration file xorg.scm: 
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/xorg.scm?id=v0.15.0-2564-g38a2f5eaf#n2564
>  
> 
>
> I assume xorg configurations ought to be done. Please, how to write my 
> config.scm?
> -- next part --
> An HTML attachment was scrubbed...
> URL: 
> 
>
> --
>
> Message: 2
> Date: Sun, 28 Oct 2018 19:45:12 +0100 (CET)
> From: 
> To: Help Guix , Bug Guix 
> Subject: Choose devices according to linux-libre code
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"
>
> Hello, Guix Help!
>
> As I've got here 
> https://lists.gnu.org/archive/html/help-guix/2018-10/msg00083.html 
> 
> some devices cannot work without linux-firmware, requiring non-free software 
> drivers. It is so bad. 
>
> I believe the issue can be solved by choosing devices that have proper 
> support by linux-libre code. So how to do this? Is there any info how to 
> choose devices working nice on linux-libre?
> -- next part --
> An HTML attachment was scrubbed...
> URL: 
> 
>
> --
>
> Message: 3
> Date: Sun, 28 Oct 2018 19:47:24 +0100 (CET)
> From: 
> To: Help Guix 
> Subject: Re: Choose devices according to linux-libre code
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"
>
> I use Lenovo G50-30 
> https://www.lenovo.com/us/en/laptops/lenovo/g-series/g50-30 
> 
>
> But when I will choose new PC it will be interesting to know.
>
> 28. Oct 2018 21:45 by zna...@tutanota.com :
>
>
>> Hello, Guix Help!
>>
>> As I've got here > 
>> https://lists.gnu.org/archive/html/help-guix/2018-10/msg00083.html 
>> 
>> some devices cannot work without linux-firmware, requiring non-free software 
>> drivers. It is so bad. 
>>
>> I believe the issue can be solved by choosing devices that have proper 
>> support by linux-libre code. So how to do this? Is there any info how to 
>> choose devices working nice on linux-libre?
>>
> -- next part --
> An HTML attachment was scrubbed...
> URL: 
> 
>
> --
>
> Message: 4
> Date: Sun, 28 Oct 2018 21:02:27 +0100
> From: Pierre Neidhardt 
> To: zna...@tutanota.com
> Cc: Help Guix , Bug Guix 
> Subject: Re: Touchpad tap
> Message-ID: <87a7mxn8ks@ambrevar.xyz>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi!
>
> Consult the manual, "(guix) X Window".  There is an example near the end:
>
> --8<---cut here---start->8---
>   (define bepo-evdev

Re: Further attempts at building GnuCash with SQLite support

2017-12-24 Thread Gary Johnson
Hi Oleg,

Thanks for taking the time to check my work. It looks like the missing
piece of the puzzle was adding the --no-grafts option. So now I am able
to install GnuCash with SQLite support using my recipe with this
command:

$ guix package -i gnucash-with-dbi --no-grafts

What still confuses me is why it doesn't work without --no-grafts. I'm
wondering if for some reason, the grafting stage is changing the hash
(and hence the directory name) of the libdbi-drivers-sqlite package and
thereby preventing dlopen from finding the appropriate library when
building gnucash.

If anyone can shed some light on this behavior, I'd love to understand
it. Perhaps I could then tweak my package recipe to work correctly
without --no-grafts, so that it would be ready for contribution to the
Guix project's package list.

I've included my package recipe at the bottom of this email one more
time. The key thing to watch for is the #:configure-flags list:

--8<>8
#:configure-flags '("--enable-aqbanking"
,(string-append "--with-dbi-dbd-dir="
(package-output (open-connection) 
libdbi-drivers-sqlite)
"/lib/dbd"))
--8<>8

My guess is that the call to package-output is returning the pre-grafted
directory name for libdbi-drivers-sqlite, but dlopen needs to find the
driver in the post-grafted one (or maybe the other way around). Any
insight would be appreciated.

Thanks,
  Gary

--8<>8
(define-public gnucash-with-dbi
  (package
   (name "gnucash-with-dbi")
   (version "2.6.16")
   (source
(origin
 (method url-fetch)
 (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
 version "/gnucash-" version ".tar.bz2"))
 (sha256
  (base32
   "1088rssg9xgwi3wdfrhdcga46gby6lrd9a1fvn9zq456lscn4m9c"))
 (patches (search-patches "gnucash-price-quotes-perl.patch"
   (build-system gnu-build-system)
   (inputs
`(("guile" ,guile-2.0)
  ("icu4c" ,icu4c)
  ("glib" ,glib)
  ("gtk" ,gtk+-2)
  ("goffice" ,goffice-0.8)
  ("libgnomecanvas" ,libgnomecanvas)
  ("libxml2" ,libxml2)
  ("libxslt" ,libxslt)
  ("webkitgtk" ,webkitgtk/gtk+-2)
  ("aqbanking" ,aqbanking)
  ("perl-date-manip" ,perl-date-manip)
  ("perl-finance-quote" ,perl-finance-quote)))
   (propagated-inputs
`(("sqlite" ,sqlite)
  ("libdbi" ,libdbi)
  ("libdbi-drivers-sqlite" ,libdbi-drivers-sqlite)))
   (native-inputs
`(("glib" ,glib "bin") ; glib-compile-schemas, etc.
  ("intltool" ,intltool)
  ("pkg-config" ,pkg-config)))
   (arguments
`(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
   #:configure-flags '("--enable-aqbanking"
   ,(string-append "--with-dbi-dbd-dir="
   (package-output 
(open-connection) libdbi-drivers-sqlite)
   "/lib/dbd"))
   #:phases
   (modify-phases %standard-phases
  (add-after
   'install 'wrap-programs
   (lambda* (#:key inputs outputs 
#:allow-other-keys)
 (for-each (lambda (prog)
 (wrap-program (string-append 
(assoc-ref outputs "out")
  
"/bin/" prog)
   `("PERL5LIB" ":" 
prefix
 ,(map (lambda (o)
 
(string-append o "/lib/perl5/site_perl/"

,(package-version perl)))
   (if 
(string=? prog "gnc-fq-helper")
   (list

,@(transitive-input-references
   
'inputs
   (map 
(lambda (l)

  (assoc l (inputs)))

'("perl-finance-quote"

  "perl-date-manip"
   (list
 

Further attempts at building GnuCash with SQLite support

2017-12-18 Thread Gary Johnson
Hi Guix,

After spending some more time with the Guix manual and a bit of REPL
experimentation, I tweaked my package definitions for libdbi and
libdbi-drivers-sqlite so that they now appear to be building
successfully. Here they are for your consideration:

==
=
= (define-module (my-packages gnucash-with-dbi)
=   #:use-module ((guix licenses) #:prefix license:)
=   #:use-module (guix store)
=   #:use-module (guix packages)
=   #:use-module (guix download)
=   #:use-module (guix build-system gnu)
=   #:use-module (gnu packages)
=   #:use-module (gnu packages databases)
=   #:use-module (gnu packages gnome)
=   #:use-module (gnu packages gnucash)
=   #:use-module (gnu packages glib)
=   #:use-module (gnu packages gtk)
=   #:use-module (gnu packages guile)
=   #:use-module (gnu packages icu4c)
=   #:use-module (gnu packages perl)
=   #:use-module (gnu packages pkg-config)
=   #:use-module (gnu packages web)
=   #:use-module (gnu packages webkit)
=   #:use-module (gnu packages xml))
=
= (define-public libdbi
=   (package
= (name "libdbi")
= (version "0.9.0")
= (source
=  (origin
=   (method url-fetch)
=   (uri
=(string-append 
"https://versaweb.dl.sourceforge.net/project/libdbi/libdbi/libdbi-;
=   version "/libdbi-" version ".tar.gz"))
=   (sha256
=(base32
= "00s5ra7hdlq25iv23nwf4h1v3kmbiyzx0v9bhggjiii4lpf6ryys"
= (build-system gnu-build-system)
= (home-page "http://libdbi.sourceforge.net/;)
= (synopsis "Database-independent abstraction layer in C")
= (description
=  "The libdbi framework implements a database-independent abstraction 
layer in C,
= similar to the DBI/DBD layer in Perl. Writing one generic set of code,
= programmers can leverage the power of multiple databases and multiple
= simultaneous database connections by using this framework.")
= (license license:lgpl2.1+)))
=
= (define-public libdbi-drivers-sqlite
=   (package
= (name "libdbi-drivers-sqlite")
= (version "0.9.0")
= (source
=  (origin
=   (method url-fetch)
=   (uri
=(string-append 
"https://versaweb.dl.sourceforge.net/project/libdbi-drivers/libdbi-drivers/libdbi-drivers-;
=   version "/libdbi-drivers-" version ".tar.gz"))
=   (sha256
=(base32
= "0m680h8cc4428xin4p733azysamzgzcmv4psjvraykrsaz6ymlj3"
= (build-system gnu-build-system)
= (propagated-inputs
=  `(("libdbi" ,libdbi)
=("sqlite" ,sqlite)))
= (arguments
=  `(#:configure-flags '("--with-sqlite3"
=,(string-append "--with-dbi-libdir="
=(package-output (open-connection) 
libdbi)
= (home-page "http://libdbi-drivers.sourceforge.net/;)
= (synopsis "Database-specific drivers for the libdbi framework")
= (description
=  "The libdbi-drivers project provides the database-specific drivers for
= the libdbi framework. The current version of libdbi-drivers will work
= with any 0.9.x release of the framework. The drivers officially
= supported by libdbi are MySQL, PostgreSQL, and SQLite3.")
= (license license:lgpl2.1+)))
=
==

So...now that those are installing themselves successfully, I moved on
to install GnuCash with DBI support for SQLite3. Here's my package
definition:

==
=
= (define-public gnucash-with-dbi
=   (package
= (name "gnucash-with-dbi")
= (version "2.6.16")
= (source
=  (origin
=   (method url-fetch)
=   (uri (string-append 
"mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
=   version "/gnucash-" version ".tar.bz2"))
=   (sha256
=(base32
= "1088rssg9xgwi3wdfrhdcga46gby6lrd9a1fvn9zq456lscn4m9c"))
=   (patches (search-patches "gnucash-price-quotes-perl.patch"
= (build-system gnu-build-system)
= (inputs
=  `(("guile" ,guile-2.0)
=("icu4c" ,icu4c)
=("glib" ,glib)
=("gtk" ,gtk+-2)
=("goffice" ,goffice-0.8)
=("libgnomecanvas" ,libgnomecanvas)
=("libxml2" ,libxml2)
=("libxslt" ,libxslt)
=("webkitgtk" ,webkitgtk/gtk+-2)
=("aqbanking" ,aqbanking)
=("perl-date-manip" ,perl-date-manip)
=("perl-finance-quote" ,perl-finance-quote)))
= (propagated-inputs
=  `(("sqlite" ,sqlite)
=("libdbi" ,libdbi)
=("libdbi-drivers-sqlite" ,libdbi-drivers-sqlite)))
= (native-inputs
=  `(("glib" ,glib "bin") ; glib-compile-schemas, etc.
=("intltool" ,intltool)
=("pkg-config" ,pkg-config)))
= (arguments
=  `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
=#:configure-flags '("--enable-aqbanking"
=,(string-append 

Error with guix pull

2017-12-11 Thread Gary Johnson
Hi Guix,

I tried running "guix pull" today, and at the end of the compilation
phase, I was presented with this error:

--8<-->8
copying and compiling to 
'/gnu/store/29nci1d7zykwriwhnpxqivilbi6cr8wc-guix-latest' with Guile 2.2.3...
loading...   26.1% of 656 filesrandom seed for tests: 1513007529
compiling...100.0% of 656 files
Backtrace:
Exception thrown while printing backtrace:
In procedure public-lookup: Module named (system repl debug) does not exist
--8<-->8

Did Guix suddenly get a new guile dependency that I need to install? Any
advice would be appreciated.

Thanks,
  Gary



Re: How to build GnuCash with SQLite backend support?

2017-12-06 Thread Gary Johnson
Hi again,

After spending some time with the Guix manual, I managed to write up a
new package module that defines packages for libdbi, libdbi-drivers
(just sqlite3 support for now), and gnucash-with-dbi (see attached
file).



gnucash-with-dbi.scm
Description: Binary data

However, now I'm getting a new error when I pop this file on the
GUIX_PACKAGE_PATH and run:

$ guix package -i libdbi-drivers

==
...
LOTS OF NORMAL CONFIG OUTPUT
...
checking for libdbi framework... checking dbi/dbi.h usability... yes
checking dbi/dbi.h presence... yes
checking for dbi/dbi.h... yes
checking for MySQL support... no
checking for PostgreSQL support... no
checking for SQLite support... no
checking for SQLite3 support... yes
checking sqlite3.h usability... yes
checking sqlite3.h presence... yes
checking for sqlite3.h... yes
checking for library containing sqlite3_exec... -lsqlite3
checking for Msql support... no
checking for Oracle support... no
checking for Firebird/Interbase support... no
checking for Freetds support... no
checking for Ingres support... no
checking for IBM DB2 support... no
checking for strtoll... yes
checking for atoll... yes
checking for vasprintf... yes
checking for asprintf... yes
checking for libdbi library... no
configure: error: Invalid libdbi directory - include files not found.
phase `configure' failed after 2.5 seconds
builder for 
`/gnu/store/nxm3ivpsngf7k9rcszry30hyjpx65iqw-libdbi-drivers-0.9.0.drv' failed 
with exit code 1
guix package: error: build failed: build of 
`/gnu/store/nxm3ivpsngf7k9rcszry30hyjpx65iqw-libdbi-drivers-0.9.0.drv' failed
==

Okay, guys. What the heck am I missing here? I've clearly added the
libdbi and sqlite packages to the "inputs" list of the libdbi-drivers
package. The configure phase is detecting dbi.h and sqlite3.h just fine,
but then it can't find the libdbi library? Now I'm definitely lost. :(

I tried sticking libdbi into propagated-inputs and even into
native-inputs with exactly the same result.

Help?
  Gary


Re: How to build GnuCash with SQLite backend support?

2017-12-06 Thread Gary Johnson
Thanks Efraim,

  I made a modified copy of gnucash.scm outside of the Guix git tree (as
gnucash-with-dbi.scm) that returns the gnucash package and was able to
get it to run with:

$ guix package -f gnucash-with-dbi.scm

Of course, I then ran into this error in the configure phase:


checking dbi/dbi.h usability... no
checking dbi/dbi.h presence... no
checking for dbi/dbi.h... no
configure: error:

 Unable to find . Either install the libdbi development
 package (such as libdbi0-dev), or switch off the database backend of
 gnucash by --disable-dbi.
 Note: If you install libdbi, you should also install its database
 drivers (such as libdbd-sqlite3 libdbd-mysql libdbd-pgsql).


So, yeah...I should have seen that coming. Since libdbi and
libdbd-sqlite3 are not part of Guix yet, I guess that means I need to
write package definitions for them. I guess I'll need to go cozy up with
the manual for awhile...

RTFM time,
  Gary



How to build GnuCash with SQLite backend support?

2017-12-05 Thread Gary Johnson
Hi guys,

I run Guix on top of Parabola. Recently, the GnuCash package from the
AUR got into conflict with an old version of ICU, and now it won't build
anymore. So...I decided to install GnuCash through Guix instead.

Unfortunately, although it built correctly (yay Guix!), I can no longer
open my accounts.gnucash file (in SQLite3 format). Instead, I just get a
message from GnuCash saying that no suitable backend can be found for
this format.

I then looked at the gnucash.scm file here:

  /usr/share/guile/site/2.2/gnu/packages/gnucash.scm

And I found this:

(arguments
 `(#:tests? #f ;FIXME: failing at /qof/gnc-date/qof print date dmy buff
   #:configure-flags '("--disable-dbi"
   "--enable-aqbanking")

So I'm guessing that the "--disable-dbi" configure flag is the culprit
here. However, I'm still a novice to the structure of Guix package build
files, so I could really use some help. I tried removing the
"--disable-dbi" flag from the #:configure-flags list, and then ran:

$ guix package -f gnucash.scm

on my new copy of the gnucash.scm file. However, guix just returns
silently without doing anything. What am I doing wrong?

Thanks in advance,
  Gary