all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* custom service definition files location
@ 2019-02-17 17:09 Reza Alizadeh Majd
  2019-02-17 22:52 ` nly
  0 siblings, 1 reply; 5+ messages in thread
From: Reza Alizadeh Majd @ 2019-02-17 17:09 UTC (permalink / raw)
  To: help-guix

Hi, 

does anyone know where do I have to place my custom service definition `.scm` files,
in order to automatically be identified by `guix system reconfigure` command? 

Thanks,
Reza

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: custom service definition files location
  2019-02-17 17:09 custom service definition files location Reza Alizadeh Majd
@ 2019-02-17 22:52 ` nly
  2019-02-18  8:26   ` Reza Alizadeh Majd
  0 siblings, 1 reply; 5+ messages in thread
From: nly @ 2019-02-17 22:52 UTC (permalink / raw)
  To: help-guix

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

Guix system is declared in 1 file. The file may be 'config.scm',or 'xyz.scm', or even 'foo.bar'.

It is not automatically detected by 'guix system' commands(you might be thinking of nix).

It is supplied as a command-line argument with the 'guix system' commands. Check 'guix system --help'.

On February 17, 2019 5:09:26 PM UTC, Reza Alizadeh Majd <r.majd@pantherx.org> wrote:
>Hi, 
>
>does anyone know where do I have to place my custom service definition
>`.scm` files,
>in order to automatically be identified by `guix system reconfigure`
>command? 
>
>Thanks,
>Reza

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[-- Attachment #2: Type: text/html, Size: 929 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: custom service definition files location
  2019-02-17 22:52 ` nly
@ 2019-02-18  8:26   ` Reza Alizadeh Majd
  2019-02-18 11:34     ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: Reza Alizadeh Majd @ 2019-02-18  8:26 UTC (permalink / raw)
  To: help-guix

Thanks for your response. 
sure I will pass my system config file as an argument to guix: 

$ guix system reconfigure /etc/confg.scm

but my question is about to detect my custom service definition files ( myservice.scm ) in order that I could use them inside my config.scm . for existing services, their definition files are located in store, in `/gnu/store/.../gnu/service/` path.

Best, 
Reza


On Mon, Feb 18, 2019, at 2:22 AM, nly wrote:
> Guix system is declared in 1 file. The file may be 'config.scm',or 
> 'xyz.scm', or even 'foo.bar'.
> 
> It is not automatically detected by 'guix system' commands(you might be 
> thinking of nix).
> 
> It is supplied as a command-line argument with the 'guix system' 
> commands. Check 'guix system --help'.
> 
> On February 17, 2019 5:09:26 PM UTC, Reza Alizadeh Majd 
> <r.majd@pantherx.org> wrote:
> >Hi, 
> >
> >does anyone know where do I have to place my custom service definition
> >`.scm` files,
> >in order to automatically be identified by `guix system reconfigure`
> >command? 
> >
> >Thanks,
> >Reza
> 
> -- 
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: custom service definition files location
  2019-02-18  8:26   ` Reza Alizadeh Majd
@ 2019-02-18 11:34     ` Ricardo Wurmus
  2019-02-18 17:52       ` Reza Alizadeh Majd
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2019-02-18 11:34 UTC (permalink / raw)
  To: Reza Alizadeh Majd; +Cc: help-guix


Reza Alizadeh Majd <r.majd@pantherx.org> writes:

> Thanks for your response.
> sure I will pass my system config file as an argument to guix:
>
> $ guix system reconfigure /etc/confg.scm
>
> but my question is about to detect my custom service definition files ( myservice.scm ) in order that I could use them inside my config.scm . for existing services, their definition files are located in store, in `/gnu/store/.../gnu/service/` path.

There are two ways to do this:

1. place your service definitions in a Guile module and put the
directory containing the module files onto GUILE_LOAD_PATH.  Refer to
the module with a “use-modules” clause in your operating system
configuration.

2. Include the file with “(include "/path/to/file-name")”.  You can use
a relative file name here.

--
Ricardo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: custom service definition files location
  2019-02-18 11:34     ` Ricardo Wurmus
@ 2019-02-18 17:52       ` Reza Alizadeh Majd
  0 siblings, 0 replies; 5+ messages in thread
From: Reza Alizadeh Majd @ 2019-02-18 17:52 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: help-guix

Thanks, adding service definition path to `GUILE_LOAD_PATH` fixed the issue. 

Best, 
Reza


On Mon, Feb 18, 2019, at 3:04 PM, Ricardo Wurmus wrote:
> 
> Reza Alizadeh Majd <r.majd@pantherx.org> writes:
> 
> > Thanks for your response.
> > sure I will pass my system config file as an argument to guix:
> >
> > $ guix system reconfigure /etc/confg.scm
> >
> > but my question is about to detect my custom service definition files ( myservice.scm ) in order that I could use them inside my config.scm . for existing services, their definition files are located in store, in `/gnu/store/.../gnu/service/` path.
> 
> There are two ways to do this:
> 
> 1. place your service definitions in a Guile module and put the
> directory containing the module files onto GUILE_LOAD_PATH.  Refer to
> the module with a “use-modules” clause in your operating system
> configuration.
> 
> 2. Include the file with “(include "/path/to/file-name")”.  You can use
> a relative file name here.
> 
> --
> Ricardo
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-02-18 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-17 17:09 custom service definition files location Reza Alizadeh Majd
2019-02-17 22:52 ` nly
2019-02-18  8:26   ` Reza Alizadeh Majd
2019-02-18 11:34     ` Ricardo Wurmus
2019-02-18 17:52       ` Reza Alizadeh Majd

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.