Run nixpkgs-fmt

This commit is contained in:
Sridhar Ratnakumar 2022-04-26 09:09:52 -04:00
parent 4010b41b76
commit 791ed10af0
8 changed files with 54 additions and 42 deletions

View file

@ -1,5 +1,4 @@
{ config, pkgs, ...}:
{ config, pkgs, ... }:
# Based on https://nixos.wiki/wiki/Redshift
{

View file

@ -1,2 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
import (import ./thunk.nix)

View file

@ -1,9 +1,14 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
let
fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then
builtins.fetchTarball
{
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else
(import <nixpkgs> { }).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
in
fetch json

View file

@ -1,2 +1,2 @@
# DO NOT HAND-EDIT THIS FILE
import (import ./thunk.nix)
import (import ./thunk.nix)

View file

@ -1,9 +1,14 @@
# DO NOT HAND-EDIT THIS FILE
let fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else (import <nixpkgs> {}).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
let
fetch = { private ? false, fetchSubmodules ? false, owner, repo, rev, sha256, ... }:
if !fetchSubmodules && !private then
builtins.fetchTarball
{
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"; inherit sha256;
} else
(import <nixpkgs> { }).fetchFromGitHub {
inherit owner repo rev sha256 fetchSubmodules private;
};
json = builtins.fromJSON (builtins.readFile ./github.json);
in fetch json
in
fetch json

View file

@ -1,5 +1,5 @@
{ pkgs, ... }:
let
let
realName = "Sridhar Ratnakumar";
# IMAP/SMTP settings for standard email servers
servers = {
@ -29,10 +29,11 @@ let
};
};
};
in {
in
{
programs.himalaya = {
enable = true;
settings = {};
settings = { };
};
accounts.email.accounts = {
proton = servers.protonmail // {
@ -41,7 +42,7 @@ in {
himalaya.enable = true;
address = "srid@srid.ca";
userName = "hey@srid.ca";
passwordCommand = "cat /Users/srid/.protonmail.password"; # Temporary password from ProtonMail Bridge, so I don't care
passwordCommand = "cat /Users/srid/.protonmail.password"; # Temporary password from ProtonMail Bridge, so I don't care
};
icloud = servers.icloud // {
inherit realName;

View file

@ -1,15 +1,15 @@
-- -------
-- Library
-- -------
- - -------
function map(mode, shortcut, command)
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
function map (mode, shortcut, command)
vim.api.nvim_set_keymap(mode, shortcut, command, { noremap = true, silent = true })
end
function nmap(shortcut, command)
map('n', shortcut, command)
map('n', shortcut, command)
end
function imap(shortcut, command)
map('i', shortcut, command)
map('i', shortcut, command)
end
-- ------
@ -32,3 +32,4 @@ vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.expandtab = true

View file

@ -1,7 +1,8 @@
{ pkgs, inputs, system, ... }:
let
nvim = inputs.neovim-nightly-overlay.packages.${system}.neovim;
in {
let
nvim = inputs.neovim-nightly-overlay.packages.${system}.neovim;
in
{
programs.neovim = {
enable = true;
package = nvim;
@ -56,7 +57,7 @@ in {
})
# Doom-emacs like experience
{
{
plugin = vim-which-key;
type = "lua";
# TODO: How to port this to Lua?
@ -68,12 +69,12 @@ in {
nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
]])
'';
'';
}
# TODO: Don't know how to configure this correctly
# nvim-whichkey-setup-lua
{
{
plugin = telescope-nvim;
type = "lua";
config = ''
@ -81,16 +82,16 @@ in {
nmap("<leader>fg", ":Telescope live_grep<cr>")
nmap("<leader>fb", ":Telescope buffers<cr>")
nmap("<leader>fh", ":Telescope help_tags<cr>")
'';
'';
}
{
{
plugin = telescope-zoxide;
type = "lua";
config = ''
nmap("<leader>fz", ":Telescope zoxide list<cr>")
'';
'';
}
{
{
plugin = telescope-file-browser-nvim;
type = "lua";
config = ''
@ -115,7 +116,7 @@ in {
-- you need to call load_extension, somewhere after setup function:
require("telescope").load_extension "file_browser"
nmap("<leader>fb", ":Telescope file_browser<cr>")
'';
'';
}
{
@ -127,7 +128,7 @@ in {
theme = 'tokyonight'
}
}
'';
'';
}
# Buffer tabs
@ -138,7 +139,7 @@ in {
require("bufferline").setup{ }
nmap("<leader>b", ":BufferLineCycleNext<cr>")
nmap("<leader>B", ":BufferLineCyclePrev<cr>")
'';
'';
}
# Developing plugins in Haskell
@ -146,7 +147,7 @@ in {
# Language support
vim-nix
{
{
plugin = haskell-vim;
type = "lua";
config = ''
@ -158,7 +159,7 @@ in {
let g:haskell_enable_typeroles = 1 " to enable highlighting of type roles
let g:haskell_enable_static_pointers = 1 " to enable highlighting of `static`
]])
'';
'';
}
vim-markdown
];