Split up common/configuration.nix

This commit is contained in:
Sijmen 2023-06-19 01:00:40 +02:00
parent 148b78f8dc
commit db4eaee487
Signed by: vijfhoek
GPG Key ID: DAF7821E067D9C48
12 changed files with 123 additions and 98 deletions

View File

@ -1,94 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
./home-manager/main.nix
];
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 14d";
};
};
nixpkgs.config.allowUnfree = true;
time.timeZone = "Europe/Amsterdam";
console = {
earlySetup = true;
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
packages = with pkgs; [ terminus_font ];
keyMap = "us";
};
environment.sessionVariables = rec {
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
EDITOR = "nvim";
};
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [
"en_US.UTF-8/UTF-8"
"nl_NL.UTF-8/UTF-8"
];
};
users.users.sijmen = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "wireshark" "video" "dialout" "libvirt" ];
description = "Sijmen";
shell = pkgs.zsh;
};
programs.zsh.enable = true;
services = {
pipewire.enable = true;
gvfs.enable = true;
usbmuxd.enable = true;
smartd.enable = true;
pcscd.enable = true;
fwupd.enable = true;
printing = {
enable = true;
drivers = with pkgs; [ hplip ];
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
};
};
#syncthing = {
#enable = true;
#user = "sijmen";
#dataDir = config.users.users.sijmen.home;
#};
};
fonts.fonts = with pkgs; [
corefonts
dejavu_fonts
iosevka
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
powerline-fonts
source-han-sans
ubuntu_font_family
vistafonts
];
}

View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
console = {
earlySetup = true;
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
packages = [ pkgs.terminus_font ];
keyMap = "us";
};
}

View File

@ -0,0 +1,11 @@
{
environment = {
sessionVariables = rec {
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
EDITOR = "nvim";
};
};
}

View File

@ -0,0 +1,16 @@
{ pkgs, ... }:
{
fonts.fonts = with pkgs; [
corefonts
dejavu_fonts
iosevka
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
powerline-fonts
source-han-sans
ubuntu_font_family
vistafonts
];
}

View File

@ -0,0 +1,9 @@
{
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [
"en_US.UTF-8/UTF-8"
"nl_NL.UTF-8/UTF-8"
];
};
}

View File

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
imports = [
../home-manager/main.nix
./console.nix
./environment.nix
./fonts.nix
./i18n.nix
./nix.nix
./services.nix
./users.nix
];
nixpkgs.config.allowUnfree = true;
time.timeZone = "Europe/Amsterdam";
programs.zsh.enable = true;
}

View File

@ -0,0 +1,14 @@
{
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 14d";
};
};
}

View File

@ -0,0 +1,30 @@
{ pkgs, ... }:
{
services = {
pipewire.enable = true;
gvfs.enable = true;
usbmuxd.enable = true;
smartd.enable = true;
pcscd.enable = true;
fwupd.enable = true;
printing = {
enable = true;
drivers = [ pkgs.hplip ];
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
};
};
#syncthing = {
#enable = true;
#user = "sijmen";
#dataDir = config.users.users.sijmen.home;
#};
};
}

View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
users.users.sijmen = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" "wireshark" "video" "dialout" "libvirt" ];
description = "Sijmen";
shell = pkgs.zsh;
};
}

View File

@ -18,7 +18,7 @@ in
<nixos-hardware/framework/12th-gen-intel>
./hardware-configuration.nix
#lanzaboote.nixosModules.lanzaboote
../common/configuration.nix
../common/configuration/main.nix
];
virtualisation = {
@ -223,7 +223,7 @@ in
};
};
#home-manager.users.sijmen.imports = [ ../common/dconf.nix ];
home-manager.users.sijmen.imports = [ ../common/dconf.nix ];
systemd.services."suspend" = {
enable = true;

View File

@ -4,7 +4,7 @@
imports =
[
./hardware-configuration.nix
../common/configuration.nix
../common/configuration/main.nix
];
hardware = {

View File

@ -3,7 +3,7 @@
{
imports = [
./hardware-configuration.nix
../common/configuration.nix
../common/configuration/main.nix
];
sound.enable = true;