rework home-manager file structure; add simple hyprland conf
This commit is contained in:
parent
c40c333078
commit
b688a738d0
15 changed files with 144 additions and 100 deletions
12
home/common/cli/default.nix
Normal file
12
home/common/cli/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Configures programs that primarily run via the command line
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./fish.nix # fish shell configuration
|
||||
./neovim.nix # neovim configuration, my "escape" editor
|
||||
./lazygit.nix # my preferred git porcellain
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
comma # nix-shell a package by prefixing it with `,`
|
||||
];
|
||||
}
|
3
home/common/cli/lazygit.nix
Normal file
3
home/common/cli/lazygit.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
programs.lazygit.enable = true;
|
||||
}
|
23
home/common/cli/neovim.nix
Normal file
23
home/common/cli/neovim.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
# LazyVim
|
||||
lua-language-server
|
||||
stylua
|
||||
# Telescope
|
||||
ripgrep
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
lazy-nvim
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."nvim/init.lua".source = ../../../dotfiles/nvim/init.lua;
|
||||
xdg.configFile."nvim/stylua.toml".source = ../../../dotfiles/nvim/stylua.toml;
|
||||
xdg.configFile."nvim/.neoconf.json".source = ../../../dotfiles/nvim/.neoconf.json;
|
||||
xdg.configFile."nvim/lua".source = ../../../dotfiles/nvim/lua;
|
||||
}
|
12
home/common/universal/default.nix
Normal file
12
home/common/universal/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./mise.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# some base packages for development, without which nothing would really work
|
||||
gcc
|
||||
gnumake
|
||||
unzip
|
||||
];
|
||||
}
|
27
home/desktop/hyprland/default.nix
Normal file
27
home/desktop/hyprland/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ lib, config, inputs, pkgs, ... }:
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
gaps_in = 15;
|
||||
gaps_out = 20;
|
||||
border_size = 2.7;
|
||||
cursor_inactive_timeout = 4;
|
||||
};
|
||||
animations = {
|
||||
enabled = true;
|
||||
};
|
||||
|
||||
bind = let
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
in [
|
||||
"SUPER,Return,exec,${terminal}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{lib, pkgs, config, ...}: {
|
||||
# install some base linux packages for development
|
||||
home.packages = with pkgs; [
|
||||
gcc
|
||||
gnumake
|
||||
|
||||
lazygit
|
||||
unzip
|
||||
];
|
||||
}
|
6
home/enoko.nix
Normal file
6
home/enoko.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ inputs, lib, pkgs, ... }: {
|
||||
imports = [
|
||||
./global.nix
|
||||
./desktop/hyprland
|
||||
];
|
||||
}
|
39
home/global.nix
Normal file
39
home/global.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ inputs, lib, pkgs, config, outputs, ... }: {
|
||||
imports = [
|
||||
./common/cli
|
||||
./common/universal
|
||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
||||
|
||||
nixpkgs = {
|
||||
overlays = builtins.attrValues outputs.overlays;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
package = lib.mkDefault pkgs.nix;
|
||||
settings = {
|
||||
experimental-features = ["nix-command" "flakes" "repl-flake"];
|
||||
warn-dirty = false;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
git.enable = true;
|
||||
};
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault "lu";
|
||||
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
stateVersion = lib.mkDefault "24.05";
|
||||
sessionPath = ["$HOME/.local/bin"];
|
||||
sessionVariables = {
|
||||
FLAKE = "$HOME/nix-config";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
{ inputs
|
||||
, outputs
|
||||
, lib
|
||||
, config
|
||||
, pkgs
|
||||
, username
|
||||
, ...
|
||||
}: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
./devel.nix
|
||||
./fish.nix
|
||||
./neovim.nix
|
||||
./mise.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
];
|
||||
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
};
|
||||
|
||||
# Enable home-manager and git
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "24.05";
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
# LazyVim
|
||||
lua-language-server
|
||||
stylua
|
||||
# Telescope
|
||||
ripgrep
|
||||
];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
lazy-nvim
|
||||
];
|
||||
};
|
||||
|
||||
xdg.configFile."nvim/init.lua".source = ../dotfiles/nvim/init.lua;
|
||||
xdg.configFile."nvim/stylua.toml".source = ../dotfiles/nvim/stylua.toml;
|
||||
xdg.configFile."nvim/.neoconf.json".source = ../dotfiles/nvim/.neoconf.json;
|
||||
xdg.configFile."nvim/lua".source = ../dotfiles/nvim/lua;
|
||||
}
|
3
home/yukari.nix
Normal file
3
home/yukari.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ inputs, lib, pkgs, ... }: {
|
||||
# nothing here yet...
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue