Compare commits

..

4 Commits

13 changed files with 183 additions and 57 deletions

View File

@ -315,6 +315,22 @@
"type": "github"
}
},
"gen-nvim": {
"flake": false,
"locked": {
"lastModified": 1702112421,
"narHash": "sha256-oF6LT8Q6Dp4mKDNTcm/hx0F8a6iN/HvpZKgGRkctrI4=",
"owner": "David-Kunz",
"repo": "gen.nvim",
"rev": "1319b03357fd7017bbaf1d45cd6b72bd9e106226",
"type": "github"
},
"original": {
"owner": "David-Kunz",
"repo": "gen.nvim",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@ -1043,6 +1059,7 @@
"disko": "disko",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"gen-nvim": "gen-nvim",
"hmts-nvim": "hmts-nvim",
"home-manager": "home-manager_2",
"hypr-contrib": "hypr-contrib",

View File

@ -54,6 +54,8 @@
neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search";
statuscol-nvim.flake = false;
statuscol-nvim.url = "github:luukvbaal/statuscol.nvim/0.10"; # HACK: fix for neovim-nightly
gen-nvim.flake = false;
gen-nvim.url = "github:David-Kunz/gen.nvim";
# Hyprland
hypr-contrib.url = "github:hyprwm/contrib";

View File

@ -26,6 +26,7 @@
keyboardLayouts = [ "us" "de" ];
};
services.wallpaper.enable = true;
services.ollama.enable = true;
programs.ledger.enable = true;
};
@ -53,9 +54,11 @@
kernelPackages = pkgs.linuxPackages_latest;
# BOOT
supportedFilesystems = [ "zfs" "btrfs" "ntfs" ];
loader.systemd-boot.enable = true;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelModules = [ "lm92" "drivetemp" ];
};

View File

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ lib, ... }:
{
# needed for zfs pool
@ -83,26 +83,9 @@
};
};
# rollback to blank
boot.initrd.systemd.services.rollback = {
description = "Rollback ZFS datasets to a pristine state";
wantedBy = [
"initrd.target"
];
after = [
"zfs-import-zroot.service"
];
before = [
"sysroot.mount"
];
path = with pkgs; [
zfs
];
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
script = ''
zfs rollback -r zroot/encrypted/root@blank && echo "rollback complete"
'';
};
boot.initrd.postDeviceCommands = lib.mkAfter ''
zfs rollback -r zroot/encrypted/root@blank && echo "rollback complete"
'';
fileSystems."/persist".neededForBoot = true;
# HACK: to fix issue of agenix running before impermanence
age.identityPaths = [

View File

@ -11,7 +11,6 @@
initrd = {
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = [ ];
luks.devices."enc".device = "/dev/disk/by-uuid/30025a9f-44cf-4074-8ae2-d4925efd67dd";
};
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];

View File

@ -16,7 +16,7 @@ in
yubikey = {
enable = mkDefault true;
luksSupport = {
enable = mkDefault true;
enable = mkDefault false;
devices = mkDefault [ "enc" ];
};
};

View File

@ -30,8 +30,8 @@ in
"browser.search.suggest.enabled" = true;
"browser.urlbar.suggest.searches" = true;
# startup page
"browser.startup.page" = 0;
# Restore previous session on startup
"browser.startup.page" = 3;
# drm
"media.eme.enabled" = true;
@ -41,30 +41,6 @@ in
# disable letterboxing
"privacy.resistFingerprinting.letterboxing" = false;
## OTHER
# Dont show warning when accessing about:config
"browser.aboutConfig.showWarning" = false;
# Hide bookmarks
"browser.toolbars.bookmarks.visibility" = "never";
# Smooth scrolling
"general.smoothScroll.lines.durationMaxMS" = 125;
"general.smoothScroll.lines.durationMinMS" = 125;
"general.smoothScroll.mouseWheel.durationMaxMS" = 200;
"general.smoothScroll.mouseWheel.durationMinMS" = 100;
"general.smoothScroll.msdPhysics.enabled" = true;
"general.smoothScroll.other.durationMaxMS" = 125;
"general.smoothScroll.other.durationMinMS" = 125;
"general.smoothScroll.pages.durationMaxMS" = 125;
"general.smoothScroll.pages.durationMinMS" = 125;
"mousewheel.min_line_scroll_amount" = 40;
"mousewheel.system_scroll_override_on_root_content.enabled" = true;
"mousewheel.system_scroll_override_on_root_content.horizontal.factor" = 175;
"mousewheel.system_scroll_override_on_root_content.vertical.factor" = 175;
"toolkit.scrollbox.horizontalScrollDistance" = 6;
"toolkit.scrollbox.verticalScrollDistance" = 2;
};
};
};

View File

