forked from c3d2/nix-config
riscbert: init
This commit is contained in:
parent
b02eb3adc4
commit
2f64b9960a
21
flake.lock
21
flake.lock
|
@ -387,6 +387,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"riscv64": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1647822145,
|
||||||
|
"narHash": "sha256-hN9oOPwR/mhUnhG2YLywUDFE51SpyBC8O8IOFSVPqbU=",
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "nixos-riscv64",
|
||||||
|
"rev": "f0b105b7671289c3fc17849532afe4fceb95bfd6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zhaofengli",
|
||||||
|
"repo": "nixos-riscv64",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"fenix": "fenix",
|
"fenix": "fenix",
|
||||||
|
@ -400,6 +420,7 @@
|
||||||
"nixpkgs-openwebrx": "nixpkgs-openwebrx",
|
"nixpkgs-openwebrx": "nixpkgs-openwebrx",
|
||||||
"openwrt": "openwrt",
|
"openwrt": "openwrt",
|
||||||
"openwrt-imagebuilder": "openwrt-imagebuilder",
|
"openwrt-imagebuilder": "openwrt-imagebuilder",
|
||||||
|
"riscv64": "riscv64",
|
||||||
"scrapers": "scrapers",
|
"scrapers": "scrapers",
|
||||||
"secrets": "secrets",
|
"secrets": "secrets",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
|
|
14
flake.nix
14
flake.nix
|
@ -82,9 +82,13 @@
|
||||||
openwrt-imagebuilder.follows = "openwrt-imagebuilder";
|
openwrt-imagebuilder.follows = "openwrt-imagebuilder";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
riscv64 = {
|
||||||
|
url = "github:zhaofengli/nixos-riscv64";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, secrets, nixos-hardware, zentralwerk, yammat, scrapers, spacemsg, tigger, ticker, heliwatch, sops-nix, naersk, fenix, microvm, ... }:
|
outputs = inputs@{ self, nixpkgs, secrets, nixos-hardware, zentralwerk, yammat, scrapers, spacemsg, tigger, ticker, heliwatch, sops-nix, naersk, fenix, microvm, riscv64, ... }:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
forAllSystems = lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
|
forAllSystems = lib.genAttrs [ "aarch64-linux" "x86_64-linux" ];
|
||||||
|
@ -602,6 +606,14 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
riscbert = nixosSystem' {
|
||||||
|
modules = [
|
||||||
|
riscv64.nixosModules.visionfive
|
||||||
|
./hosts/riscbert
|
||||||
|
];
|
||||||
|
system = "riscv64-linux";
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModule = self.nixosModules.c3d2;
|
nixosModule = self.nixosModules.c3d2;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
dacbert.ip4 = "dacbert.hq.c3d2.de";
|
dacbert.ip4 = "dacbert.hq.c3d2.de";
|
||||||
dacbert.serial = "3c271952";
|
dacbert.serial = "3c271952";
|
||||||
|
|
||||||
|
riscbert.ip4 = "riscbert.c3d2.zentralwerk.org";
|
||||||
|
|
||||||
dn42 = {
|
dn42 = {
|
||||||
ip4 = "172.22.99.253";
|
ip4 = "172.22.99.253";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./rpi-netboot.nix
|
./tftp.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "nix-build"; # Define your hostname.
|
networking.hostName = "nix-build"; # Define your hostname.
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
cleanTmpDir = true;
|
cleanTmpDir = true;
|
||||||
|
|
||||||
kernelModules = [ "kvm-intel" ];
|
kernelModules = [ "kvm-intel" ];
|
||||||
binfmt.emulatedSystems = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
|
binfmt.emulatedSystems = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" "riscv64-linux" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
loader.generic-extlinux-compatible.enable = true;
|
||||||
|
kernelParams = [
|
||||||
|
"verbose" "shell_on_fail"
|
||||||
|
"elevator=deadline"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
system.build.bootFiles = pkgs.runCommandNoCC "boot-files" {} ''
|
||||||
|
mkdir -p $out/boot
|
||||||
|
${config.boot.loader.generic-extlinux-compatible.populateCmd} -c ${config.system.build.toplevel} -d $out/boot
|
||||||
|
'';
|
||||||
|
|
||||||
|
networking.hostName = "dacbert";
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue