initial commit
This commit is contained in:
103
flake.lock
generated
Normal file
103
flake.lock
generated
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"nodes": {
|
||||
"antigravity": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786829626,
|
||||
"narHash": "sha256-Yg4SMZkoln6bEwAUPDhqCU7XWC1REPtHaerrhKf9eew=",
|
||||
"owner": "Hy4ri",
|
||||
"repo": "antigravity-flake",
|
||||
"rev": "bf9c75d727c829794599434cbb29db774dd9ce77",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Hy4ri",
|
||||
"repo": "antigravity-flake",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1785119570,
|
||||
"narHash": "sha256-Rgs2xKnGLFWQscxUaXX07oyZeuMDOHEbqDOsgliLFGM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d4fd24667c8cbef124bb70a20380cab75ec8474d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-26.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1786717298,
|
||||
"narHash": "sha256-asdPlqtM0AweQ5YNLad6eY4tSYW55YNr1uyayf7mOMQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "2dda192987ab6815e44df0130f03d6c907b79134",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "master",
|
||||
"repo": "nixos-hardware",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1767892417,
|
||||
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
|
||||
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba",
|
||||
"type": "tarball",
|
||||
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1786711500,
|
||||
"narHash": "sha256-QvnceIGTBeDvDd9oCn+GvdsnkquliuwbVgpiRH68qaQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "02e08985a27c65ffd33d434eeb2e660a2e4dc84d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-26.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"antigravity": "antigravity",
|
||||
"home-manager": "home-manager",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
54
flake.nix
Normal file
54
flake.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
description = "Multi-Machine NixOS Configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-26.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
antigravity = {
|
||||
url = "github:Hy4ri/antigravity-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
|
||||
commonModules = [
|
||||
./modules/core
|
||||
./modules/graphical
|
||||
./modules/apps
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
inputs.antigravity.overlays.default
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
backupFileExtension = "backup";
|
||||
users.anish = import ./home;
|
||||
};
|
||||
}
|
||||
];
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
hades = inputs.nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = commonModules ++ [
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
||||
./hosts/hades
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
53
home/brave.nix
Normal file
53
home/brave.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
bravePolicies = {
|
||||
# Disable built-in autofill/password prompts in favor of Bitwarden
|
||||
PasswordManagerEnabled = false;
|
||||
AutofillCreditCardEnabled = false;
|
||||
AutofillAddressEnabled = false;
|
||||
|
||||
# Dark Mode enforcement
|
||||
BrowserColorScheme = 2; # 1 = Light, 2 = Dark
|
||||
ForceDarkModeEnabled = true;
|
||||
|
||||
# Default Search Engine -> Brave Search
|
||||
DefaultSearchProviderEnabled = true;
|
||||
DefaultSearchProviderName = "Brave";
|
||||
DefaultSearchProviderSearchURL = "https://search.brave.com/search?q={searchTerms}";
|
||||
DefaultSearchProviderSuggestURL = "https://search.brave.com/api/suggest?q={searchTerms}";
|
||||
|
||||
# Font Settings
|
||||
DefaultFontSize = 16;
|
||||
DefaultFixedFontSize = 14;
|
||||
FontFamilyMap = {
|
||||
standard = "Inter";
|
||||
sansserif = "Inter";
|
||||
fixed = "JetBrainsMono Nerd Font";
|
||||
serif = "DejaVu Serif";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.brave;
|
||||
|
||||
commandLineArgs = [
|
||||
"--enable-features=UseOzonePlatform"
|
||||
"--ozone-platform=wayland"
|
||||
"--enable-wayland-ime"
|
||||
"--ignore-gpu-blocklist"
|
||||
"--enable-gpu-rasterization"
|
||||
"--enable-zero-copy"
|
||||
];
|
||||
|
||||
extensions = [
|
||||
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # Bitwarden
|
||||
{ id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; } # Vimium C
|
||||
];
|
||||
};
|
||||
xdg.configFile."brave/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
|
||||
xdg.configFile."BraveSoftware/Brave-Browser/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
|
||||
xdg.configFile."chromium/policies/managed/policies.json".text = builtins.toJSON bravePolicies;
|
||||
}
|
||||
11
home/default.nix
Normal file
11
home/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hypr
|
||||
./foot.nix
|
||||
./brave.nix
|
||||
];
|
||||
|
||||
home.stateVersion = "26.05";
|
||||
}
|
||||
17
home/foot.nix
Normal file
17
home/foot.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "JetBrainsMono Nerd Font:size=16";
|
||||
padding = "8x8";
|
||||
};
|
||||
colors = {
|
||||
background = "0f172a";
|
||||
foreground = "f8fafc";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
18
home/hypr/default.nix
Normal file
18
home/hypr/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./hypridle.nix
|
||||
# ../waybar
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
cliphist
|
||||
brightnessctl
|
||||
];
|
||||
}
|
||||
40
home/hypr/hypridle.nix
Normal file
40
home/hypr/hypridle.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
# 1. Dim screen brightness after 2.5 minutes
|
||||
{
|
||||
timeout = 150;
|
||||
on-timeout = "brightnessctl -s set 10";
|
||||
on-resume = "brightnessctl -r";
|
||||
}
|
||||
# 2. Lock screen after 5 minutes
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# 3. Turn off displays (DPMS) after 10 minutes
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
# 4. Suspend system after 30 minutes
|
||||
{
|
||||
timeout = 1800;
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
167
home/hypr/hyprland.nix
Normal file
167
home/hypr/hyprland.nix
Normal file
@@ -0,0 +1,167 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
mod = "SUPER";
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
# -----------------------------------------------------------------------
|
||||
# 1. Variables & Modifiers
|
||||
# -----------------------------------------------------------------------
|
||||
"$mod" = mod;
|
||||
"$terminal" = "foot";
|
||||
"$menu" = "rofi -show drun";
|
||||
"$browser" = "brave";
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# 2. General, Layout & Decoration
|
||||
# -----------------------------------------------------------------------
|
||||
general = {
|
||||
gaps_in = 4;
|
||||
gaps_out = 8;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||
"col.inactive_border" = "rgba(595959aa)";
|
||||
layout = "dwindle";
|
||||
allow_tearing = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 8;
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 0.95;
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 5;
|
||||
passes = 2;
|
||||
new_optimizations = true;
|
||||
};
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = "rgba(1a1a1aee)";
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = [
|
||||
"easeOutQuint, 0.23, 1, 0.32, 1"
|
||||
];
|
||||
animation = [
|
||||
"windows, 1, 3, easeOutQuint"
|
||||
"windowsOut, 1, 3, easeOutQuint, popin 80%"
|
||||
"border, 1, 3, easeOutQuint"
|
||||
"fade, 1, 3, easeOutQuint"
|
||||
"workspaces, 1, 3, easeOutQuint"
|
||||
];
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
sensitivity = 0;
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# 3. Autostart Daemons & Apps
|
||||
# -----------------------------------------------------------------------
|
||||
exec-once = [
|
||||
"waybar"
|
||||
"dunst"
|
||||
"hypridle"
|
||||
"wl-paste --type text --watch cliphist store"
|
||||
"wl-paste --type image --watch cliphist store"
|
||||
];
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# 4. Keybindings
|
||||
# -----------------------------------------------------------------------
|
||||
bind = [
|
||||
# Launchers & Applications
|
||||
"$mod, RETURN, exec, $terminal"
|
||||
"$mod, SPACE, exec, $menu"
|
||||
"$mod, B, exec, $browser"
|
||||
"$mod, D, exec, discord"
|
||||
"$mod, E, exec, $terminal -e yazi"
|
||||
"$mod, L, exec, hyprlock"
|
||||
|
||||
# Window Controls
|
||||
"$mod SHIFT, Q, killactive,"
|
||||
"$mod, F, fullscreen, 0"
|
||||
"$mod, V, togglefloating,"
|
||||
"$mod, P, pseudo,"
|
||||
"$mod, J, togglesplit,"
|
||||
|
||||
# Screenshots (Grim + Slurp)
|
||||
"$mod, PRINT, exec, grim -g \"$(slurp)\" - | wl-copy"
|
||||
"$mod SHIFT, PRINT, exec, grim ~/Pictures/Screenshot_$(date +'%Y%m%d_%H%M%S').png"
|
||||
|
||||
# Vim Focus Navigation (H, J, K, L & Arrows)
|
||||
"$mod, left, movefocus, l"
|
||||
"$mod, right, movefocus, r"
|
||||
"$mod, up, movefocus, u"
|
||||
"$mod, down, movefocus, d"
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, l, movefocus, r"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, j, movefocus, d"
|
||||
|
||||
# Vim Window Swapping
|
||||
"$mod SHIFT, left, swapwindow, l"
|
||||
"$mod SHIFT, right, swapwindow, r"
|
||||
"$mod SHIFT, up, swapwindow, u"
|
||||
"$mod SHIFT, down, swapwindow, d"
|
||||
"$mod SHIFT, h, swapwindow, l"
|
||||
"$mod SHIFT, l, swapwindow, r"
|
||||
"$mod SHIFT, k, swapwindow, u"
|
||||
"$mod SHIFT, j, swapwindow, d"
|
||||
|
||||
# Scratchpad / Special Workspace
|
||||
"$mod, S, togglespecialworkspace, magic"
|
||||
"$mod SHIFT, S, movetoworkspace, special:magic"
|
||||
]
|
||||
# Generate Workspace 1-10 switching and moving bindings with a list comprehension
|
||||
++ (map (i: "$mod, ${toString i}, workspace, ${toString i}") (lib.range 1 9))
|
||||
++ [ "$mod, 0, workspace, 10" ]
|
||||
++ (map (i: "$mod SHIFT, ${toString i}, movetoworkspace, ${toString i}") (lib.range 1 9))
|
||||
++ [ "$mod SHIFT, 0, movetoworkspace, 10" ];
|
||||
|
||||
# Locked/repeating bindings (Volume, Media, Brightness)
|
||||
bindle = [
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
];
|
||||
|
||||
# Mouse bindings (move/resize floating windows)
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
75
home/hypr/hyprlock.nix
Normal file
75
home/hypr/hyprlock.nix
Normal file
@@ -0,0 +1,75 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
grace = 0;
|
||||
hide_cursor = true;
|
||||
no_fade_in = false;
|
||||
};
|
||||
|
||||
# Background with screenshot blur effect
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
noise = 0.0117;
|
||||
contrast = 0.8916;
|
||||
brightness = 0.8172;
|
||||
vibrancy = 0.1696;
|
||||
vibrancy_darkness = 0.0;
|
||||
}
|
||||
];
|
||||
|
||||
# Clock display
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
color = "rgba(242, 243, 244, 0.75)";
|
||||
font_size = 95;
|
||||
font_family = "JetBrainsMono Nerd Font Bold";
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:1000] echo \"$(date +'%A, %B %d')\"";
|
||||
color = "rgba(242, 243, 244, 0.6)";
|
||||
font_size = 22;
|
||||
font_family = "JetBrainsMono Nerd Font";
|
||||
position = "0, 100";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
|
||||
# Password Input Field
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
size = "250, 50";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
outer_color = "rgba(33ccffee)";
|
||||
inner_color = "rgba(15, 23, 42, 0.85)";
|
||||
font_color = "rgb(242, 243, 244)";
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "<i>Enter Password...</i>";
|
||||
hide_input = false;
|
||||
position = "0, -50";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
28
hosts/hades/default.nix
Normal file
28
hosts/hades/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./display-configuration.nix
|
||||
../../modules/hardware/nvidia.nix
|
||||
../../modules/apps/gaming.nix
|
||||
];
|
||||
|
||||
networking.hostName = "hades";
|
||||
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
offload.enable = false;
|
||||
sync.enable = false;
|
||||
|
||||
amdgpuBusId = "PCI:121@0:0:0";
|
||||
nvidiaBusId = "PCI:1@0:0:0";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
mangohud
|
||||
nvtopPackages.nvidia
|
||||
];
|
||||
}
|
||||
|
||||
7
hosts/hades/display-configuration.nix
Normal file
7
hosts/hades/display-configuration.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.anish.wayland.windowManager.hyprland.settings.monitor = [
|
||||
"HDMI-A-1, 3840x2160, auto, 2"
|
||||
];
|
||||
}
|
||||
33
hosts/hades/hardware-configuration.nix
Normal file
33
hosts/hades/hardware-configuration.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
# 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" "ahci" "thunderbolt" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/b4665ea7-2347-4075-8fb5-5b9c838a4852";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/3FEE-E289";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/37ad0ef8-95d4-4cf5-a443-a867bca3d974"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
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