Skip to content

Commit 7fc9328

Browse files
committed
some stuff
1 parent 62741fe commit 7fc9328

File tree

7 files changed

+98
-12
lines changed

7 files changed

+98
-12
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,19 @@
3434
├── secrets
3535
│ └── sops secret files
3636
```
37+
38+
## Create a Live-ISO
39+
40+
Live-ISOs are great thing.
41+
They can be used to test simple, not persistant, things in a VM or being used to boot from.
42+
This is mostly useful for secruity things.
43+
44+
```bash
45+
sudo just home-iso
46+
```
47+
48+
### Issues
49+
50+
- [x] Nvidia driver is not being unloaded correctly
51+
- [ ] The fonts are not correctly used resulting in unknown special characters
52+
- [ ] Number of graphical applications is unnecessary high

home-manager/desktop/app.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@
126126
# Rest Client
127127
pkgs.insomnia
128128

129+
# Needs to be called with --disable-gpu
130+
pkgs-unstable.lmstudio
131+
129132
(pkgs.callPackage ../../pkgs/pince.nix { })
133+
(pkgs.callPackage ../../pkgs/easyeda.nix { })
130134
];
131135
}

home-manager/desktop/editors.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525

2626
# text-editors
2727
pkgs.vim
28-
pkgs.zed-editor
28+
pkgs-unstable.zed-editor
2929
];
3030
}

home-manager/shell.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ in
4949
# '';
5050
};
5151

52+
# Don't autostart Hyprland with "no-desktop" specialisation
53+
specialisation.no-desktop.configuration = {
54+
programs.zsh.initContent = ''
55+
bindkey "^[[1;5C" forward-word
56+
bindkey "^[[1;5D" backward-word
57+
'';
58+
};
59+
5260
programs.bash = {
5361
enable = true;
5462
};

hosts/img/configuration.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ in
2828
"console=tty1"
2929
];
3030

31+
# Disable NVIDIA
3132
boot.blacklistedKernelModules = [ "nouveau" ];
32-
33+
hardware.nvidia-container-toolkit.enable = lib.mkForce false;
34+
services.xserver.videoDrivers = lib.mkForce [ ];
3335
networking.networkmanager.enable = lib.mkForce false;
3436
hardware.nvidia = lib.mkForce {
3537
modesetting.enable = false;

modules/drivers/opengl.nix

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
{ ... }:
22

3-
# let
4-
# pkgs-unstable = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
5-
# in
63
{
74
hardware.graphics.enable = true;
8-
9-
# hardware.graphics = {
10-
# package = pkgs-unstable.mesa;
11-
12-
# enable32Bit = true;
13-
# package32 = pkgs-unstable.pkgsi686Linux.mesa;
14-
# };
155
}

pkgs/easyeda.nix

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
stdenv,
3+
fetchurl,
4+
unzip,
5+
autoPatchelfHook,
6+
pkgs,
7+
makeWrapper,
8+
lib,
9+
wrapGAppsHook,
10+
}:
11+
12+
stdenv.mkDerivation rec {
13+
name = "easyeda";
14+
version = "6.5.46";
15+
16+
src = fetchurl {
17+
url = "https://image.easyeda.com/files/easyeda-linux-x64-${version}.zip";
18+
sha256 = "sha256-7zFnlAmGbbDJXFPZODDoQxiXwXvFkQTE7Kb4S0oXhUg=";
19+
};
20+
21+
nativeBuildInputs = [
22+
unzip
23+
autoPatchelfHook
24+
makeWrapper
25+
wrapGAppsHook
26+
];
27+
28+
buildInputs = with pkgs; [
29+
glib
30+
nss
31+
libdrm
32+
mesa
33+
alsa-lib
34+
libGL
35+
udev
36+
];
37+
38+
unpackPhase = ''
39+
unzip $src -d .
40+
'';
41+
42+
installPhase = ''
43+
mkdir -p $out/opt/easyeda $out/share/applications/ $out/bin
44+
cp -rf easyeda-linux-x64/* $out/opt/easyeda
45+
chmod -R 777 $out/opt/easyeda
46+
47+
ln -s $out/opt/easyeda/easyeda $out/bin/easyeda
48+
49+
cp $out/opt/easyeda/EASYEDA.dkt $out/share/applications/EASYEDA.desktop
50+
substituteInPlace $out/share/applications/EASYEDA.desktop \
51+
--replace 'Exec=/opt/easyeda/easyeda %f' "Exec=easyeda %f" \
52+
--replace "Icon=" "Icon=$out"
53+
'';
54+
55+
postFixup = ''
56+
makeWrapper $out/opt/easyeda/easyeda $out/bin/easyeda \
57+
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}:$out/opt/easyeda
58+
'';
59+
60+
meta = with lib; {
61+
description = "EasyEDA Std Edition";
62+
homepage = "https://easyeda.com/";
63+
license = licenses.unfree;
64+
platforms = [ "x86_64-linux" ];
65+
};
66+
}

0 commit comments

Comments
 (0)