Add repl
This commit is contained in:
parent
8dd92acdf4
commit
a99394d8c1
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
# nixpkgs-mesa.url = github:nixos/nixpkgs-channels/bdac777becdbb8780c35be4f552c9d4518fe0bdb;
|
|
||||||
lambda-launcher.url = "github:balsoft/lambda-launcher";
|
lambda-launcher.url = "github:balsoft/lambda-launcher";
|
||||||
deploy-rs.url = "github:serokell/deploy-rs";
|
deploy-rs.url = "github:serokell/deploy-rs";
|
||||||
flake-compat = {
|
flake-compat = {
|
||||||
|
@ -216,6 +216,9 @@ If point was already at that position, move point to beginning of line."
|
|||||||
;; (load-theme 'xresources t)
|
;; (load-theme 'xresources t)
|
||||||
;; (set-frame-font "IBM Plex Mono 11" nil t)))))
|
;; (set-frame-font "IBM Plex Mono 11" nil t)))))
|
||||||
|
|
||||||
|
(add-to-list 'default-frame-alist '(font . "IBM Plex Mono 11"))
|
||||||
|
(set-face-attribute 'default nil :font "IBM Plex Mono 11")
|
||||||
|
|
||||||
(setq inhibit-startup-screen t)
|
(setq inhibit-startup-screen t)
|
||||||
|
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
|
@ -10,7 +10,6 @@ let
|
|||||||
in {
|
in {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(import inputs.emacs-overlay)
|
(import inputs.emacs-overlay)
|
||||||
# inputs.nix.overlay
|
|
||||||
(self: super: rec {
|
(self: super: rec {
|
||||||
nix = super.nix // {
|
nix = super.nix // {
|
||||||
meta = super.nix.meta // { platforms = lib.platforms.unix; };
|
meta = super.nix.meta // { platforms = lib.platforms.unix; };
|
||||||
@ -23,8 +22,6 @@ in {
|
|||||||
|
|
||||||
inherit (nur.balsoft.pkgs) termNote nix-patch;
|
inherit (nur.balsoft.pkgs) termNote nix-patch;
|
||||||
|
|
||||||
# inherit (old) mautrix-telegram;
|
|
||||||
|
|
||||||
lambda-launcher = inputs.lambda-launcher.defaultPackage.x86_64-linux;
|
lambda-launcher = inputs.lambda-launcher.defaultPackage.x86_64-linux;
|
||||||
|
|
||||||
simple-osd = inputs.simple-osd-daemons.packages.x86_64-linux;
|
simple-osd = inputs.simple-osd-daemons.packages.x86_64-linux;
|
||||||
@ -33,8 +30,6 @@ in {
|
|||||||
|
|
||||||
yt-utilities = inputs.yt-utilities.defaultPackage.x86_64-linux;
|
yt-utilities = inputs.yt-utilities.defaultPackage.x86_64-linux;
|
||||||
|
|
||||||
# mopidy-youtube = super.mopidy-youtube.overrideAttrs (_: { src = inputs.mopidy-youtube; });
|
|
||||||
|
|
||||||
nerdfonts = nur.balsoft.pkgs.roboto-mono-nerd;
|
nerdfonts = nur.balsoft.pkgs.roboto-mono-nerd;
|
||||||
|
|
||||||
weechatScripts.wee-slack = super.weechatScripts.wee-slack.overrideAttrs (oa: {
|
weechatScripts.wee-slack = super.weechatScripts.wee-slack.overrideAttrs (oa: {
|
||||||
@ -45,8 +40,6 @@ in {
|
|||||||
nix-zsh-completions = super.nix-zsh-completions.overrideAttrs (_: {
|
nix-zsh-completions = super.nix-zsh-completions.overrideAttrs (_: {
|
||||||
src = inputs.nix-zsh-completions;
|
src = inputs.nix-zsh-completions;
|
||||||
});
|
});
|
||||||
|
|
||||||
# inherit (inputs.nixpkgs-mesa.legacyPackages.x86_64-linux) sway mesa_drivers;
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
nixpkgs.config = {
|
nixpkgs.config = {
|
||||||
|
@ -96,11 +96,20 @@
|
|||||||
preexec_functions+=( notifyosd-preexec )
|
preexec_functions+=( notifyosd-preexec )
|
||||||
XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH
|
XDG_DATA_DIRS=$XDG_DATA_DIRS:$GSETTINGS_SCHEMAS_PATH
|
||||||
|
|
||||||
|
function repl() {
|
||||||
|
flake_compat="$(nix flake prefetch --json github:edolstra/flake-compat | ${pkgs.jq}/bin/jq -r .storePath)"
|
||||||
|
source="$(nix flake prefetch --json "$1" | ${pkgs.jq}/bin/jq -r .storePath)"
|
||||||
|
TEMP="$(mktemp --suffix=.nix)"
|
||||||
|
echo "let self = (import $flake_compat { src = \"$source\"; }).defaultNix; in self // self.legacyPackages.\''${builtins.currentSystem} or { } // self.packages.\''${builtins.currentSystem} or { }" > "$TEMP"
|
||||||
|
nix repl "$TEMP"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function ss() { nix shell "self#$1" }
|
function ss() { nix shell "self#$1" }
|
||||||
function es() { nix edit "self#$1" }
|
function es() { nix edit "self#$1" }
|
||||||
function bs() { nix build "self#$1" }
|
function bs() { nix build "self#$1" }
|
||||||
function rs() { nix run "self#$1" }
|
|
||||||
function is() { nix search "self#$1" }
|
function is() { nix search "self#$1" }
|
||||||
|
function rs() { repl self }
|
||||||
|
|
||||||
source ${pkgs.nix-zsh-completions}/share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh
|
source ${pkgs.nix-zsh-completions}/share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh
|
||||||
fpath=(${pkgs.nix-zsh-completions}/share/zsh/site-functions $fpath)
|
fpath=(${pkgs.nix-zsh-completions}/share/zsh/site-functions $fpath)
|
||||||
|
Loading…
Reference in New Issue
Block a user