feat: initial configuration

This commit is contained in:
Ananth Venkatesh 2025-02-02 01:23:28 -05:00
parent 3062d8c62b
commit 497fb85419
Signed by untrusted user who does not match committer: ananthv
GPG key ID: 4BB578E748CFE4FF
3 changed files with 159 additions and 0 deletions

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1738392223,
"narHash": "sha256-epwD0BvADThOtRrDoI7qJUZPe1vhXoSIwLna2/VoOMA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7d84bdf9cb85f399a8eafe8e17acee2354f13a21",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11-small",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

84
flake.nix Normal file
View file

@ -0,0 +1,84 @@
{
# /***** /****** /****
# |* *| |* | |* **** ** ***** |* | /* *
# |* *| |* | |* /* /* * |* | |* | |*
# |*****/ |* | |* **** /* * |* / |* | ******
# | |* | |* | ****** ***** |* | |
# | |* | |* * | |* | |* * |* | * |
# | **** ***** **** |* | |* * ****** *****
#
# ==========================================================================
# This is Cantabrigian's Pulsar configuration flake for hosting web services.
# It is passed into the PulsarOS configuration flake to build the server.
# You should include a specific version of this flake as an input
# in the server configuration flake and pipe its output to the `make`
# function to build the system.
description = "Pulsar configuration flake for Atlantic";
inputs = {
# PulsarOS uses the latest nixpkgs channel,
# so new (but somewhat? stable) packages are used by default.
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11-small";
};
outputs =
{ nixpkgs, ... }:
rec {
# Primary user configuration
hostname = "cantabrigian"; # Identify the system for networking tasks
user = "bricks"; # Login username of primary runner
name = "Brick Suit"; # Full name of primary user
# Git configuration
git = {
name = "Ananth Venkatesh";
email = "ananthv@mit.edu";
};
# Meta configuration
flake = "/home/${user}/git/forgejo/nixos";
# Import hardware scan (device-specific)
hardware = import ./hardware-configuration.nix;
hyprland.monitors = [ ];
# Internationalization properties
locale = "en_US.UTF-8";
# Power-efficient NVIDIA GPU settings
graphics = {
opengl = true;
nvidia.enabled = false;
};
# System overrides
overrides = [ ];
homeOverrides = [ ];
# Custom packages
systemPackages = pkgs: with pkgs; [ hello ];
homePackages =
pkgs: with pkgs; [
hello-wayland
];
# Hydra and Cachix
hydra.enabled = false;
cachix = false;
# Enforce defaults
system = "x86_64-linux";
kernel = "zen";
secureboot.enabled = false;
stateVersion = "24.11";
autoLogin = false;
ssh.enabled = true;
hyprland.mod = "SUPER";
audio.jack = false;
ollama = false;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
};
}

View file

@ -0,0 +1,48 @@
# 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,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/a13fb71a-f654-49ba-88b5-e386c9009fed";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-c06a68dc-9721-4bf1-8845-e09da3580d2e".device =
"/dev/disk/by-uuid/c06a68dc-9721-4bf1-8845-e09da3580d2e";
swapDevices = [ ];
# 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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}