4 Commits

7 changed files with 128 additions and 9 deletions

View File

@ -34,6 +34,7 @@ inputs.darwin.lib.darwinSystem {
dark = true; dark = true;
}; };
mail.user = globals.user; mail.user = globals.user;
mole.enable = true;
atuin.enable = true; atuin.enable = true;
charm.enable = true; charm.enable = true;
neovim.enable = true; neovim.enable = true;

View File

@ -8,6 +8,7 @@
./firefox.nix ./firefox.nix
./kitty.nix ./kitty.nix
./media.nix ./media.nix
./mole.nix
./obsidian.nix ./obsidian.nix
./qbittorrent.nix ./qbittorrent.nix
./slack.nix ./slack.nix

View File

@ -159,11 +159,15 @@
xdg.mimeApps = { xdg.mimeApps = {
associations.added = { associations.added = {
"text.html" = [ "firefox.desktop" ]; "text/html" = [ "firefox.desktop" ];
}; };
defaultApplications = { defaultApplications = {
"text.html" = [ "firefox.desktop" ]; "text/html" = [ "firefox.desktop" ];
}; };
associations.removed = {
"text/html" = [ "wine-extension-htm.desktop" ];
};
}; };
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux { xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {

View File

@ -0,0 +1,110 @@
{
config,
pkgs,
lib,
...
}:
let
# Build kdl-py
kdl-py = pkgs.python311.pkgs.buildPythonPackage rec {
pname = "kdl-py";
version = "1.2.0";
pyproject = true;
src = pkgs.fetchPypi {
inherit pname version;
hash = "sha256-Y/P0bGJ33trc5E3PyUZyv25r8zMLkBIuATTCKFfimXM=";
};
build-system = [ pkgs.python311.pkgs.setuptools ];
# has no tests
doCheck = false;
};
mole = pkgs.python311.pkgs.buildPythonPackage rec {
pname = "mole";
version = "0.7.1";
pyproject = true;
src = pkgs.fetchFromGitHub {
owner = "eblume";
repo = pname;
rev = "30bb052a97050b1fa89c287855d834f7952b195a";
sha256 = "sha256-DUWsfyICCfFQ2ZQBYSQVoA3eLdKC8djUylKgGdHIyJo=";
};
patches = [
(builtins.toString (
pkgs.writeText "pyproject.toml.patch" ''
diff --git a/pyproject.toml b/pyproject.toml
index 12ce0f5..787e978 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,11 +12,11 @@ packages = [
[tool.poetry.dependencies]
python = "^3.11"
# Now back to the regular dependencies
-typer = {extras = ["all"], version = "^0.9"}
+typer = {extras = ["all"], version = "^0.12"}
todoist-api-python = "^2.1.3"
openai = "^1.2.4"
rich = "^13.4.2"
-watchdog = "^3.0.0"
+watchdog = "^4.0.0"
pydub = "^0.25.1"
requests = "^2.31.0"
pyyaml = "^6.0.1"
''
))
];
# Used during build time
nativeBuildInputs = [ pkgs.python311Packages.poetry-core ];
# Used during run time
buildInputs = [
pkgs._1password
pkgs.nb-cli
];
# Both build and run time
propagatedBuildInputs = [
pkgs.python311Packages.typer
pkgs.python311Packages.todoist-api-python
pkgs.python311Packages.openai
pkgs.python311Packages.rich
pkgs.python311Packages.watchdog
pkgs.python311Packages.pydub
pkgs.python311Packages.requests
pkgs.python311Packages.pyyaml
pkgs.python311Packages.pydantic
pkgs.python311Packages.pendulum
kdl-py
pkgs.ffmpeg
];
build-system = [ pkgs.python311.pkgs.setuptools ];
# has no tests
doCheck = false;
};
in
{
options = {
mole = {
enable = lib.mkEnableOption {
description = "Enable Mole.";
default = false;
};
};
};
config = lib.mkIf config.mole.enable {
home-manager.users.${config.user} = {
home.packages = [ mole ];
};
};
}

View File

@ -158,7 +158,11 @@
}; };
}; };
extraConfig = { extraConfig = {
general.unsafe-accounts-conf = true; general = {
unsafe-accounts-conf = true;
# log-file = "~/.cache/aerc.log";
# log-level = "debug";
};
viewer = { viewer = {
pager = "${pkgs.less}/bin/less -R"; pager = "${pkgs.less}/bin/less -R";
}; };

View File

@ -41,15 +41,15 @@ local function worklayout()
local u = hs.geometry.unitrect local u = hs.geometry.unitrect
-- set the layout -- set the layout
local left = { local left = {
{ "kitty", nil, WORK_ONLY_MONITOR, u(0, 0, 1 / 2, 1), nil, nil, visible = true }, { "WezTerm", nil, WORK_ONLY_MONITOR, u(0, 0, 1 / 2, 1), nil, nil, visible = true },
} }
local right = { local right = {
{ "Slack", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true }, { "Slack", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
{ "Mail", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true }, { "Mail", nil, WORK_ONLY_MONITOR, u(1 / 2, 0, 1 / 2, 1), nil, nil, visible = true },
{ "zoom.us", nil, WORK_ONLY_MONITOR, u(5 / 8, 1 / 4, 1 / 4, 1 / 2), nil, nil, visible = true }, { "zoom.us", nil, WORK_ONLY_MONITOR, u(5 / 8, 1 / 4, 1 / 4, 1 / 2), nil, nil, visible = true },
} }
local laptop = { local laptop = {
{ "Firefox", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true }, { "Firefox", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
{ "Obsidian", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true }, { "Obsidian", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
{ "Calendar", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true }, { "Calendar", nil, LAPTOP_MONITOR, u(0, 0, 1, 1), nil, nil, visible = true },
} }

View File

@ -54,9 +54,8 @@
]; ];
# Enable VA-API for hardware transcoding # Enable VA-API for hardware transcoding
hardware.opengl = { hardware.graphics = {
enable = true; enable = true;
driSupport = true;
extraPackages = [ pkgs.libva ]; extraPackages = [ pkgs.libva ];
}; };
environment.systemPackages = [ pkgs.libva-utils ]; environment.systemPackages = [ pkgs.libva-utils ];