Files
nixos-config/nixos/custom.nix
T

108 lines
2.6 KiB
Nix

{ config, pkgs, ... }:
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.nameservers = [ "8.8.8.8" "1.1.1.1" ];
networking.networkmanager.insertNameservers = [ "1.1.1.1" "8.8.8.8" ];
networking.firewall.enable = false;
programs.firefox.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ kitty amnezia-vpn lenovo-legion ];
# hardware.fancontrol.enable = true;
# hardware.fancontrol.config = ''
# INTERVAL=5
# FCTEMPS=( /sys/class/hwmon/hwmon9/temp1_input )
# FCFANS=( /sys/class/hwmon/hwmon9/pwm1 )
# MINTEMP=25
# MAXTEMP=90
# MINPWM=50
# MAXPWM=200
# '';
# hardware.fancontrol.config = ''
# INTERVAL=2
# FCTEMPS=hwmon9/device/pwm1=/sys/class/hwmon/hwmon0/temp1_input
# FCFANS=hwmon9/device/pwm1=/sys/class/hwmon/hwmon9/fan1_input
# MINTEMP=hwmon9/device/pwm1=25
# MAXTEMP=hwmon9/device/pwm1=80
# MINPWM=hwmon9/device/pwm1=0
# MAXPWM=hwmon9/device/pwm1=220
# MINSTART=hwmon9/device/pwm1=25
# MINSTOP=hwmon9/device/pwm1=0
# '';
# services.thinkfan = {
# enable = true;
# levels = [
# [ 0 0 25 ] # level, low temp, high temp
# [ 1 20 55 ]
# [ 2 50 65 ]
# [ 3 60 75 ]
# [ 4 70 85 ]
# [ 7 80 200 ]
# ];
# };
security.sudo.extraRules = [{
users = [ "ALL" ];
commands = [{
command = "/run/current-system/sw/bin/AmneziaVPN-service";
options = [ "NOPASSWD" ];
}];
}];
programs.neovim = {
enable = true;
defaultEditor = true;
configure = {
customRC = ''
set runtimepath^=${pkgs.vimPlugins.jellybeans-vim}
colorscheme jellybeans
set number
set cc=80
set list
set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:»
if &diff
colorscheme blue
endif
'';
packages.myVimPackage = with pkgs.vimPlugins; { start = [ ctrlp ]; };
};
};
programs.zsh.enable = true;
boot = {
plymouth = {
enable = true;
theme = "lone";
themePackages = with pkgs;
[
(adi1090x-plymouth-themes.override { selected_themes = [ "lone" ]; })
];
};
consoleLogLevel = 3;
initrd.verbose = false;
kernelModules = [ "tun" "lenovo-legion-module" ]; # for VPN
extraModulePackages = with config.boot.kernelPackages;
[ lenovo-legion-module ];
kernelParams = [
"quiet"
"splash"
"boot.shell_on_fail"
"udev.log_priority=3"
"rd.systemd.show_status=auto"
];
loader.timeout = 0;
};
}