Re: Deleting unnecessary services from %desktop-services

2018-11-30 Thread znavko
Hello, Ricardo Wurmus! ok, thank you. But now I've not achieved what I need. 
avahi-damon, ntpd, networking rest in my system. 

  (services (cons*  ;;(tor-service)
    (service postgresql-service-type)
    (xfce-desktop-service)
    (modify-services  
  (remove (lambda (service)
    (eq? (service-kind service) 
   avahi-service-type ntp-service-type networking))
    %desktop-services
  );end of remove
  (elogind-service-type
    c => (elogind-configuration (handle-lid-switch 
'ignore)))
    );;end of modify desktop-services
  ));;end of services

Also they are mentioned in use-modules:

(use-modules (gnu) (gnu system nss)
 (gnu services desktop)
 (srfi srfi-1) ;;for remove function
 (gnu services networking) ;;for remove ntp
 (gnu services avahi) ;;for remove avahi
 (gnu services xorg)
 (gnu services databases);;for postgres
)
(use-service-modules desktop)
(use-package-modules certs gnome)

But if I delete this use-modules lines, remove line will give the errors: 
unbound variable avahi-service-type, ntp-service-type, networking. 
So, how to correct I do not know.


Nov 30, 2018, 5:55 AM by rek...@elephly.net :

>
> zna...@tutanota.com >  writes:
>
>> Guile Manual says 'remove' returns elements. But I need to remove elements.
>>
>
> “remove” does what you want.  The “services” field expects a list of
> services.  When using “remove” on a list of services it returns a new
> list of (possibly fewer) services.  That’s exactly what you want.
>
> “remove!”, on the other hand, mutates an existing value; you would need
> to have it operate on an existing variable to mutate it.  “remove” is
> much more elegant.
>
> --
> Ricardo
>



Re: guix gc, any way to delete only packages that aren't required to build anything?

2018-11-30 Thread Mark H Weaver
Pierre Neidhardt  writes:

>> Contrary to what Pierre wrote above, I've found that the use of these
>> flags certainly does _not_ lead to an ever-growing store.
>
> According to the discussion I linked above, The reason behind the ever-growing
> store are substitutes.  So if you don't use them, then the store size should 
> be
> stable indeed.

I re-read the thread that you linked to, and I cannot find anything to
suggest that "The reason behind the ever-growing store are substitutes".
Can you cite the specific message that says so?

 Thanks,
   Mark



Re: guix gc, any way to delete only packages that aren't required to build anything?

2018-11-30 Thread Pierre Neidhardt

> Contrary to what Pierre wrote above, I've found that the use of these
> flags certainly does _not_ lead to an ever-growing store.

According to the discussion I linked above, The reason behind the ever-growing
store are substitutes.  So if you don't use them, then the store size should be
stable indeed.

-- 
Pierre Neidhardt
https://ambrevar.xyz/


signature.asc
Description: PGP signature


Re: guix gc, any way to delete only packages that aren't required to build anything?

2018-11-30 Thread Mark H Weaver
Pierre Neidhardt  writes:

> I've been bugged by this as well (see
> https://lists.gnu.org/archive/html/help-guix/2018-09/msg00028.html).  There 
> are
> a few options beside Ricardo's suggestion:
>
> - You can start the Guix daemon with --gc-keep-outputs (see "(guix) Invoking
>   guix-daemon" in the manual).  This will never delete anything that is still
>   required, but this leads to an ever-growing store.  If you've got limited
>   storage space, you might not want this.

On my GuixSD system where substitutes are completely disabled and I
build everything locally, I've been running my Guix daemon with both
--gc-keep-derivations=yes and --gc-keep-outputs=yes for years.  Here's
the relevant excerpt of my OS config:

  (services (cons* <... my custom services here ...>
   (modify-services (remove (lambda (svc)
  (eq? (service-kind svc)
   wicd-service-type))
%base-services)
 (guix-service-type
  config =>
  (guix-configuration
(inherit config)
(use-substitutes? #f)
(authorized-keys '())
(substitute-urls '())
(extra-options '("--gc-keep-derivations=yes"
 "--gc-keep-outputs=yes")))

This configuration allows me to run "guix gc" without losing the
dependencies that are needed to build the packages that are currently
protected by GC roots, e.g. the packages in my profiles and system
generations.  It's not perfect: I lose a few packages apparently related
to grafts, but it's not too much in practice, and I can manually add
more GC roots to handle those cases.

Contrary to what Pierre wrote above, I've found that the use of these
flags certainly does _not_ lead to an ever-growing store.  On my GNOME 3
GuixSD system, my store requires ~30 gigabytes, and as long as I trim my
older profiles and system generations regularly, the space requirements
are fairly stable over time.

  Regards,
Mark



Re: Deleting unnecessary services from %desktop-services

2018-11-30 Thread Ricardo Wurmus


zna...@tutanota.com writes:

> Guile Manual says 'remove' returns elements. But I need to remove elements.

“remove” does what you want.  The “services” field expects a list of
services.  When using “remove” on a list of services it returns a new
list of (possibly fewer) services.  That’s exactly what you want.

“remove!”, on the other hand, mutates an existing value; you would need
to have it operate on an existing variable to mutate it.  “remove” is
much more elegant.

--
Ricardo




Single user mode in GuixSD

2018-11-30 Thread znavko
Hello, Guix Help! Once I've lost root password and need to restore root 
password in GuixSD.

I've tried to press 'e' in GRUB, added init=/bin/sh and booted into it.

But login screen appeared, if it was the usual boot. And I need to use 
usb-stick, mount file system, delay root hash from /etc/shadow.

Please, how to get single-user mode in GuixSD?


scheme shells (was Re: Failing to use guile-bash)

2018-11-30 Thread Giovanni Biscuolo
Hi David,

David Larsson  writes:

> Hi,
> I installed the guile-bash package and tried to use it as below but 
> can't get it to work. Anyone who is successfully using it?

unfortunately the project is currently retired:
https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/guile.scm#n1751
«
   ;; This project is currently retired.  It was initially announced here:
   ;; .
»

and the git repo appears to be deleted

 https://anonscm.debian.org/cgit/users/kaction-guest/retired/dev.guile-bash.git

unfortunately the other project guile-scsh (Guile Scheme Shell) is
bitrotten according to this
https://www.gnu.org/software/guile/manual/html_node/The-Scheme-shell-_0028scsh_0029.html

so the two projects I'm aware of are unmaintained :-( (I'm still not able to
even think contributing)

going a *little bit* OT...

(**disclaimer**: I'm an Emacs newbie _addicted_ so I'm much biased

a possible alternative I can suggest you is to explore Eshell [1], the
Emacs eshell: it's not a POSIX shell replacement but it's an interesting
interface to our operating system, and we can script it [2]

on this matter I found an interesting (long) article worth reading
https://web.archive.org/web/20181014151102/https://ambrevar.xyz/emacs-eshell/

«Back in the days, VT-like terminals were our main mean of communicating
with a machine. Decades went by, our desktop computers can now handle
gigabytes of buffering and display in 24-bit colors, and yet we still
stick to terminal emulators, that is, programs that emulate the
restrictions of those ancient machines. »

DANGER: that article made me more Emacs addicted

HTH!
Gio

[...]

[1] 
https://www.gnu.org/software/emacs/manual/html_node/eshell/Introduction.html#Introduction

[2] https://www.gnu.org/software/emacs/manual/html_node/eshell/Scripts.html

-- 
Giovanni Biscuolo

Xelera IT Infrastructures


signature.asc
Description: PGP signature


Re: Configuring a service but not starting it on boot

2018-11-30 Thread Arun Isaac


> One thing I proposed long ago is this:
> .  It would allow us to address
> this kind of issue but it has the drawback that it makes it harder to
> reason about the relationships among services: anything can happen.

I can see how the proposed finalization service can be inelegant. But, I
don't have any insight to offer. So, for now, I'll just use hacks like
the one Clement proposed.