split neovim config
This commit is contained in:
parent
8fb6118bcd
commit
5df8317a4a
19 changed files with 239 additions and 195 deletions
97
flake.lock
generated
97
flake.lock
generated
|
|
@ -1,5 +1,23 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
@ -7,11 +25,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682203081,
|
||||
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
|
||||
"lastModified": 1683651229,
|
||||
"narHash": "sha256-HN0Mw8g1XQIrcdyzqT00YW0Uqi/V/BUUUAgvcK1pcSM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
|
||||
"rev": "983f8a1bb965b261492123cd8e2d07da46d4d50a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -22,11 +40,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1680876084,
|
||||
"narHash": "sha256-eP9yxP0wc7XuVaODugh+ajgbFGaile2O1ihxiLxOuvU=",
|
||||
"lastModified": 1683269598,
|
||||
"narHash": "sha256-KNsb+nBbB1Fmxd07dt4E0KXMT4YeKJB7gQaA6Xfk+mo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "3006d2860a6ed5e01b0c3e7ffb730e9b293116e2",
|
||||
"rev": "51559e691f1493a26f94f1df1aaf516bb507e78b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -38,11 +56,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1682453498,
|
||||
"narHash": "sha256-WoWiAd7KZt5Eh6n+qojcivaVpnXKqBsVgpixpV2L9CE=",
|
||||
"lastModified": 1683408522,
|
||||
"narHash": "sha256-9kcPh6Uxo17a3kK3XCHhcWiV1Yu1kYj22RHiymUhMkU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c8018361fa1d1650ee8d4b96294783cf564e8a7f",
|
||||
"rev": "897876e4c484f1e8f92009fd11b7d988a121a4e7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -52,35 +70,24 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"nvim": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682817260,
|
||||
"narHash": "sha256-kFMXzKNj4d/0Iqbm5l57rHSLyUeyCLMuvlROZIuuhvk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "db1e4eeb0f9a9028bcb920e00abbc1409dd3ef36",
|
||||
"lastModified": 1683960683,
|
||||
"narHash": "sha256-hCKwb272GS5uM2eHGs1O9EMZHQIdhh51yIKYPY7Mc/E=",
|
||||
"owner": "iofq",
|
||||
"repo": "nvim.nix",
|
||||
"rev": "bfc15eb6cb362845375e92df2298b0d776bbbbe1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1682779028,
|
||||
"narHash": "sha256-tFfSbwSLobpHRznAa35KEU3R+fsFWTlmpFhTUdXq8RE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "54abe781c482f51ff4ff534ebaba77db5bd97442",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"owner": "iofq",
|
||||
"repo": "nvim.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
|
@ -89,25 +96,21 @@
|
|||
"home-manager": "home-manager",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"sops-nix": "sops-nix"
|
||||
"nvim": "nvim"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1682823324,
|
||||
"narHash": "sha256-KNu3OAqVyoKwnDP+gqptjQYCnZXxEwXccR89c0r1/8k=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "4f308f76633f81253a12b80e7b05b80d325005b2",
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
17
flake.nix
17
flake.nix
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
description = "Home Manager configuration";
|
||||
description = "Home Manager && NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
|
@ -8,17 +8,18 @@
|
|||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
nvim = {
|
||||
url = "github:iofq/nvim.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
outputs = { self, nixpkgs, home-manager, nixos-hardware, sops-nix, ... }:
|
||||
outputs = { self, nixpkgs, home-manager, nixos-hardware, ... } @inputs:
|
||||
let
|
||||
username = "e";
|
||||
in {
|
||||
nixosConfigurations = (
|
||||
import ./hosts {
|
||||
inherit (nixpkgs) lib;
|
||||
inherit nixpkgs home-manager nixos-hardware sops-nix username;
|
||||
}
|
||||
nixosConfigurations = ( import ./nixos { inherit inputs; } );
|
||||
homeConfigurations = (
|
||||
import ./home { inherit inputs; }
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
31
home/common.nix
Executable file
31
home/common.nix
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
imports = ( import ../modules/programs );
|
||||
programs.home-manager.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
package = pkgs.nixFlakes;
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
home = {
|
||||
stateVersion = "22.11";
|
||||
packages = with pkgs; [
|
||||
pulseaudio
|
||||
pulsemixer
|
||||
alsa-utils
|
||||
appimage-run
|
||||
wireguard-tools
|
||||
spleen
|
||||
];
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
fonts.fontconfig.enable = true;
|
||||
systemd.user.startServices = "sd-switch";
|
||||
}
|
||||
25
home/default.nix
Normal file
25
home/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ inputs, ...}:
|
||||
{
|
||||
"e" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import inputs.nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
inherit (inputs.nvim.packages.${final.system}) iofqvim;
|
||||
})
|
||||
];
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
host = {
|
||||
hostName = "t14";
|
||||
username = "e";
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./t14/home.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
{ username, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../../modules/wayland
|
||||
../../modules/librewolf
|
||||
../home.nix
|
||||
../common.nix
|
||||
];
|
||||
home = {
|
||||
username = "e";
|
||||
homeDirectory = "/home/e";
|
||||
packages = with pkgs; [
|
||||
pulseaudio
|
||||
pulsemixer
|
||||
alsa-utils
|
||||
discord
|
||||
signal-desktop
|
||||
runelite
|
||||
framesh
|
||||
iofqvim
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
{ lib, nixpkgs, username, home-manager, nixos-hardware, sops-nix, ... }:
|
||||
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
t14 = lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit username;
|
||||
host = {
|
||||
hostName = "t14";
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
sops-nix.nixosModules.sops
|
||||
./configuration.nix
|
||||
./t14/configuration.nix
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit username;
|
||||
};
|
||||
home-manager.sharedModules = [
|
||||
sops-nix.homeManagerModule
|
||||
];
|
||||
home-manager.users.${username} = {
|
||||
programs.home-manager.enable = true;
|
||||
imports = [
|
||||
./t14/home.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
{ username, pkgs, ... }:
|
||||
{
|
||||
imports = ( import ../modules/programs );
|
||||
home = {
|
||||
inherit username;
|
||||
stateVersion = "22.11";
|
||||
packages = with pkgs; [
|
||||
htop
|
||||
appimage-run
|
||||
ripgrep
|
||||
fluxcd
|
||||
k9s
|
||||
];
|
||||
};
|
||||
systemd.user.startServices = "sd-switch";
|
||||
xdg.enable = true;
|
||||
}
|
||||
|
|
@ -28,7 +28,4 @@
|
|||
enable = true;
|
||||
pinentryFlavor = "curses";
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
oath-toolkit
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
[
|
||||
./dev.nix
|
||||
./alacritty
|
||||
./nvim
|
||||
#./nvim
|
||||
./shell
|
||||
./git
|
||||
./2fa
|
||||
|
|
|
|||
10
modules/programs/dev.nix
Normal file
10
modules/programs/dev.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
fluxcd
|
||||
k9s
|
||||
kubectl
|
||||
python3
|
||||
];
|
||||
}
|
||||
|
|
@ -1,44 +1,44 @@
|
|||
{ pkgs, ...}:
|
||||
{
|
||||
xdg.configFile.nvim = {
|
||||
source = ../../../config/nvim;
|
||||
recursive = true;
|
||||
};
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
extraConfig = ":luafile ~/.config/nvim/lua/init.lua";
|
||||
xdg.configFile.nvim = {
|
||||
source = ../../../config/nvim;
|
||||
recursive = true;
|
||||
};
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
extraConfig = ":luafile ~/.config/nvim/lua/init.lua";
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-commentary
|
||||
vim-surround
|
||||
toggleterm-nvim
|
||||
targets-vim
|
||||
indent-blankline-nvim
|
||||
vim-go
|
||||
vim-nix
|
||||
(nvim-treesitter.withPlugins
|
||||
(
|
||||
plugins: with plugins; [
|
||||
tree-sitter-bash
|
||||
tree-sitter-c
|
||||
tree-sitter-dockerfile
|
||||
tree-sitter-go
|
||||
tree-sitter-javascript
|
||||
tree-sitter-json
|
||||
tree-sitter-lua
|
||||
tree-sitter-nix
|
||||
tree-sitter-php
|
||||
tree-sitter-python
|
||||
tree-sitter-yaml
|
||||
]
|
||||
)
|
||||
)
|
||||
nvim-treesitter-textobjects
|
||||
leap-nvim
|
||||
telescope-nvim
|
||||
];
|
||||
};
|
||||
}
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
vim-commentary
|
||||
vim-surround
|
||||
toggleterm-nvim
|
||||
targets-vim
|
||||
indent-blankline-nvim
|
||||
vim-go
|
||||
vim-nix
|
||||
(nvim-treesitter.withPlugins
|
||||
(
|
||||
plugins: with plugins; [
|
||||
tree-sitter-bash
|
||||
tree-sitter-c
|
||||
tree-sitter-dockerfile
|
||||
tree-sitter-go
|
||||
tree-sitter-javascript
|
||||
tree-sitter-json
|
||||
tree-sitter-lua
|
||||
tree-sitter-nix
|
||||
tree-sitter-php
|
||||
tree-sitter-python
|
||||
tree-sitter-yaml
|
||||
]
|
||||
)
|
||||
)
|
||||
nvim-treesitter-textobjects
|
||||
leap-nvim
|
||||
telescope-nvim
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ homeDirectory, pkgs, ...}:
|
||||
{ pkgs, host, ...}:
|
||||
{
|
||||
imports = [
|
||||
(import ./tmux.nix)
|
||||
|
|
@ -19,9 +19,8 @@
|
|||
":q" = "exit";
|
||||
mpv = "mpv --no-keepaspect-window";
|
||||
sus = "systemctl suspend";
|
||||
gitu = "git add . && git commit && git push";
|
||||
rcp = "rsync -avh --progress";
|
||||
|
||||
hms = "home-manager switch --flake $NIX_FLAKE#${host.username}";
|
||||
rbs = "sudo nixos-rebuild switch --flake $NIX_FLAKE#${host.hostName}";
|
||||
};
|
||||
shellOptions = [
|
||||
"cmdhist"
|
||||
|
|
@ -39,6 +38,7 @@
|
|||
export MANPAGER="nvim +Man!"
|
||||
export EDITOR="nvim"
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
export NIX_FLAKE="/home/e/dev/nix"
|
||||
[[ $- != *i* ]] && return
|
||||
function exists {
|
||||
type $1 >/dev/null 2>&1
|
||||
|
|
|
|||
|
|
@ -130,10 +130,6 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
extraConfig=''
|
||||
bindswitch lid:on output eDP-1 disable
|
||||
bindswitch lid:off output eDP-1 enable
|
||||
'';
|
||||
};
|
||||
programs.i3status = {
|
||||
enable = true;
|
||||
|
|
@ -202,11 +198,11 @@
|
|||
events = [
|
||||
{ event = "lock"; command = "${pkgs.swaylock}/bin/swaylock";}
|
||||
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock";}
|
||||
{ event = "after-resume"; command = "${pkgs.sway}/bin/swaymsg \"output * power on\"";}
|
||||
{ event = "after-resume"; command = "${pkgs.sway}/bin/swaymsg \"output * toggle\"";}
|
||||
];
|
||||
timeouts = [
|
||||
{ timeout = 600; command = "${pkgs.swaylock}/bin/swaylock";}
|
||||
{ timeout = 1200; command = "${pkgs.sway}/bin/swaymsg \"output * power off\"";}
|
||||
{ timeout = 1200; command = "${pkgs.sway}/bin/swaymsg \"output * toggle\"";}
|
||||
];
|
||||
};
|
||||
services.kanshi = {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
{ config, pkgs, username, ... }:
|
||||
{ packages, host, ... }:
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "America/Chicago";
|
||||
users.users.${username} = {
|
||||
|
||||
users.groups.plugdev = {}; # Create plugdev group
|
||||
|
||||
users.users.${host.username} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
|
|
@ -12,8 +15,17 @@
|
|||
"video"
|
||||
];
|
||||
};
|
||||
users.groups.plugdev = {};
|
||||
security.pam.services.swaylock = {};
|
||||
time.timeZone = "America/Chicago";
|
||||
|
||||
# Enable flakes and unfree packages
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "00:00";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
21
nixos/default.nix
Normal file
21
nixos/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ inputs, ... }:
|
||||
let
|
||||
in
|
||||
{ t14 = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
host = {
|
||||
hostName = "t14";
|
||||
username = "e";
|
||||
};
|
||||
};
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./t14/configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen1
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1,28 +1,24 @@
|
|||
{ config, pkgs, nixos-hardware, sops-nix, ... }:
|
||||
{ pkgs, nixos-hardware, host, ... }:
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
./nano.nix
|
||||
];
|
||||
networking.hostName = "t14";
|
||||
networking.hostName = host.hostName;
|
||||
environment.systemPackages = with pkgs; [
|
||||
cryptsetup
|
||||
];
|
||||
fonts = {
|
||||
fonts = with pkgs; [
|
||||
spleen
|
||||
roboto
|
||||
];
|
||||
};
|
||||
|
||||
programs.light.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
system.stateVersion = "22.11";
|
||||
}
|
||||
15
shell.nix
Normal file
15
shell.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# devshell for bootstrapping nixos and home-manager
|
||||
# nix develop
|
||||
|
||||
{ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
NIX_CONFIG = "experimental-features = nix-command flakes";
|
||||
nativeBuildInputs = with pkgs; [
|
||||
nix
|
||||
home-manager
|
||||
git
|
||||
vim
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue