feat: add offline search
This commit is contained in:
parent
707cbcca9e
commit
04407a5726
6 changed files with 130 additions and 11 deletions
108
flake.lock
108
flake.lock
|
@ -339,6 +339,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flake-utils_4": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_6"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ghostty": {
|
"ghostty": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
|
@ -789,6 +807,32 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ixx_2": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"search",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"search",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1729958008,
|
||||||
|
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "ixx",
|
||||||
|
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"ref": "v0.0.6",
|
||||||
|
"repo": "ixx",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"master": {
|
"master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729839280,
|
"lastModified": 1729839280,
|
||||||
|
@ -1033,6 +1077,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs_10": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1692934111,
|
||||||
|
"narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725194671,
|
"lastModified": 1725194671,
|
||||||
|
@ -1147,16 +1207,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_9": {
|
"nixpkgs_9": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1692934111,
|
"lastModified": 1731676054,
|
||||||
"narHash": "sha256-9EEE59v/esKNMR5zKbLRV9NoRPYvERw5jHQOnfr47bk=",
|
"narHash": "sha256-OZiZ3m8SCMfh3B6bfGC/Bm4x3qc1m2SVEAlkV6iY7Yg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1e44a037bbf4fcaba041436e65e87be88f3f495b",
|
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixpkgs-unstable",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -1318,10 +1378,31 @@
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_2",
|
"pre-commit-hooks": "pre-commit-hooks_2",
|
||||||
"river": "river",
|
"river": "river",
|
||||||
|
"search": "search",
|
||||||
"stable": "stable",
|
"stable": "stable",
|
||||||
"timers": "timers"
|
"timers": "timers"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"search": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils_4",
|
||||||
|
"ixx": "ixx_2",
|
||||||
|
"nixpkgs": "nixpkgs_9"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731874326,
|
||||||
|
"narHash": "sha256-FVodEap6GQT/1DSG5KOcpsrKXfG9gMNObQxW+HNJnW8=",
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"rev": "64832c4cf885350ad0e63a27fd7055bcfc7955f6",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NuschtOS",
|
||||||
|
"repo": "search",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"stable": {
|
"stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1729691686,
|
"lastModified": 1729691686,
|
||||||
|
@ -1428,10 +1509,25 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_7": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"timers": {
|
"timers": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs_9",
|
"nixpkgs": "nixpkgs_10",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1471,7 +1567,7 @@
|
||||||
},
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_6"
|
"systems": "systems_7"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1692799911,
|
"lastModified": 1692799911,
|
||||||
|
|
25
flake.nix
25
flake.nix
|
@ -65,6 +65,8 @@
|
||||||
arkenfox-userjs.url = "github:arkenfox/user.js";
|
arkenfox-userjs.url = "github:arkenfox/user.js";
|
||||||
arkenfox-userjs.flake = false;
|
arkenfox-userjs.flake = false;
|
||||||
|
|
||||||
|
search.url = "github:NuschtOS/search";
|
||||||
|
|
||||||
ghostty.url = "git+ssh://git@github.com/ghostty-org/ghostty";
|
ghostty.url = "git+ssh://git@github.com/ghostty-org/ghostty";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -115,7 +117,28 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
legacyPackages = pkgs;
|
legacyPackages = pkgs;
|
||||||
|
packages =
|
||||||
|
let
|
||||||
|
modules = [
|
||||||
|
{ name = "My stuff"; }
|
||||||
|
];
|
||||||
|
mkName = name: "${name} Search";
|
||||||
|
mkSearch = name: value: inputs'.search.packages.mkSearch {
|
||||||
|
urlPrefix = "file://${self}/flake.nix";
|
||||||
|
title = mkName name;
|
||||||
|
optionsJSON = "${(pkgs.nixosOptionsDoc { inherit (value) options; warningsAreErrors = false; }).optionsJSON}/share/doc/nixos/options.json";
|
||||||
|
};
|
||||||
|
serveSearch = name: value:
|
||||||
|
pkgs.writeShellApplication {
|
||||||
|
name = mkName name;
|
||||||
|
text = ''
|
||||||
|
xdg-open http://127.0.0.1:8080
|
||||||
|
static-web-server -p 8080 -d ${mkSearch name value}
|
||||||
|
'';
|
||||||
|
runtimeInputs = with pkgs; [ static-web-server xdg-utils ];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.lib.mapAttrs serveSearch self.nixosConfigurations;
|
||||||
};
|
};
|
||||||
|
|
||||||
flake = {
|
flake = {
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
webis.enable = true;
|
webis.enable = true;
|
||||||
impermanence.enable = true;
|
impermanence.enable = true;
|
||||||
};
|
};
|
||||||
terminal.package = pkgs.kitty;
|
|
||||||
programs.exercism.enable = true;
|
programs.exercism.enable = true;
|
||||||
services.mullvad.enable = true;
|
services.mullvad.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,6 +6,7 @@ with lib;
|
||||||
{
|
{
|
||||||
options.my.terminal = {
|
options.my.terminal = {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
description = "Terminal emulator package to use. Gets converted to path of bin automatically.";
|
||||||
type = types.package;
|
type = types.package;
|
||||||
apply = lib.getExe;
|
apply = lib.getExe;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,7 +10,7 @@ let
|
||||||
|
|
||||||
cfg = config.my.programs.python;
|
cfg = config.my.programs.python;
|
||||||
|
|
||||||
pythonVersions = map (version: "3${toString version}") (range 8 13);
|
pythonVersions = map (version: "3${toString version}") (range 9 13);
|
||||||
enabledVersions = filterAttrs (_: value: value.enable) cfg.versions;
|
enabledVersions = filterAttrs (_: value: value.enable) cfg.versions;
|
||||||
|
|
||||||
pythonPackages = version: attrNames pkgs."python${version}Packages";
|
pythonPackages = version: attrNames pkgs."python${version}Packages";
|
||||||
|
|
|
@ -15,10 +15,10 @@ in
|
||||||
enable = mkEnableOption "river";
|
enable = mkEnableOption "river";
|
||||||
keyboardLayouts = mkOption {
|
keyboardLayouts = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
description = "list of keyboard layouts";
|
description = "List of keyboard layouts.";
|
||||||
default = [ "us" "de" ];
|
default = [ "us" "de" ];
|
||||||
};
|
};
|
||||||
nvidiaSupport = mkEnableOption "nvidiaSupport";
|
nvidiaSupport = mkEnableOption "nvidia gpu support";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
Loading…
Reference in a new issue