chore: nixfmt *

This commit is contained in:
steveej 2022-10-31 11:04:38 +01:00
parent dc761a5271
commit d039179898
161 changed files with 2688 additions and 3024 deletions

View file

@ -1,15 +1,9 @@
{
...
}:
{ ... }:
{
programs.chromium = {
enable = true;
};
programs.chromium = { enable = true; };
programs.brave = {
enable = true;
};
programs.brave = { enable = true; };
nixpkgs.config = {
chromium = {
@ -18,11 +12,6 @@
};
};
programs.browserpass = {
browsers = [
"chromium"
"brave"
];
};
programs.browserpass = { browsers = [ "chromium" "brave" ]; };
}

View file

@ -1,24 +1,22 @@
{ pkgs,
...
}:
{ pkgs, ... }:
{
programs.emacs = {
enable = true;
extraPackages = epkgs: (with epkgs; [
nix-mode
magit # ; Integrate git <C-x g>
zerodark-theme # ; Nicolas' theme
undo-tree # ; <C-x u> to show the undo tree
# zoom-frm # ; increase/decrease font size for all buffers %lt;C-x C-+>
]) ++ (with epkgs.melpaPackages; [
evil
]) ++ (with epkgs.elpaPackages; [
auctex # ; LaTeX mode
beacon # ; highlight my cursor when scrolling
nameless # ; hide current package name everywhere in elisp code
]) ++ (with pkgs; [
pkgs.notmuch # From main packages set
]);
extraPackages = epkgs:
(with epkgs; [
nix-mode
magit # ; Integrate git <C-x g>
zerodark-theme # ; Nicolas' theme
undo-tree # ; <C-x u> to show the undo tree
# zoom-frm # ; increase/decrease font size for all buffers %lt;C-x C-+>
]) ++ (with epkgs.melpaPackages; [ evil ]) ++ (with epkgs.elpaPackages; [
auctex # ; LaTeX mode
beacon # ; highlight my cursor when scrolling
nameless # ; hide current package name everywhere in elisp code
]) ++ (with pkgs;
[
pkgs.notmuch # From main packages set
]);
};
}

View file

@ -1,19 +1,14 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
programs.firefox = {
enable = true;
};
programs.firefox = { enable = true; };
programs.browserpass = {
enable = true;
browsers = [
"firefox"
];
browsers = [ "firefox" ];
};
home.file.".mozilla/native-messaging-hosts/passff.json".source = "${pkgs.passff-host}/share/passff-host/passff.json";
home.file.".mozilla/native-messaging-hosts/passff.json".source =
"${pkgs.passff-host}/share/passff-host/passff.json";
}

View file

@ -1,7 +1,5 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.holochain-launcher
];
home.packages = [ pkgs.holochain-launcher ];
}

View file

