Compare commits

...

10 commits

Author SHA1 Message Date
Fabian Montero 94b184cb69 last commit 2024-12-02 20:51:02 -06:00
Fabian Montero b57f65a76e add jack2 2024-04-06 14:00:54 -06:00
Fabian Montero 2cf302a0bf checkpoint 2024-04-06 12:25:23 -06:00
Fabian Montero c866c1aa67 add ledfx 2024-04-06 12:10:53 -06:00
Fabian Montero 2aa388c2d4 checkpoint 2024-04-06 12:10:20 -06:00
Fabian Montero 64689eb7ca añade bluetooth 2023-04-26 19:04:46 -06:00
Fabian Montero e21cfa7a46 añade simple-scalar 2023-04-26 19:04:15 -06:00
Fabian Montero de11780539 añade steam a t14 2023-03-25 14:28:55 -06:00
Fabian Montero 9ab7f34763 cli: añade rar 2023-03-25 14:26:59 -06:00
Fabian Montero 635c470019 configura git para que use main en lugar de master 2023-03-23 04:11:11 -06:00
23 changed files with 333 additions and 186 deletions

View file

@ -25,24 +25,34 @@
hardware.opengl.enable = true; hardware.opengl.enable = true;
# esto es de la FGPA, eliminar cuando termine el curso hardware.pulseaudio = {
services.udev.extraRules = '' enable = true;
# USB-Blaster package = pkgs.pulseaudioFull;
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="660", GROUP="dialout", TAG+="uaccess" };
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="660", GROUP="dialout", TAG+="uaccess"
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="660", GROUP="dialout", TAG+="uaccess"
# USB-Blaster II hardware.bluetooth.enable = true;
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="660", GROUP="dialout", TAG+="uaccess" hardware.bluetooth.settings = {
ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="660", GROUP="dialout", TAG+="uaccess" General = {
''; Enable = "Source,Sink,Media,Socket";
};
};
services = { services = {
fwupd.enable = true; fwupd.enable = true;
thinkfan.enable = true; thinkfan.enable = true;
tlp.enable = true; tlp.enable = true;
tp-auto-kbbl.enable =true; tp-auto-kbbl.enable = true;
blueman.enable = true;
}; };
services = {
pcscd.enable = true;
udev.packages = [ pkgs.yubikey-personalization ];
};
environment.etc."pkcs11/modules/ykcs11".text = ''
module: ${pkgs.yubico-piv-tool}/lib/libykcs11.so
'';
} }

View file

@ -34,20 +34,19 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1679067101, "lastModified": 1712386041,
"narHash": "sha256-tMI1inGT9u4KWQml0w30dhWqQPlth1e9K/68sfDkEQA=", "narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "9154cd519a8942728038819682d6b3ff33f321bb", "rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-22.11", "ref": "release-23.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -88,16 +87,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1679318992, "lastModified": 1712310679,
"narHash": "sha256-uoj5Oy6hruIHuxzfQZtcalObe5kPrX9v+ClUMFEOzmE=", "narHash": "sha256-XgC/a/giEeNkhme/AV1ToipoZ/IVm1MV2ntiK4Tm+pw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e2c97799da5f5cd87adfa5017fba971771e123ef", "rev": "72da83d9515b43550436891f538ff41d68eecc7f",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-22.11", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -142,21 +141,6 @@
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -1,13 +1,13 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; # actualizar esto para actualizar nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; # actualizar esto para actualizar
unstable.url = "github:nixos/nixpkgs/master"; unstable.url = "github:nixos/nixpkgs/master";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
hm-isolation.url = "github:3442/hm-isolation"; hm-isolation.url = "github:3442/hm-isolation";
nixGL.url = "github:guibou/nixGL"; nixGL.url = "github:guibou/nixGL";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-22.11"; # actualizar esto para actualizar url = "github:nix-community/home-manager/release-23.11"; # actualizar esto para actualizar
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };

View file

