summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix8
-rw-r--r--home/default.nix4
-rw-r--r--home/path.nix2
-rw-r--r--home/zshrc.nix2
-rw-r--r--pkgs/default.nix56
-rw-r--r--pkgs/mssql-tools.nix48
-rw-r--r--pkgs/rqlite.nix17
-rw-r--r--shenvs/anpi.nix2
-rw-r--r--shenvs/config.nix1
-rw-r--r--shenvs/dsp.nix4
-rw-r--r--shenvs/stats.nix11
-rw-r--r--shenvs/tabas.nix19
-rw-r--r--shenvs/tex.nix8
13 files changed, 146 insertions, 36 deletions
diff --git a/flake.nix b/flake.nix
index d00eaea..4a3ce59 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,6 +1,7 @@
{
inputs = {
- nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
+ nixpkgsUnstable.url = "github:nixos/nixpkgs";
home-manager = {
# "/release-21.11" para stable
@@ -11,7 +12,7 @@
nur.url = "github:nix-community/NUR";
};
- outputs = { self, nixpkgs, home-manager, nur, ... }: with nixpkgs.lib; let
+ outputs = { self, nixpkgs, nixpkgsUnstable, home-manager, nur, ... }: with nixpkgs.lib; let
util = import ./util;
inherit (util nixpkgs.lib) importAll;
@@ -24,6 +25,7 @@
overlay = self: super: {
local = pkgSet super;
+ unstable = import nixpkgsUnstable { inherit (super) config system; };
};
nixosConfigurations = let
@@ -37,7 +39,7 @@
home = platform: home-manager.lib.homeManagerConfiguration {
system = "x86_64-linux";
- configuration = import ./home { inherit self nixpkgs nur; };
+ configuration = import ./home { inherit self nixpkgs nixpkgsUnstable nur; };
extraModules = [ platform ];
username = "ale";
diff --git a/home/default.nix b/home/default.nix
index f254899..131d8f9 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -1,4 +1,4 @@
-{ self, nixpkgs, nur }:
+{ self, nixpkgs, nixpkgsUnstable, nur }:
{ lib, config, pkgs, ... }:
with lib; {
imports = [ ./unfree.nix ];
@@ -12,6 +12,7 @@ with lib; {
nix.registry = {
"nixpkgs".flake = nixpkgs;
+ "nixpkgsUnstable".flake = nixpkgsUnstable;
"nur".flake = nur;
"system".to = {
@@ -187,6 +188,7 @@ with lib; {
set -g renumber-windows on
set -sa terminal-overrides ',xterm-termite:RGB'
set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y"
+ bind-key X set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
'';
};
};
diff --git a/home/path.nix b/home/path.nix
index d13f8d1..5245bcc 100644
--- a/home/path.nix
+++ b/home/path.nix
@@ -8,6 +8,7 @@ in [
pkgs.gnome.gnome-screenshot
pkgs.gpicview
pkgs.hack-font
+ pkgs.i3-gaps
py.ipython
pkgs.jq
pkgs.keepassxc
@@ -31,6 +32,7 @@ in [
pkgs.tree
pkgs.units
pkgs.unzip
+ pkgs.wget
pkgs.xsel
pkgs.zip
]
diff --git a/home/zshrc.nix b/home/zshrc.nix
index 85cdc95..704ef0e 100644
--- a/home/zshrc.nix
+++ b/home/zshrc.nix
@@ -22,7 +22,7 @@
}
function shenv() {
- nix shell 'system#shenvs.'"$1"
+ NIXPKGS_ALLOW_UNFREE=1 nix shell --impure 'system#shenvs.'"$1"
}
function xseli() {
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 9c5831c..93463e0 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -1,31 +1,37 @@
{ pkgs, util }:
with pkgs.lib; let
inherit (pkgs) buildEnv callPackage writeTextDir;
-in {
- shenvs = let
- build = name: { paths, enter ? null }: buildEnv {
- name = "shenv-${name}";
- paths = (optional (enter != null) (writeTextDir "lib/shenv/enter" enter))
- ++ paths;
- };
- in pkgs.lib.mapAttrs (name: shenv: build name (shenv pkgs)) (util.importAll {
- root = ../shenvs;
- exclude = [ "config" ];
- });
-
- btclone = callPackage ./btclone {};
- git-aliases = callPackage ./git-aliases.nix {};
- scripts = callPackage ./scripts {};
- tmux-lift = callPackage ./tmux-lift {};
- st = pkgs.st.override {
- conf = import ./st.nix {};
+ combined = pkgs // { inherit local; };
- patches = [
- (pkgs.fetchpatch {
- url = "https://st.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff";
- sha256 = "cbb37675e9b4986836c19aadacc616a006df81c9bf394e9e3573e164fa1867cf";
- })
- ];
+ local = {
+ shenvs = let
+ build = name: { paths, enter ? null }: buildEnv {
+ name = "shenv-${name}";
+ paths = (optional (enter != null) (writeTextDir "lib/shenv/enter" enter))
+ ++ paths;
+ };
+ in pkgs.lib.mapAttrs (name: shenv: build name (shenv combined)) (util.importAll {
+ root = ../shenvs;
+ exclude = [ "config" ];
+ });
+
+ btclone = callPackage ./btclone {};
+ git-aliases = callPackage ./git-aliases.nix {};
+ mssql-tools = callPackage ./mssql-tools.nix {};
+ rqlite = callPackage ./rqlite.nix {};
+ scripts = callPackage ./scripts {};
+ tmux-lift = callPackage ./tmux-lift {};
+
+ st = pkgs.st.override {
+ conf = import ./st.nix {};
+
+ patches = [
+ (pkgs.fetchpatch {
+ url = "https://st.suckless.org/patches/clipboard/st-clipboard-0.8.3.diff";
+ sha256 = "cbb37675e9b4986836c19aadacc616a006df81c9bf394e9e3573e164fa1867cf";
+ })
+ ];
+ };
};
-}
+in local
diff --git a/pkgs/mssql-tools.nix b/pkgs/mssql-tools.nix
new file mode 100644
index 0000000..a2de629
--- /dev/null
+++ b/pkgs/mssql-tools.nix
@@ -0,0 +1,48 @@
+# Basado en derivación para skypeforlinux en nixpkgs
+# Ver environment.unixODBCDrivers
+
+{ lib, stdenv, fetchurl, dpkg, glibc, unixODBC }:
+let
+ version = "17.9.1.1-1";
+ ubuntuRelease = "21.10";
+in stdenv.mkDerivation {
+ pname = "mssql-tools";
+ inherit version;
+
+ system = "x86_64-linux";
+
+ src =
+ if stdenv.hostPlatform.system == "x86_64-linux" then
+ fetchurl {
+ url = "https://packages.microsoft.com/ubuntu/${ubuntuRelease}/prod/pool/main/m/mssql-tools/mssql-tools_${version}_amd64.deb";
+ sha256 = "0ya9643assr80yh6g0nd3i6iw819frhbb1m421khwplk9iq793kk";
+ }
+ else
+ throw "mssql-tools is not supported on ${stdenv.hostPlatform.system}";
+
+ buildInputs = [ dpkg ];
+ dontUnpack = true;
+ outputs = [ "out" "doc" ];
+
+ installPhase = ''
+ mkdir -p $out
+ dpkg -x $src $out
+ mv $out/opt/mssql-tools/{bin,share} $out
+ mv $out/usr/share/doc/mssql-tools $doc
+ rm -r $out/opt $out/usr
+ '';
+
+ postFixup = let
+ rpath = lib.makeLibraryPath [ glibc stdenv.cc.cc unixODBC ];
+ in ''
+ for file in $(find $out/bin -type f); do
+ patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file"
+ patchelf --set-rpath ${rpath} $file
+ done
+ '';
+
+ meta = with lib; {
+ license = licenses.unfree;
+ platforms = [ "x86_64-linux" ];
+ };
+}
diff --git a/pkgs/rqlite.nix b/pkgs/rqlite.nix
new file mode 100644
index 0000000..a56d288
--- /dev/null
+++ b/pkgs/rqlite.nix
@@ -0,0 +1,17 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+let
+ version = "7.5.0";
+in buildGoModule {
+ pname = "rqlite";
+ inherit version;
+
+ src = fetchFromGitHub {
+ owner = "rqlite";
+ repo = "rqlite";
+ rev = "v${version}";
+ sha256 = "0hi5kq8w26i8azlcxy750zmbciga6l5n090ir261n00djigm5m59";
+ };
+
+ vendorSha256 = "sha256-YT1nK1vFmNCRJyWOiQhSJr83qW8uxkHXCZ81/Ch6qpg=";
+ doCheck = false;
+}
diff --git a/shenvs/anpi.nix b/shenvs/anpi.nix
index 2d19401..283fc42 100644
--- a/shenvs/anpi.nix
+++ b/shenvs/anpi.nix
@@ -4,7 +4,7 @@ pkgs: with pkgs.lib; {
symbolic
]))
- (python39.withPackages (packages: with packages; [
+ (python310.withPackages (packages: with packages; [
sympy
numpy
matplotlib
diff --git a/shenvs/config.nix b/shenvs/config.nix
index eb5033f..6c8c42d 100644
--- a/shenvs/config.nix
+++ b/shenvs/config.nix
@@ -6,7 +6,6 @@
];
workstation = [
- android-dev
el3310
randall
tabas
diff --git a/shenvs/dsp.nix b/shenvs/dsp.nix
index d5828e3..fb9d1c8 100644
--- a/shenvs/dsp.nix
+++ b/shenvs/dsp.nix
@@ -1,5 +1,7 @@
pkgs: {
paths = with pkgs; [
- octave
+ (octave.withPackages (packages: with packages; [
+ #communications
+ ]))
];
}
diff --git a/shenvs/stats.nix b/shenvs/stats.nix
new file mode 100644
index 0000000..04e4172
--- /dev/null
+++ b/shenvs/stats.nix
@@ -0,0 +1,11 @@
+pkgs: with pkgs.lib;
+ let py = with pkgs; python39.withPackages (packages: with packages; [
+ numpy
+ scipy
+ matplotlib
+ pandas
+ ipython
+ ]);
+in {
+ paths = [ py ];
+}
diff --git a/shenvs/tabas.nix b/shenvs/tabas.nix
index ebee6d3..fdb16ca 100644
--- a/shenvs/tabas.nix
+++ b/shenvs/tabas.nix
@@ -1,15 +1,30 @@
-pkgs: {
+pkgs: let
+ odbcinst =
+ { lib, writeTextDir, unixODBCDrivers }:
+ with lib; let
+ driver = unixODBCDrivers.msodbcsql17;
+ odbcinst."${driver.fancyName}" = {
+ Description = driver.meta.description;
+ Driver = "${driver}/${driver.driver}";
+ };
+ in writeTextDir "odbcinst.ini" (generators.toINI {} odbcinst);
+in {
paths = with pkgs; [
dotnet-sdk
nodejs
nodePackages.npm
postgresql_14
sqlite
+ local.mssql-tools
+ local.rqlite
];
enter = ''
export PGDATA=$HOME/vtmp/psql
export DOTNET_ROOT=${pkgs.dotnet-sdk}
- export PATH="$PATH:$HOME/.dotnet/tools";
+ export ODBCSYSINI=${pkgs.callPackage odbcinst {}}
+ export PATH="$PATH:$HOME/.dotnet/tools:$HOME/.npm-packages/bin";
+
+ alias straviasql='sqlcmd -S itcr.database.windows.net -U pmaestro -d straviatec'
'';
}
diff --git a/shenvs/tex.nix b/shenvs/tex.nix
index 2ba0670..12dfe73 100644
--- a/shenvs/tex.nix
+++ b/shenvs/tex.nix
@@ -3,11 +3,17 @@ pkgs: {
biber
(texlive.combine {
inherit (texlive)
+ appendix
scheme-medium
biblatex
biblatex-ieee
+ cleveref
csquotes
- enumitem;
+ enumitem
+ ieeetran
+ titlesec
+ titling
+ zref;
})
];
}