From c46c131bc25df98ef82313085b96cd8d8f763d95 Mon Sep 17 00:00:00 2001 From: Jay Looney Date: Wed, 13 Nov 2024 17:45:12 -0600 Subject: [PATCH] attempting to use a flake --- configuration.nix | 12 ++++++------ flake.nix | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 flake.nix diff --git a/configuration.nix b/configuration.nix index 630dada..3f05730 100644 --- a/configuration.nix +++ b/configuration.nix @@ -2,12 +2,12 @@ # 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, pkgs, nixos-hardware, ... }: { imports = [ # Include the results of the hardware scan. - + #nixos-hardware.nixosModules.gpd-pocket-3 ./hardware-configuration.nix ]; @@ -47,13 +47,13 @@ services.xserver.desktopManager.gnome.enable = true; # Configure keymap in X11 - services.xserver.layout = "us"; + services.xserver.xkb.layout = "us"; # Enable CUPS to print documents. # services.printing.enable = true; # Enable sound with pipewire. - sound.enable = true; + # sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { @@ -83,8 +83,8 @@ }; # Enable automatic login for the user. - services.xserver.displayManager.autoLogin.enable = true; - services.xserver.displayManager.autoLogin.user = "jml"; + services.displayManager.autoLogin.enable = true; + services.displayManager.autoLogin.user = "jml"; # Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 systemd.services."getty@tty1".enable = false; diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f39bf46 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "Configuration for NixOS"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixos-hardware.url = "github:nixos/nixos-hardware"; + home-manager.url = "github:nix-community/home-manager"; + }; + outputs = inputs@{self, nixpkgs, nixos-hardware, ...}: + { + nixosConfigurations = { + neon = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + # https://github.com/NixOS/nixos-hardware/blob/master/README.md#using-nix-flakes-support + nixos-hardware.nixosModules.gpd-pocket-3 + ./configuration.nix + ]; + }; + }; + }; +}