Created
April 7, 2021 09:24
-
-
Save quiloos39/5c3fa022b26f67d34166ae236d57da90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ | |
./hardware-configuration.nix | |
<home-manager/nixos> | |
]; | |
boot = { | |
loader = { | |
systemd-boot.enable = true; | |
efi.canTouchEfiVariables = true; | |
}; | |
}; | |
security.sudo.wheelNeedsPassword = false; | |
networking = { | |
hostName = "nixos"; | |
networkmanager.enable = true; | |
}; | |
time.timeZone = "Europe/Istanbul"; | |
i18n.defaultLocale = "en_US.UTF-8"; | |
console = { | |
font = "Lat2-Terminus16"; | |
keyMap = "trq"; | |
}; | |
services.gnome3 = { | |
chrome-gnome-shell.enable = true; | |
}; | |
services.xserver = { | |
enable = true; | |
layout = "tr"; | |
xkbOptions = "eurosign:e"; | |
desktopManager.gnome3.enable = true; | |
displayManager.gdm.enable = true; | |
}; | |
systemd.services.bd_prochot_off = { | |
wantedBy = [ "graphical.target" ]; | |
path = with pkgs; [ module_init_tools msr-tools bc ]; | |
script = | |
'' | |
modprobe msr | |
r=`rdmsr 0x1FC` | |
s="0x'$r'" | |
f=$(($s&0xFFFFE)) | |
wrmsr 0x1FC "obase=16;$f" | bc | |
''; | |
}; | |
sound.enable = true; | |
hardware.pulseaudio.enable = true; | |
users.users.necdet = { | |
isNormalUser = true; | |
extraGroups = [ "wheel" "networkmanager" "docker" "libvirtd" "wireshark" ]; | |
shell = pkgs.zsh; | |
}; | |
home-manager.users.necdet = { | |
programs = { | |
git = { | |
enable = true; | |
userName = "quiloos39"; | |
userEmail = "quiloos39@gmail.com"; | |
}; | |
neovim = { | |
enable = true; | |
extraConfig = | |
" | |
syntax on | |
set nu | |
set tabstop=2 | |
set shiftwidth=2 | |
set autoindent | |
set showcmd | |
let mapleader=',' | |
"; | |
viAlias = true; | |
vimAlias = true; | |
plugins = with pkgs.vimPlugins; [ | |
vim-nix | |
nerdcommenter | |
lightline-vim | |
{ | |
plugin = nerdtree; | |
config = "nnoremap <C-t> :NERDTreeToggle <CR>"; | |
} | |
{ | |
plugin = goyo; | |
config = "nnoremap <C-g> :Goyo<CR>"; | |
} | |
{ | |
plugin = changeColorScheme-vim; | |
config = '' | |
nnoremap <F5> :call NextColorScheme()<CR> | |
nnoremap <F4> :call PreviousColorScheme()<CR> | |
''; | |
} | |
{ | |
plugin = awesome-vim-colorschemes; | |
config = "colorscheme sierra"; | |
} | |
{ | |
plugin = gitgutter; | |
config = '' | |
let g:gitgutter_sign_added = '+' | |
let g:gitgutter_sign_modified = '>' | |
let g:gitgutter_sign_removed = '-' | |
let g:gitgutter_sign_removed_first_line = '^' | |
let g:gitgutter_sign_modified_removed = '<' | |
let g:gitgutter_override_sign_column_highlight = 1 | |
highlight SignColumn guibg=bg | |
highlight SignColumn ctermbg=bg | |
''; | |
} | |
]; | |
}; | |
zsh = { | |
enable = true; | |
oh-my-zsh = { | |
enable = true; | |
theme = "gentoo"; | |
plugins = [ "git" ]; | |
}; | |
shellAliases = { | |
"enrc" = "sudoedit /etc/nixos/configuration.nix"; | |
"cat" = "bat"; | |
"nxg" = "sudo nix-collect-garbage -d"; | |
"nrs" = "sudo nixos-rebuild switch"; | |
}; | |
}; | |
}; | |
home.sessionVariables = { | |
EDITOR="nvim"; | |
VISUAL="nvim"; | |
}; | |
}; | |
nixpkgs.config.allowUnfree = true; | |
config = with builtins; mkMerge | |
[ | |
{ environment.systemPackages = with pkgs; [ | |
wget | |
vim | |
neovim | |
firefox | |
msr-tools | |
google-chrome | |
docker | |
discord | |
git | |
openvpn | |
bc | |
bash | |
tmux | |
vscode | |
zsh | |
postman | |
nodejs | |
oh-my-zsh | |
htop | |
qemu_kvm | |
libvirt | |
ghc | |
virt-manager | |
home-manager | |
linuxPackages.cpupower | |
i7z | |
mprime | |
xclip | |
zoom-us | |
vlc | |
libreoffice-fresh | |
(python38.withPackages (ps: with ps; [ | |
ipython | |
jupyterlab | |
matplotlib | |
])) | |
nix-index | |
bat | |
obs-studio | |
docker-compose | |
wireshark | |
nodePackages.http-server | |
]; | |
} | |
(mkIf services.xserver.desktopManager.gnome3.enable { | |
environment.systemPackages = with pkgs; [ | |
gnomeExtensions.dash-to-dock | |
gnome3.gnome-tweak-tool | |
]; | |
}) | |
]; | |
nixpkgs.config.permittedInsecurePackages = [ | |
"adobe-reader-9.5.5-1" | |
]; | |
virtualisation = { | |
docker.enable = true; | |
libvirtd.enable = true; | |
}; | |
programs.wireshark.enable = true; | |
powerManagement = { | |
cpuFreqGovernor = "performance"; | |
scsiLinkPolicy = "max_performance"; | |
}; | |
system.stateVersion = "20.09"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment