index
:
guix
koszko
koszko-scripts
Wojtek's customized Guix
about
summary
refs
log
tree
commit
diff
log msg
author
committer
range
;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019, 2020, 2022 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. (define-module (gnu installer final) #:use-module (gnu installer newt page) #:use-module (gnu installer steps) #:use-module (gnu installer utils) #:use-module (gnu installer user) #:use-module (gnu services herd) #:use-module (guix build syscalls) #:use-module (guix build utils) #:use-module (guix utils) #:use-module (gnu build accounts) #:use-module (gnu build install) #:use-module (gnu build linux-container) #:use-module ((gnu system shadow) #:prefix sys:) #:use-module (rnrs io ports) #:use-module (srfi srfi-1) #:use-module (ice-9 ftw) #:use-module (ice-9 popen) #:use-module (ice-9 match) #:use-module (ice-9 format) #:use-module (ice-9 rdelim) #:export (install-system)) (define %seed (seed->random-state (logxor (getpid) (car (gettimeofday))))) (define (integer->alphanumeric-char n) "Map N, an integer in the [0..62] range, to an alphanumeric character." (cond ((< n 10) (integer->char (+ (char->integer #\0) n))) ((< n 36) (integer->char (+ (char->integer #\A) (- n 10)))) ((< n 62) (integer->char (+ (char->integer #\a) (- n 36)))) (else (error "integer out of bounds" n)))) (define (random-string len) "Compute a random string of size LEN where each character is alphanumeric." (let loop ((chars '())