refactor and modularize base.nix futher; use default.nix when possible
This commit is contained in:
13
configuration/base/default.nix
Normal file
13
configuration/base/default.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./fonts.nix
|
||||||
|
./kde.nix
|
||||||
|
./location-time.nix
|
||||||
|
./networking.nix
|
||||||
|
./nix-settings.nix
|
||||||
|
./pipewire.nix
|
||||||
|
./programs.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
14
configuration/base/location-time.nix
Normal file
14
configuration/base/location-time.nix
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Set your time zone.
|
||||||
|
# time.timeZone = "Europe/London";
|
||||||
|
services.automatic-timezoned.enable = true;
|
||||||
|
services.chrony = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
services.geoclue2 = {
|
||||||
|
enable = true;
|
||||||
|
geoProviderUrl = "https://api.beacondb.net/v1/geolocate";
|
||||||
|
};
|
||||||
|
}
|
||||||
26
configuration/base/networking.nix
Normal file
26
configuration/base/networking.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# networking.hostName = "nixos"; # Define your hostname.
|
||||||
|
# Pick only one of the below networking options.
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
networking.networkmanager = {
|
||||||
|
# Easiest to use and most distros use this by default.
|
||||||
|
enable = true;
|
||||||
|
wifi.powersave = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
services.mullvad-vpn = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mullvad-vpn;
|
||||||
|
};
|
||||||
|
|
||||||
|
# services.resolved.enable = true;
|
||||||
|
}
|
||||||
35
configuration/base/pipewire.nix
Normal file
35
configuration/base/pipewire.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Enable sound.
|
||||||
|
# hardware.pulseaudio.enable = true;
|
||||||
|
# OR
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
extraConfig.pipewire-pulse = {
|
||||||
|
"10-prevent-agc" = {
|
||||||
|
"pulse.rules" = [
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
{ "application.process.binary" = "chrome"; }
|
||||||
|
{ "application.process.binary" = "Discord"; }
|
||||||
|
{ "application.process.binary" = "teams"; }
|
||||||
|
{ "application.process.binary" = "electron"; }
|
||||||
|
{ "application.process.binary" = "skypeforlinux"; }
|
||||||
|
{ "application.process.binary" = "telegram-desktop"; }
|
||||||
|
{ "application.process.binary" = "vivaldi"; }
|
||||||
|
{ "application.process.binary" = "chromium"; }
|
||||||
|
{ "application.process.binary" = "zoom"; }
|
||||||
|
];
|
||||||
|
actions = {
|
||||||
|
quirks = [
|
||||||
|
"block-source-volume"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
37
configuration/base/programs.nix
Normal file
37
configuration/base/programs.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
security.sudo-rs.enable = true;
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
programs.bash.blesh.enable = true;
|
||||||
|
programs.fish.enable = true;
|
||||||
|
# List packages installed in system profile. To search, run:
|
||||||
|
# $ nix search wget
|
||||||
|
environment.systemPackages = with pkgs;
|
||||||
|
[
|
||||||
|
# utils
|
||||||
|
uutils-coreutils-noprefix
|
||||||
|
vim
|
||||||
|
curl
|
||||||
|
inetutils
|
||||||
|
dig
|
||||||
|
|
||||||
|
rar
|
||||||
|
zstd
|
||||||
|
xz
|
||||||
|
p7zip
|
||||||
|
|
||||||
|
libva-utils
|
||||||
|
smartmontools
|
||||||
|
appimage-run
|
||||||
|
|
||||||
|
# dicts
|
||||||
|
nuspell
|
||||||
|
hunspellDicts.en-gb-large
|
||||||
|
|
||||||
|
# For cursor in steam?
|
||||||
|
xsettingsd
|
||||||
|
xorg.xrdb
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -5,130 +5,24 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ ./base ];
|
||||||
[
|
|
||||||
./base/nix-settings.nix
|
|
||||||
./base/fonts.nix
|
|
||||||
./base/kde.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
hardware.enableAllFirmware = true;
|
||||||
|
|
||||||
|
# Disks / Swap / etc
|
||||||
# swapDevices = [{
|
# swapDevices = [{
|
||||||
# device = "/var/lib/swapfile";
|
# device = "/var/lib/swapfile";
|
||||||
# size = 16 * 1024; # 16 GB
|
# size = 16 * 1024; # 16 GB
|
||||||
# }];
|
# }];
|
||||||
zramSwap.enable = true; # Creates a zram block device and uses it as a swap device
|
zramSwap.enable = true; # Creates a zram block device and uses it as a swap device
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
hardware.enableAllFirmware = true;
|
|
||||||
|
|
||||||
security.sudo-rs.enable = true;
|
|
||||||
|
|
||||||
# networking.hostName = "nixos"; # Define your hostname.
|
|
||||||
# Pick only one of the below networking options.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
networking.networkmanager = {
|
|
||||||
# Easiest to use and most distros use this by default.
|
|
||||||
enable = true;
|
|
||||||
wifi.powersave = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
# hardware.pulseaudio.enable = true;
|
|
||||||
# OR
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
extraConfig.pipewire-pulse = {
|
|
||||||
"10-prevent-agc" = {
|
|
||||||
"pulse.rules" = [
|
|
||||||
{
|
|
||||||
matches = [
|
|
||||||
{ "application.process.binary" = "chrome"; }
|
|
||||||
{ "application.process.binary" = "Discord"; }
|
|
||||||
{ "application.process.binary" = "teams"; }
|
|
||||||
{ "application.process.binary" = "electron"; }
|
|
||||||
{ "application.process.binary" = "skypeforlinux"; }
|
|
||||||
{ "application.process.binary" = "telegram-desktop"; }
|
|
||||||
{ "application.process.binary" = "vivaldi"; }
|
|
||||||
{ "application.process.binary" = "chromium"; }
|
|
||||||
{ "application.process.binary" = "zoom"; }
|
|
||||||
];
|
|
||||||
actions = {
|
|
||||||
quirks = [
|
|
||||||
"block-source-volume"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.fstrim.enable = true;
|
services.fstrim.enable = true;
|
||||||
# services.resolved.enable = true;
|
|
||||||
services.mullvad-vpn = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.mullvad-vpn;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
# time.timeZone = "Europe/London";
|
|
||||||
services.automatic-timezoned.enable = true;
|
|
||||||
services.chrony = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.fwupd.enable = true;
|
|
||||||
services.geoclue2 = {
|
|
||||||
enable = true;
|
|
||||||
geoProviderUrl = "https://api.beacondb.net/v1/geolocate";
|
|
||||||
};
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
|
|
||||||
programs.bash.blesh.enable = true;
|
|
||||||
programs.fish.enable = true;
|
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs;
|
|
||||||
[
|
|
||||||
# utils
|
|
||||||
uutils-coreutils-noprefix
|
|
||||||
vim
|
|
||||||
curl
|
|
||||||
inetutils
|
|
||||||
dig
|
|
||||||
|
|
||||||
rar
|
|
||||||
zstd
|
|
||||||
xz
|
|
||||||
p7zip
|
|
||||||
|
|
||||||
libva-utils
|
|
||||||
smartmontools
|
|
||||||
appimage-run
|
|
||||||
|
|
||||||
# dicts
|
|
||||||
nuspell
|
|
||||||
hunspellDicts.en-gb-large
|
|
||||||
|
|
||||||
# For cursor in steam?
|
|
||||||
xsettingsd
|
|
||||||
xorg.xrdb
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
@@ -5,7 +5,7 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../home-manager/base.nix
|
../../home-manager
|
||||||
../../home-manager/gaming.nix
|
../../home-manager/gaming.nix
|
||||||
../../home-manager/development/vscode.nix
|
../../home-manager/development/vscode.nix
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
../../configuration/base.nix
|
../../configuration
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.disko.nixosModules.default
|
inputs.disko.nixosModules.default
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../home-manager/base.nix
|
../../home-manager
|
||||||
../../home-manager/development/vscode.nix
|
../../home-manager/development/vscode.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
../../configuration/base.nix
|
../../configuration
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
inputs.disko.nixosModules.default
|
inputs.disko.nixosModules.default
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../home-manager/base.nix
|
../../home-manager
|
||||||
../../home-manager/development/all.nix
|
../../home-manager/development
|
||||||
../../home-manager/gaming.nix
|
../../home-manager/gaming.nix
|
||||||
../../home-manager/streamlink.nix
|
../../home-manager/streamlink.nix
|
||||||
];
|
];
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
gpu-api = "auto";
|
gpu-api = "auto";
|
||||||
gpu-context = "auto";
|
gpu-context = "auto";
|
||||||
hwdec = "auto";
|
hwdec = "auto";
|
||||||
# screenshot-directory = "/mnt/HDD2/Pictures/";
|
screenshot-directory = "/mnt/HDD2/Pictures/";
|
||||||
glsl-shaders = "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl";
|
glsl-shaders = "~~/shaders/Anime4K_Clamp_Highlights.glsl:~~/shaders/Anime4K_Restore_CNN_VL.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_VL.glsl:~~/shaders/Anime4K_AutoDownscalePre_x2.glsl:~~/shaders/Anime4K_AutoDownscalePre_x4.glsl:~~/shaders/Anime4K_Upscale_CNN_x2_M.glsl";
|
||||||
};
|
};
|
||||||
extraInput = ''
|
extraInput = ''
|
||||||
|
|||||||
9
home-manager/base/default.nix
Normal file
9
home-manager/base/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./fonts.nix
|
||||||
|
./mpv.nix
|
||||||
|
./terminal.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -2,10 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./base/fonts.nix
|
./base
|
||||||
./base/terminal.nix
|
./firefox
|
||||||
./base/mpv.nix
|
|
||||||
./firefox/firefox.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs;[
|
home.packages = with pkgs;[
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./vscode.nix
|
|
||||||
./helix.nix
|
|
||||||
./dotnet.nix
|
./dotnet.nix
|
||||||
./sql.nix
|
|
||||||
./games.nix
|
./games.nix
|
||||||
|
./helix.nix
|
||||||
|
./sql.nix
|
||||||
|
./vscode.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user