Inital commit
This commit is contained in:
26
modules/nixos/bootloader.nix
Normal file
26
modules/nixos/bootloader.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
boot.binfmt.registrations.appimage = {
|
||||
wrapInterpreterInShell = false;
|
||||
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||||
recognitionType = "magic";
|
||||
offset = 0;
|
||||
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
|
||||
magicOrExtension = ''\x7fELF....AI\x02'';
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
boot.loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
};
|
||||
grub = {
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
26
modules/nixos/hardware.nix
Normal file
26
modules/nixos/hardware.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
hardware.bluetooth.settings = {
|
||||
General = {
|
||||
Experimental = true;
|
||||
ControllerMode = "bredr";
|
||||
};
|
||||
};
|
||||
|
||||
hardware.enableAllFirmware = true;
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
26
modules/nixos/i18n.nix
Normal file
26
modules/nixos/i18n.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
time.timeZone = "Europe/Riga";
|
||||
|
||||
i18n.defaultLocale = "lv_LV.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "lv_LV.UTF-8";
|
||||
LC_IDENTIFICATION = "lv_LV.UTF-8";
|
||||
LC_MEASUREMENT = "lv_LV.UTF-8";
|
||||
LC_MONETARY = "lv_LV.UTF-8";
|
||||
LC_NAME = "lv_LV.UTF-8";
|
||||
LC_NUMERIC = "lv_LV.UTF-8";
|
||||
LC_PAPER = "lv_LV.UTF-8";
|
||||
LC_TELEPHONE = "lv_LV.UTF-8";
|
||||
LC_TIME = "lv_LV.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
}
|
||||
43
modules/nixos/main-user.nix
Normal file
43
modules/nixos/main-user.nix
Normal file
@@ -0,0 +1,43 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
main-user.userName = lib.mkOption {
|
||||
default = "ocbwoy3";
|
||||
description = ''
|
||||
Username
|
||||
'';
|
||||
};
|
||||
main-user.realName = lib.mkOption {
|
||||
default = "OCbwoy3";
|
||||
description = ''
|
||||
User's Name
|
||||
'';
|
||||
};
|
||||
main-user.packages = lib.mkOption {
|
||||
default = [];
|
||||
description = ''
|
||||
User's Packages
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
users.users.${config.main-user.userName} = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "password";
|
||||
description = "${config.main-user.realName}";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "networkmanager" "wheel" "input" ];
|
||||
packages = ${config.main-user.packages};
|
||||
# with pkgs; [
|
||||
# brave
|
||||
# prismlauncher
|
||||
# gimp
|
||||
# mpv
|
||||
# vesktop
|
||||
# ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
8
modules/nixos/network.nix
Normal file
8
modules/nixos/network.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
networking.hostName = "nixos";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
}
|
||||
10
modules/nixos/nixpkgs.nix
Normal file
10
modules/nixos/nixpkgs.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
|
||||
}
|
||||
39
modules/nixos/nvidia.nix
Normal file
39
modules/nixos/nvidia.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
boot.extraModprobeConfig = ''options nvidia_drm modeset=1 fbdev=1'';
|
||||
|
||||
environment.variables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
NVD_BACKEND = "direct";
|
||||
EGL_PLATFORM = "wayland";
|
||||
};
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
vaapiIntel
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
}
|
||||
28
modules/nixos/programs.nix
Normal file
28
modules/nixos/programs.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.gamemode.enable = true;
|
||||
programs.gamemode.settings.general.renice = 0;
|
||||
programs.gamemode.settings.general.ioprio = 0;
|
||||
programs.gamemode.settings.general.softrealtime = "on";
|
||||
services.usbmuxd.enable = true;
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
c-ares ffmpeg gtk3 http-parser libevent libvpx libxslt minizip nss re2 snappy libnotify libappindicator-gtk3
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
banner = "What the fuck do you think you're doing here?\n";
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user