Re: The Little Guixer

2022-06-06 Thread yasu
(If there is a better "pad" or wiki we can use, let me know!)

https://pad.riseup.net/p/n7KQE0eCa8goWEPNR99P-keep

So, I guess the thing to do is to come up with lots of good questions?

Then we will divide up in categories and in the reasonable sequence?

-Yasu ️




On Sat, 2022-06-04 at 01:20 -0700, vi...@riseup.net wrote:
> On 2022-06-04 09:09, Yasuaki Kudo wrote:
> > Let's do this together, all of us, and publish in complete Free
> > Software format compiled by Guix 
> > 
> > > On Jun 4, 2022, at 01:41, Ludovic Courtès  wrote:
> > > 
> > > Sounds like a great idea; feel inclined to do so?  :-)
> > > 
> > > Ludo’.
> 
> we could do a small wiki?
> 
> i'm down to help.
> 
> ~vidak




Re: Add Microsoft Cascadia Code font?

2021-01-10 Thread yasu
Well, let me know if that's the case!  After all, my submission is
almost identical as the existing packages such as font-ibm-plex and
font-inconsolata?
I would prefer not to "fork" as another repository if I can avoid it!
-Yasu
On Sun, 2021-01-10 at 07:28 -0500, Julien Lepiller wrote:
> I might be wrong, but I thought fonts were considered non-functional
> data. If that's the case, isn't cc-by-nc-nd acceptable?
> 
> Le 10 janvier 2021 05:38:16 GMT-05:00, Leo Prikler <
> leo.prik...@student.tugraz.at> a écrit :
> > Hi Yasu,
> > 
> > I don't think it'll be so simple.  It appears, that nerd-fonts
> > already
> > includes – or at least has the potential to include – some non-free
> > glyphs, which would in turn then be part of Cascadia.  An instance
> > would be pomicons [1], which are licensed as CC BY-NC-ND.  A
> > reviewer
> > would first have to verify, that Cascadia is indeed wholly covered
> > under the OFL or at least under a set of free licenses.
> > 
> > Yes, it sucks having to put that much effort into packaging a font,
> > but
> > if you just want to have a workable font for programming, there are
> > probably better solutions than Cascadia, some of which are already
> > packaged in Guix – e.g. font-fira-code.
> > 
> > Regards,
> > Leo
> > 
> > [1] https://github.com/gabrielelana/pomicons
> > 
> > Am Sonntag, den 10.01.2021, 19:11 +0900 schrieb Yasuaki Kudo:
> > > Thank you for your comments!
> > > 
> > > Because I don't have a lot of time, is it ok to just re-format
> > > the
> > > original submission, get it committed with the comment that the
> > > package needs to be compiled rather than copied, when someone (or
> > > I)
> > > wants to so properly?
> > > 
> > > Cheers,
> > > Yasu
> > > 
> > > 
> > > > On Jan 10, 2021, at 18:16, Leo Prikler <
> > > > leo.prik...@student.tugraz.at> wrote:
> > > > 
> > > > Hello Vincent,
> > > > 
> > > > there is no .tar of the fonts however, that's a source tarball
> > > > generated by github.  To be fair, one should probably build
> > > > this
> > > > font
> > > > (and other fonts) from source instead.  In particular, we might
> > > > want to
> > > > package nerd-fonts[1] first, since Cascadia appears to be an
> > > > iteration
> > > > of it.
> > > > 
> > > > Regards,
> > > > Leo
> > > > 
> > > > [1] https://github.com/ryanoasis/nerd-fonts
> > > > 
> > > > 


Re: Add Microsoft Cascadia Code font?

2021-01-10 Thread yasu
I created a 'low-standard-guix' repository and moved the submitted
package there, for now :-)

https://github.com/yugawara/low-standard-guix/blob/master/README.md

Again, when I get time, let me see if I can properly package Cascadia
Code fonts!

Cheers,
Yasu



