From mboxrd@z Thu Jan  1 00:00:00 1970
From: David Craven <david@craven.ch>
Subject: bug#24993: System installer grows brittle with time
Date: Tue, 29 Nov 2016 10:17:38 +0100
Message-ID: <CAL1_imn-07k4zTQQLTON328kWyzXPy_WhB1+fDx6wOU0GFJVMg@mail.gmail.com>
References: <7d52d8ee-c253-685b-1871-f908850ee606@alaskasi.com>
	<20161123044607.GA23298@jasmine>
	<0cf83259-2c5d-ae51-5697-02299251051c@alaskasi.com>
	<db559227-d563-aa95-7e60-a7d2fd74d756@alaskasi.com>
	<20161123202911.GA3616@jasmine>
	<9ffdf0e5-a584-adb6-91ce-271a507bb14c@alaskasi.com>
	<20161129023336.GB21607@jasmine>
	<20161129084406.GF2509@macbook42.flashner.co.il>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Return-path: <bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([2001:4830:134:3::10]:40307)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1cBeYA-00062P-RG
	for bug-guix@gnu.org; Tue, 29 Nov 2016 04:18:10 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1cBeY6-0007AS-J8
	for bug-guix@gnu.org; Tue, 29 Nov 2016 04:18:06 -0500
Received: from debbugs.gnu.org ([208.118.235.43]:58428)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1cBeY6-0007AN-F0
	for bug-guix@gnu.org; Tue, 29 Nov 2016 04:18:02 -0500
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1cBeY6-0000if-7g
	for bug-guix@gnu.org; Tue, 29 Nov 2016 04:18:02 -0500
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-Message-ID: <handler.24993.B24993.14804110682724@debbugs.gnu.org>
In-Reply-To: <20161129084406.GF2509@macbook42.flashner.co.il>
List-Id: Bug reports for GNU Guix <bug-guix.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-guix>,
	<mailto:bug-guix-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-guix/>
List-Post: <mailto:bug-guix@gnu.org>
List-Help: <mailto:bug-guix-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-guix>,
	<mailto:bug-guix-request@gnu.org?subject=subscribe>
Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org
Sender: "bug-Guix" <bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: 24993@debbugs.gnu.org, Christopher Howard <christopher@alaskasi.com>

I have a nice one too. How to run guixsd on any hardware :)

(use-modules (gnu)
             (gnu system nss)
             (guix build-system trivial)
             (guix download)
             (guix git-download)
             (guix packages))
(use-service-modules base networking)
(use-package-modules certs linux)

(define-public linux-firmware
  (let ((commit "21e216f591bed97ec1adcda0e8b4b28ddf065433"))
    (package
      (name "linux-firmware")
      (version (string-append "2016.11.27-" (string-take commit 7)))
      (source (origin
                (method git-fetch)
                (uri (git-reference
                        (url (string-append
                              "https://github.com/wkennington/linux-firmware"))
                        (commit commit)))
                (sha256
                 (base32
                  "0iiayy00zr3fk8xfi8i9vrbpg7r59n5vfzx9x7cpx6gjaja8czxa"))))
      (build-system trivial-build-system)
      (arguments
       `(#:modules ((guix build utils))
         #:builder
         (begin
           (use-modules (guix build utils))

           (let* ((source   (assoc-ref %build-inputs "source"))
                  (out      (assoc-ref %outputs "out"))
                  (firmware (string-append out "/lib/firmware")))
             (mkdir-p firmware)
             (copy-recursively source firmware)))))
      (home-page "https://github.com/wkennington/linux-firmware")
      (synopsis "Linux firmware")
      (description "Linux firmware.")
      (license #f))))

(define-public linux
  (package
    (inherit linux-libre)
    (version "4.8.11")
    (source (origin
              (method url-fetch)
              (uri (string-append
                    "https://cdn.kernel.org/pub/linux/kernel/v4.x/"
                    "linux-" version ".tar.xz"))
              (sha256
               (base32
                "03w90vfjfcya38mcp1njasa5c67za203sgp9n3w52gms13s443yc"))))))

(operating-system
  (host-name "system76")
  (timezone "Europe/Zurich")
  (locale "en_US.UTF-8")

  (kernel linux)
  (firmware (list linux-firmware))

  (bootloader (grub-configuration (device "/dev/sda")))

  (file-systems (cons (file-system
                        (device "my-root")
                        (title 'label)
                        (mount-point "/")
                        (type "ext4"))
                      %base-file-systems))

  (users (cons (user-account
                (name "dvc")
                (comment "David Craven")
                (group "users")
                (supplementary-groups '("wheel" "netdev"
                                        "audio" "video"))
                (home-directory "/home/dvc"))
               %base-user-accounts))

  (packages (cons* nss-certs
                   %base-packages))

  (services (cons* (dhcp-client-service)
                   %base-services))

  ;; Allow resolution of '.local' host names with mDNS.
  (name-service-switch %mdns-host-lookup-nss))