@ -11,8 +11,6 @@ with lib;
"steam" "steam"
"steam-original" "steam-original"
"steam-run" "steam-run"
"teams"
"unrar"
"vscode-extension-ms-vscode-cpptools" "vscode-extension-ms-vscode-cpptools"
"vmware-horizon-client" "vmware-horizon-client"
"zoom" "zoom"

View file

@ -7,12 +7,7 @@ in
options.local.apps.messaging.enable = mkEnableOption "Messaging apps"; options.local.apps.messaging.enable = mkEnableOption "Messaging apps";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
discord
signal-desktop
tdesktop
teams
thunderbird thunderbird
zoom-us
]; ];
}; };
} }

View file

@ -8,6 +8,9 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
deluge deluge
lapce
ledfx
jack2
mpv mpv
obs-studio obs-studio
pavucontrol pavucontrol

View file

@ -4,7 +4,7 @@ with lib;
programs = { programs = {
zsh = { zsh = {
enable = true; enable = true;
enableSyntaxHighlighting = true; syntaxHighlighting.enable = true;
initExtra = import ./zshrc.nix pkgs; initExtra = import ./zshrc.nix pkgs;
}; };
git = { git = {
@ -12,6 +12,61 @@ with lib;
userEmail = "fabian@cluster451.org"; userEmail = "fabian@cluster451.org";
userName = "Fabián Montero"; userName = "Fabián Montero";
signing.key = "E77A808BF9A955D668EEEA6473FA9C9CB5F0249B"; signing.key = "E77A808BF9A955D668EEEA6473FA9C9CB5F0249B";
extraConfig.init.defaultBranch = "main";
};
helix = {
enable = true;
settings = {
# theme = "onedark";
editor = {
mouse = true;
line-number = "absolute";
cursorline = true;
cursorcolumn = true;
gutters = [ "diagnostics" "spacer" "line-numbers" "diff" ];
auto-completion = true;
auto-format = true;
auto-save = true;
bufferline = "multiple";
rulers = [ 80 ];
true-color = true;
lsp.display-messages = true;
auto-pairs = false;
whitespace = {
render = {
space = "all";
nbsp = "all";
tab = "all";
newline = "none";
};
};
indent-guides = {
character = "";
render = true;
};
cursor-shape = {
select = "block";
insert = "block";
normal = "block";
};
statusline = {
left = [ "mode" "spinner" "version-control" "file-name" "file-modification-indicator" "total-line-numbers" ];
};
file-picker = {
hidden = false;
follow-symlinks = false;
deduplicate-links = false;
};
};
keys.normal = {
space.space = "file_picker";
space.w = ":w";
space.q = ":q";
esc = [ "collapse_selection" "keep_primary_selection" ];
};
};
}; };
}; };
@ -27,7 +82,6 @@ with lib;
rar rar
tree tree
units units
unrar
unzip unzip
usbutils usbutils
zip zip

View file

@ -39,6 +39,12 @@ with lib;
"unstable".flake = unstable; "unstable".flake = unstable;
}; };
services.gpg-agent = {
enable = true;
enableZshIntegration = true;
pinentryFlavor = "gtk2";
};
programs.home-manager.enable = true; programs.home-manager.enable = true;
xdg = { xdg = {

View file

@ -41,6 +41,7 @@ in
betterlockscreen = { betterlockscreen = {
enable = true; enable = true;
inactiveInterval = 60;
}; };
}; };

View file

@ -69,9 +69,6 @@ in
{ {
command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 1; exec ${pkgs.firefox}/bin/firefox'"; command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 1; exec ${pkgs.firefox}/bin/firefox'";
} }
{
command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.tdesktop}/bin/telegram-desktop'";
}
{ {
command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.signal-desktop}/bin/signal-desktop'"; command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.signal-desktop}/bin/signal-desktop'";
} }

View file