@ -1,38 +1,37 @@
{ pkgs
, config
, ...
}:
{ pkgs, config, ... }:
let
# TODO: clean up the impurity in here
in {
home.sessionVariables = {
HOMESHICK_DIR="${pkgs.homeshick}";
};
home.sessionVariables = { HOMESHICK_DIR = "${pkgs.homeshick}"; };
home.activation.bootstrapRepos = config.lib.dag.entryAfter ["writeBoundary"] ''
$DRY_RUN_CMD ${pkgs.writeScript "activation-script" ''
set -e
echo home-manager path is ${config.home.path}
echo home is $HOME
home.activation.bootstrapRepos =
config.lib.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD ${
pkgs.writeScript "activation-script" ''
set -e
echo home-manager path is ${config.home.path}
echo home is $HOME
source ${pkgs.homeshick}/homeshick.sh
type homeshick
# echo Updating homeshick
# ln -sfT ${pkgs.homeshick} "$HOMESICK_REPOS"/.homeshick
# mv -Tf "$HOMESICK_REPOS"/{.,}homeshick
''};
'';
source ${pkgs.homeshick}/homeshick.sh
type homeshick
# echo Updating homeshick
# ln -sfT ${pkgs.homeshick} "$HOMESICK_REPOS"/.homeshick
# mv -Tf "$HOMESICK_REPOS"/{.,}homeshick
''
};
'';
nixpkgs.config = {
packageOverrides = pkgs: with pkgs; {
homeshick = builtins.fetchGit {
url = "https://github.com/andsens/homeshick.git";
ref = "master";
packageOverrides = pkgs:
with pkgs; {
homeshick = builtins.fetchGit {
url = "https://github.com/andsens/homeshick.git";
ref = "master";
};
};
};
};
}

View file

@ -1,6 +1,4 @@
{ pkgs,
...
}:
{ pkgs, ... }:
{
home.sessionVariables = {
@ -8,7 +6,5 @@
SAL_USE_VCLPLUGIN = "gtk3";
};
home.packages = with pkgs; [
libreoffice-fresh
];
home.packages = with pkgs; [ libreoffice-fresh ];
}

View file

@ -1,13 +1,9 @@
{ pkgs,
...
}:
{ pkgs, ... }:
let
in {
home.sessionVariables = {
EDITOR = "nvim";
};
home.sessionVariables = { EDITOR = "nvim"; };
programs.neovim = {
enable = true;
@ -16,116 +12,117 @@ in {
extraConfig = builtins.readFile ./neovim/vimrc;
plugins = with pkgs; [
# yaml-folds
{
plugin = vimUtils.buildVimPlugin {
name = "vim-yaml-folds";
src = fetchFromGitHub {
owner = "pedrohdz";
repo = "vim-yaml-folds";
rev = "890ccd8e5370808d569e96dbb06cbeca2cf5993a";
sha256 = "018z6xcwrq58q6lj6gwhrifjaxkmrlkkg0n86s6mjjlwkbs2qa4m";
plugins = with pkgs;
[
# yaml-folds
{
plugin = vimUtils.buildVimPlugin {
name = "vim-yaml-folds";
src = fetchFromGitHub {
owner = "pedrohdz";
repo = "vim-yaml-folds";
rev = "890ccd8e5370808d569e96dbb06cbeca2cf5993a";
sha256 = "018z6xcwrq58q6lj6gwhrifjaxkmrlkkg0n86s6mjjlwkbs2qa4m";
};
buildInputs = [ zip vim ];
};
buildInputs = [ zip vim ];
};
}
}
{
plugin = vimUtils.buildVimPlugin {
name = "vim-yaml";
src = fetchFromGitHub {
owner = "stephpy";
repo = "vim-yaml";
rev = "e97e063b16eba4e593d620676a0a15fa98613979";
sha256 = "0vqahbrnr43lxanpziyrmzaqqb3cmyny8ry1xvmy2xyd1larzfrk";
};
};
}
{
plugin = vimUtils.buildVimPlugin {
name = "vim-yaml";
src = fetchFromGitHub {
owner = "stephpy";
repo = "vim-yaml";
rev = "e97e063b16eba4e593d620676a0a15fa98613979";
sha256 = "0vqahbrnr43lxanpziyrmzaqqb3cmyny8ry1xvmy2xyd1larzfrk";
};
};
}
# broken 2021-06-08
# {
# plugin = vimUtils.buildVimPlugin {
# name = "vim-markdown-toc";
# src = fetchFromGitHub {
# owner = "mzlogin";
# repo = "vim-markdown-toc";
# rev = "b7bb6c37033d3a6c93906af48dc0e689bd948638";
# sha256 = "026xf2gid4qivwawh7if3nfk7zja9di0flhdzdx82lvil9x48lyz";
# };
# };
# }
# broken 2021-06-08
# {
# plugin = vimUtils.buildVimPlugin {
# name = "vim-markdown-toc";
# src = fetchFromGitHub {
# owner = "mzlogin";
# repo = "vim-markdown-toc";
# rev = "b7bb6c37033d3a6c93906af48dc0e689bd948638";
# sha256 = "026xf2gid4qivwawh7if3nfk7zja9di0flhdzdx82lvil9x48lyz";
# };
# };
# }
# broken 2021-06-08
# {
# plugin = vimUtils.buildVimPlugin {
# name = "vim-perl";
# src = fetchFromGitHub {
# owner = "vim-perl";
# repo = "vim-perl";
# rev = "f330b5d474c44e6cfae22ba50868093dea3e9adb";
# sha256 = "1dy40ixgixj0536c5ggra51b4yd1lbw4j6l0j5zc3diasb7m2gvr";
# };
# };
# }
# broken 2021-06-08
# {
# plugin = vimUtils.buildVimPlugin {
# name = "vim-perl";
# src = fetchFromGitHub {
# owner = "vim-perl";
# repo = "vim-perl";
# rev = "f330b5d474c44e6cfae22ba50868093dea3e9adb";
# sha256 = "1dy40ixgixj0536c5ggra51b4yd1lbw4j6l0j5zc3diasb7m2gvr";
# };
# };
# }
{
plugin = vimUtils.buildVimPlugin {
name = "git-blame";
src = fetchFromGitHub {
"owner" = "zivyangll";
"repo" = "git-blame.vim";
"rev" = "9d144b7bed5d8f1c9259551768b7f3b3d1294917";
"sha256" = "06zb5xcc59k25rpwl46j82fcqckiznmj97v6i0mwlb8jhqqrhy9j";
};
};
}
]
++ (with pkgs.vimPlugins; [
delimitMate
vim-airline
vim-airline-themes
ctrlp
vim-css-color
rainbow_parentheses
vim-colorschemes
vim-colorstepper
vim-signify
fugitive
vim-indent-guides
UltiSnips
fzfWrapper
{
plugin = vimUtils.buildVimPlugin {
name = "git-blame";
src = fetchFromGitHub {
"owner" = "zivyangll";
"repo" = "git-blame.vim";
"rev" = "9d144b7bed5d8f1c9259551768b7f3b3d1294917";
"sha256" = "06zb5xcc59k25rpwl46j82fcqckiznmj97v6i0mwlb8jhqqrhy9j";
};
};
}
] ++ (with pkgs.vimPlugins; [
delimitMate
vim-airline
vim-airline-themes
ctrlp
vim-css-color
rainbow_parentheses
vim-colorschemes
vim-colorstepper
vim-signify
fugitive
vim-indent-guides
UltiSnips
fzfWrapper
ncm2
ncm2-bufword
ncm2-path
ncm2-tmux
ncm2-ultisnips
nvim-yarp
ncm2
ncm2-bufword
ncm2-path
ncm2-tmux
ncm2-ultisnips
nvim-yarp
LanguageClient-neovim
LanguageClient-neovim
Improved-AnsiEsc
tabular
Improved-AnsiEsc
tabular
# Nix
vim-addon-nix tlib
vim-addon-vim2nix
# Nix
vim-addon-nix
tlib
vim-addon-vim2nix
# LaTeX
vim-latex-live-preview
vimtex
# LaTeX
vim-latex-live-preview
vimtex
# YAML
vim-yaml
# YAML
vim-yaml
# markdown
vim-markdown
vim-markdown-toc
# markdown
vim-markdown
vim-markdown-toc
# misc syntax support
vim-bazel maktaba
])
;
# misc syntax support
vim-bazel
maktaba
]);
};
}

View file

@ -1,23 +1,15 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
{
home.sessionVariables = {
# required by pass-otp
PASSWORD_STORE_EXTENSIONS_DIR = "$HOME/.nix-profile/lib/password-store/extensions";
PASSWORD_STORE_EXTENSIONS_DIR =
"$HOME/.nix-profile/lib/password-store/extensions";
PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
};
programs.browserpass = {
enable = true;
};
home.packages = with pkgs; [
pass
qtpass
rofi-pass
gnupg
];
programs.browserpass = { enable = true; };
home.packages = with pkgs; [ pass qtpass rofi-pass gnupg ];
}

View file

@ -1,50 +1,48 @@
{ pkgs
, ...
}:
{ pkgs, ... }:
let
cniConfigDir = let
loopback = pkgs.writeText "00-loopback.conf" ''
{
"cniVersion": "0.3.0",
"type": "loopback"
}
'';
podman-bridge = pkgs.writeText "87-podman-bridge.conflist" ''
{
"cniVersion": "0.3.0",
"name": "podman",
"plugins": [
{
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.88.0.0/16",
"routes": [
{ "dst": "0.0.0.0/0" }
]
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
}
]
}
'';
in pkgs.runCommand "cniConfig" {} ''
set -x
mkdir $out;
ln -s ${loopback} $out/${loopback.name}
ln -s ${podman-bridge} $out/${podman-bridge.name}
loopback = pkgs.writeText "00-loopback.conf" ''
{
"cniVersion": "0.3.0",
"type": "loopback"
}
'';
podman-bridge = pkgs.writeText "87-podman-bridge.conflist" ''
{
"cniVersion": "0.3.0",
"name": "podman",
"plugins": [
{
"type": "bridge",
"bridge": "cni0",
"isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local",
"subnet": "10.88.0.0/16",
"routes": [
{ "dst": "0.0.0.0/0" }
]
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
}
]
}
'';
in pkgs.runCommand "cniConfig" { } ''
set -x
mkdir $out;
ln -s ${loopback} $out/${loopback.name}
ln -s ${podman-bridge} $out/${podman-bridge.name}
'';
containersConf = pkgs.writeText "containers.conf" ''
# containers.conf is the default configuration file for all tools using libpod to
# manage containers
@ -107,9 +105,7 @@ let
default_network = "podman"
'';
in {
home.packages = with pkgs; [
podman
];
home.packages = with pkgs; [ podman ];
home.file.".config/containers/containers.conf".source = containersConf;

View file

@ -462,20 +462,16 @@ let
sha256 = "1jmmbz3i0hxq5ka4rsk07mynxh3pkh5g736d9ryv1czhnrb06lwf";
}
];
in
{
in {
programs.vscode = {
enable = true;
extensions = []
++ packagedExtensions
# ++ marketPlaceExtensions
;
extensions = [ ] ++ packagedExtensions
# ++ marketPlaceExtensions
;
};
home.packages = [
pkgs.nixpkgs-fmt
];
home.packages = [ pkgs.nixpkgs-fmt ];
}
# TODO: automate

View file

@ -3,37 +3,36 @@
{ ... }:
let
just-plugin =
let
plugin_file = pkgs.writeText "_just" ''
#compdef just
#autload
just-plugin = let
plugin_file = pkgs.writeText "_just" ''
#compdef just
#autload
alias justl="\just --list"
alias juste="\just --evaluate"
alias justl="\just --list"
alias juste="\just --evaluate"
local subcmds=()
local subcmds=()
while read -r line ; do
if [[ ! $line == Available* ]] ;
then
subcmds+=(''${line/[[:space:]]*\#/:})
fi
done < <(just --list)
while read -r line ; do
if [[ ! $line == Available* ]] ;
then
subcmds+=(''${line/[[:space:]]*\#/:})
fi
done < <(just --list)
_describe 'command' subcmds
'';
_describe 'command' subcmds
'';
in pkgs.stdenv.mkDerivation {
name = "just-completions";
version = "0.1.0";
phases = "installPhase";
installPhase = ''
PLUGIN_PATH=$out/share/oh-my-zsh/plugins/just
mkdir -p $PLUGIN_PATH
cp ${plugin_file} $PLUGIN_PATH/_just
chmod --recursive a-w $out
'';
in pkgs.stdenv.mkDerivation {
name = "just-completions";
version = "0.1.0";
phases = "installPhase";
installPhase = ''
PLUGIN_PATH=$out/share/oh-my-zsh/plugins/just
mkdir -p $PLUGIN_PATH
cp ${plugin_file} $PLUGIN_PATH/_just
chmod --recursive a-w $out
'';
};
in {
@ -43,8 +42,7 @@ in {
# will be called again by oh-my-zsh
enableCompletion = false;
enableAutosuggestions = true;
initExtra = let
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
initExtra = let inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
in ''
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}%f.%F{red} ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
RPROMPT=""
@ -59,8 +57,8 @@ in {
${if builtins.hasAttr "homeshick" pkgs then ''
source ${pkgs.homeshick}/homeshick.sh
fpath=(${pkgs.homeshick}/completions $fpath)
'' else ''
''}
'' else
""}
# Disable intercepting of ctrl-s and ctrl-q as flow control.
stty stop ''' -ixoff -ixon
@ -117,10 +115,7 @@ in {
oh-my-zsh = {
enable = true;
theme = "tjkirch";
plugins = [
"git"
"sudo"
];
plugins = [ "git" "sudo" ];
};
};
}