Compare commits
6 Commits
a5cfa37ed3
...
3608cc5e33
Author | SHA1 | Date | |
---|---|---|---|
3608cc5e33 | |||
c831859513 | |||
404162ac1e | |||
045f10e79b | |||
4ea60a6082 | |||
561d55ed5f |
@ -167,6 +167,10 @@
|
||||
BRIDGE_VLAN_FILTERING = "y";
|
||||
BRIDGE_IGMP_SNOOPING = "y";
|
||||
|
||||
WATCHDOG = "y";
|
||||
RALINK_WDT = "y"; # watchdog
|
||||
MT7621_WDT = "y"; # or it might be this one
|
||||
|
||||
GPIOLIB="y";
|
||||
GPIO_MT7621 = "y";
|
||||
|
||||
|
@ -34,7 +34,8 @@ in rec {
|
||||
imports = [
|
||||
../modules/tftpboot.nix
|
||||
../modules/wlan.nix
|
||||
# ./modules/flashable.nix
|
||||
../modules/flashable.nix
|
||||
../modules/kexecboot.nix
|
||||
];
|
||||
|
||||
hostname = "arhcive";
|
||||
@ -181,12 +182,13 @@ in rec {
|
||||
};
|
||||
configFile = writeText "rsync.conf" ''
|
||||
pid file = /run/rsyncd.pid
|
||||
uid = store
|
||||
uid = backup
|
||||
[srv]
|
||||
path = /srv
|
||||
use chroot = yes
|
||||
auth users = backup
|
||||
read only = false
|
||||
gid = backup
|
||||
secrets file = ${secrets_file}/.outputs/secrets
|
||||
'';
|
||||
in longrun {
|
||||
@ -201,12 +203,12 @@ in rec {
|
||||
] ;
|
||||
};
|
||||
|
||||
services.default = target {
|
||||
services.default = target {
|
||||
name = "default";
|
||||
contents =
|
||||
let links = config.hardware.networkInterfaces;
|
||||
in with config.services; [
|
||||
links.lo links.eth links.wlan
|
||||
links.lo
|
||||
defaultroute4
|
||||
resolvconf
|
||||
sshd
|
||||
@ -222,9 +224,12 @@ in rec {
|
||||
# ];
|
||||
};
|
||||
|
||||
users.store = {
|
||||
users.backup = {
|
||||
uid=500; gid=500; gecos="Storage owner"; dir="/srv";
|
||||
shell="/dev/null"; # authorizedKeys = [];
|
||||
shell="/dev/null";
|
||||
};
|
||||
groups.backup = {
|
||||
gid=500; usernames = ["backup"];
|
||||
};
|
||||
|
||||
defaultProfile.packages = with pkgs; [e2fsprogs strace tcpdump ];
|
||||
|
@ -17,6 +17,10 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
programs.busybox.applets = [
|
||||
"flashcp"
|
||||
];
|
||||
|
||||
outputs.firmware =
|
||||
let o = config.outputs; in
|
||||
pkgs.runCommand "firmware" {} ''
|
||||
|
@ -26,7 +26,6 @@ in {
|
||||
|
||||
outputs.boot-sh =
|
||||
let
|
||||
inherit (pkgs) kexec-tools;
|
||||
inherit (pkgs.lib.trivial) toHexString;
|
||||
inherit (config.outputs) squashfs kernel;
|
||||
cmdline = concatStringsSep " " config.boot.commandLine;
|
||||
|
@ -17,6 +17,13 @@ extraPkgs // {
|
||||
strace = prev.strace.override { libunwind = null; };
|
||||
|
||||
kexec-tools = prev.kexec-tools.overrideAttrs(o: {
|
||||
# For kexecboot we copy kexec into a ramdisk on the system being
|
||||
# upgraded from. This is more likely to work if kexec is
|
||||
# statically linked so doesn't have dependencies on store paths that
|
||||
# may not exist on that machine. (We can't nix-copy-closure as
|
||||
# the store may not be on a writable filesystem)
|
||||
LDFLAGS = "-static";
|
||||
|
||||
patches = o.patches ++ [
|
||||
(fetchpatch {
|
||||
# merge user command line options into DTB chosen
|
||||
|
@ -29,7 +29,7 @@ echo $QEMU_OPTIONS
|
||||
qemu-system-mips \
|
||||
-M malta -m 256 \
|
||||
-echr 16 \
|
||||
-append "default console=ttyS0,38400n8 panic=10 oops=panic init=$INIT loglevel=8 root=/dev/vda" \
|
||||
-append "liminix default console=ttyS0,38400n8 panic=10 oops=panic init=$INIT loglevel=8 root=/dev/vda" \
|
||||
-drive file=$2,format=raw,readonly=on,if=virtio \
|
||||
-netdev socket,id=access,mcast=230.0.0.1:1234,localaddr=127.0.0.1 \
|
||||
-device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=access,mac=ba:ad:1d:ea:21:02 \
|
||||
|
Loading…
Reference in New Issue
Block a user