From 9b19daa088cc376fc9ed877daf499a6e88da2088 Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 6 Apr 2021 13:51:49 -0400 Subject: [PATCH] WIP flake work --- configuration.nix | 48 +++++++++++------------------------------------ flake.lock | 25 ++++++++++++++++++++++++ flake.nix | 8 ++++++++ 3 files changed, 44 insertions(+), 37 deletions(-) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/configuration.nix b/configuration.nix index b36544c..1cd2ee2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -13,13 +13,20 @@ # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + 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 +35,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; [ 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