@ -2,6 +2,10 @@
config.local = { config.local = {
nixos = true; nixos = true;
apps = {
steam.enable = true;
};
display = { display = {
"0" = "eDP-1"; "0" = "eDP-1";
"1" = null; "1" = null;

View file

@ -1,83 +0,0 @@
{ lib, pkgs, ... }:
with lib; {
static = false; # !!!!
namespaced = true;
packages = with pkgs; [
(quartus-prime-lite.override { supportedDevices = [ "Cyclone V" ]; })
binutils
gcc
gnumake
gtkwave
verilator
];
hm = {
# QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.
home.sessionVariables.LD_LIBRARY_PATH = "${pkgs.gtk2}/lib";
# Evita GC
xdg.configFile."quartus-inputs".text = let
inherit (pkgs) requireFile;
homepage = "https://fpgasoftware.intel.com";
version = "20.1.1.720";
url = "${homepage}/${versions.majorMinor version}/?edition=lite&platform=linux";
inputs = [
(requireFile {
name = "QuartusLiteSetup-${version}-linux.run";
sha256 = "0mjp1rg312dipr7q95pb4nf4b8fwvxgflnd1vafi3g9cshbb1c3k";
inherit url;
})
(requireFile {
name = "ModelSimSetup-${version}-linux.run";
sha256 = "1cqgv8x6vqga8s4v19yhmgrr886rb6p7sbx80528df5n4rpr2k4i";
inherit url;
})
(requireFile {
name = "cyclonev-${version}.qdz";
sha256 = "11baa9zpmmfkmyv33w1r57ipf490gnd3dpi2daripf38wld8lgak";
inherit url;
})
];
in concatStringsSep "\n" inputs;
# dice soto que ponga esto globalmente si quiero nightmode en todo
# Usar gtk en aplicaciones de jvm
home.sessionVariables._JAVA_OPTIONS = concatStringsSep " " [
"-Dawt.useSystemAAFontSettings=on"
"-Dswing.aatext=true"
"-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
"-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
];
gtk = {
enable = true;
gtk2.extraConfig = ''
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
gtk-menu-images=1
gtk-button-images=1
'';
font = {
package = pkgs.noto-fonts;
name = "Noto Sans Regular";
#size = 14; <- caga layout de páginas
};
theme = {
package = pkgs.materia-theme;
name = "Materia-dark";
};
};
qt = {
enable = true;
platformTheme = "gtk";
};
};
}

View file

@ -5,12 +5,12 @@
packages = with pkgs; [ packages = with pkgs; [
binutils binutils
cmake cmake
gdb #gdb
gcc-arm-embedded #gcc-arm-embedded
gnumake gnumake
lldb #lldb
openocd #openocd
qemu #qemu
valgrind #valgrind
]; ];
} }

View file

@ -1,18 +0,0 @@
{pkgs, ...}:
{
static = true;
packages = with pkgs; [
(octave.withPackages (packages: with packages; [
symbolic
signal
]))
(python39.withPackages (packages: with packages; [
numpy
pipenv
scipy
sympy
matplotlib
]))
];
}

View file

@ -5,12 +5,7 @@
packages = with pkgs; [ packages = with pkgs; [
pipenv pipenv
(python310.withPackages ( packages: with packages; [ (python310.withPackages ( packages: with packages; [
matplotlib
numpy
pandas
requests requests
scipy
setuptools
])) ]))
]; ];
} }

View file

@ -1,22 +0,0 @@
{ pkgs, ... }:
{
static = true;
packages = with pkgs; [
biber
(texlive.combine {
inherit (texlive)
appendix
scheme-medium
biblatex
biblatex-ieee
cleveref
csquotes
enumitem
ieeetran
titlesec
titling
zref;
})
];
}

View file

@ -4,4 +4,11 @@ with lib;
systemd.user.tmpfiles.rules = [ systemd.user.tmpfiles.rules = [
"d %t/tmp 0700 fabian fabian 24h" "d %t/tmp 0700 fabian fabian 24h"
]; ];
systemd.user.services.mpris-proxy = {
Unit.Description = "Mpris proxy";
Unit.After = [ "network.target" "sound.target" ];
Service.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
Install.WantedBy = [ "default.target" ];
};
} }

View file

@ -1,5 +1,4 @@
pkgs: pkgs:
{ {
#andesight = pkgs.callPackage ./andesight {}; simplescalar = pkgs.callPackage ./simple-scalar {};
#netextender = pkgs.callPackage ./netextender {};
} }

