* Few notes to 0.8 @ 2014-11-28 11:41 Adam Pribyl 2014-11-28 21:31 ` Ludovic Courtès 0 siblings, 1 reply; 7+ messages in thread From: Adam Pribyl @ 2014-11-28 11:41 UTC (permalink / raw) To: guix-devel I have now, with the help of people from this list, running installation, with more or less complete config.scm. Guix gets better with every version. Still I do have few "user" hickups: 1. even thou networking and lsh-service are configured, networking does not start, "deco status networking" prints it is running and is e.g. PID 186, but there is no such process... weird as it should respawn. 2. during boot the system twice sets the console font, each time to a different one (this is not always reproducible). Minor. 3. fstab is not "used", I am not sure how to mount additional file systems and swap. 4. I do not have e.g. /root/.guix-profile/sbin in PATH by default, not sure why. 5. still strugglig in how to install a package for global use, probably only thru a "guix system reconfigure" otherwise every user has to do a "guix package -i" to get the app into his profile. 6. I am still not able to add any service myself, if there is at least something like rc.local available, it would be fine to have a last resort to start anything upon boot. 7. Not sure how to properly add a user (again guix system reconfigure would help), as useradd makes the usuall unix user, but is missing some other things like a build directory... Regards Adam Pribyl ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Few notes to 0.8 2014-11-28 11:41 Few notes to 0.8 Adam Pribyl @ 2014-11-28 21:31 ` Ludovic Courtès 2014-11-29 11:57 ` 宋文武 0 siblings, 1 reply; 7+ messages in thread From: Ludovic Courtès @ 2014-11-28 21:31 UTC (permalink / raw) To: Adam Pribyl; +Cc: guix-devel Adam Pribyl <pribyl@lowlevel.cz> skribis: > I have now, with the help of people from this list, running > installation, with more or less complete config.scm. Guix gets better > with every version. Thanks for the detailed feedback, as usual! > 1. even thou networking and lsh-service are configured, networking > does not start, "deco status networking" prints it is running and is > e.g. PID 186, but there is no such process... weird as it should > respawn. Are you using ‘dhcp-client-service’? What does ‘ps aux | grep dhc’ show? > 2. during boot the system twice sets the console font, each time to a > different one (this is not always reproducible). Minor. Hmm, you mean on the same tty? > 3. fstab is not "used", I am not sure how to mount additional file > systems and swap. Right. I used the ‘mount’ command, and I would use ‘swapon’, but yes, it would be useful to be able to populate /etc/fstab so one can easily mount a pre-defined file system. > 4. I do not have e.g. /root/.guix-profile/sbin in PATH by default, not > sure why. I see, that’s because ‘root’ is not created with ‘useradd’, so it does not get .bashrc from the Shadow skeletons. > 5. still strugglig in how to install a package for global use, > probably only thru a "guix system reconfigure" otherwise every user > has to do a "guix package -i" to get the app into his profile. To install a package for global use, just add it to the ‘packages’ field of ‘operating-system’, and run ‘guix system reconfigure’. I find it more convenient to have most packages managed in my user account. > 6. I am still not able to add any service myself, You mean to add a service definition? > if there is at least something like rc.local available, it would be > fine to have a last resort to start anything upon boot. Yeah I’m not sure exactly how to do it. I think the priority should be to make the “regular” service mechanism be more usable for non experts. > 7. Not sure how to properly add a user (again guix system reconfigure > would help), as useradd makes the usuall unix user, but is missing > some other things like a build directory... Yes, the ‘users’ field, and then run ‘reconfigure’. ‘useradd’ should work as well, but user accounts created that way are not under Guix control. What do you mean by “build directory” here? Thanks, Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Few notes to 0.8 2014-11-28 21:31 ` Ludovic Courtès @ 2014-11-29 11:57 ` 宋文武 2014-11-29 20:45 ` Ludovic Courtès 2014-11-29 21:06 ` Few notes to 0.8 Alex Kost 0 siblings, 2 replies; 7+ messages in thread From: 宋文武 @ 2014-11-29 11:57 UTC (permalink / raw) To: Ludovic Courtès, Adam Pribyl; +Cc: guix-devel Ludovic Courtès <ludo@gnu.org> writes: > Adam Pribyl <pribyl@lowlevel.cz> skribis: > >> I have now, with the help of people from this list, running >> installation, with more or less complete config.scm. Guix gets better >> with every version. > > Thanks for the detailed feedback, as usual! > >> 1. even thou networking and lsh-service are configured, networking >> does not start, "deco status networking" prints it is running and is >> e.g. PID 186, but there is no such process... weird as it should >> respawn. > > Are you using ‘dhcp-client-service’? What does > ‘ps aux | grep dhc’ show? > >> 2. during boot the system twice sets the console font, each time to a >> different one (this is not always reproducible). Minor. > > Hmm, you mean on the same tty? Yeah, I have issue too, solved by: (initrd (lambda (fs . args) (apply base-initrd fs #:extra-modules '("i915") args))) To get fbcon in initrd before udev-service and console-font-service. I think the 'Console' lines of `dmesg' tell the reason. > >> 3. fstab is not "used", I am not sure how to mount additional file >> systems and swap. > > Right. I used the ‘mount’ command, and I would use ‘swapon’, but yes, > it would be useful to be able to populate /etc/fstab so one can easily > mount a pre-defined file system. > >> 4. I do not have e.g. /root/.guix-profile/sbin in PATH by default, not >> sure why. > > I see, that’s because ‘root’ is not created with ‘useradd’, so it does > not get .bashrc from the Shadow skeletons. > >> 5. still strugglig in how to install a package for global use, >> probably only thru a "guix system reconfigure" otherwise every user >> has to do a "guix package -i" to get the app into his profile. > > To install a package for global use, just add it to the ‘packages’ field > of ‘operating-system’, and run ‘guix system reconfigure’. > > I find it more convenient to have most packages managed in my user > account. > >> 6. I am still not able to add any service myself, I just put it in my config.scm: (define (console-layout-service layout) (with-monad %store-monad (return (service (document "Setup keyboard layout for console") (provision '(console-layout)) (start #~(lambda _ (system* (string-append #kbd "/bin/loadkeys") #$layout))) (stop #~(const #t)) (respawn? #f))))) > > You mean to add a service definition? > >> if there is at least something like rc.local available, it would be >> fine to have a last resort to start anything upon boot. > > Yeah I’m not sure exactly how to do it. I think the priority should be > to make the “regular” service mechanism be more usable for non > experts. Any plan for user services? Get guix build a dmd.conf for user should be really cool. > >> 7. Not sure how to properly add a user (again guix system reconfigure >> would help), as useradd makes the usuall unix user, but is missing >> some other things like a build directory... > > Yes, the ‘users’ field, and then run ‘reconfigure’. > > ‘useradd’ should work as well, but user accounts created that way are > not under Guix control. > > What do you mean by “build directory” here? > > Thanks, > Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Few notes to 0.8 2014-11-29 11:57 ` 宋文武 @ 2014-11-29 20:45 ` Ludovic Courtès 2014-11-30 11:05 ` 宋文武 2014-11-29 21:06 ` Few notes to 0.8 Alex Kost 1 sibling, 1 reply; 7+ messages in thread From: Ludovic Courtès @ 2014-11-29 20:45 UTC (permalink / raw) To: 宋文武; +Cc: guix-devel 宋文武 <iyzsong@gmail.com> skribis: > Ludovic Courtès <ludo@gnu.org> writes: > >> Adam Pribyl <pribyl@lowlevel.cz> skribis: [...] >>> 2. during boot the system twice sets the console font, each time to a >>> different one (this is not always reproducible). Minor. >> >> Hmm, you mean on the same tty? > Yeah, I have issue too, solved by: > > (initrd (lambda (fs . args) > (apply base-initrd fs > #:extra-modules '("i915") > args))) > > To get fbcon in initrd before udev-service and console-font-service. Oh, OK. > I think the 'Console' lines of `dmesg' tell the reason. I have: --8<---------------cut here---------------start------------->8--- $ dmesg |grep -E '(udevd.*starting|Conso)' [ 0.000000] Console: colour VGA+ 80x25 [ 3.750956] udevd[190]: starting version 1.10 [ 4.536397] Console: switching to colour dummy device 80x25 [ 5.421016] Console: switching to colour frame buffer device 170x48 --8<---------------cut here---------------end--------------->8--- I don’t think we can solve it generically without adding udev and all the graphics drivers to the initrd, can we? Or perhaps we could just include a few common graphics drivers by default? > I just put it in my config.scm: > > (define (console-layout-service layout) > (with-monad %store-monad > (return > (service > (document "Setup keyboard layout for console") > (provision '(console-layout)) > (start #~(lambda _ > (system* (string-append #kbd "/bin/loadkeys") #$layout))) > (stop #~(const #t)) > (respawn? #f))))) Excellent. I was thinking that we should have a keyboard layout setting in the OS declaration, that would lead to a service like the one above as well as the appropriate X settings. > Any plan for user services? > Get guix build a dmd.conf for user should be really cool. Yeah, that could be nice. I wonder how this should work. Currently we’d have to start one dmd instance per user; I’m not sure where/when this should be started. Also, should the global OS declaration include user-specific service lists? WDYT? Thanks for your feedback! Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Few notes to 0.8 2014-11-29 20:45 ` Ludovic Courtès @ 2014-11-30 11:05 ` 宋文武 2014-11-30 11:34 ` Services and access to the global configuration Ludovic Courtès 0 siblings, 1 reply; 7+ messages in thread From: 宋文武 @ 2014-11-30 11:05 UTC (permalink / raw) To: Ludovic Courtès; +Cc: guix-devel Ludovic Courtès <ludo@gnu.org> writes: > 宋文武 <iyzsong@gmail.com> skribis: > >> Ludovic Courtès <ludo@gnu.org> writes: >> >>> Adam Pribyl <pribyl@lowlevel.cz> skribis: > > [...] > >>>> 2. during boot the system twice sets the console font, each time to a >>>> different one (this is not always reproducible). Minor. >>> >>> Hmm, you mean on the same tty? >> Yeah, I have issue too, solved by: >> >> (initrd (lambda (fs . args) >> (apply base-initrd fs >> #:extra-modules '("i915") >> args))) >> >> To get fbcon in initrd before udev-service and console-font-service. > > Oh, OK. > >> I think the 'Console' lines of `dmesg' tell the reason. > > I have: > > --8<---------------cut here---------------start------------->8--- > $ dmesg |grep -E '(udevd.*starting|Conso)' > [ 0.000000] Console: colour VGA+ 80x25 > [ 3.750956] udevd[190]: starting version 1.10 > [ 4.536397] Console: switching to colour dummy device 80x25 > [ 5.421016] Console: switching to colour frame buffer device 170x48 > --8<---------------cut here---------------end--------------->8--- > > I don’t think we can solve it generically without adding udev and all > the graphics drivers to the initrd, can we? Or perhaps we could just > include a few common graphics drivers by default? > >> I just put it in my config.scm: >> >> (define (console-layout-service layout) >> (with-monad %store-monad >> (return >> (service >> (document "Setup keyboard layout for console") >> (provision '(console-layout)) >> (start #~(lambda _ >> (system* (string-append #kbd "/bin/loadkeys") #$layout))) >> (stop #~(const #t)) >> (respawn? #f))))) > > Excellent. I was thinking that we should have a keyboard layout setting > in the OS declaration, that would lead to a service like the one above > as well as the appropriate X settings. Currently, operating-system is not declarative, with the setting: (operating-system (keymap "dvorak")) IIUC, the xorg-server service can't see it unless passed explicitly. In NixOS, declarative configuration is implemented by 'modules': https://nixos.org/wiki/NixOS:Modules Every module can define some options, access and contrib to the config, the configuration.nix is just a normal module provided by user. Yeah, how all the modules eval toghether is still a mystery for me. > >> Any plan for user services? >> Get guix build a dmd.conf for user should be really cool. > > Yeah, that could be nice. > > I wonder how this should work. Currently we’d have to start one dmd > instance per user; I’m not sure where/when this should be started. How about run: $ guix system --user reconfigure config.scm (or guix user-profile?) With config.scm: (user-profile (locale "en_US.utf8") (services (list (emacs-daemon-service))) (packages (list emacs))) Get ~/.guix-profile (a better name?): boot locale profile The `boot' is just like system's boot, run the activate script, start dmd, even populate user's home with files build by guix. After login, I can just run `boot' manually, or automatic by adding it to ~/.bash_profile, ~/.xsession (can be populated by guix too). > Also, should the global OS declaration include user-specific service > lists? WDYT? The global OS could provide the default settings for user profile. (operating-system (user-profile)) And access as a singleton as %os, then user can reuse or override with: (user-profile (services (list (operating-system-services %os)))) But the declarative way is more better! > > Thanks for your feedback! > > Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Services and access to the global configuration 2014-11-30 11:05 ` 宋文武 @ 2014-11-30 11:34 ` Ludovic Courtès 0 siblings, 0 replies; 7+ messages in thread From: Ludovic Courtès @ 2014-11-30 11:34 UTC (permalink / raw) To: 宋文武; +Cc: guix-devel 宋文武 <iyzsong@gmail.com> skribis: > Ludovic Courtès <ludo@gnu.org> writes: > >> 宋文武 <iyzsong@gmail.com> skribis: >> >>> Ludovic Courtès <ludo@gnu.org> writes: >>> >>>> Adam Pribyl <pribyl@lowlevel.cz> skribis: [...] >>> I just put it in my config.scm: >>> >>> (define (console-layout-service layout) >>> (with-monad %store-monad >>> (return >>> (service >>> (document "Setup keyboard layout for console") >>> (provision '(console-layout)) >>> (start #~(lambda _ >>> (system* (string-append #kbd "/bin/loadkeys") #$layout))) >>> (stop #~(const #t)) >>> (respawn? #f))))) >> >> Excellent. I was thinking that we should have a keyboard layout setting >> in the OS declaration, that would lead to a service like the one above >> as well as the appropriate X settings. > Currently, operating-system is not declarative, with the setting: > (operating-system > (keymap "dvorak")) > IIUC, the xorg-server service can't see it unless passed explicitly. Right. > In NixOS, declarative configuration is implemented by 'modules': > https://nixos.org/wiki/NixOS:Modules > > Every module can define some options, access and contrib to the config, > the configuration.nix is just a normal module provided by user. > > Yeah, how all the modules eval toghether is still a mystery for me. Yes, that’s the whole point. I don’t want an ‘mkIf’ here. ;-) There are several issues here. 1. Is it desirable for any service to be able to touch any part of the OS configuration, as is the case in NixOS? I’m not sure. On one hand, it’s useful in situations like the one above; on the other hand, it feels like each service definition would get more authority than it really needed. Currently, the <service> type has fields such as ‘user-accounts’ and ‘pam-services’ for that reason: a service can add new accounts or PAM services, but does not access the global OS config. These would not be needed if services had access to the global config. 2. Services typically need to be able to add files to the store, etc. Currently, that means that services must be monadic values in the store monad. This is slightly annoying, because indeed it makes it feel “less declarative.” 3. In NixOS there’s no type checking: one can just add fields to the global configuration attribute set, and they may be picked up by service definitions. Here, ‘operating-system’ is a well-defined type, and service-specific options are passed as arguments to procedures that implement the service. Just random thoughts. :-) I feel there are things we can improve, but it’s not completely clear how yet. Thanks, Ludo’. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Few notes to 0.8 2014-11-29 11:57 ` 宋文武 2014-11-29 20:45 ` Ludovic Courtès @ 2014-11-29 21:06 ` Alex Kost 1 sibling, 0 replies; 7+ messages in thread From: Alex Kost @ 2014-11-29 21:06 UTC (permalink / raw) To: 宋文武; +Cc: guix-devel 宋文武 (2014-11-29 14:57 +0300) wrote: [...] > I just put it in my config.scm: > > (define (console-layout-service layout) > (with-monad %store-monad > (return > (service > (document "Setup keyboard layout for console") > (provision '(console-layout)) > (start #~(lambda _ > (system* (string-append #kbd "/bin/loadkeys") #$layout))) > (stop #~(const #t)) > (respawn? #f))))) Hey, this is cool! I think it's worth adding it to the repo. -- Alex ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-11-30 11:34 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-28 11:41 Few notes to 0.8 Adam Pribyl 2014-11-28 21:31 ` Ludovic Courtès 2014-11-29 11:57 ` 宋文武 2014-11-29 20:45 ` Ludovic Courtès 2014-11-30 11:05 ` 宋文武 2014-11-30 11:34 ` Services and access to the global configuration Ludovic Courtès 2014-11-29 21:06 ` Few notes to 0.8 Alex Kost
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).