diff --git a/etc/nixos/configuration.nix b/etc/nixos/configuration.nix index 60f12b5..122d49b 100644 --- a/etc/nixos/configuration.nix +++ b/etc/nixos/configuration.nix @@ -2,20 +2,20 @@ { imports = - [ + [ ./hardware-configuration.nix ]; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - boot.kernelPackages = pkgs.linuxPackages_6_1; + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; - boot.initrd.luks.devices."luks-62a9c28b-959c-480e-bf53-e87b791b569d".device = "/dev/disk/by-uuid/62a9c28b-959c-480e-bf53-e87b791b569d"; networking.hostName = "core"; - networking.enableIPv6 = false; - networking.networkmanager.enable = true; + networking.enableIPv6 = false; time.timeZone = "Asia/Tehran"; @@ -23,97 +23,121 @@ services.xserver.enable = true; - services.displayManager.sddm.enable = true; - services.desktopManager.plasma6.enable = true; + services.displayManager.ly.enable = true; services.xserver.xkb = { layout = "us"; variant = ""; }; - #graphics drivers - services.xserver.videoDrivers = [ - "modesetting" - "nvidia" - ]; - - hardware.graphics = { - enable = true; - }; - - hardware.nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; - open = false; - nvidiaSettings = true; - }; - services.printing.enable = false; - services.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; + jack.enable = true; + wireplumber.enable = true; }; - security = { - sudo.enable = false; - doas.enable = true; - doas.extraRules = [ - { - users = [ "coast" ]; - keepEnv = true; - persist = true; - } - ]; - }; + services.libinput.enable = true; + + security.sudo.enable = false; + security.sudo-rs.enable = true; + + programs.zsh.enable = true; + programs.zsh.syntaxHighlighting.enable = true; users.users.coast = { isNormalUser = true; description = "coast"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "networkmanager" "wheel" "video" "audio" ]; + shell = pkgs.zsh; packages = with pkgs; [ - kdePackages.kate + zsh-autosuggestions + brave vesktop fastfetch - chromium - tor-browser - unrar - git - htop nix-search-cli - vscode + appimage-run + krita + tauon + hyprshot + starship + rofi-wayland + dysk + ranger + mako + libnotify + waybar + kitty + swww + obs-studio + lolcat ]; }; + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + services.flatpak.enable = true; + services.jellyfin.enable = true; + programs.steam.enable = true; + programs.sway.enable = true; - programs = { - nekoray = { - enable = true; - tunMode.enable = true; - }; - steam.enable = true; + hardware.graphics.enable = true; + services.xserver.videoDrivers = ["nvidia"]; + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; }; nixpkgs.config.allowUnfree = true; environment.systemPackages = with pkgs; [ - wget - vim - lshw - alsa-utils - wine - winetricks - wineWowPackages.stable - wine64 - wineWowPackages.waylandFull + pcmanfm + wayland-utils + wl-clipboard + git + rubyPackages_3_4.rake + ruby + neovim + wget + nekoray + alsa-utils + gcc + nerd-fonts.ubuntu ]; + programs.nekoray = { + enable = true; + tunMode.enable = 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; + # }; + + # List services that you want to enable: + + # 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; + system.stateVersion = "25.05"; } diff --git a/etc/nixos/hardware-configuration.nix b/etc/nixos/hardware-configuration.nix new file mode 100644 index 0000000..08b2508 --- /dev/null +++ b/etc/nixos/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/69901137-d68b-4d12-916b-973ba1c725f9"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5AE2-A8DF"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/45403b2e-c5a6-430f-bab3-31dd60e85279"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}