View file

@ -0,0 +1,25 @@
From 33f6fb023c09464467eea4538f18e2a131acee3a Mon Sep 17 00:00:00 2001
From: Alejandro Soto <alejandro@34project.org>
Date: Wed, 26 Apr 2023 13:37:32 -0600
Subject: [PATCH] fix case of YY_CURRENT_BUFFER
---
ld/ldlex.l | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/simpleutils-990811/ld/ldlex.l b/simpleutils-990811/ld/ldlex.l
index 2eef80f..561b8af 100644
--- a/simpleutils-990811/ld/ldlex.l
+++ b/simpleutils-990811/ld/ldlex.l
@@ -585,7 +585,7 @@ yy_input (buf, result, max_size)
int max_size;
{
*result = 0;
- if (yy_current_buffer->yy_input_file)
+ if (YY_CURRENT_BUFFER->yy_input_file)
{
if (yyin)
{
--
2.38.4

View file

@ -0,0 +1,24 @@
From 442edcc1d281a62a0092bcde19038ba3c976e499 Mon Sep 17 00:00:00 2001
From: Alejandro Soto <alejandro@34project.org>
Date: Wed, 26 Apr 2023 13:35:21 -0600
Subject: [PATCH 1/3] define sys_nerr
---
gcc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc-2.7.2.3/gcc.c b/gcc-2.7.2.3/gcc.c
index fe7de5b..1ac933f 100644
--- a/gcc-2.7.2.3/gcc.c
+++ b/gcc-2.7.2.3/gcc.c
@@ -176,6 +176,7 @@ extern int errno;
#endif
extern int sys_nerr;
+int __attribute__((weak)) sys_nerr = 0;
#ifndef HAVE_STRERROR
#if defined(bsd4_4)
extern const char *const sys_errlist[];
--
2.38.4

View file

@ -0,0 +1,25 @@
From b074acb822459a42d2507ad5729e9e60bb1de572 Mon Sep 17 00:00:00 2001
From: Alejandro Soto <alejandro@34project.org>
Date: Wed, 26 Apr 2023 13:35:42 -0600
Subject: [PATCH 2/3] fix obstack.h post-increment
---
obstack.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc-2.7.2.3/obstack.h b/gcc-2.7.2.3/obstack.h
index 28bcd44..3a517b5 100644
--- a/gcc-2.7.2.3/obstack.h
+++ b/gcc-2.7.2.3/obstack.h
@@ -338,7 +338,7 @@ __extension__ \
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (void *)); \
if (!__o->alloc_failed) \
- *((void **)__o->next_free)++ = ((void *)datum); \
+ *((void **)__o->next_free++) = ((void *)datum); \
(void) 0; })
#define obstack_int_grow(OBSTACK,datum) \
--
2.38.4

View file

@ -0,0 +1,25 @@
From 12c34c7ff8e4e00ba54bd0b90f2ca6905109cb5d Mon Sep 17 00:00:00 2001
From: Alejandro Soto <alejandro@34project.org>
Date: Wed, 26 Apr 2023 13:35:57 -0600
Subject: [PATCH 3/3] stdarg.h instead of varargs.h
---
protoize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc-2.7.2.3/protoize.c b/gcc-2.7.2.3/protoize.c
index 9728bf2..fb82ef0 100644
--- a/gcc-2.7.2.3/protoize.c
+++ b/gcc-2.7.2.3/protoize.c
@@ -57,7 +57,7 @@ Boston, MA 02111-1307, USA. */
#define _POSIX_SOURCE
#endif
-#include <varargs.h>
+#include <stdarg.h>
/* On some systems stdio.h includes stdarg.h;
we must bring in varargs.h first. */
#include <stdio.h>
--
2.38.4

View file

@ -0,0 +1,118 @@
# https://www.cse.iitd.ac.in/~cs5070217/csl718/assignment1/ss_install_instructions.html
{ bison, fetchurl, flex, multiStdenv, stdenv_32bit, strace }:
let
host = "i686-pc-linux";
target = "sslittle-na-sstrix";
gcc-version = "2.7.2.3";
makeflags = "LANGUAGES=c CC=\"$CC -m32 $CFLAGS\" prefix=$out";
in
multiStdenv.mkDerivation {
pname = "SimpleScalar";
version = "1998-08-11"; # !!!
nativeBuildInputs = [ flex bison ];
sourceRoot = ".";
srcs = [
(fetchTarball {
name = "simplesim-3.0";
url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/simplesim-3v0d.tgz";
sha256 = "sha256:022rlniimzl30c1874765hl001dxc716vfwm40ij256h1qk2dwgw";
})
(fetchTarball {
name = "simpleutils-990811";
url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/simpleutils-990811.tar.gz";
sha256 = "sha256:0w952z382s7ghrxwrad7fd058b1kj5ad1abh8idxwwk47va72cdf";
})
];
# El código es muy viejo y Nix usa opciones muy estrictas por defecto
CFLAGS = "-O3 -Wno-error=format-security";
# Algunas tarballs vienen sin directorio de primer nivel y además requieren arreglos
postUnpack =
let
simpletools = fetchurl {
url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/simpletools-2v0.tgz";
sha256 = "sha256-FTDTqyQWZCnuNPmTcu3Hcjgp4pHNoUcC0GOGhSJV9Iw=";
};
gcc-ss = fetchurl {
url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/gcc-${gcc-version}.ss.tar.gz";
sha256 = "sha256-3R3wsLmxoN3MkEW4gaxnhIyTBs0CUiSiH7C1/hF2atM=";
};
ar-and-ranlib = fetchurl {
url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/ar_and_ranlib.tar.gz";
sha256 = "sha256-MRTO6cAg3WeXlk3jDy2lVuiSXDRz1+LLa2XDkBDygMU=";
};
in
''
tar xf ${simpletools}
rm -r gcc-2.6.3
tar xf ${gcc-ss}
mkdir ar-and-ranlib
tar xf ${ar-and-ranlib} -C ar-and-ranlib
chmod -R +w gcc-${gcc-version} ar-and-ranlib
'';
patches = [
./0001-fix-case-of-YY_CURRENT_BUFFER.patch
./0002-define-sys_nerr.patch
./0003-fix-obstack.h-post-increment.patch
./0004-stdarg.h-instead-of-varargs.h.patch
];
postPatch = ''
patchelf \
--set-interpreter "$(<${stdenv_32bit.cc}/nix-support/dynamic-linker-m32)" \
ar-and-ranlib/{ar,ranlib}
'';
configurePhase = ''
BUILD=$PWD
cd $BUILD/simplesim-3.0
make config-pisa
cd $BUILD/simpleutils-990811
./configure --host=${host} --target=${target} --with-gnu-as --with-gnu-ld --prefix=$out
cd $BUILD/gcc-${gcc-version}
./configure --host=${host} --target=${target} --with-gnu-as --with-gnu-ld --prefix=$out
'';
buildPhase = ''
make -C $BUILD/simplesim-3.0
make -C $BUILD/simpleutils-990811
# GCC necesita binutils para compilar
make -C $BUILD/simpleutils-990811 install
cp $BUILD/ar-and-ranlib/{ar,ranlib} $out/${target}/bin/
cd $BUILD/gcc-${gcc-version}
mkdir -p $out/lib
cp patched/sys/cdefs.h $BUILD/${target}/include/sys/cdefs.h
cp -r $BUILD/${target} $out/
cp $BUILD/${target}/lib/{libc.a,crt0.o} $out/lib/
sed -i '130s@-I/usr/include@-I./include@' Makefile
! make ${makeflags}
sed -i 's/\(return "FIXME\\n\)/\1\\/g' insn-output.c
PATH="$out/${target}/bin:$PATH" make ${makeflags}
'';
installPhase = ''
cp $BUILD/simplesim-3.0/{sim-{outorder,cache,profile,bpred,eio,safe,fast},sysprobe} $out/bin/
PATH="$out/${target}/bin:$PATH" make -C $BUILD/gcc-${gcc-version} ${makeflags} install
'';
}