Merge master into staging-next
This commit is contained in:
commit
446763e8e1
@ -1,160 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
# A dummy /etc/nixos/configuration.nix in the booted CD that
|
||||
# rebuilds the CD's configuration (and allows the configuration to
|
||||
# be modified, of course, providing a true live CD). Problem is
|
||||
# that we don't really know how the CD was built - the Nix
|
||||
# expression language doesn't allow us to query the expression being
|
||||
# evaluated. So we'll just hope for the best.
|
||||
dummyConfiguration = pkgs.writeText "configuration.nix"
|
||||
''
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{ # Add your own options below, e.g.:
|
||||
# services.openssh.enable = true;
|
||||
nixpkgs.config.platform = pkgs.platforms.fuloong2f_n32;
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l;
|
||||
|
||||
# A clue for the kernel loading
|
||||
kernelParams = pkgs.writeText "kernel-params.txt" ''
|
||||
Kernel Parameters:
|
||||
init=/boot/init ${toString config.boot.kernelParams}
|
||||
'';
|
||||
|
||||
# System wide nixpkgs config
|
||||
nixpkgsUserConfig = pkgs.writeText "config.nix" ''
|
||||
pkgs:
|
||||
{
|
||||
platform = pkgs.platforms.fuloong2f_n32;
|
||||
}
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
imports = [ ./system-tarball.nix ];
|
||||
|
||||
# Disable some other stuff we don't need.
|
||||
security.sudo.enable = false;
|
||||
|
||||
# Include only the en_US locale. This saves 75 MiB or so compared to
|
||||
# the full glibcLocales package.
|
||||
i18n.supportedLocales = ["en_US.UTF-8/UTF-8" "en_US/ISO-8859-1"];
|
||||
|
||||
# Include some utilities that are useful for installing or repairing
|
||||
# the system.
|
||||
environment.systemPackages =
|
||||
[ pkgs.w3m # needed for the manual anyway
|
||||
pkgs.testdisk # useful for repairing boot problems
|
||||
pkgs.ms-sys # for writing Microsoft boot sectors / MBRs
|
||||
pkgs.parted
|
||||
pkgs.ddrescue
|
||||
pkgs.ccrypt
|
||||
pkgs.cryptsetup # needed for dm-crypt volumes
|
||||
|
||||
# Some networking tools.
|
||||
pkgs.sshfs-fuse
|
||||
pkgs.socat
|
||||
pkgs.screen
|
||||
pkgs.wpa_supplicant # !!! should use the wpa module
|
||||
|
||||
# Hardware-related tools.
|
||||
pkgs.sdparm
|
||||
pkgs.hdparm
|
||||
pkgs.dmraid
|
||||
|
||||
# Tools to create / manipulate filesystems.
|
||||
pkgs.ntfsprogs # for resizing NTFS partitions
|
||||
pkgs.btrfs-progs
|
||||
pkgs.jfsutils
|
||||
|
||||
# Some compression/archiver tools.
|
||||
pkgs.unzip
|
||||
pkgs.zip
|
||||
pkgs.xz
|
||||
pkgs.dar # disk archiver
|
||||
|
||||
# Some editors.
|
||||
pkgs.nvi
|
||||
pkgs.bvi # binary editor
|
||||
pkgs.joe
|
||||
];
|
||||
|
||||
# The initrd has to contain any module that might be necessary for
|
||||
# mounting the CD/DVD.
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "vfat" "reiserfs" ];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_10;
|
||||
boot.kernelParams = [ "console=tty1" ];
|
||||
|
||||
boot.postBootCommands =
|
||||
''
|
||||
mkdir -p /mnt
|
||||
|
||||
cp ${dummyConfiguration} /etc/nixos/configuration.nix
|
||||
'';
|
||||
|
||||
# Some more help text.
|
||||
services.getty.helpLine =
|
||||
''
|
||||
|
||||
Log in as "root" with an empty password. ${
|
||||
if config.services.xserver.enable then
|
||||
"Type `start xserver' to start\nthe graphical user interface."
|
||||
else ""
|
||||
}
|
||||
'';
|
||||
|
||||
# Include the firmware for various wireless cards.
|
||||
networking.enableRalinkFirmware = true;
|
||||
networking.enableIntel2200BGFirmware = true;
|
||||
|
||||
# To speed up further installation of packages, include the complete stdenv
|
||||
# in the Nix store of the tarball.
|
||||
tarball.storeContents = pkgs2storeContents [ pkgs.stdenv ]
|
||||
++ [
|
||||
{
|
||||
object = config.system.build.bootStage2;
|
||||
symlink = "/boot/init";
|
||||
}
|
||||
{
|
||||
object = config.system.build.toplevel;
|
||||
symlink = "/boot/system";
|
||||
}
|
||||
];
|
||||
|
||||
tarball.contents = [
|
||||
{ source = kernelParams;
|
||||
target = "/kernelparams.txt";
|
||||
}
|
||||
{ source = config.boot.kernelPackages.kernel + "/" + config.system.boot.loader.kernelFile;
|
||||
target = "/boot/" + config.system.boot.loader.kernelFile;
|
||||
}
|
||||
{ source = nixpkgsUserConfig;
|
||||
target = "/root/.nixpkgs/config.nix";
|
||||
}
|
||||
];
|
||||
|
||||
# Allow sshd to be started manually through "start sshd". It should
|
||||
# not be started by default on the installation CD because the
|
||||
# default root password is empty.
|
||||
services.openssh.enable = true;
|
||||
systemd.services.openssh.wantedBy = lib.mkOverride 50 [];
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generationsDir.enable = false;
|
||||
system.boot.loader.kernelFile = "vmlinux";
|
||||
|
||||
nixpkgs.config = {
|
||||
platform = pkgs.platforms.fuloong2f_n32;
|
||||
};
|
||||
}
|
@ -1,89 +0,0 @@
|
||||
Let all the files in the system tarball sit in a directory served by NFS (the
|
||||
NFS root) like this in exportfs:
|
||||
/home/pcroot 192.168.1.0/24(rw,no_root_squash,no_all_squash)
|
||||
|
||||
Run "exportfs -a" after editing /etc/exportfs, for the nfs server to be aware
|
||||
of the changes.
|
||||
|
||||
Use a tftp server serving the root of boot/ (from the system tarball).
|
||||
|
||||
In order to have PXE boot, use the boot/dhcpd.conf-example file for your dhcpd
|
||||
server, as it will point your PXE clients to pxelinux.0 from the tftp server.
|
||||
Adapt the configuration to your network.
|
||||
|
||||
Adapt the pxelinux configuration (boot/pxelinux.cfg/default) to set the path to
|
||||
your nfrroot. If you use ip=dhcp in the kernel, the nfs server ip will be taken
|
||||
from dhcp and so you don't have to specify it.
|
||||
|
||||
The linux in bzImage includes network drivers for some usual cards.
|
||||
|
||||
|
||||
QEMU Testing
|
||||
---------------
|
||||
|
||||
You can test qemu pxe boot without having a DHCP server adapted, but having
|
||||
nfsroot, like this:
|
||||
qemu-system-x86_64 -tftp /home/pcroot/boot -net nic -net user,bootfile=pxelinux.0 -boot n
|
||||
|
||||
I don't know how to use NFS through the qemu '-net user' though.
|
||||
|
||||
|
||||
QEMU Testing with NFS root and bridged network
|
||||
-------------------------------------------------
|
||||
|
||||
This allows testing with qemu as any other host in your LAN.
|
||||
|
||||
Testing with the real dhcpd server requires setting up a bridge and having a
|
||||
tap device.
|
||||
tunctl -t tap0
|
||||
brctl addbr br0
|
||||
brctl addif br0 eth0
|
||||
brctl addif tap0 eth0
|
||||
ifconfig eth0 0.0.0.0 up
|
||||
ifconfig tap0 0.0.0.0 up
|
||||
ifconfig br0 up # With your ip configuration
|
||||
|
||||
Then you can run qemu:
|
||||
qemu-system-x86_64 -boot n -net tap,ifname=tap0,script=no -net nic,model=e1000
|
||||
|
||||
|
||||
Using the system-tarball-pc in a chroot
|
||||
--------------------------------------------------
|
||||
|
||||
Installation:
|
||||
mkdir nixos-chroot && cd nixos-chroot
|
||||
tar xf your-system-tarball.tar.xz
|
||||
mkdir sys dev proc tmp root var run
|
||||
mount --bind /sys sys
|
||||
mount --bind /dev dev
|
||||
mount --bind /proc proc
|
||||
|
||||
Activate the system: look for a directory in nix/store similar to:
|
||||
"/nix/store/y0d1lcj9fppli0hl3x0m0ba5g1ndjv2j-nixos-feb97bx-53f008"
|
||||
Having found it, activate that nixos system *twice*:
|
||||
chroot . /nix/store/SOMETHING-nixos-SOMETHING/activate
|
||||
chroot . /nix/store/SOMETHING-nixos-SOMETHING/activate
|
||||
|
||||
This runs a 'hostname' command. Restore your old hostname with:
|
||||
hostname OLDHOSTNAME
|
||||
|
||||
Copy your system resolv.conf to the /etc/resolv.conf inside the chroot:
|
||||
cp /etc/resolv.conf etc
|
||||
|
||||
Then you can get an interactive shell in the nixos chroot. '*' means
|
||||
to run inside the chroot interactive shell
|
||||
chroot . /bin/sh
|
||||
* source /etc/profile
|
||||
|
||||
Populate the nix database: that should be done in the init script if you
|
||||
had booted this nixos. Run:
|
||||
* `grep local-cmds run/current-system/init`
|
||||
|
||||
Then you can proceed normally subscribing to a nixos channel:
|
||||
nix-channel --add https://nixos.org/channels/nixos-unstable
|
||||
nix-channel --update
|
||||
|
||||
Testing:
|
||||
nix-env -i hello
|
||||
which hello
|
||||
hello
|
@ -1,163 +0,0 @@
|
||||
# This module contains the basic configuration for building a NixOS
|
||||
# tarball, that can directly boot, maybe using PXE or unpacking on a fs.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l;
|
||||
|
||||
# For PXE kernel loading
|
||||
pxeconfig = pkgs.writeText "pxeconfig-default" ''
|
||||
default menu.c32
|
||||
prompt 0
|
||||
|
||||
label bootlocal
|
||||
menu default
|
||||
localboot 0
|
||||
timeout 80
|
||||
TOTALTIMEOUT 9000
|
||||
|
||||
label nixos
|
||||
MENU LABEL ^NixOS using nfsroot
|
||||
KERNEL bzImage
|
||||
append ip=dhcp nfsroot=/home/pcroot init=${config.system.build.toplevel}/init rw
|
||||
|
||||
# I don't know how to make this boot with nfsroot (using the initrd)
|
||||
label nixos_initrd
|
||||
MENU LABEL NixOS booting the poor ^initrd.
|
||||
KERNEL bzImage
|
||||
append initrd=initrd ip=dhcp nfsroot=/home/pcroot init=${config.system.build.toplevel}/init rw
|
||||
|
||||
label memtest
|
||||
MENU LABEL ^${pkgs.memtest86.name}
|
||||
KERNEL memtest
|
||||
'';
|
||||
|
||||
dhcpdExampleConfig = pkgs.writeText "dhcpd.conf-example" ''
|
||||
# Example configuration for booting PXE.
|
||||
allow booting;
|
||||
allow bootp;
|
||||
|
||||
# Adapt this to your network configuration.
|
||||
option domain-name "local";
|
||||
option subnet-mask 255.255.255.0;
|
||||
option broadcast-address 192.168.1.255;
|
||||
option domain-name-servers 192.168.1.1;
|
||||
option routers 192.168.1.1;
|
||||
|
||||
# PXE-specific configuration directives...
|
||||
# Some BIOS don't accept slashes for paths inside the tftp servers,
|
||||
# and will report Access Violation if they see slashes.
|
||||
filename "pxelinux.0";
|
||||
# For the TFTP and NFS root server. Set the IP of your server.
|
||||
next-server 192.168.1.34;
|
||||
|
||||
subnet 192.168.1.0 netmask 255.255.255.0 {
|
||||
range 192.168.1.50 192.168.1.55;
|
||||
}
|
||||
'';
|
||||
|
||||
readme = ./system-tarball-pc-readme.txt;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
imports =
|
||||
[ ./system-tarball.nix
|
||||
|
||||
# Profiles of this basic installation.
|
||||
../../profiles/all-hardware.nix
|
||||
../../profiles/base.nix
|
||||
../../profiles/installation-device.nix
|
||||
];
|
||||
|
||||
# To speed up further installation of packages, include the complete stdenv
|
||||
# in the Nix store of the tarball.
|
||||
tarball.storeContents = pkgs2storeContents [ pkgs.stdenv ];
|
||||
|
||||
tarball.contents =
|
||||
[ { source = config.boot.kernelPackages.kernel + "/" + config.system.boot.loader.kernelFile;
|
||||
target = "/boot/" + config.system.boot.loader.kernelFile;
|
||||
}
|
||||
{ source = "${pkgs.syslinux}/share/syslinux/pxelinux.0";
|
||||
target = "/boot/pxelinux.0";
|
||||
}
|
||||
{ source = "${pkgs.syslinux}/share/syslinux/menu.c32";
|
||||
target = "/boot/menu.c32";
|
||||
}
|
||||
{ source = pxeconfig;
|
||||
target = "/boot/pxelinux.cfg/default";
|
||||
}
|
||||
{ source = readme;
|
||||
target = "/readme.txt";
|
||||
}
|
||||
{ source = dhcpdExampleConfig;
|
||||
target = "/boot/dhcpd.conf-example";
|
||||
}
|
||||
{ source = "${pkgs.memtest86}/memtest.bin";
|
||||
# We can't leave '.bin', because pxelinux interprets this specially,
|
||||
# and it would not load the image fine.
|
||||
# http://forum.canardpc.com/threads/46464-0104-when-launched-via-pxe
|
||||
target = "/boot/memtest";
|
||||
}
|
||||
];
|
||||
|
||||
# Allow sshd to be started manually through "start sshd". It should
|
||||
# not be started by default on the installation CD because the
|
||||
# default root password is empty.
|
||||
services.openssh.enable = true;
|
||||
systemd.services.openssh.wantedBy = lib.mkOverride 50 [];
|
||||
|
||||
# To be able to use the systemTarball to catch troubles.
|
||||
boot.crashDump = {
|
||||
enable = true;
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_3_4;
|
||||
};
|
||||
|
||||
# No grub for the tarball.
|
||||
boot.loader.grub.enable = false;
|
||||
|
||||
/* fake entry, just to have a happy stage-1. Users
|
||||
may boot without having stage-1 though */
|
||||
fileSystems.fake =
|
||||
{ mountPoint = "/";
|
||||
device = "/dev/something";
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
packageOverrides = p: {
|
||||
linux_3_4 = p.linux_3_4.override {
|
||||
extraConfig = ''
|
||||
# Enable drivers in kernel for most NICs.
|
||||
E1000 y
|
||||
# E1000E y
|
||||
# ATH5K y
|
||||
8139TOO y
|
||||
NE2K_PCI y
|
||||
ATL1 y
|
||||
ATL1E y
|
||||
ATL1C y
|
||||
VORTEX y
|
||||
VIA_RHINE y
|
||||
R8169 y
|
||||
|
||||
# Enable nfs root boot
|
||||
UNIX y # http://www.linux-mips.org/archives/linux-mips/2006-11/msg00113.html
|
||||
IP_PNP y
|
||||
IP_PNP_DHCP y
|
||||
FSCACHE y
|
||||
NFS_FS y
|
||||
NFS_FSCACHE y
|
||||
ROOT_NFS y
|
||||
|
||||
# Enable devtmpfs
|
||||
DEVTMPFS y
|
||||
DEVTMPFS_MOUNT y
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,172 +0,0 @@
|
||||
# This module contains the basic configuration for building a NixOS
|
||||
# tarball for the sheevaplug.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
# A dummy /etc/nixos/configuration.nix in the booted CD that
|
||||
# rebuilds the CD's configuration (and allows the configuration to
|
||||
# be modified, of course, providing a true live CD). Problem is
|
||||
# that we don't really know how the CD was built - the Nix
|
||||
# expression language doesn't allow us to query the expression being
|
||||
# evaluated. So we'll just hope for the best.
|
||||
dummyConfiguration = pkgs.writeText "configuration.nix"
|
||||
''
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Add your own options below and run "nixos-rebuild switch".
|
||||
# E.g.,
|
||||
# services.openssh.enable = true;
|
||||
}
|
||||
'';
|
||||
|
||||
|
||||
pkgs2storeContents = l : map (x: { object = x; symlink = "none"; }) l;
|
||||
|
||||
# A clue for the kernel loading
|
||||
kernelParams = pkgs.writeText "kernel-params.txt" ''
|
||||
Kernel Parameters:
|
||||
init=${config.system.build.toplevel}/init ${toString config.boot.kernelParams}
|
||||
'';
|
||||
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
imports = [ ./system-tarball.nix ];
|
||||
|
||||
# Disable some other stuff we don't need.
|
||||
security.sudo.enable = false;
|
||||
|
||||
# Include only the en_US locale. This saves 75 MiB or so compared to
|
||||
# the full glibcLocales package.
|
||||
i18n.supportedLocales = ["en_US.UTF-8/UTF-8" "en_US/ISO-8859-1"];
|
||||
|
||||
# Include some utilities that are useful for installing or repairing
|
||||
# the system.
|
||||
environment.systemPackages =
|
||||
[ pkgs.w3m # needed for the manual anyway
|
||||
pkgs.ddrescue
|
||||
pkgs.ccrypt
|
||||
pkgs.cryptsetup # needed for dm-crypt volumes
|
||||
|
||||
# Some networking tools.
|
||||
pkgs.sshfs-fuse
|
||||
pkgs.socat
|
||||
pkgs.screen
|
||||
pkgs.wpa_supplicant # !!! should use the wpa module
|
||||
|
||||
# Hardware-related tools.
|
||||
pkgs.sdparm
|
||||
pkgs.hdparm
|
||||
pkgs.dmraid
|
||||
|
||||
# Tools to create / manipulate filesystems.
|
||||
pkgs.btrfs-progs
|
||||
|
||||
# Some compression/archiver tools.
|
||||
pkgs.unzip
|
||||
pkgs.zip
|
||||
pkgs.xz
|
||||
pkgs.dar # disk archiver
|
||||
|
||||
# Some editors.
|
||||
pkgs.nvi
|
||||
pkgs.bvi # binary editor
|
||||
pkgs.joe
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generationsDir.enable = false;
|
||||
system.boot.loader.kernelFile = "uImage";
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "mvsdio" "reiserfs" "ext3" "ums-cypress" "rtc_mv" "ext4" ];
|
||||
|
||||
boot.postBootCommands = lib.mkIf (!boot.initrd.systemd.enable)
|
||||
''
|
||||
mkdir -p /mnt
|
||||
|
||||
cp ${dummyConfiguration} /etc/nixos/configuration.nix
|
||||
'';
|
||||
|
||||
boot.initrd.extraUtilsCommands = lib.mkIf (!boot.initrd.systemd.enable)
|
||||
''
|
||||
copy_bin_and_libs ${pkgs.util-linux}/sbin/hwclock
|
||||
'';
|
||||
|
||||
boot.initrd.postDeviceCommands = lib.mkIf (!boot.initrd.systemd.enable)
|
||||
''
|
||||
hwclock -s
|
||||
'';
|
||||
|
||||
boot.kernelParams =
|
||||
[
|
||||
"selinux=0"
|
||||
"console=tty1"
|
||||
# "console=ttyS0,115200n8" # serial console
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxKernel.packages.linux_3_4;
|
||||
|
||||
boot.supportedFilesystems = [ "reiserfs" ];
|
||||
|
||||
/* fake entry, just to have a happy stage-1. Users
|
||||
may boot without having stage-1 though */
|
||||
fileSystems.fake =
|
||||
{ mountPoint = "/";
|
||||
device = "/dev/something";
|
||||
};
|
||||
|
||||
services.getty = {
|
||||
# Some more help text.
|
||||
helpLine = ''
|
||||
Log in as "root" with an empty password. ${
|
||||
if config.services.xserver.enable then
|
||||
"Type `start xserver' to start\nthe graphical user interface."
|
||||
else ""
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
# Setting vesa, we don't get the nvidia driver, which can't work in arm.
|
||||
services.xserver.videoDrivers = [ "vesa" ];
|
||||
|
||||
documentation.nixos.enable = false;
|
||||
|
||||
# Include the firmware for various wireless cards.
|
||||
networking.enableRalinkFirmware = true;
|
||||
networking.enableIntel2200BGFirmware = true;
|
||||
|
||||
# To speed up further installation of packages, include the complete stdenv
|
||||
# in the Nix store of the tarball.
|
||||
tarball.storeContents = pkgs2storeContents [ pkgs.stdenv ];
|
||||
tarball.contents = [
|
||||
{ source = kernelParams;
|
||||
target = "/kernelparams.txt";
|
||||
}
|
||||
{ source = config.boot.kernelPackages.kernel + "/" + config.system.boot.loader.kernelFile;
|
||||
target = "/boot/" + config.system.boot.loader.kernelFile;
|
||||
}
|
||||
{ source = pkgs.ubootSheevaplug;
|
||||
target = "/boot/uboot";
|
||||
}
|
||||
];
|
||||
|
||||
# Allow sshd to be started manually through "start sshd". It should
|
||||
# not be started by default on the installation CD because the
|
||||
# default root password is empty.
|
||||
services.openssh.enable = true;
|
||||
systemd.services.openssh.wantedBy = lib.mkOverride 50 [];
|
||||
|
||||
# cpufrequtils fails to build on non-pc
|
||||
powerManagement.enable = false;
|
||||
|
||||
nixpkgs.config = {
|
||||
platform = pkgs.platforms.sheevaplug;
|
||||
};
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
# This module creates a bootable ISO image containing the given NixOS
|
||||
# configuration. The derivation for the ISO image will be placed in
|
||||
# config.system.build.tarball.
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
versionFile = pkgs.writeText "nixos-label" config.system.nixos.label;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
tarball.contents = mkOption {
|
||||
example = literalExpression ''
|
||||
[ { source = pkgs.memtest86 + "/memtest.bin";
|
||||
target = "boot/memtest.bin";
|
||||
}
|
||||
]
|
||||
'';
|
||||
description = ''
|
||||
This option lists files to be copied to fixed locations in the
|
||||
generated ISO image.
|
||||
'';
|
||||
};
|
||||
|
||||
tarball.storeContents = mkOption {
|
||||
example = literalExpression "[ pkgs.stdenv ]";
|
||||
description = ''
|
||||
This option lists additional derivations to be included in the
|
||||
Nix store in the generated ISO image.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = {
|
||||
|
||||
# In stage 1 of the boot, mount the CD/DVD as the root FS by label
|
||||
# so that we don't need to know its device.
|
||||
fileSystems = { };
|
||||
|
||||
# boot.initrd.availableKernelModules = [ "mvsdio" "reiserfs" "ext3" "ext4" ];
|
||||
|
||||
# boot.initrd.kernelModules = [ "rtc_mv" ];
|
||||
|
||||
# Closures to be copied to the Nix store on the CD, namely the init
|
||||
# script and the top-level system configuration directory.
|
||||
tarball.storeContents =
|
||||
[ { object = config.system.build.toplevel;
|
||||
symlink = "/run/current-system";
|
||||
}
|
||||
];
|
||||
|
||||
# Individual files to be included on the CD, outside of the Nix
|
||||
# store on the CD.
|
||||
tarball.contents =
|
||||
[ { source = config.system.build.initialRamdisk + "/" + config.system.boot.loader.initrdFile;
|
||||
target = "/boot/" + config.system.boot.loader.initrdFile;
|
||||
}
|
||||
{ source = versionFile;
|
||||
target = "/nixos-version.txt";
|
||||
}
|
||||
];
|
||||
|
||||
# Create the tarball
|
||||
system.build.tarball = import ../../../lib/make-system-tarball.nix {
|
||||
inherit (pkgs) stdenv closureInfo pixz;
|
||||
|
||||
inherit (config.tarball) contents storeContents;
|
||||
};
|
||||
|
||||
boot.postBootCommands =
|
||||
''
|
||||
# After booting, register the contents of the Nix store on the
|
||||
# CD in the Nix database in the tmpfs.
|
||||
if [ -f /nix-path-registration ]; then
|
||||
${config.nix.package.out}/bin/nix-store --load-db < /nix-path-registration &&
|
||||
rm /nix-path-registration
|
||||
fi
|
||||
|
||||
# nixos-rebuild also requires a "system" profile and an
|
||||
# /etc/NIXOS tag.
|
||||
touch /etc/NIXOS
|
||||
${config.nix.package.out}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -389,10 +389,9 @@ in {
|
||||
"mysql.service"
|
||||
"postgresql.service"
|
||||
];
|
||||
reloadTriggers = [
|
||||
configFile
|
||||
lovelaceConfigFile
|
||||
];
|
||||
reloadTriggers = lib.optional (cfg.config != null) configFile
|
||||
++ lib.optional (cfg.lovelaceConfig != null) lovelaceConfigFile;
|
||||
|
||||
preStart = let
|
||||
copyConfig = if cfg.configWritable then ''
|
||||
cp --no-preserve=mode ${configFile} "${cfg.configDir}/configuration.yaml"
|
||||
|
@ -158,6 +158,10 @@ let
|
||||
(sec "addressbook")
|
||||
(strOpt "defaulturl" cfg.addressbook.defaulturl)
|
||||
] ++ (optionalEmptyList "subscriptions" cfg.addressbook.subscriptions)
|
||||
++ [
|
||||
(sec "meshnets")
|
||||
(boolOpt "yggdrasil" cfg.yggdrasil.enable)
|
||||
] ++ (optionalNullString "yggaddress" cfg.yggdrasil.address)
|
||||
++ (flip map
|
||||
(collect (proto: proto ? port && proto ? address) cfg.proto)
|
||||
(proto: let protoOpts = [
|
||||
@ -546,6 +550,17 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
yggdrasil.enable = mkEnableOption "Yggdrasil";
|
||||
|
||||
yggdrasil.address = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = ''
|
||||
Your local yggdrasil address. Specify it if you want to bind your router to a
|
||||
particular address.
|
||||
'';
|
||||
};
|
||||
|
||||
proto.http = (mkEndpointOpt "http" "127.0.0.1" 7070) // {
|
||||
|
||||
auth = mkEnableOption "Webconsole authentication";
|
||||
|
@ -318,39 +318,12 @@ in rec {
|
||||
"mkdir $out; ln -s $toplevel $out/dummy");
|
||||
|
||||
|
||||
# Provide a tarball that can be unpacked into an SD card, and easily
|
||||
# boot that system from uboot (like for the sheevaplug).
|
||||
# The pc variant helps preparing the expression for the system tarball
|
||||
# in a machine faster than the sheevpalug
|
||||
/*
|
||||
system_tarball_pc = forAllSystems (system: makeSystemTarball {
|
||||
module = ./modules/installer/cd-dvd/system-tarball-pc.nix;
|
||||
inherit system;
|
||||
});
|
||||
*/
|
||||
|
||||
# Provide container tarball for lxc, libvirt-lxc, docker-lxc, ...
|
||||
containerTarball = forAllSystems (system: makeSystemTarball {
|
||||
module = ./modules/virtualisation/lxc-container.nix;
|
||||
inherit system;
|
||||
});
|
||||
|
||||
/*
|
||||
system_tarball_fuloong2f =
|
||||
assert builtins.currentSystem == "mips64-linux";
|
||||
makeSystemTarball {
|
||||
module = ./modules/installer/cd-dvd/system-tarball-fuloong2f.nix;
|
||||
system = "mips64-linux";
|
||||
};
|
||||
|
||||
system_tarball_sheevaplug =
|
||||
assert builtins.currentSystem == "armv5tel-linux";
|
||||
makeSystemTarball {
|
||||
module = ./modules/installer/cd-dvd/system-tarball-sheevaplug.nix;
|
||||
system = "armv5tel-linux";
|
||||
};
|
||||
*/
|
||||
|
||||
tests = allTests;
|
||||
|
||||
/* Build a bunch of typical closures so that Hydra can keep track of
|
||||
|
File diff suppressed because one or more lines are too long
@ -21,7 +21,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aesara";
|
||||
version = "2.7.5";
|
||||
version = "2.7.6";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
@ -30,7 +30,7 @@ buildPythonPackage rec {
|
||||
owner = "aesara-devs";
|
||||
repo = "aesara";
|
||||
rev = "refs/tags/rel-${version}";
|
||||
hash = "sha256-wx0F7GHfIS2OTnOIlhQAsUAZHm9PncoIG+bn3dsIWrU=";
|
||||
hash = "sha256-N/hAD8ev12OhodjVAlzOKwdmIer8r4i1GfgvlnGaYNU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "afsapi";
|
||||
version = "0.2.5";
|
||||
version = "0.2.6";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||
owner = "wlcrs";
|
||||
repo = "python-afsapi";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-GWBj4MsbWb4g67rjVWxe7RHinkv+rYlcAJiY4goFB5c=";
|
||||
hash = "sha256-SPHED/zbrjULtJFz1x+0kq+lDrLeuol+1rOH2/xWEnI=";
|
||||
};
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
|
@ -15,14 +15,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-cloud-pubsub";
|
||||
version = "2.13.1";
|
||||
version = "2.13.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-P5x5cUxSKYueJJpGZgwb8NRX9nkovOzw2Ox6BrzGzFQ=";
|
||||
hash = "sha256-nkwfzjrNFgaOfPT4izV2YQFSVRQ4/G04oF1FBPA/IME=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "hahomematic";
|
||||
version = "2022.7.3";
|
||||
version = "2022.7.5";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||
owner = "danielperna84";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
sha256 = "sha256-nzP2BvEH9PytauF0q86s4vCSEuGtku+WIu4ttIzf8bU=";
|
||||
sha256 = "sha256-VCm94/kMQl9gbt7Veefo75z1PuOd4faUMGbBxLI/ZUs=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -7,13 +7,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "haversine";
|
||||
version = "2.5.1";
|
||||
version = "2.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mapado";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-tHA1Ff/J1mfSnER2X/8e0QyQkuRz1mn8MeGlThVQaSg=";
|
||||
sha256 = "sha256-cFb2DsXIwaaJK3tiOTCc0k45FVJ4/Vudkq0rzqalGJs=";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-engineio";
|
||||
version = "4.3.2";
|
||||
version = "4.3.3";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@ -25,7 +25,7 @@ buildPythonPackage rec {
|
||||
owner = "miguelgrinberg";
|
||||
repo = "python-engineio";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-RXIFfd4eeRLaDPe6+8jhIN2TI1yz/uDfnvWT95euaIo=";
|
||||
sha256 = "sha256-+0H7Ojy5/K0EllNTSvGLNIZlglcMh76r9XHxFMUwrrY=";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-socketio";
|
||||
version = "5.6.0";
|
||||
version = "5.7.0";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
@ -23,7 +23,7 @@ buildPythonPackage rec {
|
||||
owner = "miguelgrinberg";
|
||||
repo = "python-socketio";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-zsTSz2RHtr4LqqPCkvHcaAw7RvfkHTNDm83OS+SgMUU=";
|
||||
sha256 = "sha256-POYD4w0iBAdaN2L4cpLJz1aCE9J0Iob//VN94/5lJLw=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -1,33 +1,60 @@
|
||||
{ buildPythonPackage
|
||||
, lib
|
||||
, fetchPypi
|
||||
, isPy27
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, h3
|
||||
, numba
|
||||
, numpy
|
||||
, poetry-core
|
||||
, pytestCheckHook
|
||||
, pytest-cov
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "timezonefinder";
|
||||
version = "5.2.0";
|
||||
version = "6.0.2";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = isPy27;
|
||||
disabled = pythonOlder "3.8";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "a374570295a8dbd923630ce85f754e52578e288cb0a9cf575834415e84758352";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jannikmi";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-jquaA/+alSRUaa2wXQ6YoDR4EY9OlZCAdcxS5TR0CAU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
h3
|
||||
numpy
|
||||
];
|
||||
|
||||
checkInputs = [ numba pytestCheckHook pytest-cov ];
|
||||
checkInputs = [
|
||||
numba
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace 'numpy = "^1.22"' 'numpy = "*"'
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"timezonefinder"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# Some tests need the CLI on the PATH
|
||||
export PATH=$out/bin:$PATH
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "fast python package for finding the timezone of any point on earth (coordinates) offline";
|
||||
description = "Module for finding the timezone of any point on earth (coordinates) offline";
|
||||
homepage = "https://github.com/MrMinimal64/timezonefinder";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
|
@ -11,16 +11,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "texlab";
|
||||
version = "4.0.0";
|
||||
version = "4.2.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "latex-lsp";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-hRY1cJFakbq6pU2TKql+eVWvKtNDzVIQkE5BbRW5n5A=";
|
||||
sha256 = "sha256-oYM+OAYjQ8aNAryg0Cthj14BsxMFnOtz38XdUQZZolk=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-VwB02FfoAKL0fEvpvpxfkAR6PcWZFK/d5aVOtUq7f10=";
|
||||
cargoSha256 = "sha256-TDGiqC9eNIJfLTc1R3nvE84rAsVE8jtTaeQbVNMeVgg=";
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "emote";
|
||||
version = "3.0.3";
|
||||
version = "3.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tom-james-watson";
|
||||
repo = "Emote";
|
||||
rev = "v${version}";
|
||||
sha256 = "mqCSl+EGbnL9AfzZT3aa/Y5Rsx433ZmI31BmK3wkaJk=";
|
||||
sha256 = "sha256-brGU5LzE9A1F5AVNIuyd8vFKEh58ijRB5qVEID/KJfY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -6,16 +6,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cdk-go";
|
||||
version = "1.2.0";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cdk-team";
|
||||
repo = "CDK";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-0RDCg0UYCj0hlCM3BgOzKfuOulQVI/C9Mz6g5TJ5B1Y=";
|
||||
sha256 = "sha256-AhTeovusYsrtxrifvElMrFdYAa3a31JIm7jjIQuk8zI=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-fEGU8egsEAYStsYiTi1SFyBY3qBrrOiPuZn1eZ+YCVM=";
|
||||
vendorSha256 = "sha256-aJN/d/BxmleRXKw6++k6e0Vb0Gs5zg1QfakviABYTog=";
|
||||
|
||||
# At least one test is outdated
|
||||
doCheck = false;
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gitleaks";
|
||||
version = "8.8.11";
|
||||
version = "8.8.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zricethezav";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-KBUKdtwSYktySmhZYE3VSVu2tjCwUHuNSNwoxLHWQrg=";
|
||||
sha256 = "sha256-rrTZuDMKZqDWFHbnqDbPd5L6g7ff1lZpSpwTgYFd0Uw=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-X8z9iKRR3PptNHwy1clZG8QsClsjbW45nZb2fHGfSYk=";
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "sslscan";
|
||||
version = "2.0.14";
|
||||
version = "2.0.15";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rbsec";
|
||||
repo = "sslscan";
|
||||
rev = version;
|
||||
sha256 = "sha256-CqfxiTRIgrr4J6qThDFqohkxJj5Byf0vQzG+voAEzag=";
|
||||
sha256 = "sha256-YUczZYdrFGNYHoVZJ/HRbULgYWILKeo7lqyndSQO2Kw=";
|
||||
};
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
@ -5,13 +5,13 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "step-cli";
|
||||
version = "0.20.0";
|
||||
version = "0.21.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "smallstep";
|
||||
repo = "cli";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-CCtK7FuOOO6Ht4WjBpFVcfCL4XE3XR52WDahP4JDJ7M=";
|
||||
sha256 = "sha256-8A63RaNa6/CD0Jlckid3RFvf0gpibFW5YZ36MdYI4ak=";
|
||||
};
|
||||
|
||||
ldflags = [
|
||||
@ -25,7 +25,7 @@ buildGoModule rec {
|
||||
rm command/certificate/remote_test.go
|
||||
'';
|
||||
|
||||
vendorSha256 = "sha256-O2B8NMsFxyRLsOi8Zznr2NaqktX9k8ZtWPeaFlkNUnE=";
|
||||
vendorSha256 = "sha256-o11PoBKC0SDPgPjqAr4KA2SAS6vusRBqzNUwnhZ9hxA=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A zero trust swiss army knife for working with X509, OAuth, JWT, OATH OTP, etc";
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "wapiti";
|
||||
version = "3.1.2";
|
||||
version = "3.1.3";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wapiti-scanner";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-nGAG+7FqEktc55i5Q2urKh52vm/i6kX4kvS2AVUAUjA=";
|
||||
sha256 = "sha256-alrJVe4Miarkk8BziC8Y333b3swJ4b4oQpP2WAdT2rc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
@ -30,6 +30,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
loguru
|
||||
Mako
|
||||
markupsafe
|
||||
mitmproxy
|
||||
six
|
||||
sqlalchemy
|
||||
tld
|
||||
|
Loading…
Reference in New Issue
Block a user