mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-09 20:33:15 -06:00
Compare commits
7 commits
7b13b92a94
...
6de469a365
Author | SHA1 | Date | |
---|---|---|---|
6de469a365 | |||
52fb1204d6 | |||
1f1cf3a6be | |||
8aade59df9 | |||
198250d7e8 | |||
08963267d5 | |||
18f89b41a8 |
12 changed files with 172 additions and 51 deletions
34
flake.lock
34
flake.lock
|
@ -341,11 +341,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723058230,
|
"lastModified": 1723143710,
|
||||||
"narHash": "sha256-deu8zvgseDg2gQEnZiCda4TrbA6pleE9iItoZlsoMtE=",
|
"narHash": "sha256-qbjodK+UgnQ2YdtKmuI1XEG84SZlid39rQo6Ap9NTqI=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "9a09eac79b85c846e3a865a9078a3f8ff65a9259",
|
"rev": "4b4971c06fb02df00a2bd20b6b47b5d0e7d799a7",
|
||||||
"revCount": 5069,
|
"revCount": 5071,
|
||||||
"submodules": true,
|
"submodules": true,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/hyprwm/Hyprland/"
|
"url": "https://github.com/hyprwm/Hyprland/"
|
||||||
|
@ -534,11 +534,11 @@
|
||||||
"lix": {
|
"lix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723067281,
|
"lastModified": 1723140921,
|
||||||
"narHash": "sha256-JefJQFq8Y5iPXER0vQ0pXkgSbdim+CiuHF0qOaV7t6Y=",
|
"narHash": "sha256-WRt4kYvg6cpnatF5zUCIUeurU67M7b4dk3oYdZ0cu9M=",
|
||||||
"rev": "6fdb47f0b259a9ffbe4bdb349d6aaf03a0144092",
|
"rev": "e03cd8b3a6f70c60f359fd683c2b25f8eba4da0d",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/6fdb47f0b259a9ffbe4bdb349d6aaf03a0144092.tar.gz"
|
"url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/e03cd8b3a6f70c60f359fd683c2b25f8eba4da0d.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
|
@ -663,11 +663,11 @@
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722253092,
|
"lastModified": 1723124175,
|
||||||
"narHash": "sha256-37vyqHPx57deHhwvi4jwyNQLYkhm/rlVTYKOG1iahsc=",
|
"narHash": "sha256-w+rlZdbj4kn70uPJl4WrPDFoGEy0A9oJqw684nvZ9dY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "f373ad59ae5866f0f98216bd5c71526b373450d2",
|
"rev": "be1a6b2e4ddc34b9b6a297e7df2f2a2ecee24690",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -715,11 +715,11 @@
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1723065524,
|
"lastModified": 1723137378,
|
||||||
"narHash": "sha256-tDVR90hCs2WOJkyNxw/WX7RfelEENWO3d29rTR5sTf8=",
|
"narHash": "sha256-+MkYW9iZwi0D0hLeS5S1Ov3VNJ3twdTlHW7dRKeiCBY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "526290c52272f08f7f3b5b36ef67012a60600e5e",
|
"rev": "b412353cee03010813974408d5ae63f7422b176d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -1156,11 +1156,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722993798,
|
"lastModified": 1723080195,
|
||||||
"narHash": "sha256-cXzpRh+nUTBqo4mU+jzG4otZcpTfo29DC0apTmH2gtU=",
|
"narHash": "sha256-0g2ljOHZZtEZZG9GKusKiNx1+VKm+MEKzCOL2KdkLRg=",
|
||||||
"owner": "Cloudef",
|
"owner": "Cloudef",
|
||||||
"repo": "zig2nix",
|
"repo": "zig2nix",
|
||||||
"rev": "5a0307b91ad2cd6c60fd5817b6a88108e254730a",
|
"rev": "7320da37a4d45afb0aa94d22861a0fe07152c038",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ enabled, ... }:
|
{ enabled, config, ... }:
|
||||||
{
|
{
|
||||||
oizys = {
|
oizys = {
|
||||||
vpn = enabled;
|
vpn = enabled;
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
};
|
};
|
||||||
vbox = enabled;
|
vbox = enabled;
|
||||||
backups = enabled;
|
backups = enabled;
|
||||||
|
hp-scanner = enabled;
|
||||||
languages = [
|
languages = [
|
||||||
"misc"
|
"misc"
|
||||||
"nim"
|
"nim"
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
"tex"
|
"tex"
|
||||||
"zig"
|
"zig"
|
||||||
];
|
];
|
||||||
|
llm = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.restic.backups.gdrive = {
|
services.restic.backups.gdrive = {
|
||||||
|
@ -33,5 +35,5 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.daylin.extraGroups = [ "audio" ];
|
users.users.${config.oizys.user}.extraGroups = [ "audio" ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,13 +7,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.printing = enabled;
|
services.printing = enabled;
|
||||||
hardware.sane = enabled // {
|
|
||||||
extraBackends = [ pkgs.hplipWithPlugin ];
|
|
||||||
};
|
|
||||||
users.users.daylin.extraGroups = [
|
|
||||||
"scanner"
|
|
||||||
"lp"
|
|
||||||
];
|
|
||||||
|
|
||||||
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/lenovo/thinkpad/x1/9th-gen/default.nix
|
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/lenovo/thinkpad/x1/9th-gen/default.nix
|
||||||
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/common/pc/ssd/default.nix
|
# https://github.com/NixOS/nixos-hardware/blob/c478b3d56969006e015e55aaece4931f3600c1b2/common/pc/ssd/default.nix
|
||||||
|
|
|
@ -10,12 +10,22 @@ let
|
||||||
flake = flakeFromSystem system;
|
flake = flakeFromSystem system;
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = map [
|
overlays = [
|
||||||
"lix-module"
|
(flake.overlay "lix-module")
|
||||||
"hyprland-contrib"
|
(flake.overlay "hyprland-contrib")
|
||||||
"nixpkgs-wayland"
|
(flake.overlay "nixpkgs-wayland")
|
||||||
] flake.overlay;
|
];
|
||||||
};
|
};
|
||||||
|
myPackages = map [
|
||||||
|
"tsm"
|
||||||
|
"hyprman"
|
||||||
|
"zls"
|
||||||
|
] flake.pkg;
|
||||||
|
|
||||||
|
hyprPackages = with (flake.pkgs "hyprland"); [
|
||||||
|
default
|
||||||
|
xdg-desktop-portal-hyprland
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
makePackages =
|
makePackages =
|
||||||
|
@ -23,24 +33,18 @@ in
|
||||||
{
|
{
|
||||||
src = ./.;
|
src = ./.;
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[
|
(with pkgs; [
|
||||||
pkgs.pixi
|
pixi
|
||||||
pkgs.swww
|
swww
|
||||||
pkgs.nixVersions.stable
|
nixVersions.stable
|
||||||
]
|
|
||||||
++ (map [
|
|
||||||
"tsm"
|
|
||||||
"hyprman"
|
|
||||||
"zls"
|
|
||||||
] flake.pkg)
|
|
||||||
++ (with flake.pkgs "hyprland"; [
|
|
||||||
default
|
|
||||||
xdg-desktop-portal-hyprland
|
|
||||||
])
|
])
|
||||||
++ [
|
++ [
|
||||||
(flake.pkgs "roc").full
|
(flake.pkgs "roc").full
|
||||||
(flake.pkgs "zig2nix").zig.master.bin
|
(flake.pkgs "zig2nix").zig.master.bin
|
||||||
];
|
]
|
||||||
|
++ myPackages
|
||||||
|
++ hyprPackages;
|
||||||
|
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
mkdir "$out"
|
mkdir "$out"
|
||||||
|
|
|
@ -47,6 +47,9 @@ mkOizysModule config "hyprland" {
|
||||||
swww
|
swww
|
||||||
|
|
||||||
catppuccin-cursors.mochaDark
|
catppuccin-cursors.mochaDark
|
||||||
|
|
||||||
|
# not even clear why I need to add this but ¯\_(ツ)_/¯
|
||||||
|
kdePackages.qtwayland
|
||||||
])
|
])
|
||||||
++ [ (flake.pkg "hyprman") ]
|
++ [ (flake.pkg "hyprman") ]
|
||||||
|
|
||||||
|
|
24
modules/llm/default.nix
Normal file
24
modules/llm/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
enabled,
|
||||||
|
mkOizysModule,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (pkgs) python3Packages;
|
||||||
|
llm-ollama = python3Packages.callPackage ../../pkgs/llm-plugins/llm-ollama { };
|
||||||
|
llm-claude3 = python3Packages.callPackage ../../pkgs/llm-plugins/llm-claude-3 { };
|
||||||
|
llm = (
|
||||||
|
pkgs.llm.withPlugins [
|
||||||
|
llm-ollama
|
||||||
|
llm-claude3
|
||||||
|
]
|
||||||
|
);
|
||||||
|
in
|
||||||
|
|
||||||
|
mkOizysModule config "llm" {
|
||||||
|
services.ollama = enabled;
|
||||||
|
environment.systemPackages = [ llm ];
|
||||||
|
}
|
|
@ -28,6 +28,7 @@ in
|
||||||
|
|
||||||
gui
|
gui
|
||||||
fonts
|
fonts
|
||||||
|
hp-scanner
|
||||||
|
|
||||||
languages
|
languages
|
||||||
|
|
||||||
|
@ -37,6 +38,8 @@ in
|
||||||
|
|
||||||
nix-ld
|
nix-ld
|
||||||
restic
|
restic
|
||||||
|
|
||||||
|
llm
|
||||||
];
|
];
|
||||||
|
|
||||||
options.oizys = {
|
options.oizys = {
|
||||||
|
|
|
@ -25,6 +25,7 @@ let
|
||||||
kind ? "braille",
|
kind ? "braille",
|
||||||
}:
|
}:
|
||||||
"[1;3${number}m\n" + runes.${name}.${kind} + "\n[0m";
|
"[1;3${number}m\n" + runes.${name}.${kind} + "\n[0m";
|
||||||
|
|
||||||
cfg = config.oizys.rune;
|
cfg = config.oizys.rune;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,7 @@ def convert [] {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def nix [] {
|
def nix-file [] {
|
||||||
let rune = $in | convert
|
let rune = $in | convert
|
||||||
$"{
|
$"{
|
||||||
braille = ''
|
braille = ''
|
||||||
|
@ -34,8 +34,7 @@ ascii = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
def col [] {
|
def col [] {
|
||||||
$in
|
$in | reduce --fold "" {|it, acc|
|
||||||
| reduce --fold "" {|it, acc|
|
|
||||||
$acc + $'<td><img src="($it.url)"></td>'
|
$acc + $'<td><img src="($it.url)"></td>'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,7 +44,7 @@ def row [] { $"<tr>($in)</tr>" }
|
||||||
def readme [] {
|
def readme [] {
|
||||||
let runes = $in
|
let runes = $in
|
||||||
let dims = { rows: 2 cols: 2 }
|
let dims = { rows: 2 cols: 2 }
|
||||||
let cells = ($runes | chunks $dims.rows | each { $in | col | row})
|
let cells = ($runes | chunks $dims.rows | each { col | row})
|
||||||
let table = [ "<table>" ...$cells "</table>" ] | str join
|
let table = [ "<table>" ...$cells "</table>" ] | str join
|
||||||
|
|
||||||
$"# Runes\n\n($table)\n"
|
$"# Runes\n\n($table)\n"
|
||||||
|
@ -56,7 +55,7 @@ $runes
|
||||||
| save -f "README.md"
|
| save -f "README.md"
|
||||||
|
|
||||||
$runes
|
$runes
|
||||||
| each {|rune| $rune | nix }
|
| each { nix-file }
|
||||||
|
|
||||||
|
|
||||||
print "don't forget to run `nix fmt`!"
|
nix fmt
|
||||||
|
|
25
modules/services/scanner/hp-scanner.nix
Normal file
25
modules/services/scanner/hp-scanner.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
enabled,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
mkOizysModule,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
mkOizysModule config "hp-scanner" {
|
||||||
|
|
||||||
|
environment.systemPackages = [ pkgs.kdePackages.skanpage ];
|
||||||
|
|
||||||
|
hardware.sane = enabled // {
|
||||||
|
extraBackends = [ pkgs.hplipWithPlugin ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.avahi = enabled // {
|
||||||
|
nssmdns4 = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.${config.oizys.user}.extraGroups = [
|
||||||
|
"scanner"
|
||||||
|
"lp"
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
34
pkgs/llm-plugins/llm-claude-3/default.nix
Normal file
34
pkgs/llm-plugins/llm-claude-3/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
|
||||||
|
# build-system
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
|
|
||||||
|
# deps
|
||||||
|
anthropic,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "llm-claude-3";
|
||||||
|
version = "0.4";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "simonw";
|
||||||
|
repo = "llm-claude-3";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-5qF5BK319PNzB4XsLdYvtyq/SxBDdHJ9IoKWEnvNRp4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [ anthropic ];
|
||||||
|
|
||||||
|
dontCheckRuntimeDeps = true;
|
||||||
|
}
|
33
pkgs/llm-plugins/llm-ollama/default.nix
Normal file
33
pkgs/llm-plugins/llm-ollama/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchPypi,
|
||||||
|
|
||||||
|
# build-system
|
||||||
|
setuptools,
|
||||||
|
|
||||||
|
# deps
|
||||||
|
ollama,
|
||||||
|
pydantic,
|
||||||
|
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "llm-ollama";
|
||||||
|
version = "0.5.0";
|
||||||
|
pyproject = true;
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit version;
|
||||||
|
pname = "llm_ollama";
|
||||||
|
hash = "sha256-M3FF9fAZ2rr+toKoz/rLRPZxB7LIHqmZQXJBdKR4fVk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
ollama
|
||||||
|
pydantic
|
||||||
|
];
|
||||||
|
|
||||||
|
build-system = [ setuptools ];
|
||||||
|
|
||||||
|
# will only be used in environment with llm installed
|
||||||
|
dontCheckRuntimeDeps = true;
|
||||||
|
}
|
Loading…
Reference in a new issue