Compare commits

..

2 Commits

Author SHA1 Message Date
grimhilt
dc40d5200c global modif 2023-04-08 16:59:40 +02:00
grimhilt
2b8e14423c add nixshells 2023-04-08 16:59:16 +02:00
15 changed files with 146 additions and 11 deletions

View File

@ -3,7 +3,7 @@ sxhkd &
polybar bar -q &
bspc monitor eDP-1 -d 1 2 3 4 5 6 7 8
bspc monitor HDMI-1 -d 9 10
bspc monitor HDMI-1 -d 9 10 11
bspc rule -a Element desktop=^3
bspc rule -a Librewolf desktop=^2

View File

@ -5,6 +5,12 @@
nix-direnv
];
home = {
stateVersion = "22.05";
username = "grimhilt";
homeDirectory = "/home/grimhilt";
};
programs = {
zsh = {
enable = true;
@ -12,6 +18,8 @@
conf = "vim /etc/nixos/configuration.nix";
touchSens = "xinput --set-prop 14 'libinput Accel Speed'";
cShell = "nix-shell ~/.config/nixshell/c.nix";
clrShell = "cat /dev/null > ~/.bash_history && history -c";
nextsync = "/home/grimhilt/Documents/prog/c/nextsync/nextsync";
};
enableCompletion = true;
plugins = [

View File

@ -9,7 +9,9 @@ in
SDL2.dev
SDL2_image
SDL2_gfx
#SDL2_image.dev
sqlite
sqlite.dev
libconfig
];
nativeBuildInputs = with pkgs; [
pkg-config

8
.config/nixshell/cpp.nix Normal file
View File

@ -0,0 +1,8 @@
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
buildInputs = with pkgs; [
cmake
];
}

View File

@ -0,0 +1,23 @@
# When Cypress starts, it copies some files into `~/.config/Cypress/cy/production/browsers/chrome-stable/interactive/CypressExtension/`
# from the Nix Store, one of which it attempts to modify immediately after.
# As-is, this fails because the copied file keeps the read-only flag it had in
# the Store.
# Luckily, the code responsible is a plain text script that we can easily patch:
final: prev: {
cypress = prev.cypress.overrideAttrs (oldAttrs: {
installPhase = let
old = "copyExtension(pathToExtension, extensionDest)";
# This has only been tested against Cypress 6.0.0!
newForChrome =
"copyExtension(pathToExtension, extensionDest).then(() => fs_1.default.chmodAsync(extensionBg, 0o0644))";
newForFirefox =
"copyExtension(pathToExtension, extensionDest).then(() => fs.chmodAsync(extensionBg, 0o0644))";
in ''
sed -i 's/${old}/${newForChrome}/' \
./resources/app/packages/server/lib/browsers/chrome.js
sed -i 's/${old}/${newForFirefox}/' \
./resources/app/packages/server/lib/browsers/utils.js
'' + oldAttrs.installPhase;
});
}

9
.config/nixshell/go.nix Normal file
View File

@ -0,0 +1,9 @@
let
pkgs = import <nixpkgs> {};
unstable = import <unstable> {};
in
pkgs.mkShell {
buildInputs = with pkgs; [
go
];
}

View File

@ -1,6 +1,7 @@
with (import <nixpkgs> {});
mkShell {
buildInputs = [
let pkgs = import <nixpkgs> { overlays = [ (import ./cypress-overlay.nix) ]; };
in pkgs.mkShell {
name = "matrix-shell";
buildInputs = with pkgs; [
yarn
docker
act
@ -16,6 +17,7 @@ mkShell {
xorg.libXtst
xorg.xauth
xvfb-run
(with dotnetCorePackages; combinePackages [ sdk_5_0 ])
stdenv.cc.cc zlib glib dbus gtk3 atk pango freetype
fontconfig gdk-pixbuf cairo cups expat libgpg-error alsa-lib nspr nss
xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst
@ -29,6 +31,9 @@ mkShell {
shellHook = ''
export NAME="matrix-shell"
export NODE_OPTIONS=--openssl-legacy-provider
export CYPRESS_INSTALL_BINARY=0
export CYPRESS_RUN_BINARY=${pkgs.cypress}/bin/Cypress
'';
}
#https://gist.github.com/r-k-b/2485f977b476aa3f76a47329ce7f9ad4?permalink_comment_id=4402925

10
.config/nixshell/node.nix Normal file
View File

@ -0,0 +1,10 @@
with (import <nixpkgs> {});
mkShell {
buildInputs = [
yarn
nodejs
nodePackages.npm
nodePackages.nodemon
];
}

View File

@ -0,0 +1,7 @@
with import <nixpkgs> {};
mkShell {
buildInputs = [
postgresql
];
}

View File

@ -0,0 +1,15 @@
with (import <nixpkgs> {});
mkShell {
buildInputs = [
yarn
nodejs
] ++ (with pkgs.nodePackages; [
npm
nodemon
]);
shellHook = ''
export NAME="react-shell"
export NODE_OPTIONS=--openssl-legacy-provider
'';
}

14
.config/nixshell/rust.nix Normal file
View File

@ -0,0 +1,14 @@
let
pkgs = import <nixpkgs> {};
unstable = import <unstable> {};
in
pkgs.mkShell {
buildInputs = with pkgs; [
unstable.rustc
cargo
libressl
];
nativeBuildInputs = with pkgs; [
pkg-config
];
}

View File

@ -0,0 +1,24 @@
with (import <nixpkgs> {});
let
vueCli = pkgs.fetchFromGitHub {
owner = "vuejs";
repo = "vue-cli";
rev = "v4.5.15";
sha256 = "sha256-zJhk7tZAjqGLQOSTs3t5pj5qNtwersItGUM2oD4/R8o=";
};
in mkShell {
buildInputs = [
yarn
nodejs
vueCli
] ++ (with pkgs.nodePackages; [
npm
nodemon
]);
shellHook = ''
export NAME="vue-shell"
export PATH=$(yarn bin):$PATH
'';
}

View File

@ -43,7 +43,7 @@ screenchange-reload = true
[module/bspwm-desktops]
type = internal/bspwm
pin-workspaces = true
format = <label-state>
label-focused = %name%

View File

@ -110,8 +110,8 @@ super + shift + {h, j, k, l}
# Focus/Send to the given desktop
#super + {_,shift + }{ampersand,eacute,quotedbl,apostrophe,parenleft,minus,egrave,underscore,ccedilla,agrave}
super + {_,shift + }{ampersand,eacute,quotedbl,apostrophe,parenleft,a,z,e,r,t}
bspc {desktop -f,node -d} '^{1-9,10}'
super + {_,shift + }{ampersand,eacute,quotedbl,apostrophe,parenleft,a,z,e,r,t,y}
bspc {desktop -f,node -d} '^{1-9,10,11}'
# Focus the node for the given path jump
super + {p,b,comma,period}

View File

@ -7,7 +7,7 @@ let
unstable = import <unstable> {};
in {
programs.nix-ld.enable = true;
programs.nix-ld.enable = true;
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
./ledger.nix
@ -73,6 +73,11 @@ programs.nix-ld.enable = true;
};
virtualisation.docker.enable = true;
services.mysql.enable = true;
services.mysql.package = pkgs.mariadb;
services.mongodb.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
@ -123,6 +128,9 @@ programs.nix-ld.enable = true;
chromium
# utils
wireguard-tools
vlc
tldr
dolphin
git
ranger
@ -136,6 +144,7 @@ programs.nix-ld.enable = true;
# apps
element-desktop
zulip
nextcloud-client
discord
onlyoffice-bin
@ -149,8 +158,9 @@ programs.nix-ld.enable = true;
# devs
python311
geany
nasm
docker-compose
filezilla
insomnia
];
fonts.fonts = [ pkgs.font-awesome ];