mirror of
https://github.com/inexcode/nixos-config.git
synced 2024-11-27 00:11:27 +00:00
update laptop
This commit is contained in:
parent
1c4f59a494
commit
b5259e38e8
|
@ -4,24 +4,55 @@
|
|||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
exec -a "$0" "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
[
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./software.nix
|
||||
./modules/gnome.nix
|
||||
# ./modules/i3.nix
|
||||
./modules/zsh.nix
|
||||
./pipewire.nix
|
||||
];
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
# allowBroken = true;
|
||||
android_sdk.accept_license = true;
|
||||
chromium.enableWideVine = true;
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super:
|
||||
{
|
||||
vscode-extensions = super.vscode-extensions // {
|
||||
github.copilot = pkgs.vscode-utils.buildVscodeMarketplaceExtension {
|
||||
mktplcRef = {
|
||||
publisher = "github";
|
||||
name = "copilot";
|
||||
version = "1.30.6165";
|
||||
sha256 = "2Y4zQphaPzTjvOJ4EluaVNFksJ2/PL7UE5ceAW7da6Q=";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
|
||||
|
||||
# Networking
|
||||
|
||||
|
@ -38,8 +69,29 @@
|
|||
};
|
||||
};
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 1716 51820 24642 ];
|
||||
allowedUDPPorts = [ 1716 51820 24642 ];
|
||||
enable = false;
|
||||
allowedTCPPorts = [ 3979 1716 51820 24642 ];
|
||||
allowedUDPPorts = [ 3979 1716 51820 24642 ];
|
||||
};
|
||||
hosts = {
|
||||
"195.201.86.153" = [ "derpy" "server" ];
|
||||
"64.227.64.222" = [ "wireguard" ];
|
||||
"192.168.1.2" = [ "openhab" ];
|
||||
"188.126.61.194" = [ "home" ];
|
||||
};
|
||||
wireguard.interfaces = {
|
||||
wg0 = {
|
||||
ips = [ "10.100.0.2/24" ];
|
||||
privateKeyFile = "/home/inex/wireguard-keys/private";
|
||||
peers = [
|
||||
{
|
||||
publicKey = "8sEAHYhydEGKTVecXcOb28zeGHGLGCsri5evbSQV8mY=";
|
||||
allowedIPs = [ "10.100.0.0/24" ];
|
||||
endpoint = "135.181.97.221:51820";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -52,11 +104,15 @@
|
|||
package = pkgs.bluezFull;
|
||||
};
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
package = pkgs.pulseaudioFull;
|
||||
support32Bit = true;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
};
|
||||
sane = {
|
||||
enable = true;
|
||||
brscan4.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Select internationalisation properties.
|
||||
|
@ -72,12 +128,18 @@
|
|||
# List services that you want to enable:
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.gutenprint ];
|
||||
};
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
layout = "us";
|
||||
xkbVariant = "colemak";
|
||||
videoDrivers = [ "nvidia" ];
|
||||
libinput.enable = true;
|
||||
exportConfiguration = true;
|
||||
|
@ -86,12 +148,11 @@
|
|||
#displayManager.startx.enable = true;
|
||||
};
|
||||
|
||||
boot.kernelParams = [ "modprobe.blacklist=dvb_usb_rtl28xxu" ];
|
||||
services.udev.packages = [ pkgs.rtl-sdr ];
|
||||
|
||||
# Video driver
|
||||
hardware = {/*
|
||||
bumblebee = {
|
||||
enable = true;
|
||||
driver = "nouveau";
|
||||
};*/
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
|
@ -114,23 +175,41 @@
|
|||
};
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
enableOnBoot = false;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.steam-hardware.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.inex = {
|
||||
users.users = {
|
||||
inex = {
|
||||
isNormalUser = true;
|
||||
home = "/home/inex";
|
||||
description = "Inex Code";
|
||||
extraGroups = [ "wheel" "networkmanager" "jackaudio" "audio" "video" "adbusers" "docker" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [ "wheel" "user-with-access-to-virtualbox" "networkmanager" "jackaudio" "audio" "video" "adbusers" "docker" "scanner" "lp" "plugdev" ]; # Enable ‘sudo’ for the user.
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "19.09"; # Did you read the comment?}
|
||||
system.stateVersion = "22.05"; # Did you read the comment?}
|
||||
|
||||
environment.shellInit = ''
|
||||
export VST_PATH=/nix/var/nix/profiles/default/lib/vst:/var/run/current-system/sw/lib/vst:~/.vst
|
||||
export LXVST_PATH=/nix/var/nix/profiles/default/lib/lxvst:/var/run/current-system/sw/lib/lxvst:~/.lxvst
|
||||
export LADSPA_PATH=/nix/var/nix/profiles/default/lib/ladspa:/var/run/current-system/sw/lib/ladspa:~/.ladspa
|
||||
export LV2_PATH=/nix/var/nix/profiles/default/lib/lv2:/var/run/current-system/sw/lib/lv2:~/.lv2
|
||||
export DSSI_PATH=/nix/var/nix/profiles/default/lib/dssi:/var/run/current-system/sw/lib/dssi:~/.dssi
|
||||
export VST3_PATH=/nix/var/nix/profiles/default/lib/vst3:/var/run/current-system/sw/lib/vst3:~/.vst3
|
||||
'';
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
};
|
||||
};
|
||||
desktopManager = {
|
||||
gnome3.enable = true;
|
||||
gnome.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -18,10 +18,9 @@
|
|||
qt5.platformTheme = "gnome";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome3.pomodoro
|
||||
gnome3.gnome-tweaks
|
||||
gnome3.networkmanager-openvpn
|
||||
gnome3.evolution
|
||||
gnome.pomodoro
|
||||
gnome.gnome-tweaks
|
||||
evolution
|
||||
gnomeExtensions.gsconnect
|
||||
paper-icon-theme
|
||||
];
|
||||
|
|
96
Laptop/modules/vscode.nix
Normal file
96
Laptop/modules/vscode.nix
Normal file
|
@ -0,0 +1,96 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
extensions = (with pkgs.vscode-extensions; [
|
||||
unstable.vscode-extensions.ms-vsliveshare.vsliveshare
|
||||
arcticicestudio.nord-visual-studio-code
|
||||
bbenoist.nix
|
||||
davidanson.vscode-markdownlint
|
||||
dbaeumer.vscode-eslint
|
||||
jakebecker.elixir-ls
|
||||
james-yu.latex-workshop
|
||||
jnoortheen.nix-ide
|
||||
mhutchie.git-graph
|
||||
ms-azuretools.vscode-docker
|
||||
ms-python.vscode-pylance
|
||||
ms-python.python
|
||||
ms-toolsai.jupyter
|
||||
ms-vscode-remote.remote-ssh
|
||||
ms-vscode.cpptools
|
||||
github.copilot
|
||||
]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "vscode-standardjs";
|
||||
publisher = "chenxsan";
|
||||
version = "1.4.1";
|
||||
sha256 = "0hiaqflp0d3k2pq3p44wrpyn4v6n0x660f4v47nf9bsdn5lidih3";
|
||||
}
|
||||
{
|
||||
name = "npm-intellisense";
|
||||
publisher = "christian-kohler";
|
||||
version = "1.4.1";
|
||||
sha256 = "0hph57g8fbwrvj1sdzc7vqsiaf7n2qzvkakc9ir0kkkwwdxc6c5a";
|
||||
}
|
||||
{
|
||||
name = "dart-code";
|
||||
publisher = "Dart-Code";
|
||||
version = "3.40.0";
|
||||
sha256 = "1cvibhazgz42zzwlk354sihrimw26qvgsq5nirvwx4v27gcirq81";
|
||||
}
|
||||
{
|
||||
name = "flutter";
|
||||
publisher = "Dart-Code";
|
||||
version = "3.40.0";
|
||||
sha256 = "0yxkqr6ajpdl06rxxad4c1zx5ci4sbaj2lk2xl9bws51imn58wry";
|
||||
}
|
||||
{
|
||||
name = "vscode-html-css";
|
||||
publisher = "ecmel";
|
||||
version = "1.12.2";
|
||||
sha256 = "059s1yg0b875b3ijhwgpg8v408as5z6r876jv5jing1vjb20pgvb";
|
||||
}
|
||||
{
|
||||
name = "vscode-npm-script";
|
||||
publisher = "eg2";
|
||||
version = "0.3.25";
|
||||
sha256 = "0z01i0fhl0phmz5bx5fh80flarldk7sdqgr14vx9kjz5yjzz48ys";
|
||||
}
|
||||
{
|
||||
name = "vsc-material-theme-icons";
|
||||
publisher = "equinusocio";
|
||||
version = "2.3.1";
|
||||
sha256 = "1djm4k3hcn4aq63d4mxs2n4ffq5x1qr82q6gxwi5pmabrb0hrb30";
|
||||
}
|
||||
{
|
||||
name = "vscode-systemd-support";
|
||||
publisher = "hangxingliu";
|
||||
version = "1.0.1";
|
||||
sha256 = "0f7j6y1jngicm475nilx08j55d94nnmymifxcbkszlxg0lnjrqys";
|
||||
}
|
||||
{
|
||||
name = "materialdesignicons-intellisense";
|
||||
publisher = "lukas-tr";
|
||||
version = "4.0.0";
|
||||
sha256 = "1748pj3jcgddpiamcs4ii2bjsmn9m9fx0dn2swfki8c6ibwrhy0w";
|
||||
}
|
||||
{
|
||||
name = "remote-containers";
|
||||
publisher = "ms-vscode-remote";
|
||||
version = "0.234.0";
|
||||
sha256 = "07mx08nwvw7jdlvkbr5iwikrcriib4zc1im1lbrqxjv7paj1an86";
|
||||
}
|
||||
|
||||
];
|
||||
vscode-with-extensions = pkgs.vscode-with-extensions.override {
|
||||
vscodeExtensions = extensions;
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
config = {
|
||||
environment.systemPackages = [
|
||||
vscode-with-extensions
|
||||
];
|
||||
};
|
||||
}
|
94
Laptop/pipewire.nix
Normal file
94
Laptop/pipewire.nix
Normal file
|
@ -0,0 +1,94 @@
|
|||
{
|
||||
security.rtkit.enable = true;
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
config.pipewire = {
|
||||
"context.properties" = {
|
||||
"link.max-buffers" = 16;
|
||||
"log.level" = 2;
|
||||
"default.clock.rate" = 48000;
|
||||
"default.clock.quantum" = 512;
|
||||
"default.clock.min-quantum" = 512;
|
||||
"default.clock.max-quantum" = 512;
|
||||
"core.daemon" = true;
|
||||
"core.name" = "pipewire-0";
|
||||
};
|
||||
"context.modules" = [
|
||||
{
|
||||
name = "libpipewire-module-rtkit";
|
||||
args = {
|
||||
"nice.level" = -15;
|
||||
"rt.prio" = 88;
|
||||
"rt.time.soft" = 200000;
|
||||
"rt.time.hard" = 200000;
|
||||
};
|
||||
flags = [ "ifexists" "nofail" ];
|
||||
}
|
||||
{ name = "libpipewire-module-protocol-native"; }
|
||||
{ name = "libpipewire-module-profiler"; }
|
||||
{ name = "libpipewire-module-metadata"; }
|
||||
{ name = "libpipewire-module-spa-device-factory"; }
|
||||
{ name = "libpipewire-module-spa-node-factory"; }
|
||||
{ name = "libpipewire-module-client-node"; }
|
||||
{ name = "libpipewire-module-client-device"; }
|
||||
{
|
||||
name = "libpipewire-module-portal";
|
||||
flags = [ "ifexists" "nofail" ];
|
||||
}
|
||||
{
|
||||
name = "libpipewire-module-access";
|
||||
args = {};
|
||||
}
|
||||
{ name = "libpipewire-module-adapter"; }
|
||||
{ name = "libpipewire-module-link-factory"; }
|
||||
{ name = "libpipewire-module-session-manager"; }
|
||||
];
|
||||
};
|
||||
config.pipewire-pulse = {
|
||||
"context.properties" = {
|
||||
"log.level" = 2;
|
||||
};
|
||||
"context.modules" = [
|
||||
{
|
||||
name = "libpipewire-module-rtkit";
|
||||
args = {
|
||||
"nice.level" = -15;
|
||||
"rt.prio" = 88;
|
||||
"rt.time.soft" = 200000;
|
||||
"rt.time.hard" = 200000;
|
||||
};
|
||||
flags = [ "ifexists" "nofail" ];
|
||||
}
|
||||
{ name = "libpipewire-module-protocol-native"; }
|
||||
{ name = "libpipewire-module-client-node"; }
|
||||
{ name = "libpipewire-module-adapter"; }
|
||||
{ name = "libpipewire-module-metadata"; }
|
||||
{
|
||||
name = "libpipewire-module-protocol-pulse";
|
||||
args = {
|
||||
"pulse.min.req" = "512/48000";
|
||||
"pulse.default.req" = "512/48000";
|
||||
"pulse.max.req" = "512/48000";
|
||||
"pulse.min.quantum" = "512/48000";
|
||||
"pulse.max.quantum" = "512/48000";
|
||||
"server.address" = [ "unix:native" ];
|
||||
};
|
||||
}
|
||||
];
|
||||
"stream.properties" = {
|
||||
"node.latency" = "512/48000";
|
||||
"resample.quality" = 1;
|
||||
};
|
||||
};
|
||||
config.jack = {
|
||||
"jack.properties" = {
|
||||
"node.latency" = "512/48000";
|
||||
"node.lock-quantum" = true;
|
||||
};
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,29 +1,52 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> {};
|
||||
in {
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Utils
|
||||
cool-retro-term
|
||||
tmux
|
||||
ponysay
|
||||
(pkgs.callPackage ./modules/my_vim.nix {})
|
||||
neofetch
|
||||
(pkgs.callPackage ./modules/my_vim.nix { })
|
||||
pciutils
|
||||
usbutils
|
||||
i2c-tools
|
||||
bind
|
||||
# openvpn
|
||||
git
|
||||
unzip
|
||||
tldr
|
||||
ffmpeg
|
||||
wget
|
||||
nix-bundle
|
||||
file
|
||||
glxinfo
|
||||
|
||||
nmap
|
||||
|
||||
gparted
|
||||
|
||||
# Archives
|
||||
unzip
|
||||
unrar
|
||||
|
||||
appimage-run
|
||||
|
||||
# Manuals
|
||||
unstable.manix
|
||||
tldr
|
||||
|
||||
# Terminal
|
||||
cool-retro-term
|
||||
mosh
|
||||
tmux
|
||||
neofetch
|
||||
ponysay
|
||||
bpytop
|
||||
httpie
|
||||
htop
|
||||
|
||||
# Voice
|
||||
speechd
|
||||
rhvoice
|
||||
unstable.noisetorch
|
||||
|
||||
xsane
|
||||
|
||||
# Wireguard
|
||||
wireguard
|
||||
wireguard-tools
|
||||
|
||||
nextcloud-client
|
||||
|
@ -34,41 +57,56 @@ in {
|
|||
|
||||
# Browsers
|
||||
firefox
|
||||
ungoogled-chromium
|
||||
|
||||
# Downloaders
|
||||
transmission-gtk
|
||||
youtube-dl
|
||||
yt-dlp
|
||||
syncthing
|
||||
wget
|
||||
|
||||
# Messangers
|
||||
tdesktop
|
||||
#discord
|
||||
mumble
|
||||
#riot-desktop
|
||||
qtox
|
||||
dino
|
||||
zoom-us
|
||||
gomuks
|
||||
|
||||
# Games
|
||||
steam
|
||||
steam-run-native
|
||||
steam-run
|
||||
unstable.openttd
|
||||
minecraft
|
||||
lutris
|
||||
vulkan-tools
|
||||
wineWowPackages.full
|
||||
wineWowPackages.fonts
|
||||
xonotic
|
||||
cataclysm-dda
|
||||
|
||||
# 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
|
||||
# VCS
|
||||
git
|
||||
gitAndTools.git-bug
|
||||
|
||||
# IDE
|
||||
lens
|
||||
postman
|
||||
unstable.androidStudioPackages.canary
|
||||
|
||||
# Compilers and interpretators
|
||||
ccls
|
||||
cmake
|
||||
gcc-unwrapped
|
||||
octaveFull
|
||||
python3Full
|
||||
nodejs
|
||||
nixpkgs-fmt
|
||||
|
||||
# Docker and orchestration
|
||||
ansible
|
||||
docker-compose
|
||||
|
||||
# Maps
|
||||
josm
|
||||
|
||||
# Screen recording
|
||||
|
@ -76,27 +114,45 @@ in {
|
|||
peek
|
||||
|
||||
# Graphics
|
||||
blender
|
||||
krita
|
||||
gmic_krita_qt
|
||||
potrace
|
||||
ffmpeg
|
||||
inkscape
|
||||
imagemagick
|
||||
|
||||
# Audio
|
||||
audacity
|
||||
pulseeffects-pw
|
||||
# lmms
|
||||
picard
|
||||
cmus
|
||||
spotify
|
||||
rhythmbox
|
||||
unstable.helvum
|
||||
|
||||
# Plugins
|
||||
# ladspaPlugins
|
||||
# lsp-plugins
|
||||
vlc
|
||||
syncplay
|
||||
|
||||
# DAW
|
||||
zrythm
|
||||
distrho
|
||||
helvum
|
||||
zam-plugins
|
||||
x42-plugins
|
||||
helm
|
||||
zyn-fusion
|
||||
lsp-plugins
|
||||
ardour
|
||||
|
||||
# Documents
|
||||
anki
|
||||
libreoffice
|
||||
homebank
|
||||
trilium
|
||||
klavaro
|
||||
liberation_ttf
|
||||
obsidian
|
||||
keepassxc
|
||||
glow
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue