mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 18:40:14 +01:00
split configs
This commit is contained in:
parent
8df61f216e
commit
00fbfd0fef
|
@ -10,18 +10,13 @@ with lib; let
|
|||
in {
|
||||
imports = [
|
||||
./home
|
||||
./gnome.nix
|
||||
./kde.nix
|
||||
./desktop
|
||||
./i18n.nix
|
||||
./nixpkgs.nix
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"electron-12.2.3"
|
||||
];
|
||||
};
|
||||
|
||||
config = {
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
@ -34,56 +29,11 @@ in {
|
|||
# Enable networking
|
||||
networkmanager.enable = true;
|
||||
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
# KDE Connect
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
# KDE Connect
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
firewall.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
# Enable the X11 windowing system / wayland depending on DE
|
||||
enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
layout = "de";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
openssh = {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
|
@ -91,49 +41,18 @@ in {
|
|||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.extraConfig = ''
|
||||
DefaultTimeoutStopSec=7s
|
||||
DefaultTimeoutStopSec=12s
|
||||
'';
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
system = {
|
||||
stateVersion = "22.11";
|
||||
autoUpgrade.enable = true; # enable auto updates
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "00:30";
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
};
|
||||
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
};
|
||||
|
||||
zsh.enable = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
|
@ -145,4 +64,5 @@ in {
|
|||
ncdu
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
64
modules/desktop/default.nix
Normal file
64
modules/desktop/default.nix
Normal file
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.my.desktop;
|
||||
in {
|
||||
imports = [
|
||||
./gnome.nix
|
||||
./kde.nix
|
||||
];
|
||||
|
||||
options.my.desktop = {
|
||||
enable = lib.mkEnableOption "desktop";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
# Enable the X11 windowing system / wayland depending on DE
|
||||
xserver.enable = true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
};
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
};
|
||||
};
|
||||
|
||||
# unblock kde connect / gsconnect
|
||||
networking.firewall = {
|
||||
allowedTCPPortRanges = [
|
||||
{
|
||||
# KDE Connect
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{
|
||||
# KDE Connect
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -24,6 +24,8 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.desktop.enable = true;
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
# Enable the GNOME Desktop Environment.
|
|
@ -23,6 +23,8 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.desktop.enable = true;
|
||||
|
||||
services = {
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
xserver = {
|
|
@ -133,16 +133,15 @@ in {
|
|||
userName = "Vinzenz Schroeter";
|
||||
userEmail = "vinzenz.f.s@gmail.com";
|
||||
|
||||
#package = pkgs.gitFull;
|
||||
#config.credential.helper = "libsecret";
|
||||
|
||||
aliases = {
|
||||
prettylog = "log --pretty=oneline --graph";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
pull.ff = "only";
|
||||
init.defaultBranch = "main";
|
||||
merge.tool = "kdiff3";
|
||||
push.autoSetupRemote = "true";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
28
modules/i18n.nix
Normal file
28
modules/i18n.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{...}: {
|
||||
config = {
|
||||
time.timeZone = "Europe/Berlin";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
# Configure keymap in X11
|
||||
layout = "de";
|
||||
xkbVariant = "";
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
};
|
||||
}
|
21
modules/nixpkgs.nix
Normal file
21
modules/nixpkgs.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{...}: {
|
||||
config = {
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"electron-12.2.3"
|
||||
];
|
||||
};
|
||||
|
||||
system = {
|
||||
stateVersion = "22.11";
|
||||
# enable auto updates
|
||||
autoUpgrade.enable = true;
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "00:30";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue