Setup FPGA config set

This commit is contained in:
Artemis Tosini 2020-11-01 20:27:07 +00:00
parent 3bc487aeaf
commit 1d0fa61447
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
7 changed files with 68 additions and 16 deletions

View file

@ -11,6 +11,7 @@
./system/current ./system/current
./packages.nix ./packages.nix
./fonts.nix ./fonts.nix
./sets/neovim.nix
]; ];
nix = { nix = {
@ -40,7 +41,6 @@
environment = { environment = {
variables = { variables = {
EDITOR = "nvim";
TERMINAL = "alacritty"; TERMINAL = "alacritty";
# for Sway # for Sway

24
externals/packages/fujproj/default.nix vendored Normal file
View file

@ -0,0 +1,24 @@
{ stdenv, fetchFromGitHub, cmake, pkgconfig, libusb1, libftdi1 }:
stdenv.mkDerivation rec {
pname = "fujprog";
version = "4.8";
src = fetchFromGitHub {
owner = "kost";
repo = pname;
rev = "v${version}";
sha256 = "08kzkzd5a1wfd1aycywdynxh3qy6n7z9i8lihkahmb4xac3chmz5";
};
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ libftdi1 libusb1 ];
meta = with stdenv.lib; {
description = "FPGA JTAG programmer for ULX2/3S boards";
homepage = "https://github.com/kost/fujprog";
license = licenses.bsd2;
platforms = platforms.linux;
maintainers = with maintainers; [ artemist ];
};
}

View file

@ -1,3 +1,8 @@
# TinyFPGA Bx # TinyFPGA Bx
SUBSYSTEM=="tty", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6130", TAG+="uaccess" SUBSYSTEM=="tty", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="6130", TAG+="uaccess"
# Fomu
SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5bf0", MODE="0664", GROUP="plugdev"
# ULX3S
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="0664", GROUP="plugdev"

View file

@ -25,18 +25,9 @@ in
vlc_qt5 vlc_qt5
youtubeDL youtubeDL
# Drawing and art
krita
xournal
xournalpp
# Books # Books
calibre calibre
# Emulation
mgba
mupen64plus
# Wine and tools # Wine and tools
cabextract cabextract
samba samba
@ -110,7 +101,6 @@ in
libarchive libarchive
lsof lsof
mercurialFull mercurialFull
neovim
nix-index nix-index
nixops nixops
openssl openssl
@ -151,7 +141,6 @@ in
# Development # Development
arduino arduino
bear
binutils-unwrapped binutils-unwrapped
ccache ccache
clang-tools clang-tools
@ -162,7 +151,6 @@ in
gnumake gnumake
go go
gopls gopls
jetbrains.clion
llvm.clang llvm.clang
llvm.lld llvm.lld
nasm nasm
@ -171,7 +159,6 @@ in
patchelf patchelf
python37Packages.python-language-server python37Packages.python-language-server
rnix-lsp rnix-lsp
rr
rustup rustup
valgrind valgrind
vscode vscode
@ -214,7 +201,6 @@ in
evince evince
gnome3.eog gnome3.eog
gnome3.gnome-system-monitor gnome3.gnome-system-monitor
googleearth
libreoffice-fresh libreoffice-fresh
zathura zathura

26
sets/fpga.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# Synthesis
icestorm
nextpnr
trellis
yosys
# Testing
ghdl
symbiyosys
verilog
# Programming
dfu-util
tinyprog
wishbone-tool
( callPackage ../externals/packages/fujproj { } )
# CPU stuff
pkgsCross.riscv64-embedded.buildPackages.binutils
pkgsCross.riscv64-embedded.buildPackages.gcc
pkgsCross.riscv32-embedded.buildPackages.binutils
pkgsCross.riscv32-embedded.buildPackages.gcc
];
}

10
sets/neovim.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
programs.neovim = {
enable = true;
vimAlias = true;
defaultEditor = true;
configure.customRC = "source ~/.config/nvim/init.vim\n";
};
}

View file

@ -5,6 +5,7 @@
./boot-config.nix ./boot-config.nix
./hardware-configuration.nix ./hardware-configuration.nix
../../services/ssh.nix ../../services/ssh.nix
../../sets/fpga.nix
../../private/starlight.nix ../../private/starlight.nix
]; ];