init
This commit is contained in:
112
home/core.nix
Normal file
112
home/core.nix
Normal file
@@ -0,0 +1,112 @@
|
||||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
|
||||
{ outputs, lib, config, pkgs, username, useremail, sysversion, ... }: {
|
||||
|
||||
home = {
|
||||
inherit username;
|
||||
homeDirectory = "/home/${username}";
|
||||
|
||||
# Add stuff for your user as you see fit:
|
||||
packages = with pkgs; [
|
||||
nixpkgs-fmt
|
||||
];
|
||||
};
|
||||
|
||||
# Enable git
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
|
||||
userName = username;
|
||||
userEmail = useremail;
|
||||
|
||||
includes = [
|
||||
{
|
||||
# use diffrent email & name for work
|
||||
path = "~/work/.gitconfig";
|
||||
condition = "gitdir:~/work/";
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "master";
|
||||
push.autoSetupRemote = true;
|
||||
pull.rebase = true;
|
||||
|
||||
# replace https with ssh
|
||||
# url = {
|
||||
# "ssh://git@github.com/" = {
|
||||
# insteadOf = "https://github.com/";
|
||||
# };
|
||||
# "ssh://git@gitlab.com/" = {
|
||||
# insteadOf = "https://gitlab.com/";
|
||||
# };
|
||||
# "ssh://git@bitbucket.com/" = {
|
||||
# insteadOf = "https://bitbucket.com/";
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
bashrcExtra = "";
|
||||
shellAliases = {
|
||||
la = "ls -la";
|
||||
ll = "ls -l";
|
||||
"nixos-switch" = "sudo nixos-rebuild switch --flake /home/${username}/.nix";
|
||||
};
|
||||
};
|
||||
|
||||
vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
plugins = with pkgs.vimPlugins; [ vim-airline ];
|
||||
settings = { ignorecase = true; };
|
||||
extraConfig = ''
|
||||
set mouse=a
|
||||
set expandtab
|
||||
set tabstop=2
|
||||
set softtabstop=2
|
||||
set shiftwidth=2
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
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
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = (_: 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 = sysversion;
|
||||
}
|
||||
56
home/desktop.nix
Normal file
56
home/desktop.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
# 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, useremail, ... }:
|
||||
{
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
./core.nix
|
||||
../modules/home/hyprland
|
||||
../modules/home/vscode
|
||||
../modules/home/zsh
|
||||
../modules/home/xdg.nix
|
||||
../modules/home/theme.nix
|
||||
../modules/home/fcitx.nix
|
||||
../modules/home/wechat.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
# Add stuff for your user as you see fit:
|
||||
packages = with pkgs; [
|
||||
bc # GNU software calculator
|
||||
vlc
|
||||
imv # image viewer
|
||||
microsoft-edge
|
||||
chromium
|
||||
wpsoffice
|
||||
yazi # terminal file manager
|
||||
|
||||
zip
|
||||
unzip
|
||||
usbutils # lsusb etc.
|
||||
lsof # lsof process util
|
||||
htop # process monitor
|
||||
pciutils # lspci etc.
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
JAVA_HOME = "";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
# Enable home-manager and git
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
# git.enable = true;
|
||||
};
|
||||
}
|
||||
26
home/server.nix
Normal file
26
home/server.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
# 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, useremail, ... }: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./nvim.nix
|
||||
./core.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
# Add stuff for your user as you see fit:
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
|
||||
# Enable home-manager and git
|
||||
programs = { };
|
||||
}
|
||||
Reference in New Issue
Block a user