diff --git a/.gitignore b/.gitignore index 577b0a0..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix index b36544c..50ef733 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,25 +1,47 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: +{ config, lib, pkgs, modulesPath, ... }: { imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix + [ (modulesPath + "/installer/scan/not-detected.nix") ]; + fileSystems."/" = + { device = "/dev/disk/by-uuid/e0516457-2611-4fbd-afdd-b96618c15fc9"; + fsType = "ext4"; + }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/5C46-63E4"; + fsType = "vfat"; + }; + swapDevices = + [ { device = "/dev/disk/by-uuid/0bb9c031-1533-40bb-81ae-f956ba84568d"; } + ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + # high-resolution display + hardware.video.hidpi.enable = lib.mkDefault true; + # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + + nixpkgs.config.allowUnfree = true; + nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + + time.timeZone = "America/New_York"; networking.hostName = "x1c7"; networking.networkmanager.enable = true; - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Set your time zone. - time.timeZone = "America/New_York"; # The global useDHCP flag is deprecated, therefore explicitly set to false here. # Per-interface useDHCP will be mandatory in the future, so this generated config @@ -28,48 +50,15 @@ networking.interfaces.enp0s31f6.useDHCP = true; networking.interfaces.wlp0s20f3.useDHCP = true; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. - # i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # }; - - # Enable the X11 windowing system. services.xserver.enable = true; - - - # Enable the GNOME 3 Desktop Environment. services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome3.enable = true; - - # Configure keymap in X11 - # services.xserver.layout = "us"; - # services.xserver.xkbOptions = "eurosign:e"; - - # Enable CUPS to print documents. - # services.printing.enable = true; - - # Enable sound. - # sound.enable = true; - # hardware.pulseaudio.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.srid = { isNormalUser = true; extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. }; - nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ @@ -78,17 +67,6 @@ vscode ]; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. services.openssh.enable = true; # Open ports in the firewall. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..afc14f4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1617730239, + "narHash": "sha256-/ld88MfYZwO6kgHxsTFcViidEOxOSrYEgW/0uSl8EFc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a05293a93c8498ee3b2e72afc91cbfbd04547918", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b28cbca --- /dev/null +++ b/flake.nix @@ -0,0 +1,8 @@ +{ + outputs = { self, nixpkgs }: { + nixosConfigurations.x1c7 = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ ./configuration.nix ]; + }; + }; +} \ No newline at end of file