First attempt at splitting out common config items

This commit is contained in:
2024-03-27 21:23:45 +00:00
parent c0e7c705d9
commit e8e42fb163
3 changed files with 37 additions and 25 deletions

17
common.nix Normal file
View File

@@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
{
imports = [
users.nix
];
# Set your time zone.
time.timeZone = "Europe/London";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkb.options in tty.
};
}

View File

@@ -8,6 +8,7 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../common.nix
];
system.copySystemConfiguration = true;
@@ -27,16 +28,6 @@
networking.networkmanager.enable = true;
networking.firewall.enable = true;
# Set your time zone.
time.timeZone = "Europe/London";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkb.options in tty.
};
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
@@ -78,21 +69,6 @@
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Force intel-media-driver
# Define a user account. Don't forget to set a password with passwd.
users = {
defaultUserShell = pkgs.zsh;
users.nikdoof = {
isNormalUser = true;
extraGroups =
[
"wheel"
"video"
];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHWO2qwHaPaQs46na4Aa6gMkw5QqRHUMGQphtgAcDJOw"
];
};
};
# List packages installed in system profile
environment.systemPackages = with pkgs; [

19
users.nix Normal file
View File

@@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }:
{
users = {
defaultUserShell = pkgs.zsh;
users.nikdoof = {
isNormalUser = true;
extraGroups =
[
"wheel"
"video"
];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHWO2qwHaPaQs46na4Aa6gMkw5QqRHUMGQphtgAcDJOw"
];
};
};
}