Added zsh, neovim, and some other stuff.
This commit is contained in:
parent
2dca39131a
commit
6995807563
3012
flake.lock
generated
3012
flake.lock
generated
File diff suppressed because it is too large
Load Diff
13
flake.nix
13
flake.nix
@ -13,9 +13,20 @@
|
|||||||
|
|
||||||
# Let's theme everything easilly
|
# Let's theme everything easilly
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
|
|
||||||
|
# NVF FOR SUPER NVIM
|
||||||
|
nvf = {
|
||||||
|
url = "github:notashelf/nvf";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }@inputs: {
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
home-manager,
|
||||||
|
...
|
||||||
|
} @ inputs: {
|
||||||
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ # Include the results of the hardware scan.
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
@ -15,7 +18,11 @@
|
|||||||
networking.hostName = "nixos"; # Define your hostname.
|
networking.hostName = "nixos"; # Define your hostname.
|
||||||
|
|
||||||
# Enable flakes
|
# Enable flakes
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
||||||
|
# Enable bluetooth
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|
||||||
# Setup gpu
|
# Setup gpu
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
@ -24,8 +31,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Allow for nvidia
|
# Allow for nvidia
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
hardware.nvidia.open = true; # Set to false for proprietary drivers
|
hardware.nvidia.open = false;
|
||||||
hardware.nvidia.modesetting.enable = true;
|
hardware.nvidia.modesetting.enable = true;
|
||||||
hardware.nvidia.powerManagement.enable = true;
|
hardware.nvidia.powerManagement.enable = true;
|
||||||
hardware.nvidia.nvidiaSettings = true;
|
hardware.nvidia.nvidiaSettings = true;
|
||||||
@ -63,6 +70,13 @@
|
|||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "";
|
||||||
|
options = "caps:escape";
|
||||||
|
};
|
||||||
|
|
||||||
# Enable the KDE Plasma Desktop Environment.
|
# Enable the KDE Plasma Desktop Environment.
|
||||||
services.displayManager.sddm.enable = true;
|
services.displayManager.sddm.enable = true;
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
@ -72,13 +86,6 @@
|
|||||||
oxygen
|
oxygen
|
||||||
];
|
];
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "";
|
|
||||||
options = "caps:escape";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
# Enable sound with pipewire.
|
||||||
services.pulseaudio.enable = false;
|
services.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
@ -93,12 +100,12 @@
|
|||||||
users.users.crony = {
|
users.users.crony = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Crony";
|
description = "Crony";
|
||||||
extraGroups = [ "networkmanager" "wheel" "video" "input" "audio" "libvirtd" ];
|
extraGroups = ["networkmanager" "wheel" "video" "input" "audio" "libvirtd"];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Setup home manager
|
# Setup home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {inherit inputs; };
|
extraSpecialArgs = {inherit inputs;};
|
||||||
backupFileExtension = "backup";
|
backupFileExtension = "backup";
|
||||||
users = {
|
users = {
|
||||||
crony = import ./home.nix;
|
crony = import ./home.nix;
|
||||||
@ -139,9 +146,14 @@
|
|||||||
programs.steam.gamescopeSession.enable = true;
|
programs.steam.gamescopeSession.enable = true;
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
|
|
||||||
|
# Installing zsh
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
users.defaultUserShell = pkgs.zsh;
|
||||||
|
environment.pathsToLink = [ "/share/zsh" ];
|
||||||
|
|
||||||
# Enable sytling using stylix
|
# Enable sytling using stylix
|
||||||
stylix.enable = true;
|
stylix.enable = true;
|
||||||
stylix.autoEnable=true;
|
stylix.autoEnable = true;
|
||||||
stylix.image = ./wallpaper.png;
|
stylix.image = ./wallpaper.png;
|
||||||
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
|
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
|
||||||
|
|
||||||
@ -172,6 +184,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable nixd to see nixpkgs path
|
||||||
|
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||||
|
|
||||||
# Change terminal font size
|
# Change terminal font size
|
||||||
stylix.fonts.sizes.terminal = 15;
|
stylix.fonts.sizes.terminal = 15;
|
||||||
|
|
||||||
@ -181,6 +196,12 @@
|
|||||||
# Enable zram swap device
|
# Enable zram swap device
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
|
# Nfs share
|
||||||
|
fileSystems."/mnt/share" = {
|
||||||
|
device = "192.168.0.4:/mnt/nfs";
|
||||||
|
fsType = "nfs";
|
||||||
|
};
|
||||||
|
|
||||||
# DO NOT CHANGE
|
# DO NOT CHANGE
|
||||||
system.stateVersion = "24.11"; # Did you read the comment?
|
system.stateVersion = "24.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,34 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
config,
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = ["kvm-amd"];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/0fbf752d-9234-42bd-9e04-8246de85e8d6";
|
device = "/dev/disk/by-uuid/0fbf752d-9234-42bd-9e04-8246de85e8d6";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/3156-31B6";
|
device = "/dev/disk/by-uuid/3156-31B6";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = ["fmask=0077" "dmask=0077"];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [inputs.nvf.homeManagerModules.default];
|
||||||
|
|
||||||
# Some info
|
# Some info
|
||||||
home.username = "crony";
|
home.username = "crony";
|
||||||
home.homeDirectory = "/home/crony";
|
home.homeDirectory = "/home/crony";
|
||||||
@ -10,6 +15,10 @@
|
|||||||
librewolf
|
librewolf
|
||||||
thunderbird
|
thunderbird
|
||||||
qbittorrent
|
qbittorrent
|
||||||
|
alejandra
|
||||||
|
keepassxc
|
||||||
|
restic
|
||||||
|
age
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable programs to get their themes
|
# Enable programs to get their themes
|
||||||
@ -47,8 +56,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.neovim.enable = true;
|
|
||||||
|
|
||||||
# Enable theming chromium + use ungoogled chromium package
|
# Enable theming chromium + use ungoogled chromium package
|
||||||
programs.chromium = {
|
programs.chromium = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -62,6 +69,172 @@
|
|||||||
userEmail = "crony@cronyakatsuki.xyz";
|
userEmail = "crony@cronyakatsuki.xyz";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Setup neovim
|
||||||
|
programs.nvf = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
vim = {
|
||||||
|
# Enable the aliases, I love them
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
|
||||||
|
# Changing some basic settings
|
||||||
|
options = {
|
||||||
|
tabstop = 2;
|
||||||
|
shiftwidth = 2;
|
||||||
|
updatetime = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the undo file
|
||||||
|
undoFile = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
binds = {
|
||||||
|
# Setup whichkey
|
||||||
|
whichKey.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable gitsings
|
||||||
|
git.gitsigns = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable lsp
|
||||||
|
lsp = {
|
||||||
|
enable = true;
|
||||||
|
lspkind.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Setup the theme
|
||||||
|
theme = {
|
||||||
|
enable = true;
|
||||||
|
name = "gruvbox";
|
||||||
|
style = "dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Setup lsp's and languages
|
||||||
|
languages = {
|
||||||
|
enableLSP = true;
|
||||||
|
enableTreesitter = true;
|
||||||
|
enableFormat = true;
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
bash.enable = true;
|
||||||
|
go.enable = true;
|
||||||
|
markdown = {
|
||||||
|
enable = true;
|
||||||
|
extensions.render-markdown-nvim.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable mini modules ( mini is amazing )
|
||||||
|
mini = {
|
||||||
|
statusline.enable = true;
|
||||||
|
comment.enable = true;
|
||||||
|
notify.enable = true;
|
||||||
|
surround.enable = true;
|
||||||
|
diff.enable = true;
|
||||||
|
pairs.enable = true;
|
||||||
|
indentscope.enable = true;
|
||||||
|
bufremove.enable = true;
|
||||||
|
git.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Use telescope
|
||||||
|
telescope.enable = true;
|
||||||
|
|
||||||
|
# Enable autocompletion
|
||||||
|
autocomplete.nvim-cmp = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
close = null;
|
||||||
|
complete = null;
|
||||||
|
confirm = "<C-l>";
|
||||||
|
next = "<C-j>";
|
||||||
|
previous = "<C-k>";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable syncthing
|
||||||
|
services.syncthing.enable = true;
|
||||||
|
|
||||||
|
# Setup zsh
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
historySubstringSearch.enable = true;
|
||||||
|
|
||||||
|
dotDir = ".config/zsh";
|
||||||
|
|
||||||
|
initExtra = ''
|
||||||
|
# VI Mode escape timeout fix
|
||||||
|
export KEYTIMEOUT=1
|
||||||
|
|
||||||
|
# Substring search settings
|
||||||
|
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold"
|
||||||
|
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=black,bold'
|
||||||
|
bindkey -M vicmd 'k' history-substring-search-up
|
||||||
|
bindkey -M vicmd 'j' history-substring-search-down
|
||||||
|
'';
|
||||||
|
|
||||||
|
zplug = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
{name = "zap-zsh/supercharge";}
|
||||||
|
{name = "zap-zsh/completions";}
|
||||||
|
{name = "zap-zsh/vim";}
|
||||||
|
{name = "chivalryq/git-alias";}
|
||||||
|
{name = "zdharma-continuum/fast-syntax-highlighting";}
|
||||||
|
{name = "zsh-users/zsh-history-substring-search";}
|
||||||
|
{name = "MichaelAquilina/zsh-you-should-use";}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install fzf
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install starship
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install zoxide
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install eza
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
git = true;
|
||||||
|
icons = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Install direnv
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Default environmental variables
|
# Default environmental variables
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
@ -76,4 +249,3 @@
|
|||||||
# DO NOT CHANGE ALSO
|
# DO NOT CHANGE ALSO
|
||||||
home.stateVersion = "24.11"; # Please read the comment before changing.
|
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user