mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: put builtin in scope when needed
This commit is contained in:
parent
d7d55059ce
commit
8271aea4ba
9 changed files with 38 additions and 34 deletions
|
|
@ -7,7 +7,7 @@
|
|||
let
|
||||
home = config.home.homeDirectory;
|
||||
in
|
||||
builtins.fromTOML ''
|
||||
fromTOML ''
|
||||
[global]
|
||||
strict_env = true
|
||||
[whitelist]
|
||||
|
|
|
|||
|
|
@ -4,20 +4,21 @@
|
|||
config,
|
||||
...
|
||||
}:
|
||||
with builtins;
|
||||
{
|
||||
imports = [ ./aliasesAbbrs.nix ];
|
||||
|
||||
programs.fish =
|
||||
let
|
||||
readConfig = n: builtins.readFile ./conf.d/${n}.fish;
|
||||
readConfigs = ns: builtins.concatStringsSep "\n" (map readConfig ns);
|
||||
readConfig = n: readFile ./conf.d/${n}.fish;
|
||||
readConfigs = ns: concatStringsSep "\n" (map readConfig ns);
|
||||
|
||||
add_paths =
|
||||
ps:
|
||||
lib.trivial.pipe ps [
|
||||
(lib.lists.reverseList) # source paths in reverse order
|
||||
(map (p: "fish_add_path -m ${p}"))
|
||||
(builtins.concatStringsSep "\n")
|
||||
(concatStringsSep "\n")
|
||||
(s: s + "\n")
|
||||
];
|
||||
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
cs:
|
||||
lib.trivial.pipe cs [
|
||||
(map (c: "source ${c}/share/fish/vendor_completions.d/*.fish"))
|
||||
(builtins.concatStringsSep "\n")
|
||||
(concatStringsSep "\n")
|
||||
(s: s + "\n")
|
||||
];
|
||||
in
|
||||
|
|
@ -66,10 +67,10 @@
|
|||
(map (
|
||||
n: {
|
||||
name = n;
|
||||
value = builtins.readFile ./functions/${n}.fish;
|
||||
value = readFile ./functions/${n}.fish;
|
||||
}
|
||||
))
|
||||
builtins.listToAttrs
|
||||
listToAttrs
|
||||
];
|
||||
in
|
||||
makeFishFunctions [
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
neovim-pin,
|
||||
...
|
||||
}:
|
||||
with builtins;
|
||||
{
|
||||
programs.neovim = {
|
||||
package = neovim-pin.neovim-unwrapped;
|
||||
|
|
@ -32,11 +33,11 @@
|
|||
|
||||
home.file =
|
||||
let
|
||||
fr_utf-8_spl = builtins.fetchurl {
|
||||
fr_utf-8_spl = fetchurl {
|
||||
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl";
|
||||
sha256 = "abfb9702b98d887c175ace58f1ab39733dc08d03b674d914f56344ef86e63b61";
|
||||
};
|
||||
fr_utf-8_sug = builtins.fetchurl {
|
||||
fr_utf-8_sug = fetchurl {
|
||||
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug";
|
||||
sha256 = "0294bc32b42c90bbb286a89e23ca3773b7ef50eff1ab523b1513d6a25c6b3f58";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
with builtins;
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
settings = fromTOML (builtins.readFile ./starship.toml);
|
||||
settings = fromTOML (readFile ./starship.toml);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
with builtins;
|
||||
{
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
|
|
@ -7,6 +8,6 @@
|
|||
set -g default-command "${pkgs.fish}/bin/fish" # Use fish
|
||||
set -g default-shell "${pkgs.fish}/bin/fish"
|
||||
''
|
||||
+ builtins.readFile ./tmux.conf;
|
||||
+ readFile ./tmux.conf;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,18 @@
|
|||
{ pkgs, ... }:
|
||||
with builtins;
|
||||
{
|
||||
programs.vim =
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
extraConfig = readFile ./vimrc;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-sleuth
|
||||
vim-surround
|
||||
vim-fugitive
|
||||
vim-commentary
|
||||
undotree
|
||||
tabular
|
||||
vim-wakatime
|
||||
vim-caddyfile
|
||||
];
|
||||
};
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
extraConfig = readFile ./vimrc;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-sleuth
|
||||
vim-surround
|
||||
vim-fugitive
|
||||
vim-commentary
|
||||
undotree
|
||||
tabular
|
||||
vim-wakatime
|
||||
vim-caddyfile
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue