Get home-manager configurations working
This commit is contained in:
parent
3b8a6567b2
commit
6ce8b4264e
1
dotfiles
Submodule
1
dotfiles
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 3c006855689bcaeb401e2b52c979ce4c57cd8fd5
|
@ -76,6 +76,7 @@
|
|||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
${settings.user.name} = mkHome ./users/main-user.nix;
|
${settings.user.name} = mkHome ./users/main-user.nix;
|
||||||
|
"root" = mkHome ./users/root.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
8
modules/home/profiles/desktop.nix
Normal file
8
modules/home/profiles/desktop.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{pkgs, settings, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.file = {
|
||||||
|
".config/mpv".source = ../../../dotfiles/.config/mpv;
|
||||||
|
".config/polybar".source = ../../../dotfiles/.config/polybar;
|
||||||
|
};
|
||||||
|
}
|
7
modules/home/profiles/gaming-pc.nix
Normal file
7
modules/home/profiles/gaming-pc.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{pkgs, settings, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./desktop.nix
|
||||||
|
];
|
||||||
|
}
|
@ -1,8 +1,57 @@
|
|||||||
{pkgs, settings, ...}:
|
{pkgs, settings, ...}:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
home.file = {
|
||||||
|
".config/zsh/plugins/zsh-autosuggestions".source = "${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions";
|
||||||
|
".config/zsh/plugins/fast-syntax-highlighting".source = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
|
||||||
|
".config/zsh/plugins/nix-zsh-completions".source = "${pkgs.nix-zsh-completions}/share/zsh/plugins/nix";
|
||||||
|
".config/zsh/plugins/pure".source = "${pkgs.pure-prompt}/share/zsh/site-functions";
|
||||||
|
".config/zsh/functions".source = ../../dotfiles/.config/zsh/functions;
|
||||||
|
".config/zsh/keybinds.zsh".source = ../../dotfiles/.config/zsh/keybinds.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dotDir = ".config/zsh";
|
dotDir = ".config/zsh";
|
||||||
|
envExtra = ''
|
||||||
|
export EDITOR="vim"
|
||||||
|
export TERMINAL="konsole"
|
||||||
|
export TERM="konsole"
|
||||||
|
export BROWSER="firefox"
|
||||||
|
export VIDEO="mpv"
|
||||||
|
export OPENER="xdg-open"
|
||||||
|
'';
|
||||||
|
initExtra = ''
|
||||||
|
# Set emacs key binding.
|
||||||
|
bindkey -e
|
||||||
|
|
||||||
|
# Import functions.
|
||||||
|
source "$ZDOTDIR/functions"
|
||||||
|
|
||||||
|
# Set custom key bindings.
|
||||||
|
zsh_add_config keybinds.zsh
|
||||||
|
|
||||||
|
# Configure pure-prompt.
|
||||||
|
export PURE_PROMPT_SYMBOL="$"
|
||||||
|
if [ "$USER" = "root" ]; then
|
||||||
|
export PURE_PROMPT_SYMBOL="#"
|
||||||
|
fi
|
||||||
|
export PROMPT_PURE_SSH_CONNECTION=YES
|
||||||
|
zsh_fpath_plugin sindresorhus/pure
|
||||||
|
autoload -U promptinit; promptinit
|
||||||
|
zstyle :prompt:pure:user color cyan
|
||||||
|
zstyle :prompt:pure:host color white
|
||||||
|
zstyle ':prompt:pure:prompt:*' color white
|
||||||
|
prompt pure
|
||||||
|
|
||||||
|
# Add extra plugins.
|
||||||
|
zsh_add_plugin zdharma-continuum/fast-syntax-highlighting
|
||||||
|
|
||||||
|
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||||
|
zsh_add_plugin zsh-users/zsh-autosuggestions
|
||||||
|
|
||||||
|
# Show off the system.
|
||||||
|
${pkgs.fastfetch}/bin/fastfetch
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -91,6 +91,10 @@
|
|||||||
# Nix Package Auto Cleanup
|
# Nix Package Auto Cleanup
|
||||||
nix = {
|
nix = {
|
||||||
settings.auto-optimise-store = true;
|
settings.auto-optimise-store = true;
|
||||||
|
optimise = {
|
||||||
|
automatic = true;
|
||||||
|
dates = [ "03:45" ];
|
||||||
|
};
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "weekly";
|
dates = "weekly";
|
||||||
|
@ -67,6 +67,9 @@
|
|||||||
vlc
|
vlc
|
||||||
kdePackages.k3b
|
kdePackages.k3b
|
||||||
|
|
||||||
|
# Desktop
|
||||||
|
polybar
|
||||||
|
|
||||||
# Software defined radio
|
# Software defined radio
|
||||||
gqrx
|
gqrx
|
||||||
];
|
];
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
};
|
};
|
||||||
users = {
|
users = {
|
||||||
${settings.user.name} = import ../../users/main-user.nix;
|
${settings.user.name} = import ../../users/main-user.nix;
|
||||||
|
"root" = import ../../users/root.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,12 @@
|
|||||||
imports = [
|
imports = [
|
||||||
../modules/home/git.nix
|
../modules/home/git.nix
|
||||||
../modules/home/zsh.nix
|
../modules/home/zsh.nix
|
||||||
];
|
] ++ (if (builtins.pathExists ../modules/home/profiles/${settings.profile}.nix)
|
||||||
|
then
|
||||||
|
[ ../modules/home/profiles/${settings.profile}.nix ]
|
||||||
|
else
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
|
||||||
home.username = settings.user.name;
|
home.username = settings.user.name;
|
||||||
home.homeDirectory = "/home/${settings.user.name}";
|
home.homeDirectory = "/home/${settings.user.name}";
|
||||||
|
23
users/root.nix
Normal file
23
users/root.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{pkgs, settings, ...}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../modules/home/zsh.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home.username = "root";
|
||||||
|
home.homeDirectory = "/root";
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# 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 = "23.11";
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user