initial commit x2
This commit is contained in:
47
system/apps.nix
Normal file
47
system/apps.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
#Безделушки
|
||||
fastfetch
|
||||
btop
|
||||
|
||||
#Для никсы
|
||||
nix-prefetch-git
|
||||
home-manager
|
||||
nh
|
||||
|
||||
#Сис утилиты
|
||||
pciutils
|
||||
glxinfo
|
||||
killall
|
||||
inxi
|
||||
tree
|
||||
|
||||
#Основ пакеты
|
||||
micro
|
||||
wget
|
||||
git
|
||||
bash
|
||||
];
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
cantarell-fonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
fira-code-symbols
|
||||
fira-code
|
||||
dejavu_fonts
|
||||
jetbrains-mono
|
||||
nerd-fonts.symbols-only
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
fontconfig.defaultFonts.emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
programs = {
|
||||
adb.enable = true;
|
||||
gamemode.enable = true;
|
||||
zsh.enable = true;
|
||||
};
|
||||
steam.enable = true;
|
||||
};
|
||||
}
|
||||
29
system/boot.nix
Normal file
29
system/boot.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ config, pkgs, ... }: {
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
kernelParams = [ "quiet" "splash" ];
|
||||
blacklistedKernelModules = [ "nouveau" ];
|
||||
consoleLogLevel = 3;
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "uas" "sd_mod" "sdhci_pci" ];
|
||||
kernelModules = [ "i915" ];
|
||||
verbose = false;
|
||||
};
|
||||
loader = {
|
||||
timeout = 7;
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
grub = {
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
};
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "bgrt";
|
||||
};
|
||||
};
|
||||
}
|
||||
13
system/default.nix
Normal file
13
system/default.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./apps.nix
|
||||
./disko.nix
|
||||
./nixos.nix
|
||||
./services.nix
|
||||
./user.nix
|
||||
./boot.nix
|
||||
./hardware.nix
|
||||
./other.nix
|
||||
./systemd.nix
|
||||
];
|
||||
}
|
||||
41
system/disko.nix
Normal file
41
system/disko.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ inputs, ... }: {
|
||||
imports = [ inputs.disko.nixosModules.disko ];
|
||||
disko.devices = {
|
||||
disk = {
|
||||
my-disk = {
|
||||
device = "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "1G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "10G";
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4"; # да, я люблю ext4, минусы?
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
33
system/hardware.nix
Normal file
33
system/hardware.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
hardware = {
|
||||
intel-gpu-tools.enable = true;
|
||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
pulseaudio = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement = {
|
||||
enable = false;
|
||||
finegrained = false;
|
||||
};
|
||||
prime = {
|
||||
sync.enable = false;
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
};
|
||||
}
|
||||
11
system/nixos.nix
Normal file
11
system/nixos.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, lib, ... }: {
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
system.stateVersion = "24.11";
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = true;
|
||||
};
|
||||
hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
};
|
||||
}
|
||||
13
system/other.nix
Normal file
13
system/other.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ config, lib, ... }: {
|
||||
networking = {
|
||||
useDHCP = lib.mkDefault true;
|
||||
hostName = "sophron";
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
time.timeZone = "Asia/Yekaterinburg";
|
||||
i18n.defaultLocale = "ru_RU.UTF-8";
|
||||
console = {
|
||||
font = "cyr-sun16";
|
||||
keyMap = "ru";
|
||||
};
|
||||
}
|
||||
27
system/services.nix
Normal file
27
system/services.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ config, pkgs, ... }: {
|
||||
services = {
|
||||
xserver = {
|
||||
# enable = true;
|
||||
# windowManager.bspwm.enable = true;
|
||||
# displayManager.lightdm.enable = false;
|
||||
# displayManager.startx.enable = true;
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
#libinput = {
|
||||
# enable = true;
|
||||
# mouse = {
|
||||
# accelProfile = "adaptive";
|
||||
# };
|
||||
#};
|
||||
openssh = {
|
||||
enable = true;
|
||||
ports = [ 95 ];
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
UseDns = true;
|
||||
AllowUsers = [ "chronoblade" ];
|
||||
PermitRootLogin = "yes";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
11
system/systemd.nix
Normal file
11
system/systemd.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }: {
|
||||
systemd.services.gpu = {
|
||||
enable = true;
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
Description = "gpu service";
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.intel-gpu-tools}/bin/intel_gpu_frequency -s 400";
|
||||
};
|
||||
};
|
||||
}
|
||||
33
system/user.nix
Normal file
33
system/user.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{ config, pkgs, ... }: {
|
||||
users.users = {
|
||||
fox = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "input" "networkmanager" "video" "audio" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
services.getty.autologinUser = "fox";
|
||||
environment.loginShellInit = ''
|
||||
[[ "$(tty)" == /dev/tty1 ]] && Hyprland
|
||||
'';
|
||||
security = {
|
||||
polkit = {
|
||||
enable = true;
|
||||
};
|
||||
sudo = {
|
||||
enable = true;
|
||||
extraRules = [{
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.systemd}/bin/reboot";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "${pkgs.systemd}/bin/poweroff";
|
||||
options = [ "NOPASSWD" ];
|
||||
}];
|
||||
groups = [ "wheel" ];
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user