diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6a4809b --- /dev/null +++ b/flake.lock @@ -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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3ce34b1 --- /dev/null +++ b/flake.nix @@ -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; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..f6af8c7 --- /dev/null +++ b/hardware-configuration.nix @@ -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..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; +}