From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?5a6L5paH5q2m?= Subject: Re: Few notes to 0.8 Date: Sun, 30 Nov 2014 19:05:57 +0800 Message-ID: <878uithrsa.fsf@gmail.com> References: <87ppc7106v.fsf@gnu.org> <87r3wm1aoq.fsf@gmail.com> <87y4qtwxaz.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xv2KV-0002J4-TE for guix-devel@gnu.org; Sun, 30 Nov 2014 06:06:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xv2KR-0005GV-IU for guix-devel@gnu.org; Sun, 30 Nov 2014 06:06:15 -0500 In-Reply-To: <87y4qtwxaz.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > >> Ludovic Court=C3=A8s writes: >> >>> Adam Pribyl 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=E2=80=99t 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 =20=20 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=E2=80=99d have to start one = dmd > instance per user; I=E2=80=99m not sure where/when this should be started. How about run: $ guix system --user reconfigure config.scm (or guix user-profile?) =20=20=20 With config.scm: (user-profile (locale "en_US.utf8") (services (list (emacs-daemon-service))) (packages (list emacs))) =20=20=20=20=20 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=E2=80=99.