initial commit
This commit is contained in:
7
modules/apps/browser.nix
Normal file
7
modules/apps/browser.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
brave
|
||||
];
|
||||
}
|
||||
7
modules/apps/communication.nix
Normal file
7
modules/apps/communication.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
discord
|
||||
];
|
||||
}
|
||||
10
modules/apps/default.nix
Normal file
10
modules/apps/default.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./terminal.nix
|
||||
./browser.nix
|
||||
./communication.nix
|
||||
./dev.nix
|
||||
];
|
||||
}
|
||||
12
modules/apps/dev.nix
Normal file
12
modules/apps/dev.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
uv
|
||||
rustup
|
||||
antigravity-cli
|
||||
pi-coding-agent
|
||||
];
|
||||
}
|
||||
15
modules/apps/gaming.nix
Normal file
15
modules/apps/gaming.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = false;
|
||||
dedicatedServer.openFirewall = false;
|
||||
gamescopeSession.enable = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mangohud
|
||||
gamemode
|
||||
];
|
||||
}
|
||||
9
modules/apps/terminal.nix
Normal file
9
modules/apps/terminal.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
foot
|
||||
zoxide
|
||||
fzf
|
||||
];
|
||||
}
|
||||
9
modules/core/default.nix
Normal file
9
modules/core/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./system.nix
|
||||
./users.nix
|
||||
./nix.nix
|
||||
];
|
||||
}
|
||||
18
modules/core/nix.nix
Normal file
18
modules/core/nix.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
34
modules/core/system.nix
Normal file
34
modules/core/system.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
networking.firewall.enable = true;
|
||||
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
curl
|
||||
wget
|
||||
vim
|
||||
btop
|
||||
gparted
|
||||
pciutils
|
||||
usbutils
|
||||
egl-wayland
|
||||
];
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
30
modules/core/users.nix
Normal file
30
modules/core/users.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
loginShellInit = ''
|
||||
if [ -z "$DISPLAY" ] && [ "$TTY" = "/dev/tty1" ]; then
|
||||
exec start-hyprland
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
users.users.anish = {
|
||||
isNormalUser = true;
|
||||
description = "Main Account";
|
||||
extraGroups = [ "wheel" "networkmanager" "video" "audio" "gaming" "llm" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
# ssh-ed25519 AAAAA.... add my key here to enable ssh from another computer
|
||||
];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
}
|
||||
32
modules/graphical/default.nix
Normal file
32
modules/graphical/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
services.displayManager.sddm.enable = false;
|
||||
services.getty.autologinUser = "anish";
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
HYPRCURSOR_ENABLED = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
GDK_BACKEND = "wayland,x11,*";
|
||||
WLR_DRM_DEVICES = "/dev/dri/card1:/dev/dri/card0";
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
nerd-fonts.fira-code
|
||||
font-awesome
|
||||
];
|
||||
}
|
||||
25
modules/hardware/nvidia.nix
Normal file
25
modules/hardware/nvidia.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
boot.initrd.kernelModules = [ "nvidia" "nvidia_modeset" "nvidia_uvm" "nvidia_drm" ];
|
||||
boot.kernelParams = [
|
||||
"nvidia-drm.modeset=1"
|
||||
"nvidia-drm.fbdev=1"
|
||||
];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = lib.mkDefault false;
|
||||
open = lib.mkDefault true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user