mirror of
https://github.com/inexcode/nixos-config.git
synced 2024-11-27 08:21:27 +00:00
Add pc configuration
This commit is contained in:
parent
9039bdc3b1
commit
aa2ca53a67
165
Desktop/configuration.nix
Normal file
165
Desktop/configuration.nix
Normal file
|
@ -0,0 +1,165 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> {};
|
||||
in {
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./software.nix
|
||||
./modules/gnome.nix
|
||||
./modules/zsh.nix
|
||||
];
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
android_sdk.accept_license = true;
|
||||
};
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "inex-pc";
|
||||
networkmanager.enable = true;
|
||||
useDHCP = false;
|
||||
interfaces = {
|
||||
enp7s0 = {
|
||||
useDHCP = true;
|
||||
};
|
||||
wlp8s0 = {
|
||||
useDHCP = true;
|
||||
};
|
||||
};
|
||||
firewall = {
|
||||
enable = false;
|
||||
allowedTCPPorts = [ 1716 51820 24642 27036 27037 ];
|
||||
allowedUDPPorts = [ 1716 51820 24642 27031 27036 ];
|
||||
};
|
||||
wireguard.interfaces = {
|
||||
wg0 = {
|
||||
# Determines the IP address and subnet of the client's end of the tunnel interface.
|
||||
ips = [ "10.100.0.6/24" ];
|
||||
|
||||
# Path to the private key file.
|
||||
#
|
||||
# Note: The private key can also be included inline via the privateKey option,
|
||||
# but this makes the private key world-readable; thus, using privateKeyFile is
|
||||
# recommended.
|
||||
privateKeyFile = "/home/inex/wireguard-keys/private";
|
||||
|
||||
peers = [
|
||||
# For a client configuration, one peer entry for the server will suffice.
|
||||
{
|
||||
# Public key of the server (not a file path).
|
||||
publicKey = "8sEAHYhydEGKTVecXcOb28zeGHGLGCsri5evbSQV8mY=";
|
||||
|
||||
# Forward all the traffic via VPN.
|
||||
# allowedIPs = [ "0.0.0.0/0" ];
|
||||
# Or forward only particular subnets
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
|
||||
# Set this to the server IP and port.
|
||||
endpoint = "135.181.97.221:51820";
|
||||
|
||||
# Send keepalives every 25 seconds. Important to keep NAT tables alive.
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Select internationalisation properties.
|
||||
# i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "us";
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Moscow";
|
||||
|
||||
services = {
|
||||
printing.enable = true;
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "us";
|
||||
xkbVariant = "colemak";
|
||||
videoDrivers = [ "amdgpu" ];
|
||||
libinput.enable = true;
|
||||
exportConfiguration = true;
|
||||
wacom.enable = true;
|
||||
};
|
||||
openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
forwardX11 = true;
|
||||
};
|
||||
pipewire.enable = true;
|
||||
flatpak.enable = true;
|
||||
};
|
||||
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
# Video driver
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = [ pkgs.amdvlk pkgs.rocm-opencl-icd pkgs.rocm-runtime ];
|
||||
};
|
||||
steam-hardware.enable = true;
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
package = pkgs.bluezFull;
|
||||
};
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
support32Bit = true;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
};
|
||||
};
|
||||
|
||||
environment.variables.VK_ICD_FILENAMES = "${pkgs.amdvlk}/share/vulkan/icd.d/amd_icd64.json";
|
||||
|
||||
programs = {
|
||||
adb.enable = true;
|
||||
java = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.inex = {
|
||||
isNormalUser = true;
|
||||
home = "/home/inex";
|
||||
description = "Inex Code";
|
||||
extraGroups = [ "wheel" "networkmanager" "jackaudio" "audio" "video" "adbusers" "docker" ]; # Enable ‘sudo’ for the user.
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzL0gmvpMOZbijqZOlTuNqtVHZGoNrxCiWJXIDcUwr1cx8M2o61qK/wNMZmyYGROpJbpsFERAjXIXBpwg2KQ3ONRL6q44nPrOSbHm3zL8pnFEvzM0BUKV1Mq2T1dM+geMhQnLrwZhOxvp3+9uhFSTPP/dVzWQ19pEiK5hHpXlD3eyO+LIaS/wkTJvBy/wCKz+O/coLyBQ+Mn5hGQaJAyDec/ovu8OhBkJbbvWp03F2zcWUCxwVfZ1VnLQxn7tk9L4iTw1+rDt0kaRQvVISV3KdqLJnPODku6eC38LcMfHIFXAWBdSUslGUl9Qkd1c+6Gorzt3BrfYL/HDW2Xk3UTQF inex-envy"
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCbUS/AblfzZcfr/iMxHJ5pubzCuriVTu12TKt1iRQFDjQDo+/j0/Ga07zqyB9VUhpJg/IOcJ6o2T4PBixNuHQQX5z4sb/tqzbx3buBz0HIp8VHRC3TtLAmsFj24AldxlADlQpGnlt+g3p200m2dwu/Yoe4+GD8Twwg6FCsyiRjstbfo89Kmwi9yVbXx5aBssscEkXBQODTpwOB05nCz3oUuvQ5ex+yH+o02cTlYyBoglgfzM6HzR0GkmCRDlx613nqa1+ICxwWY0cXMbhnUwDoJASk5eJovtmEqC29qJKABxZaKRYsaW3sMJiMOvPHf9BkVKp4uPINhLc5vopwZI10xsNOn75AXRptkHzenn7ymC+qwJr53Z1tAAfMb5ypJ+u+SE8wazd4x2CIFHH+LbaputqxyfUxNoMbFMGNXICDAOCCQ0nkax7Ifr1NlTp07zTYH6VP0kzqqYiAlBu5qo3qIi5dRsLvb6/McerDNhRmYh25Ww7zpEY4Q9uTWDZkCP8= u0_a122@localhost"
|
||||
];
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "20.03"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
31
Desktop/modules/gnome.nix
Normal file
31
Desktop/modules/gnome.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Enable the GNOME Desktop Environment.
|
||||
services.xserver = {
|
||||
displayManager = {
|
||||
gdm = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
autoSuspend = false;
|
||||
};
|
||||
};
|
||||
desktopManager = {
|
||||
gnome3.enable = true;
|
||||
kodi.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
qt5.platformTheme = "gnome";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome3.pomodoro
|
||||
gnome3.gnome-tweaks
|
||||
gnome3.networkmanager-openvpn
|
||||
gnome3.evolution
|
||||
gnomeExtensions.gsconnect
|
||||
paper-icon-theme
|
||||
];
|
||||
}
|
||||
|
26
Desktop/modules/my_vim.nix
Normal file
26
Desktop/modules/my_vim.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{neovim, vimUtils, vimPlugins, stdenv, fetchgit}:
|
||||
|
||||
let custom_config=''
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:airline_theme='dark'
|
||||
'';
|
||||
in neovim.override {
|
||||
vimAlias = true;
|
||||
configure = {
|
||||
customRC = custom_config;
|
||||
vam.pluginDictionaries = [
|
||||
{ names = [
|
||||
"vim-sensible"
|
||||
"vim-airline"
|
||||
"vim-airline-themes"
|
||||
"nerdtree"
|
||||
"vim-nix"
|
||||
"dart-vim-plugin"
|
||||
"coc-nvim"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
|
42
Desktop/modules/zsh.nix
Normal file
42
Desktop/modules/zsh.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
interactiveShellInit = "ponysay -q";
|
||||
autosuggestions = {
|
||||
enable = true;
|
||||
};
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
};
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
"python"
|
||||
"man"
|
||||
"z"
|
||||
"catimg"
|
||||
"copyfile"
|
||||
"encode64"
|
||||
"extract"
|
||||
"npm"
|
||||
"pip"
|
||||
];
|
||||
theme = "spaceship";
|
||||
customPkgs = with pkgs; [
|
||||
pkgs.nix-zsh-completions
|
||||
pkgs.spaceship-prompt
|
||||
pkgs.zsh-autosuggestions
|
||||
pkgs.zsh-syntax-highlighting
|
||||
];
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsh-autosuggestions
|
||||
zsh-syntax-highlighting
|
||||
];
|
||||
}
|
||||
|
132
Desktop/software.nix
Normal file
132
Desktop/software.nix
Normal file
|
@ -0,0 +1,132 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> {};
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Utils
|
||||
cool-retro-term
|
||||
tmux
|
||||
ponysay
|
||||
(pkgs.callPackage ./modules/my_vim.nix {})
|
||||
neofetch
|
||||
pciutils
|
||||
usbutils
|
||||
i2c-tools
|
||||
lm_sensors
|
||||
bind
|
||||
libcec
|
||||
# openvpn
|
||||
git
|
||||
unzip
|
||||
tldr
|
||||
ffmpeg
|
||||
wget
|
||||
nix-bundle
|
||||
nmap
|
||||
file
|
||||
unrar
|
||||
mosh
|
||||
syncthing
|
||||
|
||||
# ROCm
|
||||
rocm-opencl-runtime
|
||||
rocm-smi
|
||||
clinfo
|
||||
|
||||
# Voice
|
||||
speechd
|
||||
rhvoice
|
||||
|
||||
# Wireguard
|
||||
#wireguard
|
||||
#wireguard-tools
|
||||
|
||||
nextcloud-client
|
||||
|
||||
# Encrypted folders
|
||||
encfs
|
||||
#gencfsm
|
||||
|
||||
# Browsers
|
||||
firefox
|
||||
transmission-gtk
|
||||
youtube-dl
|
||||
|
||||
# Messangers
|
||||
tdesktop
|
||||
#discord
|
||||
mumble
|
||||
#riot-desktop
|
||||
#qtox
|
||||
dino
|
||||
zoom-us
|
||||
teams
|
||||
teamspeak_client
|
||||
|
||||
# Games
|
||||
steam
|
||||
steam-run-native
|
||||
openttd
|
||||
minecraft
|
||||
unstable.lutris-unwrapped
|
||||
vulkan-tools
|
||||
wineWowPackages.full
|
||||
wineWowPackages.fonts
|
||||
winetricks
|
||||
xonotic
|
||||
|
||||
# Development
|
||||
vscode
|
||||
ansible
|
||||
octaveFull
|
||||
texlive.combined.scheme-full
|
||||
gcc-unwrapped
|
||||
python3Full
|
||||
# (import (builtins.fetchTarball "https://github.com/babariviere/nixpkgs/archive/flutter-init.tar.gz") {}).flutter
|
||||
#android-studio
|
||||
cmake
|
||||
nodejs
|
||||
|
||||
ccls
|
||||
|
||||
josm
|
||||
|
||||
# Screen recording
|
||||
unstable.obs-studio
|
||||
peek
|
||||
|
||||
# Graphics
|
||||
krita
|
||||
gmic_krita_qt
|
||||
potrace
|
||||
|
||||
# Audio
|
||||
audacity
|
||||
# lmms
|
||||
picard
|
||||
cmus
|
||||
spotify
|
||||
|
||||
vlc
|
||||
|
||||
# Plugins
|
||||
# ladspaPlugins
|
||||
# lsp-plugins
|
||||
|
||||
# Documents
|
||||
anki
|
||||
libreoffice
|
||||
homebank
|
||||
trilium-desktop
|
||||
klavaro
|
||||
liberation_ttf
|
||||
keepassxc
|
||||
|
||||
# Themes
|
||||
paper-icon-theme
|
||||
plata-theme
|
||||
|
||||
];
|
||||
|
||||
}
|
Loading…
Reference in a new issue