mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
users/foo-dogsquared: modularize shell setup
This commit is contained in:
parent
77139559a9
commit
a70b8ad5d6
@ -17,6 +17,7 @@
|
||||
git.enable = true;
|
||||
keys.gpg.enable = true;
|
||||
keys.ssh.enable = true;
|
||||
shell.enable = true;
|
||||
};
|
||||
|
||||
services.desktop.enable = true;
|
||||
@ -31,19 +32,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
# My user shell of choice because I'm not a hipster.
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
historyControl = [ "erasedups" "ignoredups" "ignorespace" ];
|
||||
historyIgnore = [
|
||||
"cd"
|
||||
"exit"
|
||||
"lf"
|
||||
"ls"
|
||||
"nvim"
|
||||
];
|
||||
};
|
||||
|
||||
# Set nixpkgs config both outside and inside of home-manager.
|
||||
nixpkgs.config = import ./config/nixpkgs/config.nix;
|
||||
xdg.configFile."nixpkgs/config.nix".source = ./config/nixpkgs/config.nix;
|
||||
@ -69,13 +57,6 @@
|
||||
};
|
||||
# My custom modules.
|
||||
profiles = {
|
||||
dev = {
|
||||
enable = true;
|
||||
shell.enable = true;
|
||||
extras.enable = true;
|
||||
shaders.enable = true;
|
||||
servers.enable = true;
|
||||
};
|
||||
editors = {
|
||||
emacs.enable = true;
|
||||
vscode.enable = true;
|
||||
@ -89,12 +70,6 @@
|
||||
research.enable = true;
|
||||
};
|
||||
|
||||
|
||||
systemd.user.sessionVariables = {
|
||||
MANPAGER = "nvim +Man!";
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
xdg.userDirs = {
|
||||
|
@ -8,6 +8,7 @@
|
||||
./programs/email.nix
|
||||
./programs/git.nix
|
||||
./programs/keys.nix
|
||||
./programs/shell.nix
|
||||
|
||||
./services/desktop.nix
|
||||
];
|
||||
|
42
users/home-manager/foo-dogsquared/modules/programs/shell.nix
Normal file
42
users/home-manager/foo-dogsquared/modules/programs/shell.nix
Normal file
@ -0,0 +1,42 @@
|
||||
# My user shell of choice because I'm not a hipster.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
userCfg = config.users.foo-dogsquared;
|
||||
cfg = userCfg.programs.shell;
|
||||
in
|
||||
{
|
||||
options.users.foo-dogsquared.programs.shell.enable = lib.mkEnableOption "configuration of foo-dogsquared's shell of choice and its toolbelt";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Add the dev home-manager profiles to be more of a hipster.
|
||||
profiles.dev = {
|
||||
enable = true;
|
||||
extras.enable = true;
|
||||
shell.enable = true;
|
||||
servers.enable = true;
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
historyControl = [ "erasedups" "ignoredups" "ignorespace" ];
|
||||
historyIgnore = [
|
||||
"cd"
|
||||
"exit"
|
||||
"lf"
|
||||
"ls"
|
||||
"nvim"
|
||||
];
|
||||
};
|
||||
|
||||
# Set up with these variables.
|
||||
systemd.user.sessionVariables = {
|
||||
PAGER = "moar";
|
||||
MANPAGER = "nvim +Man!";
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
# Add it to the laundry list.
|
||||
services.bleachbit.cleaners = [ "bash.history" ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user