initial commit

This commit is contained in:
Ifrahim Ansari 2026-02-15 11:10:32 -05:00
commit 6491e91ec5
37 changed files with 1116 additions and 0 deletions

109
laptop/configuration.nix Normal file
View file

@ -0,0 +1,109 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./hardware-configuration.nix
../disk-config.nix
];
environment.shellAliases = {
rebuild = "sudo nixos-rebuild switch --flake ~/nixos/.#laptop";
c = "nix-shell ~/nixos/shells/c.nix";
js = "nix-shell ~/nixos/shells/js.nix";
nix = "nix-shell ~/nixos/shells/nix.nix";
rust = "nix-shell ~/nixos/shells/rust.nix";
python = "nix-shell ~/nixos/shells/python.nix";
};
fonts.fontconfig.enable = true;
fonts.packages = with pkgs; [ nerd-fonts.jetbrains-mono ];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "whoami"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
networking.networkmanager.wifi.powersave = false;
# Set your time zone.
time.timeZone = "America/New_York";
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Gnome Desktop.
services.desktopManager.gnome.enable = true;
services.displayManager.gdm.enable = true;
services.gnome.gnome-software.enable = true;
services.gnome.core-apps.enable = true;
services.gnome.games.enable = false;
services.flatpak.enable = true;
hardware.graphics.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
programs.bash.enable = true;
programs.bash.completion.enable = true;
users.defaultUserShell = pkgs.bash;
users.users.ifrahim = {
isNormalUser = true;
extraGroups = [
"networkmanager"
"wheel"
]; # Enable sudo for the user.
initialPassword = "Smsia2004";
};
environment.systemPackages = with pkgs; [
home-manager
curl
wget
btop
];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
networking.firewall.enable = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "25.11"; # Did you read the comment?
}

View file

@ -0,0 +1,29 @@
# 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"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}