mirror of
https://github.com/Superredstone/nixos.git
synced 2026-03-07 20:28:08 +01:00
Major refactor
This commit is contained in:
@@ -1,24 +1,30 @@
|
||||
{ pkgs, lib, currentSystemDe, ... }:
|
||||
{
|
||||
services.xserver.enable = true;
|
||||
services.xserver.excludePackages = with pkgs; [
|
||||
xterm
|
||||
];
|
||||
service = {
|
||||
xserver.enable = true;
|
||||
xserver.excludePackages = with pkgs; [
|
||||
xterm
|
||||
];
|
||||
|
||||
# Display managers
|
||||
services.displayManager.sddm = lib.mkIf (currentSystemDe == "plasma") {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
# Display managers
|
||||
displayManager = {
|
||||
sddm = lib.mkIf (currentSystemDe == "plasma") {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
gdm.enable = lib.mkIf (currentSystemDe == "gnome") true;
|
||||
};
|
||||
|
||||
# Desktop environments
|
||||
desktopManager = {
|
||||
plasma6.enable = lib.mkIf (currentSystemDe == "plasma") true;
|
||||
gnome.enable = lib.mkIf (currentSystemDe == "gnome") true;
|
||||
};
|
||||
};
|
||||
services.displayManager.gdm.enable = lib.mkIf (currentSystemDe == "gnome") true;
|
||||
|
||||
# Desktop environments
|
||||
services.desktopManager.plasma6.enable = lib.mkIf (currentSystemDe == "plasma") true;
|
||||
environment.plasma6.excludePackages = with pkgs.kdePackages; [
|
||||
elisa
|
||||
konsole
|
||||
];
|
||||
services.desktopManager.gnome.enable = lib.mkIf (currentSystemDe == "gnome") true;
|
||||
environment.gnome.excludePackages = with pkgs; [
|
||||
gnome-contacts
|
||||
gnome-console
|
||||
@@ -37,16 +43,12 @@
|
||||
|
||||
xdg = {
|
||||
autostart.enable = true;
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [
|
||||
# xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
portal.enable = true;
|
||||
};
|
||||
|
||||
programs.kdeconnect = lib.mkIf (currentSystemDe != "none") {
|
||||
enable = true;
|
||||
# FIXME: Make this work for KDE
|
||||
package = pkgs.gnomeExtensions.gsconnect;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,27 +3,29 @@
|
||||
imports = [
|
||||
./keyboard.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
] ++ (if (currentSystemDe != "none") then [
|
||||
./sound.nix
|
||||
./fonts.nix
|
||||
./de.nix
|
||||
./fonts.nix
|
||||
./sound.nix
|
||||
] else []);
|
||||
|
||||
time.timeZone = "Europe/Rome";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "it_IT.UTF-8";
|
||||
LC_IDENTIFICATION = "it_IT.UTF-8";
|
||||
LC_MEASUREMENT = "it_IT.UTF-8";
|
||||
LC_MONETARY = "it_IT.UTF-8";
|
||||
LC_NAME = "it_IT.UTF-8";
|
||||
LC_NUMERIC = "it_IT.UTF-8";
|
||||
LC_PAPER = "it_IT.UTF-8";
|
||||
LC_TELEPHONE = "it_IT.UTF-8";
|
||||
LC_TIME = "it_IT.UTF-8";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "it_IT.UTF-8";
|
||||
LC_IDENTIFICATION = "it_IT.UTF-8";
|
||||
LC_MEASUREMENT = "it_IT.UTF-8";
|
||||
LC_MONETARY = "it_IT.UTF-8";
|
||||
LC_NAME = "it_IT.UTF-8";
|
||||
LC_NUMERIC = "it_IT.UTF-8";
|
||||
LC_PAPER = "it_IT.UTF-8";
|
||||
LC_TELEPHONE = "it_IT.UTF-8";
|
||||
LC_TIME = "it_IT.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
|
||||
7
modules/nix-config/services.nix
Normal file
7
modules/nix-config/services.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
{
|
||||
services = {
|
||||
pcscd.enable = true;
|
||||
nordvpn.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,13 +1,14 @@
|
||||
{ ... }:
|
||||
{
|
||||
# Enable sound with pipewire.
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
pulseaudio.enable = false;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{ pkgs, nur, gamingSystem, workSystem, currentSystemDe, ... }@ inputs:
|
||||
{
|
||||
imports = [
|
||||
./nordvpn.nix
|
||||
./programs
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# CLI utils
|
||||
appimage-run
|
||||
@@ -97,26 +99,4 @@
|
||||
gnome-tweaks
|
||||
] else []);
|
||||
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
programs.steam = if gamingSystem then {
|
||||
enable = true;
|
||||
# package = pkgs.steam-millennium;
|
||||
remotePlay.openFirewall = true;
|
||||
} else {};
|
||||
|
||||
programs.hyprland.enable = if currentSystemDe == "hyprland" then true else false;
|
||||
|
||||
services.pcscd.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-tty;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
27
modules/programs/default.nix
Normal file
27
modules/programs/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ pkgs, gamingSystem, currentSystemDe, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nordvpn.nix
|
||||
];
|
||||
|
||||
programs = {
|
||||
gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
};
|
||||
steam = if gamingSystem then {
|
||||
enable = true;
|
||||
# package = pkgs.steam-millennium;
|
||||
remotePlay.openFirewall = true;
|
||||
} else {};
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-tty;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
nh = {
|
||||
enable = true;
|
||||
};
|
||||
hyprland.enable = if currentSystemDe == "hyprland" then true else false;
|
||||
};
|
||||
}
|
||||
@@ -10,6 +10,4 @@
|
||||
nordvpn = pkgs.nur.repos.wingej0.nordvpn;
|
||||
})
|
||||
];
|
||||
services.nordvpn.enable = true;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user