configuration: extract nixos config into more files
This commit is contained in:
parent
276658b73c
commit
056899d344
14
system/bluetooth.nix
Normal file
14
system/bluetooth.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.blueman.enable = true;
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
DiscoverableTimeout = 0;
|
||||||
|
# Discoverable = true;
|
||||||
|
AlwaysPairable = true;
|
||||||
|
};
|
||||||
|
Policy = { AutoEnable = true; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -9,6 +9,13 @@
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./thunar.nix
|
./thunar.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
./fonts.nix
|
||||||
|
./sound.nix
|
||||||
|
./bluetooth.nix
|
||||||
|
./locale.nix
|
||||||
|
./users.nix
|
||||||
|
./containers.nix
|
||||||
|
./network.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
@ -18,108 +25,9 @@
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
services.udev.packages = [ pkgs.android-udev-rules ];
|
services.udev.packages = [ pkgs.android-udev-rules ];
|
||||||
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
# Open kde connect ports
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Sao_Paulo";
|
|
||||||
environment.variables.TZ = config.time.timeZone;
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "pt_BR.utf8";
|
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
|
||||||
# services.xserver.displayManager.gdm.enable = true;
|
|
||||||
# services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
# services.xserver.displayManager.autologin.user = "lelgenio";
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.xkb = {
|
|
||||||
layout = "us";
|
|
||||||
variant = "colemak";
|
|
||||||
};
|
|
||||||
console.keyMap = "colemak";
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
virtualisation.docker.autoPrune.enable = true;
|
|
||||||
virtualisation.docker.autoPrune.dates = "monthly";
|
|
||||||
virtualisation.docker.autoPrune.flags = [ "--all --volumes" ];
|
|
||||||
|
|
||||||
programs.extra-container.enable = true;
|
|
||||||
|
|
||||||
programs.firejail.enable = true;
|
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
ports = [ 9022 ];
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
KbdInteractiveAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# programs.ssh = {
|
|
||||||
# startAgent = true;
|
|
||||||
# extraConfig = ''
|
|
||||||
# AddKeysToAgent yes
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
|
|
||||||
## Enable sound with pipewire.
|
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
wireplumber.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.blueman.enable = true;
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
General = {
|
|
||||||
DiscoverableTimeout = 0;
|
|
||||||
# Discoverable = true;
|
|
||||||
AlwaysPairable = true;
|
|
||||||
};
|
|
||||||
Policy = { AutoEnable = true; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
services.libinput.enable = true;
|
services.libinput.enable = true;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.mutableUsers = false;
|
|
||||||
users.users.lelgenio = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Leonardo Eugênio";
|
|
||||||
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
|
|
||||||
shell = pkgs.fish;
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
|
|
||||||
|
|
||||||
# services.getty.autologinUser = "lelgenio";
|
|
||||||
programs.fish.enable = true;
|
|
||||||
|
|
||||||
programs.dzgui.enable = true;
|
|
||||||
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
|
|
||||||
|
|
||||||
packages.media-packages.enable = true;
|
packages.media-packages.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
pavucontrol
|
pavucontrol
|
||||||
|
@ -130,21 +38,7 @@
|
||||||
gnome3.adwaita-icon-theme # default gnome cursors
|
gnome3.adwaita-icon-theme # default gnome cursors
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.enableDefaultPackages = true;
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk
|
|
||||||
noto-fonts-emoji
|
|
||||||
nerdfonts_fira_hack
|
|
||||||
];
|
|
||||||
|
|
||||||
services.geoclue2.enable = true;
|
services.geoclue2.enable = true;
|
||||||
# programs.qt5ct.enable = true;
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
systemd.extraConfig = ''
|
systemd.extraConfig = ''
|
||||||
DefaultTimeoutStopSec=10s
|
DefaultTimeoutStopSec=10s
|
||||||
|
|
11
system/containers.nix
Normal file
11
system/containers.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
virtualisation.docker.autoPrune.enable = true;
|
||||||
|
virtualisation.docker.autoPrune.dates = "monthly";
|
||||||
|
virtualisation.docker.autoPrune.flags = [ "--all --volumes" ];
|
||||||
|
|
||||||
|
programs.extra-container.enable = true;
|
||||||
|
|
||||||
|
programs.firejail.enable = true;
|
||||||
|
}
|
9
system/fonts.nix
Normal file
9
system/fonts.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
fonts.enableDefaultPackages = true;
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk
|
||||||
|
noto-fonts-emoji
|
||||||
|
nerdfonts_fira_hack
|
||||||
|
];
|
||||||
|
}
|
12
system/locale.nix
Normal file
12
system/locale.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, config, ... }: {
|
||||||
|
time.timeZone = "America/Sao_Paulo";
|
||||||
|
environment.variables.TZ = config.time.timeZone;
|
||||||
|
i18n.defaultLocale = "pt_BR.utf8";
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "colemak";
|
||||||
|
};
|
||||||
|
console.keyMap = "colemak";
|
||||||
|
}
|
24
system/network.nix
Normal file
24
system/network.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
# Open kde connect ports
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 9022 ];
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
11
system/sound.nix
Normal file
11
system/sound.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -17,4 +17,7 @@
|
||||||
protontricks
|
protontricks
|
||||||
bottles
|
bottles
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.dzgui.enable = true;
|
||||||
|
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
|
||||||
}
|
}
|
||||||
|
|
20
system/users.nix
Normal file
20
system/users.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
# services.getty.autologinUser = "lelgenio";
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.mutableUsers = false;
|
||||||
|
users.users.lelgenio = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Leonardo Eugênio";
|
||||||
|
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
||||||
|
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
|
||||||
|
}
|
Loading…
Reference in a new issue