cleanup by gurjaka
This commit is contained in:
@@ -1,23 +1,25 @@
|
|||||||
{ config, pkgs, ... }:
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
{
|
# Include the results of the hardware scan.
|
||||||
imports =
|
./hardware-configuration.nix
|
||||||
[ # Include the results of the hardware scan.
|
./modules/users/users.nix
|
||||||
./hardware-configuration.nix
|
];
|
||||||
./modules/users/users.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub = {
|
||||||
boot.loader.grub.device = "/dev/vda";
|
enable = true;
|
||||||
boot.loader.grub.useOSProber = true;
|
device = "/dev/vda";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Use latest kernel.
|
# Use latest kernel.
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.hostName = "testVM"; # Define your hostname.
|
networking = {
|
||||||
networking.networkmanager.enable = true;
|
hostName = "testVM"; # Define your hostname.
|
||||||
|
networkmanager.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
@@ -46,14 +48,6 @@
|
|||||||
# Configure console keymap
|
# Configure console keymap
|
||||||
console.keyMap = "de";
|
console.keyMap = "de";
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
# users.users.cerberus = {
|
|
||||||
# isNormalUser = true;
|
|
||||||
# description = "cerberus";
|
|
||||||
# extraGroups = [ "networkmanager" "wheel" ];
|
|
||||||
# packages = with pkgs; [];
|
|
||||||
# };
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
@@ -84,5 +78,4 @@
|
|||||||
# networking.firewall.enable = false;
|
# networking.firewall.enable = false;
|
||||||
|
|
||||||
system.stateVersion = "25.05"; # Did you read the comment?
|
system.stateVersion = "25.05"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
{config, pkgs, ...}:
|
{pkgs, ...}: {
|
||||||
|
|
||||||
{
|
|
||||||
users.users.users.packages = with pkgs; [
|
users.users.users.packages = with pkgs; [
|
||||||
btop
|
btop
|
||||||
ncdu
|
ncdu
|
||||||
tmux
|
tmux
|
||||||
curl
|
curl
|
||||||
bat
|
bat
|
||||||
nethogs
|
nethogs
|
||||||
]
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
{config, pkgs, ...}:
|
{pkgs, ...}: let
|
||||||
|
user = "cerberus";
|
||||||
{
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./zsh.nix
|
(import ./zsh.nix {inherit pkgs user;})
|
||||||
|
./zoxide.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Define user account and dont forget to set a password with 'passwd'
|
# Define user account and dont forget to set a password with 'passwd'
|
||||||
users.users.cerberus = {
|
users.users."${user}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "cerberus";
|
description = "cerberus";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = ["networkmanager" "wheel"];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
9
nixos/modules/users/zoxide.nix
Normal file
9
nixos/modules/users/zoxide.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,36 +1,37 @@
|
|||||||
{config, pkgs, ...}:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
users.users.cerberus.packages = with pkgs; [
|
pkgs,
|
||||||
zoxide
|
user,
|
||||||
fzf
|
...
|
||||||
|
}: {
|
||||||
|
users.users.${user}.packages = with pkgs; [
|
||||||
|
fzf
|
||||||
];
|
];
|
||||||
|
|
||||||
# ZSH configuration
|
# ZSH configuration
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
autosuggestions.enable = true;
|
autosuggestions.enable = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
histSize = 10000;
|
histSize = 10000;
|
||||||
histFile = "$HOME/.zsh_history";
|
histFile = "$HOME/.zsh_history";
|
||||||
setOptions = [
|
setOptions = [
|
||||||
"HIST_IGNORE_ALL_DUPS"
|
"HIST_IGNORE_ALL_DUPS"
|
||||||
"APPEND_HISTORY"
|
"APPEND_HISTORY"
|
||||||
"SHARE_HISTORY"
|
"SHARE_HISTORY"
|
||||||
"HIST_IGNORE_SPACE"
|
"HIST_IGNORE_SPACE"
|
||||||
"EXTENDED_GLOB"
|
"EXTENDED_GLOB"
|
||||||
"CORRECT"
|
"CORRECT"
|
||||||
];
|
];
|
||||||
shellInit = ''
|
shellInit = ''
|
||||||
eval "$(zoxide init zsh)"
|
eval "$(fzf --zsh)"
|
||||||
eval "$(fzf --zsh)"
|
alias ..="cd .."
|
||||||
'';
|
alias ...="cd ../.."
|
||||||
};
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# Setting aliases
|
# Setting aliases
|
||||||
environment.shellAliases = {
|
environment.shellAliases = {
|
||||||
ls = "ls -l --color --hyperlink=auto";
|
ls = "ls -l --color --hyperlink=auto";
|
||||||
# ".." = "cd ..";
|
};
|
||||||
# "..." = "cd ../.."
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user