Initial system setup

This commit is contained in:
nest 2025-12-07 22:57:38 -05:00
commit 9de7773af9
5 changed files with 277 additions and 0 deletions

95
configuration.nix Normal file
View file

@ -0,0 +1,95 @@
{ config, lib, pkgs, ... }:
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelModules = [ "amdgpu" ];
networking.hostName = "crow"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
users.defaultUserShell = pkgs.zsh;
users.users.nest = {
isNormalUser = true;
extraGroups = [ "wheel" "network" ]; # Enable sudo for the user.
packages = with pkgs; [
tree
];
};
programs.niri.enable = true;
programs.zsh.enable = true;
environment.systemPackages = with pkgs; [
neovim
wget
];
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Enable sound.
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
services.getty.autologinUser = "nest";
services.displayManager = {
gdm.enable = true;
autoLogin = {
enable = true;
user = "nest";
};
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# 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?
}

47
flake.lock generated Normal file
View file

@ -0,0 +1,47 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1764998300,
"narHash": "sha256-fZatn/KLfHLDXnF0wy7JxXqGaZmGDTVufT4o/AOlj44=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "27a6182347ccae90a88231ae0dc5dfa7d15815bb",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1764950072,
"narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f61125a668a320878494449750330ca58b78c557",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

30
flake.nix Normal file
View file

@ -0,0 +1,30 @@
{
description = "Nest's Flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, home-manager, ... }: {
nixosConfigurations.crow = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.nest = import ./home.nix;
backupFileExtension = "backup";
};
}
];
};
};
}

View 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 = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/310d77f1-247d-4db9-9db0-be6b70483bd8";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/9F36-9DE8";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d7fbd2b2-c943-457b-afc1-ad355d30a5c2"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

72
home.nix Normal file
View file

@ -0,0 +1,72 @@
{ config, pkgs, ... }:
{
# ============ Home-Manager =============
home.username = "nest";
home.homeDirectory = "/home/nest";
home.stateVersion = "26.05";
# =======================================
# ================ Programs =============
programs.git = {
enable = true;
settings = {
user = {
name = "nest";
email = "booksandpi@gmail.com";
};
};
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history.size = 10000;
shellAliases = {
ll = "ls -la";
update = "sudo nixos-rebuild --flake $HOME/.nix#crow";
};
profileExtra = ''
if [-z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = 1 ]; then
exec gdm
fi
'';
oh-my-zsh = {
enable = true;
plugins = [ "git" ];
};
};
programs.alacritty.enable = true;
programs.rofi.enable = true;
programs.swaylock.enable = true;
programs.quickshell.enable = true;
programs.librewolf.enable = true;
# ======================================
# ============== Services ==============
services.swayidle.enable = true;
services.polkit-gnome.enable = true;
# ======================================
# ============ Packages ================
home.packages = with pkgs; [
swaybg
mako
];
# ======================================
}