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
15
flake.nix
15
flake.nix
@ -13,14 +13,25 @@
|
||||
|
||||
# Let's theme everything easilly
|
||||
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 {
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./hosts/default/configuration.nix
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -1,11 +1,14 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
@ -15,7 +18,11 @@
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
|
||||
# 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
|
||||
hardware.graphics = {
|
||||
@ -24,8 +31,8 @@
|
||||
};
|
||||
|
||||
# Allow for nvidia
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.open = true; # Set to false for proprietary drivers
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware.nvidia.open = false;
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
hardware.nvidia.powerManagement.enable = true;
|
||||
hardware.nvidia.nvidiaSettings = true;
|
||||
@ -63,6 +70,13 @@
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
options = "caps:escape";
|
||||
};
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
@ -72,13 +86,6 @@
|
||||
oxygen
|
||||
];
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
options = "caps:escape";
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
@ -93,19 +100,19 @@
|
||||
users.users.crony = {
|
||||
isNormalUser = true;
|
||||
description = "Crony";
|
||||
extraGroups = [ "networkmanager" "wheel" "video" "input" "audio" "libvirtd" ];
|
||||
extraGroups = ["networkmanager" "wheel" "video" "input" "audio" "libvirtd"];
|
||||
};
|
||||
|
||||
# Setup home manager
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs; };
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
backupFileExtension = "backup";
|
||||
users = {
|
||||
crony = import ./home.nix;
|
||||
};
|
||||
};
|
||||
|
||||
# Disable hibernation, sleep and other friends
|
||||
# Disable hibernation, sleep and other friends
|
||||
systemd.targets = {
|
||||
sleep = {
|
||||
enable = false;
|
||||
@ -139,9 +146,14 @@
|
||||
programs.steam.gamescopeSession.enable = true;
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
# Installing zsh
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
|
||||
# Enable sytling using stylix
|
||||
stylix.enable = true;
|
||||
stylix.autoEnable=true;
|
||||
stylix.autoEnable = true;
|
||||
stylix.image = ./wallpaper.png;
|
||||
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
|
||||
stylix.fonts.sizes.terminal = 15;
|
||||
|
||||
@ -181,6 +196,12 @@
|
||||
# Enable zram swap device
|
||||
zramSwap.enable = true;
|
||||
|
||||
# Nfs share
|
||||
fileSystems."/mnt/share" = {
|
||||
device = "192.168.0.4:/mnt/nfs";
|
||||
fsType = "nfs";
|
||||
};
|
||||
|
||||
# DO NOT CHANGE
|
||||
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’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/0fbf752d-9234-42bd-9e04-8246de85e8d6";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/0fbf752d-9234-42bd-9e04-8246de85e8d6";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3156-31B6";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/3156-31B6";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# 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
|
||||
|
@ -1,6 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.nvf.homeManagerModules.default];
|
||||
|
||||
# Some info
|
||||
home.username = "crony";
|
||||
home.homeDirectory = "/home/crony";
|
||||
@ -10,6 +15,10 @@
|
||||
librewolf
|
||||
thunderbird
|
||||
qbittorrent
|
||||
alejandra
|
||||
keepassxc
|
||||
restic
|
||||
age
|
||||
];
|
||||
|
||||
# Enable programs to get their themes
|
||||
@ -47,8 +56,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
programs.neovim.enable = true;
|
||||
|
||||
# Enable theming chromium + use ungoogled chromium package
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
@ -62,6 +69,172 @@
|
||||
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
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
@ -76,4 +249,3 @@
|
||||
# DO NOT CHANGE ALSO
|
||||
home.stateVersion = "24.11"; # Please read the comment before changing.
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user