commit 413ab20e7f2453692e8560ccb8e8cf11e4849c10
parent 8fe3fe26fe7f20572b61a37dae1c774116a8ec5e
Author: GuyClicking <bpaul848@gmail.com>
Date: Sun, 27 Jun 2021 17:38:15 +1000
stuff
Diffstat:
9 files changed, 106 insertions(+), 31 deletions(-)
diff --git a/flake.nix b/flake.nix
@@ -28,7 +28,19 @@
neovim.overlay
vim-plugins-overlay.overlay
];
- libExtra = import ./lib;
+ lib = nixpkgs.lib;
+ libExtra = import ./lib { inherit lib; };
+ homeConfig = path: home-manager.lib.homeManagerConfiguration {
+ system = "x86_64-linux";
+ homeDirectory = "/home/benjamin";
+ username = "benjamin";
+ configuration = { pkgs, ... }: {
+ nixpkgs.overlays = overlays;
+ imports = [
+ path
+ ];
+ };
+ };
in
{
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
@@ -55,20 +67,11 @@
type = "app";
program = "${self.packages.x86_64-linux.customize}/bin/customize";
};
- apps.x86_64-linux.home = {
+ apps.x86_64-linux = lib.mapAttrs (n: v: {
type = "app";
- program = "${self.home.activationPackage}/activate";
- };
- home = home-manager.lib.homeManagerConfiguration {
- system = "x86_64-linux";
- homeDirectory = "/home/benjamin";
- username = "benjamin";
- configuration = { pkgs, ... }: {
- nixpkgs.overlays = overlays;
- imports = [
- ./home/home.nix
- ];
- };
- };
+ program = "${self.home.${n}.activationPackage}/activate";
+ }) self.home;
+ #home = homeConfig ./home/home.nix;
+ home = libExtra.mapOnDir' ./home/profiles (name: a: lib.nameValuePair (lib.removeSuffix ".nix" name) (homeConfig "${toString ./home/profiles}/${name}"));
};
}
diff --git a/home/home.nix b/home/home.nix
@@ -16,7 +16,10 @@ in {
home.file = scripts;
- alacritty.enable = true;
+ alacritty = {
+ enable = true;
+ font = "Hack Nerd Font";
+ };
dunst.enable = true;
neovim.enable = true;
polybar.enable = true;
@@ -24,7 +27,7 @@ in {
zathura.enable = true;
xbindkeys.enable = true;
xinit = {
- enable = true;
+ enable = false;
config = ''
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME .Xresources
diff --git a/home/modules/alacritty.nix b/home/modules/alacritty.nix
@@ -55,24 +55,25 @@ in
config = mkIf config.alacritty.enable {
programs.alacritty = {
enable = true;
+ package = pkgs.hello;
settings = {
font = {
- size = 9;
+ size = 10;
normal = {
- family = "Hack";
+ family = config.alacritty.font;
style = "Regular";
};
bold = {
- family = "Hack";
+ family = config.alacritty.font;
style = "Bold";
};
italic = {
- family = "Hack";
+ family = config.alacritty.font;
style = "Italic";
};
bold_italic = {
- family = "Hack";
+ family = config.alacritty.font;
style = "Bold Italic";
};
};
diff --git a/home/modules/latex.nix b/home/modules/latex.nix
@@ -12,6 +12,6 @@ with lib;
pgfplots
texlab
texlive.combined.scheme-full
- ]
+ ];
};
}
diff --git a/home/modules/neovim/init.lua b/home/modules/neovim/init.lua
@@ -84,6 +84,8 @@ vim.wo.signcolumn = "yes"
-- nvim-compe
+vim.g.vimtex_view_method = "zathura"
+
function t(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
diff --git a/home/modules/zsh.nix b/home/modules/zsh.nix
@@ -49,7 +49,7 @@ in
};
initExtra = ''
- #. ~/.nix-profile/etc/profile.d/nix.sh
+ . ~/.nix-profile/etc/profile.d/nix.sh
any-nix-shell zsh --info-right | source /dev/stdin
diff --git a/home/profiles/arch.nix b/home/profiles/arch.nix
@@ -0,0 +1,56 @@
+{ pkgs, lib, ... }:
+
+with lib;
+let
+ libExtra = import ../../lib { inherit lib; };
+ scripts = libExtra.mapOnDir ../scripts (name: a:
+ libExtra.createScriptFile name "${toString ../scripts}/${name}"
+ );
+in {
+ home.stateVersion = "20.09";
+
+ imports = [
+ ../modules
+ ../themes/gruvbox
+ ];
+
+ home.file = scripts;
+
+ alacritty = {
+ enable = true;
+ font = "Hack Nerd Font";
+ };
+ dunst.enable = true;
+ neovim.enable = true;
+ polybar.enable = true;
+ starship.enable = true;
+ zathura.enable = true;
+ xbindkeys.enable = true;
+ xinit = {
+ enable = false;
+ config = ''
+ [[ -f ~/.Xresources ]] && xrdb -merge -I$HOME .Xresources
+
+ . ~/.xprofile
+
+ exec bspwm
+ '';
+ };
+ zsh = {
+ enable = true;
+ editor = "nvim";
+ };
+
+ home.packages = [
+ # packages
+ pkgs.bc
+ pkgs.ccls
+ pkgs.fzf
+ pkgs.gcc
+ pkgs.haskell-language-server
+ pkgs.i3lock-color
+ pkgs.manpages
+ pkgs.texlab
+ pkgs.tree-sitter
+ ];
+}
diff --git a/home/profiles/laptop.nix b/home/profiles/laptop.nix
@@ -1,13 +1,21 @@
-{ pkgs, ... }:
+{ pkgs, lib, ... }:
-{
+with lib;
+let
+ libExtra = import ../lib { inherit lib; };
+ scripts = libExtra.mapOnDir ./scripts (name: a:
+ libExtra.createScriptFile name "${toString ./scripts}/${name}"
+ );
+in {
home.stateVersion = "20.09";
imports = [
- ../modules
- ../themes/gruvbox
+ ./modules
+ ./themes/gruvbox
];
+ home.file = scripts;
+
alacritty.enable = true;
dunst.enable = true;
neovim.enable = true;
@@ -19,9 +27,7 @@
enable = true;
config = ''
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME .Xresources
-
. ~/.xprofile
-
exec bspwm
'';
};
diff --git a/lib/dirs.nix b/lib/dirs.nix
@@ -8,7 +8,11 @@ rec {
*/
mapOnDir = dir: fn:
let d = builtins.readDir dir; in
- builtins.mapAttrs (fn) d;
+ mapAttrs (fn) d;
+
+ mapOnDir' = dir: fn:
+ let d = builtins.readDir dir; in
+ mapAttrs' (fn) d;
importDir = dir:
map (file: "${toString dir}/${file}") (filter (f: f != "default.nix") (attrValues (mapOnDir dir (name: a: