mirror of
https://github.com/Andrey0189/nixos-config-reborn.git
synced 2025-09-15 10:06:00 +03:00
here we go again
This commit is contained in:
61
nixos/configuration.nix
Normal file
61
nixos/configuration.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
./modules/zram.nix
|
||||
./modules/bluetooth.nix
|
||||
./modules/env.nix
|
||||
./modules/boot.nix
|
||||
./packages.nix
|
||||
];
|
||||
|
||||
xdg.mime.defaultApplications = {
|
||||
"inode/directory" = "lf";
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nixos";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Asia/Tashkent";
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.amper = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.getty.autologinUser = "amper";
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
# clean.enable = true;
|
||||
# clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/home/amper/flake";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
|
39
nixos/hardware-configuration.nix
Normal file
39
nixos/hardware-configuration.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/69019f25-749c-4480-bbfc-72eef4c49313";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/12CE-A600";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp4s0f4u2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
5
nixos/modules/bluetooth.nix
Normal file
5
nixos/modules/bluetooth.nix
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
}
|
4
nixos/modules/boot.nix
Normal file
4
nixos/modules/boot.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
12
nixos/modules/env.nix
Normal file
12
nixos/modules/env.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
environment.sessionVariables = rec {
|
||||
TERMINAL = "alacritty";
|
||||
EDITOR = "nvim";
|
||||
# Hint Electron apps to use Wayland
|
||||
# NIXOS_OZONE_WL = "1";
|
||||
XDG_BIN_HOME = "$HOME/.local/bin";
|
||||
PATH = [
|
||||
"${XDG_BIN_HOME}"
|
||||
];
|
||||
};
|
||||
}
|
8
nixos/modules/zram.nix
Normal file
8
nixos/modules/zram.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "lz4";
|
||||
memoryPercent = 100;
|
||||
priority = 999;
|
||||
};
|
||||
}
|
58
nixos/packages.nix
Normal file
58
nixos/packages.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{ pkgs, ... }: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
alacritty
|
||||
chromium
|
||||
git
|
||||
neovim
|
||||
wofi
|
||||
swww
|
||||
imv
|
||||
mpv
|
||||
unzip
|
||||
microfetch
|
||||
gcc
|
||||
home-manager
|
||||
prismlauncher
|
||||
telegram-desktop
|
||||
waybar
|
||||
bottom
|
||||
xdg-desktop-portal-hyprland
|
||||
wl-clipboard
|
||||
cliphist
|
||||
grimblast
|
||||
obsidian
|
||||
htop
|
||||
lf
|
||||
jetbrains.pycharm-professional
|
||||
python311
|
||||
blueman
|
||||
teams-for-linux
|
||||
silicon
|
||||
tree
|
||||
obs-studio
|
||||
fuzzel
|
||||
tmux
|
||||
ffmpeg
|
||||
yt-dlp
|
||||
jre8
|
||||
ripgrep
|
||||
discord
|
||||
zip
|
||||
nodejs
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
jetbrains-mono
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
twemoji-color-font
|
||||
font-awesome
|
||||
powerline-fonts
|
||||
powerline-symbols
|
||||
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user