summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/default.nix22
-rw-r--r--home/dev-utils/default.nix24
-rw-r--r--home/git/default.nix4
-rw-r--r--home/neovim/completion.nix7
-rw-r--r--home/neovim/default.nix20
-rw-r--r--home/neovim/filetype.nix8
-rw-r--r--home/neovim/lsp.nix9
-rw-r--r--home/neovim/plugins.nix7
-rw-r--r--home/zsh/default.nix14
-rw-r--r--home/zsh/plugins.nix129
10 files changed, 125 insertions, 119 deletions
diff --git a/home/default.nix b/home/default.nix
index 3687c53..2c43efb 100644
--- a/home/default.nix
+++ b/home/default.nix
@@ -1,24 +1,26 @@
-{ flakeInputs, flakeOutputs, metadata, ... }:
-
{
+ flakeInputs,
+ flakeOutputs,
+ metadata,
+ ...
+}: {
# Use the flake input pkgs so Home Manager configuration can share overlays
# etc. with the rest of the configuration.
home-manager.useGlobalPkgs = true;
# Pass special arguments from flake.nix further down the chain. I really hate
# this split module system.
- home-manager.extraSpecialArgs = { inherit flakeInputs flakeOutputs metadata; };
+ home-manager.extraSpecialArgs = {inherit flakeInputs flakeOutputs metadata;};
# OKAY FUCK THIS SHIT. THERE IS ONE USER. IT IS ME. LINUS. I WILL ADD
# MULTIUSER SUPPORT IF IT EVER BECOMES A REQUIREMENT.
home-manager.users.linus = {
- imports =
- [
- ./neovim
- ./zsh
- ./git
- ./dev-utils
- ];
+ imports = [
+ ./neovim
+ ./zsh
+ ./git
+ ./dev-utils
+ ];
xdg.enable = true;
};
diff --git a/home/dev-utils/default.nix b/home/dev-utils/default.nix
index 77d8085..1bb9e57 100644
--- a/home/dev-utils/default.nix
+++ b/home/dev-utils/default.nix
@@ -1,19 +1,23 @@
-{ pkgs, lib, ... }:
-
{
- home.packages =
- with pkgs; [
+ pkgs,
+ lib,
+ ...
+}: {
+ home.packages = with pkgs;
+ [
cling
deno
- (python311Full.withPackages (ps: with ps; [
- virtualenv
- tkinter
- ]))
+ (python311Full.withPackages (ps:
+ with ps; [
+ virtualenv
+ tkinter
+ ]))
imagemagick
nodePackages_latest.nodemon
rlwrap
tcl-8_6
- ] ++ lib.optional pkgs.stdenv.isDarwin trash;
+ ]
+ ++ lib.optional pkgs.stdenv.isDarwin trash;
- home.sessionVariables.MANPATH = lib.optionalString pkgs.stdenv.isDarwin "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man:$MANPATH";
+ home.sessionVariables.MANPATH = lib.optionalString pkgs.stdenv.isDarwin "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man:$MANPATH";
}
diff --git a/home/git/default.nix b/home/git/default.nix
index 4199ebc..bd7295e 100644
--- a/home/git/default.nix
+++ b/home/git/default.nix
@@ -1,6 +1,4 @@
-{ ... }:
-
-{
+{...}: {
programs.git = {
enable = true;
diff --git a/home/neovim/completion.nix b/home/neovim/completion.nix
index f3be603..70d6e1a 100644
--- a/home/neovim/completion.nix
+++ b/home/neovim/completion.nix
@@ -1,8 +1,9 @@
# This module sets up auto completion for Neovim.
-
-{ pkgs, lib, ... }:
-
{
+ pkgs,
+ lib,
+ ...
+}: {
programs.neovim.plugins = with pkgs.vimPlugins; [
# This is the actual completion engine.
{
diff --git a/home/neovim/default.nix b/home/neovim/default.nix
index ccf6dc5..4d49854 100644
--- a/home/neovim/default.nix
+++ b/home/neovim/default.nix
@@ -1,15 +1,15 @@
# This file contains the HM configuration options for Neovim.
-
-{ pkgs, lib, ... }:
-
{
- imports =
- [
- ./lsp.nix
- ./filetype.nix
- ./completion.nix
- ./plugins.nix
- ];
+ pkgs,
+ lib,
+ ...
+}: {
+ imports = [
+ ./lsp.nix
+ ./filetype.nix
+ ./completion.nix
+ ./plugins.nix
+ ];
programs.neovim = {
enable = true;
diff --git a/home/neovim/filetype.nix b/home/neovim/filetype.nix
index 66d5e68..8dc9536 100644
--- a/home/neovim/filetype.nix
+++ b/home/neovim/filetype.nix
@@ -1,8 +1,5 @@
# This module configures various syntax/filetype plugins for Neovim.
-
-{ pkgs, ... }:
-
-let
+{pkgs, ...}: let
vim-noweb = pkgs.vimUtils.buildVimPlugin {
pname = "vim-noweb";
version = "26-08-2023"; # day of retrieval
@@ -11,8 +8,7 @@ let
hash = "sha256-c5eUZiKIjAfjJ33l821h5DjozMpMf0CaK03QIkSUfxg=";
};
};
-in
-{
+in {
programs.neovim.plugins = with pkgs.vimPlugins; [
vim-nix
vim-noweb
diff --git a/home/neovim/lsp.nix b/home/neovim/lsp.nix
index 5a80758..3aa3094 100644
--- a/home/neovim/lsp.nix
+++ b/home/neovim/lsp.nix
@@ -1,10 +1,11 @@
# This module sets up LSP server configurations for Neovim. It is waaay
# overcomplicated as it kind of turned into an experiment in generating Lua
# code from a Nix attrset.
-
-{ pkgs, lib, ... }:
-
{
+ pkgs,
+ lib,
+ ...
+}: {
programs.neovim.plugins = [
{
plugin = pkgs.vimPlugins.nvim-lspconfig;
@@ -87,7 +88,6 @@
}
];
}
-
# I spent like an hour writing this, only to find it was a pretty bad idea.
#
# nixToLua = s:
@@ -107,3 +107,4 @@
# toString s
# else
# throw "Cannot convert ${builtins.typeOf s} to Lua value!";
+
diff --git a/home/neovim/plugins.nix b/home/neovim/plugins.nix
index 89cd6e7..1e0a707 100644
--- a/home/neovim/plugins.nix
+++ b/home/neovim/plugins.nix
@@ -1,8 +1,9 @@
# This module sets up and configures various miscellaneous plugins.
-
-{ pkgs, lib, ... }:
-
{
+ pkgs,
+ lib,
+ ...
+}: {
programs.neovim.plugins = [
{
plugin = pkgs.vimPlugins.vim-localvimrc;
diff --git a/home/zsh/default.nix b/home/zsh/default.nix
index 91c7ba3..8884f56 100644
--- a/home/zsh/default.nix
+++ b/home/zsh/default.nix
@@ -1,10 +1,12 @@
-{ pkgs, config, lib, ... }:
-
{
- imports =
- [
- ./plugins.nix
- ];
+ pkgs,
+ config,
+ lib,
+ ...
+}: {
+ imports = [
+ ./plugins.nix
+ ];
programs.zsh = {
enable = true;
diff --git a/home/zsh/plugins.nix b/home/zsh/plugins.nix
index 68e1bfc..73a35a3 100644
--- a/home/zsh/plugins.nix
+++ b/home/zsh/plugins.nix
@@ -1,76 +1,77 @@
-{ pkgs, lib, config, ... }:
-
-let
+{
+ pkgs,
+ lib,
+ config,
+ ...
+}: let
inherit (lib.strings) concatStringsSep;
inherit (lib.attrsets) catAttrs;
- plugins =
- [
- {
- name = "autovenv";
+ plugins = [
+ {
+ name = "autovenv";
+ src = pkgs.fetchFromGitHub {
+ owner = "linnnus";
+ repo = "autovenv";
+ rev = "d9f0cd7";
+ hash = "sha256-GfJIybMYxE97xLSkrOSGsn+AREmnCyqe9n2aZwjw4w4=";
+ };
+ }
+ {
+ name = "zsh-cwd-history";
+ src = pkgs.stdenvNoCC.mkDerivation rec {
+ pname = "zsh-cwd-history";
+ version = "73afed8";
+
src = pkgs.fetchFromGitHub {
- owner = "linnnus";
- repo = "autovenv";
- rev = "d9f0cd7";
- hash = "sha256-GfJIybMYxE97xLSkrOSGsn+AREmnCyqe9n2aZwjw4w4=";
+ owner = "ericfreese";
+ repo = pname;
+ rev = version;
+ hash = "sha256-xW11wPFDuFU80AzgAgLwkvK7Qv58fo3i3kSasE3p0zs=";
};
- }
- {
- name = "zsh-cwd-history";
- src = pkgs.stdenvNoCC.mkDerivation rec {
- pname = "zsh-cwd-history";
- version = "73afed8";
- src = pkgs.fetchFromGitHub {
- owner = "ericfreese";
- repo = pname;
- rev = version;
- hash = "sha256-xW11wPFDuFU80AzgAgLwkvK7Qv58fo3i3kSasE3p0zs=";
- };
+ fixupPhase = ''
+ substituteInPlace ${pname}.zsh \
+ --replace md5 ${pkgs.hashdeep}/bin/md5deep
- fixupPhase = ''
- substituteInPlace ${pname}.zsh \
- --replace md5 ${pkgs.hashdeep}/bin/md5deep
-
- mkdir -p $out
- mv * $out
- '';
+ mkdir -p $out
+ mv * $out
+ '';
- # This is kind of a weird, useless derivation, so we have to
- # manually avoid doing lots of the usual stuff.
- dontInstall = true;
- };
- config = ''
- # Where to but history files
- export ZSH_CWD_HISTORY_DIR=${config.xdg.dataHome}/zsh-cwd-history
- mkdir -p "$ZSH_CWD_HISTORY_DIR"
+ # This is kind of a weird, useless derivation, so we have to
+ # manually avoid doing lots of the usual stuff.
+ dontInstall = true;
+ };
+ config = ''
+ # Where to but history files
+ export ZSH_CWD_HISTORY_DIR=${config.xdg.dataHome}/zsh-cwd-history
+ mkdir -p "$ZSH_CWD_HISTORY_DIR"
- # Toggle between global/local history
- bindkey '^G' cwd-history-toggle
- '';
- }
- {
- name = "zsh-vi-mode-cursor";
- src = pkgs.fetchFromGitHub {
- owner = "Buckmeister";
- repo = "zsh-vi-mode-cursor";
- rev = "fa7cc0973ee71636e906e25e782d0aea19545d60";
- hash = "sha256-j73M4bvAoHWt5Wwg47hM0p5Or74x/3btTOPnI22SqG8=";
- };
- }
- {
- name = "zsh-nix-shell";
- file = "nix-shell.plugin.zsh";
- src = pkgs.fetchFromGitHub {
- owner = "chisui";
- repo = "zsh-nix-shell";
- rev = "v0.7.0";
- sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
- };
- }
- ];
-in
-{
+ # Toggle between global/local history
+ bindkey '^G' cwd-history-toggle
+ '';
+ }
+ {
+ name = "zsh-vi-mode-cursor";
+ src = pkgs.fetchFromGitHub {
+ owner = "Buckmeister";
+ repo = "zsh-vi-mode-cursor";
+ rev = "fa7cc0973ee71636e906e25e782d0aea19545d60";
+ hash = "sha256-j73M4bvAoHWt5Wwg47hM0p5Or74x/3btTOPnI22SqG8=";
+ };
+ }
+ {
+ name = "zsh-nix-shell";
+ file = "nix-shell.plugin.zsh";
+ src = pkgs.fetchFromGitHub {
+ owner = "chisui";
+ repo = "zsh-nix-shell";
+ rev = "v0.7.0";
+ sha256 = "149zh2rm59blr2q458a5irkfh82y3dwdich60s9670kl3cl5h2m1";
+ };
+ }
+ ];
+in {
programs.zsh = {
plugins = map (p: removeAttrs p ["config"]) plugins;