Add first machine user config

This commit is contained in:
Michael Thomas 2021-02-18 19:54:37 -05:00
parent a5178d3096
commit 5b75eb7775
10 changed files with 148 additions and 0 deletions

5
nixpkgs/README.md Normal file
View File

@ -0,0 +1,5 @@
# Home Manager Configuration
This directory contains my configuration for home-manager, which can be easily installed by running `./install.sh {machine name}`.
The `machines` folder contains userland configs for specific machines. Each of these configs will import modules from the `modules` folder for shell config, git config, etc.

5
nixpkgs/install.sh Executable file
View File

@ -0,0 +1,5 @@
# Where first arg is directory under machines, can be one of macos, fedora, nixos
mkdir -p $HOME/.config
ln -s $(pwd) $HOME/.config/nixpkgs
ln -s $(pwd)/machines/$1/home.nix $HOME/.config/nixpkgs/home.nix
ln -s $(pwd)/machines/$1/config.nix $HOME/.config/nixpkgs/config.nix

View File

@ -0,0 +1,3 @@
{
allowUnfree = true;
}

View File

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
imports = [
../../modules/home-manager.nix
../../modules/fonts.nix
../../modules/git.nix
../../modules/gnome.nix
../../modules/vscode.nix
../../modules/zsh.nix
];
home.packages = with pkgs; [
neofetch
fortune
];
}

View File

@ -0,0 +1,8 @@
{ config, pkgs, libs, ... }:
{
home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" ]; })
];
fonts.fontconfig.enable = true;
}

12
nixpkgs/modules/git.nix Normal file
View File

@ -0,0 +1,12 @@
{ config, pkgs, libs, ... }:
{
home.packages = with pkgs; [
git-lfs
];
programs.git = {
enable = true;
userEmail = "michaelhthomas@outlook.com";
userName = "Michael Thomas";
};
}

27
nixpkgs/modules/gnome.nix Normal file
View File

@ -0,0 +1,27 @@
{ config, pkgs, libs, ... }:
{
home.packages = with pkgs; [
gnomeExtensions.caffeine
];
gtk = {
enable = true;
theme.name = "Adwaita-dark";
# font.name = "Ubuntu 12";
iconTheme = {
name = "Papirus";
package = pkgs.papirus-icon-theme;
};
};
programs.gnome-terminal = {
enable = true;
profile = {
"5ddfe964-7ee6-4131-b449-26bdd97518f7" = {
default = true;
visibleName = "Michael";
font = "FiraCode Nerd Font 12";
};
};
};
}

View File

@ -0,0 +1,20 @@
{ config, pkgs, libs, ... }:
{
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = builtins.getEnv "USER";
home.homeDirectory = builtins.getEnv "HOME";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "21.03";
}

View File

@ -0,0 +1,15 @@
{ config, pkgs, libs, ... }:
{
programs = {
vscode = {
enable = true;
extensions = [
pkgs.vscode-extensions.bbenoist.Nix
];
# userSettings = {
# "editor.fontFamily" = "'FiraCode Nerd Font', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";
# "editor.tabSize" = 2;
# };
};
};
}

35
nixpkgs/modules/zsh.nix Normal file
View File

@ -0,0 +1,35 @@
{ config, pkgs, libs, ... }:
{
programs.zsh = {
enable = true;
prezto = {
enable = true;
pmodules = [
"archive"
"docker"
"environment"
"git"
"terminal"
"editor"
"history"
"directory"
"spectrum"
"utility"
"completion"
"command-not-found"
"syntax-highlighting"
"history-substring-search"
"autosuggestions"
"prompt"
];
};
};
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
character.symbol = "";
character.success_symbol = "[](bold green)";
};
};
}