mirror of
https://github.com/daylinmorgan/oizys.git
synced 2024-11-09 20:33:15 -06:00
Compare commits
No commits in common. "98dc2b807b2f9fefce8052abfd9c855082343e4a" and "2e4e12f36949c1cd41ad82842293b5b76c9d9ced" have entirely different histories.
98dc2b807b
...
2e4e12f369
12 changed files with 54 additions and 178 deletions
|
@ -1,4 +1,4 @@
|
|||
{ enabled, config, ... }:
|
||||
{ enabled, ... }:
|
||||
{
|
||||
oizys = {
|
||||
vpn = enabled;
|
||||
|
@ -11,7 +11,6 @@
|
|||
};
|
||||
vbox = enabled;
|
||||
backups = enabled;
|
||||
hp-scanner = enabled;
|
||||
languages = [
|
||||
"misc"
|
||||
"nim"
|
||||
|
@ -22,7 +21,6 @@
|
|||
"tex"
|
||||
"zig"
|
||||
];
|
||||
llm = enabled;
|
||||
};
|
||||
|
||||
services.restic.backups.gdrive = {
|
||||
|
@ -35,5 +33,5 @@
|
|||
];
|
||||
};
|
||||
|
||||
users.users.${config.oizys.user}.extraGroups = [ "audio" ];
|
||||
users.users.daylin.extraGroups = [ "audio" ];
|
||||
}
|
||||
|
|
|
@ -7,6 +7,13 @@
|
|||
};
|
||||
|
||||
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/common/pc/ssd/default.nix
|
||||
|
|
|
@ -10,22 +10,12 @@ let
|
|||
flake = flakeFromSystem system;
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(flake.overlay "lix-module")
|
||||
(flake.overlay "hyprland-contrib")
|
||||
(flake.overlay "nixpkgs-wayland")
|
||||
];
|
||||
overlays = map [
|
||||
"lix-module"
|
||||
"hyprland-contrib"
|
||||
"nixpkgs-wayland"
|
||||
] flake.overlay;
|
||||
};
|
||||
myPackages = map [
|
||||
"tsm"
|
||||
"hyprman"
|
||||
"zls"
|
||||
] flake.pkg;
|
||||
|
||||
hyprPackages = with (flake.pkgs "hyprland"); [
|
||||
default
|
||||
xdg-desktop-portal-hyprland
|
||||
];
|
||||
in
|
||||
{
|
||||
makePackages =
|
||||
|
@ -33,18 +23,24 @@ in
|
|||
{
|
||||
src = ./.;
|
||||
nativeBuildInputs =
|
||||
(with pkgs; [
|
||||
pixi
|
||||
swww
|
||||
nixVersions.stable
|
||||
[
|
||||
pkgs.pixi
|
||||
pkgs.swww
|
||||
pkgs.nixVersions.stable
|
||||
]
|
||||
++ (map [
|
||||
"tsm"
|
||||
"hyprman"
|
||||
"zls"
|
||||
] flake.pkg)
|
||||
++ (with flake.pkgs "hyprland"; [
|
||||
default
|
||||
xdg-desktop-portal-hyprland
|
||||
])
|
||||
++ [
|
||||
(flake.pkgs "roc").full
|
||||
(flake.pkgs "zig2nix").zig.master.bin
|
||||
]
|
||||
++ myPackages
|
||||
++ hyprPackages;
|
||||
|
||||
];
|
||||
}
|
||||
''
|
||||
mkdir "$out"
|
||||
|
|
|
@ -6,6 +6,13 @@
|
|||
flake,
|
||||
...
|
||||
}:
|
||||
let
|
||||
activate-snippet = ''
|
||||
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
||||
exec Hyprland
|
||||
fi
|
||||
'';
|
||||
in
|
||||
|
||||
mkOizysModule config "hyprland" {
|
||||
programs.hyprland = enabled;
|
||||
|
@ -40,9 +47,6 @@ mkOizysModule config "hyprland" {
|
|||
swww
|
||||
|
||||
catppuccin-cursors.mochaDark
|
||||
|
||||
# not even clear why I need to add this but ¯\_(ツ)_/¯
|
||||
kdePackages.qtwayland
|
||||
])
|
||||
++ [ (flake.pkg "hyprman") ]
|
||||
|
||||
|
@ -55,30 +59,20 @@ mkOizysModule config "hyprland" {
|
|||
#
|
||||
# dunst
|
||||
]);
|
||||
|
||||
services.getty = {
|
||||
extraArgs = [ "--skip-login" ];
|
||||
loginOptions = "-p -- ${config.oizys.user}";
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"bashrc.local".text = activate-snippet;
|
||||
"zshenv.local".text = activate-snippet;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(flake.overlay "hyprland-contrib")
|
||||
# (overlayFrom "nixpkgs-wayland")
|
||||
# (overlayFrom "hyprland")
|
||||
];
|
||||
# using the below to autostart Hyprland
|
||||
# broke my keybindings that were working before
|
||||
# services.getty = {
|
||||
# extraArgs = [ "--skip-login" ];
|
||||
# loginOptions = "-p -- ${config.oizys.user}";
|
||||
# };
|
||||
#
|
||||
# environment.etc =
|
||||
# let
|
||||
# activate-snippet = ''
|
||||
# if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
|
||||
# exec Hyprland
|
||||
# fi
|
||||
# '';
|
||||
# in
|
||||
# {
|
||||
# "bashrc.local".text = activate-snippet;
|
||||
# "zshenv.local".text = activate-snippet;
|
||||
# };
|
||||
#
|
||||
|
||||
}
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
enabled,
|
||||
mkOizysModule,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs) python3Packages;
|
||||
llm-ollama = python3Packages.callPackage ./llm-plugins/llm-ollama { };
|
||||
llm-claude3 = python3Packages.callPackage ./llm-plugins/llm-claude-3 { };
|
||||
llm = (
|
||||
pkgs.llm.withPlugins [
|
||||
llm-ollama
|
||||
llm-claude3
|
||||
]
|
||||
);
|
||||
in
|
||||
|
||||
mkOizysModule config "llm" {
|
||||
services.ollama = enabled;
|
||||
environment.systemPackages = [ llm ];
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
{
|
||||
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;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
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;
|
||||
}
|
|
@ -12,7 +12,6 @@ let
|
|||
mkOption
|
||||
literalExpression
|
||||
types
|
||||
optionals
|
||||
;
|
||||
cfg = config.oizys.nix-ld;
|
||||
|
||||
|
@ -104,7 +103,8 @@ in
|
|||
|
||||
config =
|
||||
let
|
||||
libs = defaultLibraries ++ cfg.extra-libraries ++ (optionals cfg.overkill.enable overkillLibraries);
|
||||
libs =
|
||||
defaultLibraries ++ cfg.extra-libraries ++ (if cfg.overkill.enable then overkillLibraries else [ ]);
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
programs.nix-ld = enabled // {
|
||||
|
|
|
@ -28,7 +28,6 @@ in
|
|||
|
||||
gui
|
||||
fonts
|
||||
hp-scanner
|
||||
|
||||
languages
|
||||
|
||||
|
@ -38,8 +37,6 @@ in
|
|||
|
||||
nix-ld
|
||||
restic
|
||||
|
||||
llm
|
||||
];
|
||||
|
||||
options.oizys = {
|
||||
|
|
|
@ -25,7 +25,6 @@ let
|
|||
kind ? "braille",
|
||||
}:
|
||||
"[1;3${number}m\n" + runes.${name}.${kind} + "\n[0m";
|
||||
|
||||
cfg = config.oizys.rune;
|
||||
in
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ def convert [] {
|
|||
}
|
||||
}
|
||||
|
||||
def nix-file [] {
|
||||
def nix [] {
|
||||
let rune = $in | convert
|
||||
$"{
|
||||
braille = ''
|
||||
|
@ -34,7 +34,8 @@ ascii = ''
|
|||
}
|
||||
|
||||
def col [] {
|
||||
$in | reduce --fold "" {|it, acc|
|
||||
$in
|
||||
| reduce --fold "" {|it, acc|
|
||||
$acc + $'<td><img src="($it.url)"></td>'
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +45,7 @@ def row [] { $"<tr>($in)</tr>" }
|
|||
def readme [] {
|
||||
let runes = $in
|
||||
let dims = { rows: 2 cols: 2 }
|
||||
let cells = ($runes | chunks $dims.rows | each { col | row})
|
||||
let cells = ($runes | chunks $dims.rows | each { $in | col | row})
|
||||
let table = [ "<table>" ...$cells "</table>" ] | str join
|
||||
|
||||
$"# Runes\n\n($table)\n"
|
||||
|
@ -55,7 +56,7 @@ $runes
|
|||
| save -f "README.md"
|
||||
|
||||
$runes
|
||||
| each { nix-file }
|
||||
| each {|rune| $rune | nix }
|
||||
|
||||
|
||||
nix fmt
|
||||
print "don't forget to run `nix fmt`!"
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
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"
|
||||
];
|
||||
|
||||
}
|
Loading…
Reference in a new issue