commit b65a9e02b0e67155bcf0f528ef127f5d7387d4f3 Author: NeoTheFox Date: Sun Nov 1 14:01:34 2020 +0300 initial diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d8a320e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,110 @@ +# EditorConfig configuration for nixpkgs +# https://EditorConfig.org + +# Top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file, utf-8 charset +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 + +# Ignore diffs/patches +[*.{diff,patch}] +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset + +# see https://nixos.org/nixpkgs/manual/#chap-conventions + +# Match json/lockfiles/markdown/nix/perl/python/ruby/shell/docbook files, set indent to spaces +[*.{json,lock,md,nix,pl,pm,py,rb,sh,xml}] +indent_style = space + +# Match docbook files, set indent width of one +[*.xml] +indent_size = 1 + +# Match json/lockfiles/markdown/nix/ruby files, set indent width of two +[*.{json,lock,md,nix,rb}] +indent_size = 2 + +# Match perl/python/shell scripts, set indent width of four +[*.{pl,pm,py,sh}] +indent_size = 4 + +# Match gemfiles, set indent to spaces with width of two +[Gemfile] +indent_size = 2 +indent_style = space + +# Disable file types or individual files +# some of these files may be auto-generated and/or require significant changes + +[*.{c,h}] +insert_final_newline = unset +trim_trailing_whitespace = unset + +[*.{key,ovpn}] +insert_final_newline = unset +end_of_line = unset + +[*.lock] +indent_size = unset + +[deps.nix] +insert_final_newline = unset +[pkgs/tools/networking/dd-agent/*-deps.nix] +insert_final_newline = unset + +[eggs.nix] +trim_trailing_whitespace = unset + +[gemset.nix] +insert_final_newline = unset + +[node-{composition,packages,packages-generated}.nix] +insert_final_newline = unset + +[nixos/modules/services/networking/ircd-hybrid/*.{conf,in}] +trim_trailing_whitespace = unset + +[nixos/tests/systemd-networkd-vrf.nix] +trim_trailing_whitespace = unset + +[pkgs/build-support/dotnetenv/Wrapper/**] +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset + +[pkgs/build-support/upstream-updater/**] +trim_trailing_whitespace = unset + +[pkgs/development/compilers/elm/registry.dat] +end_of_line = unset +insert_final_newline = unset + +[pkgs/development/haskell-modules/hackage-packages.nix] +indent_style = unset +trim_trailing_whitespace = unset + +[pkgs/development/mobile/androidenv/generated/{addons,packages}.nix] +trim_trailing_whitespace = unset + +[pkgs/development/node-packages/composition.nix] +insert_final_newline = unset + +[pkgs/servers/dict/wordnet_structures.py] +trim_trailing_whitespace = unset + +[pkgs/tools/misc/timidity/timidity.cfg] +trim_trailing_whitespace = unset + +[pkgs/tools/security/enpass/data.json] +insert_final_newline = unset +trim_trailing_whitespace = unset + +[pkgs/top-level/emscripten-packages.nix] +trim_trailing_whitespace = unset diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef9e943 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +hadware-configuration.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..224639b --- /dev/null +++ b/configuration.nix @@ -0,0 +1,146 @@ + +# ░██████╗░██████╗░██████╗░  ██████╗░░█████╗░░█████╗░██╗░░██╗███████╗████████╗  ██████╗░ +# ██╔════╝░██╔══██╗██╔══██╗  ██╔══██╗██╔══██╗██╔══██╗██║░██╔╝██╔════╝╚══██╔══╝  ╚════██╗ +# ██║░░██╗░██████╔╝██║░░██║  ██████╔╝██║░░██║██║░░╚═╝█████═╝░█████╗░░░░░██║░░░  ░░███╔═╝ +# ██║░░╚██╗██╔═══╝░██║░░██║  ██╔═══╝░██║░░██║██║░░██╗██╔═██╗░██╔══╝░░░░░██║░░░  ██╔══╝░░ +# ╚██████╔╝██║░░░░░██████╔╝  ██║░░░░░╚█████╔╝╚█████╔╝██║░╚██╗███████╗░░░██║░░░  ███████╗ +# ░╚═════╝░╚═╝░░░░░╚═════╝░  ╚═╝░░░░░░╚════╝░░╚════╝░╚═╝░░╚═╝╚══════╝░░░╚═╝░░░  ╚══════╝ + +{ config, pkgs, lib, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ./gnome.nix + ./sway.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.timeout = 2; + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelParams = [ "video=efifb" "fbcon=rotate:1" "quiet" ]; + boot.kernel.sysctl."vm.swappiness" = 1; + hardware.cpu.intel.updateMicrocode = true; + + networking.hostName = "pipboy4k"; + networking.useDHCP = false; + #networking.interfaces.wlp1s0.useDHCP = true; + networking.networkmanager.enable = true; + networking.networkmanager.wifi.backend = "iwd"; + + i18n.defaultLocale = "en_US.UTF-8"; + + # Set your time zone. + time.timeZone = "Europe/Moscow"; + + nixpkgs.config.allowUnfree = true; # I'm sorry Mr. Richard + environment.systemPackages = with pkgs; [ + wget neovim curl git neofetch pv ncdu mesa-demos mpv exa aria2 + kitty firefox-wayland rsync qutebrowser qbittorrent gimp synergy + vulkan-tools vulkan-loader ranger nnn fd mdcat youtube-dl + lazygit htop libva-utils intel-gpu-tools fscrypt-experimental + ]; + + #Flatpak + services.flatpak.enable = true; + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ]; + + #EDITOR + programs.vim.defaultEditor = true; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # pinentryFlavor = "gnome3"; + # }; + + # Services: + + # TLP + services.tlp.enable = true; + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = false; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound. + sound.enable = true; + + hardware.pulseaudio.enable = true; + hardware.pulseaudio.extraModules = [ pkgs.pulseaudio-modules-bt ]; + hardware.pulseaudio.daemon.config = { + resample-method = "soxr-hq"; + avoid-resampling = "true"; + default-sample-format="float32le"; + }; + + # Enable the X11 windowing system. + services.xserver.enable = true; + services.xserver.layout = "us,ru"; + services.xserver.xkbVariant = ",phonetic_winkeys"; + services.xserver.xkbOptions = "grp:caps_toggle"; + + # Hardware video encoding + nixpkgs.config.packageOverrides = pkgs: { + vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + }; + hardware.opengl = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; + }; + + # Enable touchpad support. + # services.xserver.libinput.enable = true; + + # Groups / Users + users.groups.games = {}; + + #security.pam.enableFscrypt = true; + + users.users.neothefox = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" "video" "games" ]; + shell = pkgs.zsh; + }; + + programs.zsh = { + enable = true; + enableCompletion = true; + enableBashCompletion = true; + + ohMyZsh = { + enable = true; + plugins = [ "git" "sudo" "man" ]; + theme = "robbyrussell"; + }; + + }; + + # 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? + +} + diff --git a/gnome.nix b/gnome.nix new file mode 100644 index 0000000..9b934a5 --- /dev/null +++ b/gnome.nix @@ -0,0 +1,14 @@ +# █▀▀ █▄░█ █▀█ █▀▄▀█ █▀▀ +# █▄█ █░▀█ █▄█ █░▀░█ ██▄ + +{ config, pkgs, ... }: + +{ + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome3.enable = true; + + environment.systemPackages = with pkgs; [celluloid gnome-podcasts gnomeExtensions.caffeine]; + services.udev.packages = with pkgs; [ gnome3.gnome-settings-daemon ]; + + environment.gnome3.excludePackages = with pkgs.gnome3; [ totem geary geary gnome-software gnome-music gnome-terminal ]; +} diff --git a/sway.nix b/sway.nix new file mode 100644 index 0000000..35d6266 --- /dev/null +++ b/sway.nix @@ -0,0 +1,26 @@ +# █▀ █░█░█ ▄▀█ █▄█ +# ▄█ ▀▄▀▄▀ █▀█ ░█░ + +{ config, pkgs, ... }: + +{ + programs.sway = { + enable = true; + extraPackages = with pkgs; [ + swaylock + swayidle + xwayland + waybar + mako + kanshi + rofi + i3status-rust + networkmanager_dmenu + swaylock + swayidle + pavucontrol + gammastep + ]; + }; + +}