@ -50,10 +50,106 @@ in
keepassxc-browser
languagetool
multi-account-containers
sponsorblock
temporary-containers
ublock-origin
wikiwand-wikipedia-modernized
vimium
];
settings = {
# Disable Pocket
"extensions.pocket.enabled" = false;
# Disable Activity Stream
# https://wiki.mozilla.org/Firefox/Activity_Stream
"browser.newtabpage.activity-stream.enabled" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.discoverystreamfeed" = false;
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false;
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "";
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.searchEngines" = "";
"browser.newtabpage.pinned" = "[]";
# Disable new tab tile ads & preload
# http://www.thewindowsclub.com/disable-remove-ad-tiles-from-firefox
# http://forums.mozillazine.org/viewtopic.php?p=13876331#p13876331
# https://wiki.mozilla.org/Tiles/Technical_Documentation#Ping
# https://gecko.readthedocs.org/en/latest/browser/browser/DirectoryLinksProvider.html#browser-newtabpage-directory-source
# https://gecko.readthedocs.org/en/latest/browser/browser/DirectoryLinksProvider.html#browser-newtabpage-directory-ping
"browser.newtabpage.enhanced" = false;
"browser.newtabpage.introShown" = true;
"browser.newtab.preload" = false;
"browser.newtabpage.directory.ping" = "";
"browser.newtabpage.directory.source" = "data:text/plain,{}";
# Disable some not so useful functionality.
"browser.disableResetPrompt" = true; # "Looks like you haven't started Firefox in a while."
"browser.onboarding.enabled" = false; # "New to Firefox? Let's get started!" tour
"browser.aboutConfig.showWarning" = false; # Warning when opening about:config
"extensions.shield-recipe-client.enabled" = false;
# do not offer to save passwords = nor allow the user to enable the feature
"signon.rememberSignons" = false;
"signon.rememberSignons.visibilityToggle" = false;
# send do not track header
"privacy.donottrackheader.enabled" = true;
# Hide bookmarks
"browser.toolbars.bookmarks.visibility" = "never";
# Smooth scrolling
"general.smoothScroll.lines.durationMaxMS" = 125;
"general.smoothScroll.lines.durationMinMS" = 125;
"general.smoothScroll.mouseWheel.durationMaxMS" = 200;
"general.smoothScroll.mouseWheel.durationMinMS" = 100;
"general.smoothScroll.msdPhysics.enabled" = true;
"general.smoothScroll.other.durationMaxMS" = 125;
"general.smoothScroll.other.durationMinMS" = 125;
"general.smoothScroll.pages.durationMaxMS" = 125;
"general.smoothScroll.pages.durationMinMS" = 125;
"mousewheel.min_line_scroll_amount" = 40;
"mousewheel.system_scroll_override_on_root_content.enabled" = true;
"mousewheel.system_scroll_override_on_root_content.horizontal.factor" = 175;
"mousewheel.system_scroll_override_on_root_content.vertical.factor" = 175;
"toolkit.scrollbox.horizontalScrollDistance" = 6;
"toolkit.scrollbox.verticalScrollDistance" = 2;
# Do not check if Firefox is the default browser
"browser.shell.checkDefaultBrowser" = false;
# Reduce search engine noise in the urlbar's completion window. The
# shortcuts and suggestions will still work, but Firefox won't clutter
# its UI with reminders that they exist.
"browser.urlbar.suggest.searches" = false;
"browser.urlbar.shortcuts.bookmarks" = false;
"browser.urlbar.shortcuts.history" = false;
"browser.urlbar.shortcuts.tabs" = false;
"browser.urlbar.showSearchSuggestionsFirst" = false;
"browser.urlbar.speculativeConnect.enabled" = false;
# https://bugzilla.mozilla.org/1642623
"browser.urlbar.dnsResolveSingleWordsAfterSearch" = 0;
# https://blog.mozilla.org/data/2021/09/15/data-and-firefox-suggest/
"browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
# Show whole URL in address bar
"browser.urlbar.trimURLs" = false;
# auto enable addons
"extensions.autoDisableScopes" = 0;
# Disable Form autofill
# https://wiki.mozilla.org/Firefox/Features/Form_Autofill
"browser.formfill.enable" = false;
"extensions.formautofill.addresses.enabled" = false;
"extensions.formautofill.available" = "off";
"extensions.formautofill.creditCards.available" = false;
"extensions.formautofill.creditCards.enabled" = false;
"extensions.formautofill.heuristics.enabled" = false;
};
};
};
};

View File

@ -111,7 +111,7 @@ in
}
misc {
vrr = 1
vrr = 0
mouse_move_enables_dpms = true
key_press_enables_dpms = true
force_default_wallpaper = 0

View File

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
with builtins;
{
@ -332,5 +332,25 @@ with builtins;
};
cmd = [ "Neogen" ];
}
{
plugin = gen-nvim;
init = /* lua */ ''
require("gen").setup({
model = "zephyr:7b-beta", -- The default model to use.
display_mode = "float", -- The display mode. Can be "float" or "split".
show_prompt = false, -- Shows the Prompt submitted to Ollama.
show_model = false, -- Displays which model you are using at the beginning of your chat session.
no_auto_close = false, -- Never closes the window automatically.
init = function(options) end,
-- Function to initialize Ollama
command = "${lib.getExe pkgs.curl} --silent --no-buffer -X POST http://localhost:11434/api/generate -d $body",
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
-- This can also be a lua function returning a command string, with options as the input parameter.
-- The executed command must return a JSON object with { response, context }
-- (context property is optional).
debug = false -- Prints errors and the command which is run.
})
'';
}
];
}

View File

@ -12,9 +12,6 @@ with builtins;
highlight = {
enable = true;
};
context_commentstring = {
enable = true;
};
textobjects =
{
select =

View File

@ -0,0 +1,27 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.my.services.ollama;
in
{
options.my.services.ollama = {
enable = mkEnableOption "ollama";
package = mkOption {
type = types.package;
default = pkgs.ollama;
};
};
config = mkIf cfg.enable {
systemd.user.services.ollama = {
after = [ "network.target" ];
serviceConfig = {
Type = "simple";
Restart = "on-failure";
RestartSec = "1s";
ExecStart = "${getExe cfg.package} serve";
};
};
};
}

View File

@ -61,5 +61,11 @@ with lib.my;
version = mkVersionInput inputs.neotest-python;
src = inputs.neotest-python;
});
gen-nvim = prev.vimUtils.buildVimPlugin {
pname = "gen-nvim";
version = mkVersionInput inputs.gen-nvim;
src = inputs.gen-nvim;
};
};
}