On Sun, 2021-01-10 at 19:56 +0900, Yasuaki Kudo wrote:
> Hi Leo,
> 
> Understood, and this level of scrutiny is actually an encouraging
> sign that Guix has standards! 
> 
> I am happy enough to have it this way for my personal use for
> now.  Later, when I have more time, let me revisit.   
> 
> I have not experimented with this yet but I also understand I can
> create a separate repository as well.   Maybe that will also do
> 
> Regards,
> Yasu
> 
> > On Jan 10, 2021, at 19:38, Leo Prikler <
> > leo.prik...@student.tugraz.at> wrote:
> > 
> > Hi Yasu,
> > 
> > I don't think it'll be so simple.  It appears, that nerd-fonts
> > already
> > includes – or at least has the potential to include – some non-free
> > glyphs, which would in turn then be part of Cascadia.  An instance
> > would be pomicons [1], which are licensed as CC BY-NC-ND.  A
> > reviewer
> > would first have to verify, that Cascadia is indeed wholly covered
> > under the OFL or at least under a set of free licenses.
> > 
> > Yes, it sucks having to put that much effort into packaging a font,
> > but
> > if you just want to have a workable font for programming, there are
> > probably better solutions than Cascadia, some of which are already
> > packaged in Guix – e.g. font-fira-code.
> > 
> > Regards,
> > Leo
> > 
> > [1] https://github.com/gabrielelana/pomicons
> > 
> > Am Sonntag, den 10.01.2021, 19:11 +0900 schrieb Yasuaki Kudo:
> > > Thank you for your comments!
> > > 
> > > Because I don't have a lot of time, is it ok to just re-format
> > > the
> > > original submission, get it committed with the comment that the
> > > package needs to be compiled rather than copied, when someone (or
> > > I)
> > > wants to so properly?
> > > 
> > > Cheers,
> > > Yasu
> > > 
> > > 
> > > > On Jan 10, 2021, at 18:16, Leo Prikler <
> > > > leo.prik...@student.tugraz.at> wrote:
> > > > 
> > > > Hello Vincent,
> > > > 
> > > > there is no .tar of the fonts however, that's a source tarball
> > > > generated by github.  To be fair, one should probably build
> > > > this
> > > > font
> > > > (and other fonts) from source instead.  In particular, we might
> > > > want to
> > > > package nerd-fonts[1] first, since Cascadia appears to be an
> > > > iteration
> > > > of it.
> > > > 
> > > > Regards,
> > > > Leo
> > > > 
> > > > [1] https://github.com/ryanoasis/nerd-fonts
> > > > 
> > > > 




Add Microsoft Cascadia Code font?

2021-01-10 Thread yasu
Hello Guix Development,

Attached is my Guix package submission of Microsoft Cascadia Code
fonts.

This is my very first attempt to make a Guix package contribution and I
did this in less than 30 minutes, copying the package descriptions of
IBM Plex fonts and modifying a few things.   I dont' know what
protocols I may have missed  

Would you please let me know how to proceed from here?

Regards,
Yasu
From a86683caa6ee17e881c91cc103d30f844d6a6b34 Mon Sep 17 00:00:00 2001
From: Yasuaki Kudo 
Date: Sun, 10 Jan 2021 16:11:26 +0900
Subject: [PATCH] i

---
 gnu/packages/fonts.scm | 17 +
 1 file changed, 17 insertions(+)

diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm
index 11a8e6261b..d080eb5567 100644
--- a/gnu/packages/fonts.scm
+++ b/gnu/packages/fonts.scm
@@ -78,6 +78,23 @@
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages xorg))
 
