Archived
0
0
Fork 0

separate home-manager into separate files

This commit is contained in:
Daryl Ronningen 2023-01-01 23:49:55 -08:00
parent 9ed80f122e
commit ade0c23a94
Signed by: Daryl Ronningen
GPG key ID: FD23F0C934A5EC6B
7 changed files with 192 additions and 189 deletions

View file

@ -13,7 +13,7 @@
profiles = { profiles = {
laptop = { laptop = {
fingerprint = { fingerprint = {
eDP-1 = "00ffffffffffff0009e55f0900000000171d0104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a00fb"; eDP-1 = "00ffffffffffff0009e55f0900000000171d0104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a00fb";
}; };
config = { config = {
eDP-1 = { eDP-1 = {

View file

@ -29,9 +29,18 @@
... ...
}: let }: let
modules = { modules = {
home = [ home = {
./users/relms/home.nix common = [
]; ./users/relms/base.nix
./users/relms/shell.nix
];
dev = [
./users/relms/dev.nix
];
gui = [
./users/relms/gui.nix
];
};
nixos = { nixos = {
common = [ common = [
./common/personal.nix ./common/personal.nix
@ -90,7 +99,7 @@
homeConfigurations.relms = home-manager.lib.homeManagerConfiguration { homeConfigurations.relms = home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
modules = modules.home; modules = modules.home.common ++ modules.home.dev ++ modules.home.gui;
}; };
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;

21
users/relms/base.nix Normal file
View file

@ -0,0 +1,21 @@
{
lib,
config,
pkgs,
...
}: {
home.username = "relms";
home.homeDirectory = "/home/relms";
home.stateVersion = "22.11";
programs.home-manager.enable = true;
programs.gpg.enable = true;
services.gpg-agent.enable = true;
services.gpg-agent.enableSshSupport = true;
services.gpg-agent.pinentryFlavor = "gnome3";
services.gnome-keyring.enable = true;
services.gnome-keyring.components = ["pkcs11" "secrets" "ssh"];
}

74
users/relms/dev.nix Normal file
View file

@ -0,0 +1,74 @@
{pkgs, ...}: {
home.packages = with pkgs; [
gcc12
xsel
wget
rustup
tree-sitter
];
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userEmail = "relms@relms.dev";
userName = "Daryl Ronningen";
delta = {
enable = true;
options = {
navigate = true;
light = false;
line-numbers = true;
side-by-side = true;
};
};
extraConfig = {
init = {
defaultBranch = "main";
};
pull = {
rebase = false;
};
credential = {
helper = "store";
};
core = {
editor = "nvim";
};
};
signing = {
signByDefault = true;
key = "3905311D17C0E1E8AD2B3439FD23F0C934A5EC6B";
};
};
programs.neovim = {
enable = true;
package = pkgs.neovim;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = true;
};
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.lazygit.enable = true;
programs.lazygit.settings = {
gui = {
showIcons = true;
};
git = {
paging = {
colorArg = "always";
pager = "delta --dark --paging=never";
};
commit = {
signOff = true;
};
parseEmoji = true;
};
};
}

28
users/relms/gui.nix Normal file
View file

@ -0,0 +1,28 @@
{pkgs, ...}: {
home.packages = with pkgs; [
gnome.nautilus
gnome.gnome-tweaks
gnome.gnome-software
adw-gtk3
numix-icon-theme-circle
];
programs.gnome-terminal = {
enable = true;
profile = {
default = {
default = true;
font = "FiraCode Nerd Font Mono";
visibleName = "Default";
};
};
};
programs.firefox.enable = true;
programs.firefox.package = pkgs.firefox.override {
cfg = {
enableGnomeExtensions = true;
enableTridactylNative = true;
};
};
}

View file

@ -1,184 +0,0 @@
{
lib,
config,
pkgs,
...
}: {
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = "relms";
home.homeDirectory = "/home/relms";
# Some user packages
home.packages = with pkgs; [
gnome.nautilus
gnome.gnome-tweaks
gnome.gnome-software
adw-gtk3
numix-icon-theme-circle
gcc12
xsel
wget
rustup
tree-sitter
];
# 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 = "22.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.htop.enable = true;
programs.hyfetch.enable = true;
programs.hyfetch.settings = {
preset = "genderfluid";
mode = "rgb";
color_align = {
mode = "horizontal";
};
};
programs.exa.enable = true;
programs.fish.enable = true;
programs.fish.shellAliases = {
ls = "exa -laFghHUum@ --sort name --group-directories-first --git --icons";
tree = "exa -laFghHUumRT@ --sort name --group-directories-first --git --icons";
nixos-rebuild = "sudo nixos-rebuild --flake ~/git/flake#";
home-manager = "home-manager --flake ~/git/flake#relms";
};
programs.bash.enable = true;
programs.bash.enableVteIntegration = true;
programs.firefox.enable = true;
programs.firefox.package = pkgs.firefox.override {
cfg = {
enableGnomeExtensions = true;
enableTridactylNative = true;
};
};
programs.starship.enable = true;
programs.starship.enableFishIntegration = true;
programs.starship.enableBashIntegration = true;
programs.starship.settings = {
add_newline = true;
format = lib.concatStrings ["$username@$hostname" " " "$directory" " " "$all$character"];
right_format = "$cmd_duration";
directory = {
format = "[$path]($style)[$read_only]($read_only_style)";
read_only = " 🔒";
};
hostname = {
ssh_only = false;
format = "[$hostname]($style)";
};
username = {
show_always = true;
format = "[$user]($style)";
};
shell = {
disabled = false;
};
time = {
disabled = false;
};
status = {
disabled = false;
};
};
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userEmail = "relms@relms.dev";
userName = "Daryl Ronningen";
delta = {
enable = true;
options = {
navigate = true;
light = false;
line-numbers = true;
side-by-side = true;
};
};
extraConfig = {
init = {
defaultBranch = "main";
};
pull = {
rebase = false;
};
credential = {
helper = "store";
};
core = {
editor = "nvim";
};
};
signing = {
signByDefault = true;
key = "3905311D17C0E1E8AD2B3439FD23F0C934A5EC6B";
};
};
programs.neovim = {
enable = true;
package = pkgs.neovim;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
withNodeJs = true;
withPython3 = true;
withRuby = true;
};
programs.gnome-terminal = {
enable = true;
profile = {
default = {
default = true;
font = "FiraCode Nerd Font Mono";
visibleName = "Default";
};
};
};
programs.direnv.enable = true;
programs.direnv.nix-direnv.enable = true;
programs.lazygit.enable = true;
programs.lazygit.settings = {
gui = {
showIcons = true;
};
git = {
paging = {
colorArg = "always";
pager = "delta --dark --paging=never";
};
commit = {
signOff = true;
};
parseEmoji = true;
};
};
programs.gpg.enable = true;
services.gpg-agent.enable = true;
services.gpg-agent.enableSshSupport = true;
services.gpg-agent.pinentryFlavor = "gnome3";
services.gnome-keyring.enable = true;
services.gnome-keyring.components = ["pkcs11" "secrets" "ssh"];
}

55
users/relms/shell.nix Normal file
View file

@ -0,0 +1,55 @@
{lib, ...}: {
programs.htop.enable = true;
programs.hyfetch.enable = true;
programs.hyfetch.settings = {
preset = "genderfluid";
mode = "rgb";
color_align = {
mode = "horizontal";
};
};
programs.exa.enable = true;
programs.fish.enable = true;
programs.fish.shellAliases = {
ls = "exa -laFghHUum@ --sort name --group-directories-first --git --icons";
tree = "exa -laFghHUumRT@ --sort name --group-directories-first --git --icons";
nixos-rebuild = "sudo nixos-rebuild --flake ~/git/flake#";
home-manager = "home-manager --flake ~/git/flake#relms";
};
programs.bash.enable = true;
programs.bash.enableVteIntegration = true;
programs.starship.enable = true;
programs.starship.enableFishIntegration = true;
programs.starship.enableBashIntegration = true;
programs.starship.settings = {
add_newline = true;
format = lib.concatStrings ["$username@$hostname" " " "$directory" " " "$all$character"];
right_format = "$cmd_duration";
directory = {
format = "[$path]($style)[$read_only]($read_only_style)";
read_only = " 🔒";
};
hostname = {
ssh_only = false;
format = "[$hostname]($style)";
};
username = {
show_always = true;
format = "[$user]($style)";
};
shell = {
disabled = false;
};
time = {
disabled = false;
};
status = {
disabled = false;
};
};
}