From 4460a9f28840d4981832e1cc5c8294ac5d30e838 Mon Sep 17 00:00:00 2001 From: Markus Heurung Date: Wed, 17 Jul 2024 17:22:24 +0200 Subject: [PATCH] first things refactored in nixos configuration --- hosts/cube.nix | 31 ++++--------------------------- modules/common.nix | 4 ++-- 2 files changed, 6 insertions(+), 29 deletions(-) diff --git a/hosts/cube.nix b/hosts/cube.nix index d5f62c6..0739c88 100644 --- a/hosts/cube.nix +++ b/hosts/cube.nix @@ -1,13 +1,10 @@ -# 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, ... }: { imports = - [ # Include the results of the hardware scan. + [ ./cube-hardware-configuration.nix + ../modules/common.nix ]; # Bootloader. @@ -21,8 +18,6 @@ boot.loader.efi.canTouchEfiVariables = true; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - networking.hostName = "cube"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. @@ -41,24 +36,6 @@ }; }; - # Set your time zone. - time.timeZone = "Europe/Berlin"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_DE.UTF-8"; - LC_IDENTIFICATION = "de_DE.UTF-8"; - LC_MEASUREMENT = "de_DE.UTF-8"; - LC_MONETARY = "de_DE.UTF-8"; - LC_NAME = "de_DE.UTF-8"; - LC_NUMERIC = "de_DE.UTF-8"; - LC_PAPER = "de_DE.UTF-8"; - LC_TELEPHONE = "de_DE.UTF-8"; - LC_TIME = "de_DE.UTF-8"; - }; - security = { pam.services.swaylock = {}; polkit.enable = true; @@ -73,8 +50,8 @@ alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; + # If you want to use JACK applications, uncomment this + # jack.enable = true; }; services.plex = { enable = true; diff --git a/modules/common.nix b/modules/common.nix index e4aff01..bc4be3a 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, lib, pkgs, modulesPath, ... }: { nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -20,4 +20,4 @@ LC_TELEPHONE = "de_DE.UTF-8"; LC_TIME = "de_DE.UTF-8"; }; -}; +}