+(define-public font-cascadia-code
+  (package
+(name "font-cascadia-code")
+(version "2009.22")
+(source (origin
+  (method url-fetch)
+  (uri (string-append "https://github.com/microsoft/cascadia-code/releases/download/;
+  "v" version "/CascadiaCode-" version ".zip"))
+  (sha256
+(base32
+  "0ilqvy7hzw35w5mig6zp2lny30fm8kmpzh69fg2npr4snyacq6w0"
+(build-system font-build-system)
+(home-page "https://github.com/microsoft/cascadia-code/;)
+(synopsis "Microsoft Cascadia Code")
+(description "This package provides Microsoft Cascadia Code fonts.")
+(license license:silofl1.1)))
+
 (define-public font-ibm-plex
   (package
 (name "font-ibm-plex")
-- 
2.30.0



Re: BUG: Re: guix environment: error: cannot create container: unprivileged user cannot create user namespaces

2020-12-06 Thread yasu
Hi Zimoun,

I tried as you suggested but it didn't work...


   root@guix ~# echo "kernel.unprivileged_userns_clone = 1" >
   /etc/sysctl.d/local.conf
   -bash: /etc/sysctl.d/local.conf: No such file or directory
   root@guix ~# sysctl --system
   root@guix ~# logout
   ~$ guix environment -C
   guix environment: error: cannot create container: unprivileged user
   cannot create user namespaces
   guix environment: error: please set
   /proc/sys/kernel/unprivileged_userns_clone to "1"


Now, if this posting were to be belived, I think this term
   kernel.unprivileged_userns_clone

   is specific to Debian Linux, and does not exist outside of that circle.
   
   It disables a bit of "hardening" that Debian patches into their 
   distribution kernel. If you're not running such a kernel, it will
   fail 
   and not do anything, as such a setting doesn't even exist in the
   mainline Linux kernel.


   I wonder how this term came in to Guix in the first place?

   -Yasu


   On Sun, 2020-12-06 at 17:56 +0100, zimoun wrote:
   > Hi,
> 
> Please try the recommendation. Have you tried it?
> 
>   please set /proc/sys/kernel/unprivileged_userns_clone to "1"
> 
> As root, you just do:
> 
>   echo 1 > /proc/sys/kernel/unprivileged_userns_clone
> 
> then “guix environment -C” should work as expected.  To do the trick
> automatically with Sheperd, I do not know, but I am sure that the
> systemd equivalent 
> 
>   echo "kernel.unprivileged_userns_clone = 1" >
> /etc/sysctl.d/local.conf
>   sysctl --system
> 
> seems doable with Guix System.
> 
> 
> On my system, and I need explanations if it does not work similarly
> on
> yours, I simply do:
> 
> --8<---cut here---start->8---
> $ guix environment -C --ad-hoc hello -- hello 
> guix environment: error: cannot create container: unprivileged user
> cannot create user namespaces
> guix environment: error: please set
> /proc/sys/kernel/unprivileged_userns_clone to "1"
> 
> $ su -
> Password:
> # echo 1 > /proc/sys/kernel/unprivileged_userns_clone 
> # logout
> 
> $ guix environment -C --ad-hoc hello -- hello 
> Hello, world!
> --8<---cut here---end--->8---
> 
> Hope that helps,
> simon




BUG: Re: guix environment: error: cannot create container: unprivileged user cannot create user namespaces

2020-12-06 Thread yasu
Hi,

I really don't know much about Linux but it looks like the problem I
reported has something to do with Debian?

https://unix.stackexchange.com/questions/303213/how-to-enable-user-namespaces-in-the-kernel-for-unprivileged-unshare

Now, I don't use Debian at all (I use Guix System) and do you think
this is a Bug in Guix (in that this Debian specific word should never
even be mentioned in Guix?)

To summarize this bug again:

The Bug:
The container command no longer works,  after the commit
8bc5ca5160db3d82bd5b6b2b7ed80c96f42bd33e.
guix environment -C


Additional Information:
Instead of working as it did until the commit, the command now
dies with the following error mesage:
guix environment: error: cannot create container:
unprivileged user cannot create user namespaces
guix environment: error: please set
/proc/sys/kernel/unprivileged_userns_clone to "1"

The message "please set
/proc/sys/kernel/unprivileged_userns_clone to "1",
seems irrelevant to Guix System users as it may only relate to
Debian users.
I don't know why this Debian specific message is here in the
first place...  

Disclaimer :-):
I am assuming this is indeed Debian specific (I tried to
install LinuxLinux (the Guix default) but failed - my AMD graphics card
won't allow me to even boot, unless I use regular Linux.)

I scanned for the phrase in LinuxLibre source code but there
was no mention of it:
~/Downloads$ tar -xf linux-libre-5.9.12-gnu.tar.xz
~/Downloads$ cd linux-5.9.12/
~/Downloads/linux-5.9.12$ rg -i unprivileged_userns_clone


Just FYI: the problem phrase is indeed found in the Debian
Kernel Patch:
~/co/debian$ rg -i unprivileged_userns_clone

linux/debian/patches/debian/add-sysctl-to-disallow-
unprivileged-CLONE_NEWUSER-by-default.patch
25:+extern int unprivileged_userns_clone;
27:+#define unprivileged_userns_clone 0
36:+if ((clone_flags & CLONE_NEWUSER) &&
!unprivileged_userns_clone)
47:+if ((unshare_flags & CLONE_NEWUSER) &&
!unprivileged_userns_clone) {
65:+extern int unprivileged_userns_clone;
77:+.procname   = "unprivileged_userns_clone",
78:+.data   = _userns_clone,
    96:+int unprivileged_userns_clone;





Cheers,
Yasu




commit 8bc5ca5160db3d82bd5b6b2b7ed80c96f42bd33eAuthor: Paul Garlick <
pgarl...@tourbillion-technology.com>Date:   Thu Dec 3 16:00:18 2020
+
linux-container: Correct test for unprivileged user namespace
support.
Fixes <https://bugs.gnu.org/31977>;.Reported by Paul Garlick
.
* gnu/build/linux-container.scm (unprivileged-user-namespace-
supported?):Return #f when the 'userns-file' does not exist.
diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-
container.scmindex 4a8bed5a9a..3870b50907 100644--- a/gnu/build/linux-
container.scm+++ b/gnu/build/linux-container.scm@@ -44,7 +44,7
@@   (let ((userns-file
"/proc/sys/kernel/unprivileged_userns_clone")) (if (file-exists?
userns-file) (eqv? #\1 (call-with-input-file userns-file read-
char))-#t)))+#f)))

On Sat, 2020-12-05 at 09:20 +0900, yasu wrote:
> Hi Pj,
> Thank you for you reply (and your wonderful Hacking Guide 
> https://gitlab.com/pjotrp/guix-notes/blob/master/HACKING.org)!
> I tried the command and it didn't work...
> I use Guix System (not  a foreign distribution) as described at the
> bottom 
> -Yasu
> 
> On Fri, 2020-12-04 at 19:55 +0100, Pjotr Prins wrote:
> > On Fri, Dec 04, 2020 at 05:32:08PM +0100, zimoun wrote:
> > > Have you tried to do the recommandation?
> > > 
> > >  please set /proc/sys/kernel/unprivileged_userns_clone to "1"
> > 
> > As root:
> > 
> > echo 1 > /proc/sys/kernel/unprivileged_userns_clone
> > 
> > Yes, it is common on Debian and such.
> > 
> > Pj.
> 
> root@guix ~# echo 1 > /proc/sys/kernel/unprivileged_userns_clone-
> bash: /proc/sys/kernel/unprivileged_userns_clone: No such file or
> directory
> root@guix ~# guix system describeGeneration 5631  Dec 05 2020
> 09:09:16  (current)  file name: /var/guix/profiles/system-5631-
> link  canonical file name:
> /gnu/store/qqzk4kvrhxjcia3hcq3xqrcdi36azzz9-system  label: GNU with
> Linux 5.9.12  bootloader: grub-efi  root device: label: "my-root" 
> kernel: /gnu/store/9a93vpq4aa1c3adiaaa3blwc18r9r7zz-linux-
> 5.9.12/bzImage  channels:guix:  repository URL: 
> https://git.savannah.gnu.org/git/guix.git  branch:
> master  commit:
> 86d635b85035086d21c319f31f628761df5c82e5nonguix:  repository
> URL: https://gitlab.com/nonguix/nonguix  branch:
> master  commit: b08ea529d4d36468b20ef4aff6dc87b3de0eff70guix-
> chromium:  repository URL: 
> https://gitlab.com/mbakke/guix-chromium.git  branch:
> master  commit: 2de450b92e5f2624d4f964407686934e22239f7b 
> configuration file: /gnu/store/hlma107m2004g6qq00ihm190am5mh9z0-
> configuration.scm


Re: guix environment: error: cannot create container: unprivileged user cannot create user namespaces

2020-12-04 Thread yasu
Hi Pj,

Thank you for you reply (and your wonderful Hacking Guide 
https://gitlab.com/pjotrp/guix-notes/blob/master/HACKING.org)!

I tried the command and it didn't work...
I use Guix System (not  a foreign distribution) as described at the
bottom :-)

-Yasu


On Fri, 2020-12-04 at 19:55 +0100, Pjotr Prins wrote:
> On Fri, Dec 04, 2020 at 05:32:08PM +0100, zimoun wrote:
> > Have you tried to do the recommandation?
> > 
> >  please set /proc/sys/kernel/unprivileged_userns_clone to "1"
> 
> As root:
> 
> echo 1 > /proc/sys/kernel/unprivileged_userns_clone
> 
> Yes, it is common on Debian and such.
> 
> Pj.

root@guix ~# echo 1 > /proc/sys/kernel/unprivileged_userns_clone
-bash: /proc/sys/kernel/unprivileged_userns_clone: No such file or
directory

root@guix ~# guix system describe
Generation 5631 Dec 05 2020 09:09:16(current)
  file name: /var/guix/profiles/system-5631-link
  canonical file name: /gnu/store/qqzk4kvrhxjcia3hcq3xqrcdi36azzz9-
system
  label: GNU with Linux 5.9.12
  bootloader: grub-efi
  root device: label: "my-root"
  kernel: /gnu/store/9a93vpq4aa1c3adiaaa3blwc18r9r7zz-linux-
5.9.12/bzImage
  channels:
guix:
  repository URL: https://git.savannah.gnu.org/git/guix.git
  branch: master
  commit: 86d635b85035086d21c319f31f628761df5c82e5
nonguix:
  repository URL: https://gitlab.com/nonguix/nonguix
  branch: master
  commit: b08ea529d4d36468b20ef4aff6dc87b3de0eff70
guix-chromium:
  repository URL: https://gitlab.com/mbakke/guix-chromium.git
  branch: master
  commit: 2de450b92e5f2624d4f964407686934e22239f7b
  configuration file: /gnu/store/hlma107m2004g6qq00ihm190am5mh9z0-
configuration.scm


guix environment: error: cannot create container: unprivileged user cannot create user namespaces

2020-12-04 Thread yasu
Hi Guix Development,

I rely on the -C option below to compile ./pre-inst-env  .

guix environment -C guix


(I learned the technique through 
https://gitlab.com/pjotrp/guix-notes/blob/master/INSTALL.org - 
./pre-inst-env just won't compile correctly unless I follow the
instructions on the page)

However, this feature has become unavailable after the
commit  8bc5ca5160db...

~/co/guix (master)$ guix environment -C guix
guix environment: error: cannot create container: unprivileged user
cannot create user namespaces
guix environment: error: please set
/proc/sys/kernel/unprivileged_userns_clone to "1"



The commit details are below:
commit 8bc5ca5160db3d82bd5b6b2b7ed80c96f42bd33e
Author: Paul Garlick 
Date:   Thu Dec 3 16:00:18 2020 +

linux-container: Correct test for unprivileged user namespace
support.

Fixes <https://bugs.gnu.org/31977>;;.
Reported by Paul Garlick .

* gnu/build/linux-container.scm (unprivileged-user-namespace-
supported?):
Return #f when the 'userns-file' does not exist.

diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-
container.scm
index 4a8bed5a9a..3870b50907 100644
--- a/gnu/build/linux-container.scm
+++ b/gnu/build/linux-container.scm
@@ -44,7 +44,7 @@
   (let ((userns-file "/proc/sys/kernel/unprivileged_userns_clone"))
 (if (file-exists? userns-file)
 (eqv? #\1 (call-with-input-file userns-file read-char))
-#t)))
+#f)))

 (define (setgroups-supported?)
   "Return #t if the setgroups proc file, introduced in Linux-libre
3.19,



I hope this is a bug that can be fixed.   Otherwise, it looks like I
won't  be able to compile pre-inst-env?

Cheers,
Yasu


Re: Japanese Input wont't without manually adding environmental variables?

2020-11-07 Thread yasu
Hi Leo,

Oh this looks like like exactly what I need!!

https://issues.guix.info/44354

Very much looking forward to this being picked up!!

Thank you so much!

-Yasu


On Sat, 2020-11-07 at 10:23 +0100, Leo Prikler wrote:
> Hello, yasu
> 
> I recently submitted #44354, which would set GUIX_GTK*_IM_MODULE_FILE
> from the system configuration.  Once this patch is merged, you should
> be able to add ibus and ibus-anthy to your operating-system packages
> and have them picked up from there by gnome.
> 
> Note, that this patch would as it is currently likely only set
> GUIX_GTK3_IM_MODULE_FILE, because the gnome package does not contain
> anything linked against gtk+-2.  If that is a concern, you can add an
> application that does to it.  Mine currently looks like this:
> 
> ```
>   (package
> (inherit gnome)
> (propagated-inputs
>  `(,@(package-propagated-inputs gnome)
>;; IBus
>("ibus" ,ibus)
>("ibus-anthy" ,ibus-anthy)
>;; World
>("dconf-editor" ,dconf-editor)
>("evolution" ,evolution)
>("evolution-data-server" ,evolution-data-server)
>("gitg" ,gitg)
>("gnome-tweaks" ,gnome-tweaks)
>("polari" ,polari)
>("seahorse" ,seahorse
> ```
> 
> [As you can see, just ibus and a few more Gnome packages, but none
> using Gtk+ 2.]
> 
> Best regards,
> Leo
> 




Re: Japanese Input wont't without manually adding environmental variables?

2020-11-07 Thread yasu
I see..., thank you anyway!

I wonder if we can collect of this kind of usability tips in wiki-like
systems somewhere so we don't have to keep digging google for
information. 

I am very excited about Guix - I switched from Nix and I am not going
back!

-Yasu



On Sat, 2020-11-07 at 16:41 +0800, 宋文武 wrote:
> yasu  writes:
> 
> > Hi!
> > 
> > After installing packages ibus and ibus-anthy , I thought I would
> > be able to type Japanese - but I had to follow the tip below and
> > manually add these variables to make it work.
> > Would this be considered a bug? 
> 
> Yes, guix lack supports for input methods.
> 
> > https://www.mail-archive.com/help-guix@gnu.org/msg08282.html
> > 
> > export GUIX_GTK2_IM_MODULE_FILE="$HOME/.guix-profile/lib/gtk-
> > 2.0/2.10.0/immodules-gtk2.cache" 
> > export GUIX_GTK3_IM_MODULE_FILE="$HOME/.guix-profile/lib/gtk-
> > 3.0/3.0.0/immodules-gtk3.cache" 
> > 
> 
> For these kind of environment variables, we usually set them in
> '.guix-profile/etc/profile' via 'native-search-paths' of a package.
> 
> But adding 'GUIX_GTK3_IM_MODULE_FILE' to the 'native-search-paths' of
> 'gtk+' is not good enough or won't solve this issue as we usually
> don't
> install 'gtk+' into the profile.  I'd like to find another way set
> them,
> could be add some code to '(guix profiles)' with the 'gtk-im-modules'
> profile hook.  Need more thinking... 
> 
> 
> In the meantime, we have to set those environment variables
> manually..




Japanese Input wont't without manually adding environmental variables?

2020-11-06 Thread yasu
Hi!
After installing packages ibus and ibus-anthy , I thought I would be
able to type Japanese - but I had to follow the tip below and manually
add these variables to make it work.Would this be considered a bug?  
https://www.mail-archive.com/help-guix@gnu.org/msg08282.html
export GUIX_GTK2_IM_MODULE_FILE="$HOME/.guix-profile/lib/gtk-
2.0/2.10.0/immodules-gtk2.cache" export
GUIX_GTK3_IM_MODULE_FILE="$HOME/.guix-profile/lib/gtk-
3.0/3.0.0/immodules-gtk3.cache" 
Cheers,Yasu