From dc57716c76ea937be10d6e396c293503e7687edf Mon Sep 17 00:00:00 2001 From: mollyw Date: Tue, 7 Jul 2026 16:27:53 -0400 Subject: [PATCH] Copy current NixOS configuration --- configuration.nix | 81 ++++++++++++++++++++++++++++++++++++++ flake.lock | 49 +++++++++++++++++++++++ flake.nix | 27 +++++++++++++ hardware-configuration.nix | 36 +++++++++++++++++ home.nix | 63 +++++++++++++++++++++++++++++ 5 files changed, 256 insertions(+) create mode 100644 configuration.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hardware-configuration.nix create mode 100644 home.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..b7fb45b --- /dev/null +++ b/configuration.nix @@ -0,0 +1,81 @@ +{ config, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ]; + + # Bootloader + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # System configuration + networking.hostName = "nixos"; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # Networking + networking.networkmanager.enable = true; + + # Time zone + time.timeZone = "America/New_York"; + + # Localization + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + # X11 and Desktop + services.xserver.enable = true; + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; + services.xserver.xkb = { layout = "us"; variant = ""; }; + + # Printing + services.printing.enable = true; + + # Sound + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + # User account + users.users."mollyw" = { + isNormalUser = true; + description = "Molly Wunderlich"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ + # Add user-specific packages here + ]; + }; + + # System packages + environment.systemPackages = with pkgs; [ + vim + pkgs.proton-vpn + pkgs.proton-pass + pkgs.signal-desktop + pkgs.discord + pkgs.btop + pkgs.protonmail-desktop + pkgs.proton-authenticator + ]; + + # Applications + programs.firefox.enable = true; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # System state version + system.stateVersion = "26.05"; +} \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..182dc2a --- /dev/null +++ b/flake.lock @@ -0,0 +1,49 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1781981105, + "narHash": "sha256-/1nNBbA7PrSQpTc9Qazkhl4kIPg+TNl0CjxS3UQJKlw=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "7bfff44b465909f69a442701293bc0badcf476dc", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-26.05", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1781808408, + "narHash": "sha256-0sOb6OIaD/K1zHxBhpmlKvkADfe0n8+l4Jj2e1Q0r3w=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "e8210c649915deed7080033cdbabcc19e40bb899", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8385517 --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "NixOS configuration for chi"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; + home-manager = { + url = "github:nix-community/home-manager/release-26.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = inputs@{ nixpkgs, home-manager, ... }: { + nixosConfigurations = { + chi = nixpkgs.lib.nixosSystem { + modules = [ + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.mollyw = import ./home.nix; + } + ]; + }; + }; + }; +} \ No newline at end of file diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..6814e15 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,36 @@ +# 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" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + hardware.graphics.enable = true; + hardware.graphics.enable32Bit = true; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9cb5a634-7d09-4f2d-9751-596b01fad242"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/EE6A-ACA5"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/28d5c451-f9a0-4bc5-ae48-6aeaf4848f38"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..185137b --- /dev/null +++ b/home.nix @@ -0,0 +1,63 @@ +# This is your home-manager configuration file +# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) +{ + inputs, + lib, + config, + pkgs, + ... +}: { + # You can import other home-manager modules here + imports = [ + # If you want to use modules your own flake exports (from modules/home-manager): + # inputs.self.homeManagerModules.example + + # Or modules exported from other flakes (such as nix-colors): + # inputs.nix-colors.homeManagerModules.default + + # You can also split up your configuration and import pieces of it here: + # ./nvim.nix + ]; + + nixpkgs = { + # You can add overlays here + overlays = [ + # Add overlays your own flake exports (from overlays and pkgs dir): + inputs.self.overlays.additions + inputs.self.overlays.modifications + inputs.self.overlays.unstable-packages + + # You can also add overlays exported from other flakes: + # neovim-nightly-overlay.overlays.default + + # Or define it inline, for example: + # (final: prev: { + # hi = final.hello.overrideAttrs (oldAttrs: { + # patches = [ ./change-hello-to-hi.patch ]; + # }); + # }) + ]; + # Configure your nixpkgs instance + config = { + # Disable if you don't want unfree packages + allowUnfree = true; + }; + }; + + # TODO: Set your username + home = { + username = "your-username"; + homeDirectory = "/home/your-username"; + }; + + # Add stuff for your user as you see fit: + # programs.neovim.enable = true; + # home.packages = with pkgs; [ steam ]; + + # Enable home-manager and git + programs.home-manager.enable = true; + programs.git.enable = true; + + # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion + home.stateVersion = "25.11"; +} -- 2.51.2