feat: restructure system config

Create common system config and derive common server & desktop configs
from it.
This commit is contained in:
Felix Schröter 2022-06-26 13:12:01 +02:00
parent 4af1b35392
commit 8dcece0836
Signed by: felschr
GPG key ID: 671E39E6744C807D
6 changed files with 22 additions and 19 deletions

7
system/common.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
imports = [ ./i18n.nix ./nix.nix ./networking.nix ./hardened.nix ];
environment.systemPackages = with pkgs; [ wget curl openssl neovim ];
}

8
system/desktop.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ./fonts.nix ./sound.nix ./vpn.nix ];
services.printing.enable = true;
services.fwupd.enable = true;
}

View file

@ -1,17 +1,6 @@
{ config, pkgs, ... }:
{
imports = [
./hardened.nix
./sound.nix
./i18n.nix
./nix.nix
./networking.nix
./vpn.nix
];
environment.systemPackages = with pkgs; [ wget curl openssl neovim ];
# TODO once nerdfonts 2.2.0 is released switch to NerdFontsSymbolsOnly
# Also needs to be added to known fonts in nixpkgs:
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/data/fonts/nerdfonts/shas.nix
@ -32,7 +21,4 @@
monospace = [ "Fira Code" "Noto Color Emoji" "FiraCode Nerd Font" ];
emoji = [ "Noto Color Emoji" "FiraCode Nerd Font" ];
};
services.printing.enable = true;
services.fwupd.enable = true;
}

5
system/server.nix Normal file
View file

@ -0,0 +1,5 @@
{ config, pkgs, ... }:
{
imports = [ ./common.nix ];
}