Working on integrating home-manager into NixOS configurations
This commit is contained in:
parent
7a1b4c714f
commit
5b289a3b7d
3 changed files with 114 additions and 2 deletions
|
|
@ -2,8 +2,12 @@
|
||||||
description = "System flake";
|
description = "System flake";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
}
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
|
outputs = { self, nixpkgs, ... }@inputs: {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
mecca = nixpkgs.lib.nixosSystem {
|
mecca = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,27 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
];
|
||||||
# Set default user lunita
|
# Set default user lunita
|
||||||
users.users.lunita = {
|
users.users.lunita = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Lunita";
|
description = "Lunita";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = [ "networkmanager" "wheel" ];
|
||||||
packages = with pkgs; [];
|
packages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
firefox
|
||||||
|
];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
|
users = {
|
||||||
|
"lunita" = import ./home.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
# Enable automatic system updates
|
# Enable automatic system updates
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
95
.config/nix/hosts/home.nix
Normal file
95
.config/nix/hosts/home.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "lunita";
|
||||||
|
home.homeDirectory = "/home/lunita";
|
||||||
|
|
||||||
|
home.stateVersion = "25.05";
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
c = "clear";
|
||||||
|
nf = "neofetch";
|
||||||
|
v = "nvim";
|
||||||
|
d = "cd ~/Documents";
|
||||||
|
D = "cd ~/Downloads";
|
||||||
|
dot = "cd ~/dotfiles";
|
||||||
|
};
|
||||||
|
|
||||||
|
initContent = ''
|
||||||
|
# '~' => goto base of user home directory
|
||||||
|
alias ~='cd ~'
|
||||||
|
# Vim keybinds
|
||||||
|
bindkey -v
|
||||||
|
# Preferred editor for local and remote sessions
|
||||||
|
if [[ -n $SSH_CONNECTION ]]; then
|
||||||
|
export EDITOR='vim'
|
||||||
|
else
|
||||||
|
export EDITOR='nvim'
|
||||||
|
fi
|
||||||
|
# Set TERM for Ghostty ssh workaround
|
||||||
|
if [[ "$TERM_PROGRAM" == "ghostty" ]]; then
|
||||||
|
export TERM=xterm-256color
|
||||||
|
fi
|
||||||
|
# Run Hyprland if applicable
|
||||||
|
if [[ "$(tty)" == "/dev/tty"* ]] && command -v Hyprland &> /dev/null; then
|
||||||
|
exec Hyprland
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
|
history.size = 10000;
|
||||||
|
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [ "git" ];
|
||||||
|
theme = "lambda";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "lulusilly";
|
||||||
|
userEmail = "lunita@puppygirl.onl";
|
||||||
|
aliases = {
|
||||||
|
ci = "commit";
|
||||||
|
co = "checkout";
|
||||||
|
s = "status";
|
||||||
|
pu = "push origin master";
|
||||||
|
rmc = "rm -r --cached";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
tree # Nice file tree views w/permissions
|
||||||
|
neofetch # Muh epic r1ce!!!
|
||||||
|
btop # Resource manager
|
||||||
|
stow # For dotfiles deployment. May use home.file in future
|
||||||
|
imagemagick # For converting images into other fmts
|
||||||
|
sxiv # Minimal image viewer
|
||||||
|
mpv # Video player
|
||||||
|
zathura # PDF/CBZ/EPUB/DJVU reader
|
||||||
|
tmux # Tride and true terminal multiplexer
|
||||||
|
obsidian # For epic note taking (really just mediocre journaling)
|
||||||
|
keepassxc # Secure password manager
|
||||||
|
syncthing # Self explanatory
|
||||||
|
ghostty # Terminal emulator
|
||||||
|
# Fonts
|
||||||
|
nerd-fonts.jetbrains-mono
|
||||||
|
miracode
|
||||||
|
monocraft
|
||||||
|
];
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
home.file = {
|
||||||
|
};
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "emacs";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue