mirror of
https://github.com/eliasrenman/nixos-config.git
synced 2026-03-17 04:36:07 +01:00
feat: added gnome
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
# and in the NixOS manual (accessible by running 'nixos-help').
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
@@ -10,28 +10,21 @@
|
||||
<nixos-hardware/huawei/machc-wa>
|
||||
./hardware-configuration.nix
|
||||
./packages.nix
|
||||
# Uncomment the relevant desktop environment:
|
||||
# ./hyprland.nix
|
||||
# ./gnome.nix
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Plymouth for graphical bootscreen
|
||||
boot.plymouth.enable = true;
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.kernelParams = [ "quiet" ];
|
||||
boot.plymouth.extraConfig = ''
|
||||
DeviceScale=1
|
||||
'';
|
||||
boot.plymouth.themePackages = with pkgs; [
|
||||
(adi1090x-plymouth-themes.override { selected_themes = [ "colorful_loop" ]; })
|
||||
];
|
||||
boot.plymouth.theme = "colorful_loop";
|
||||
|
||||
# bluetooth support
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
services.blueman.enable = true;
|
||||
|
||||
# VBox only
|
||||
# fsck will fail under vbox and cause a boot to hang, so turn it off
|
||||
boot.initrd.checkJournalingFS = false;
|
||||
@@ -43,29 +36,23 @@
|
||||
i18n.defaultLocale = "sv_SE.UTF-8";
|
||||
|
||||
time.timeZone = "Europe/Stockholm";
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
ohMyZsh.enable = true;
|
||||
shellAliases = {
|
||||
vi = "nvim";
|
||||
|
||||
};
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.neovim.enable = true;
|
||||
programs.neovim.vimAlias = true;
|
||||
programs.neovim.defaultEditor = true;
|
||||
#programs.nylas-mail.enable = true;
|
||||
programs.npm.enable = true;
|
||||
#programs.nm-applet.enable = true;
|
||||
programs.less.enable = true;
|
||||
#programs.iotop.enable = true;
|
||||
programs.iftop.enable = true;
|
||||
programs.java.enable = true;
|
||||
|
||||
services.mpd = {
|
||||
enable = true;
|
||||
startWhenNeeded = true;
|
||||
@@ -82,10 +69,10 @@
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
networking.firewall.enable = false;
|
||||
# Spotify ports for Chromecasts and mobile phones
|
||||
networking.firewall.allowedTCPPorts = [ 57621 ];
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ];
|
||||
|
||||
services.printing.enable = true;
|
||||
|
||||
@@ -100,22 +87,15 @@
|
||||
support32Bit = true;
|
||||
};
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
# services.xserver.xkbOptions = "eurosign:e";
|
||||
services.xserver.displayManager.sddm = {
|
||||
enable = true;
|
||||
theme = "chili";
|
||||
};
|
||||
services.xserver.libinput.enable = true;
|
||||
services.xserver.layout = "se";
|
||||
services.xserver.xkbVariant = "mac";
|
||||
|
||||
# Enable the Hyprland Desktop Environment.
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland.xwayland.enable = true;
|
||||
# Don't forget to set a password with ‘passwd’.
|
||||
|
||||
security.polkit.enable = true;
|
||||
|
||||
users.users.elias = {
|
||||
isNormalUser = true;
|
||||
description = "Elias Renman";
|
||||
@@ -123,89 +103,43 @@
|
||||
uid = 1000;
|
||||
extraGroups = [ "wheel" "networkmanager" "docker" ];
|
||||
};
|
||||
# Login configuration
|
||||
security.pam.services.swaylock = {};
|
||||
security.polkit.enable = true;
|
||||
# This value determines the NixOS release with which your system is to be
|
||||
# compatible, in order to avoid breaking some software such as database
|
||||
# servers. You should change this only after NixOS release notes say you
|
||||
# should.
|
||||
system.stateVersion = "18.09";
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
waybar = super.waybar.overrideAttrs (oldAttrs: {
|
||||
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
system.stateVersion = "18.09";
|
||||
|
||||
services.logind.extraConfig = ''
|
||||
# don’t shutdown when power button is short-pressed
|
||||
# don't shutdown when power button is short-pressed
|
||||
HandlePowerKey=ignore
|
||||
'';
|
||||
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||
|
||||
#Spotify ports for google chromecasts and mobile phones
|
||||
networking.firewall.allowedTCPPorts = [ 57621 ];
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ];
|
||||
environment.variables = {
|
||||
PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig";
|
||||
};
|
||||
|
||||
# Nvidia driver configuration
|
||||
# Enable OpenGL
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
};
|
||||
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
hardware.nvidia = {
|
||||
#prime = {
|
||||
# sync.enable = true;
|
||||
|
||||
# Make sure to use the correct Bus ID values for your system!
|
||||
# nvidiaBusId = "PCI:1:0:0";
|
||||
# intelBusId = "PCI:0:2:0";
|
||||
# };
|
||||
# Modesetting is required.
|
||||
modesetting.enable = true;
|
||||
|
||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||
# Enable this if you have graphical corruption issues or application crashes after waking
|
||||
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead
|
||||
# of just the bare essentials.
|
||||
powerManagement.enable = false;
|
||||
|
||||
# Fine-grained power management. Turns off GPU when not in use.
|
||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||
powerManagement.finegrained = false;
|
||||
|
||||
# Use the NVidia open source kernel module (not to be confused with the
|
||||
# independent third-party "nouveau" open source driver).
|
||||
open = false;
|
||||
|
||||
# Enable the Nvidia settings menu,
|
||||
# accessible via `nvidia-settings`.
|
||||
nvidiaSettings = true;
|
||||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
programs.hyprland.enableNvidiaPatches = true;
|
||||
|
||||
environment.variables = {
|
||||
PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig";
|
||||
};
|
||||
|
||||
|
||||
virtualisation.docker.rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
|
||||
|
||||
virtualisation.virtualbox.host.enable = true;
|
||||
users.extraGroups.vboxusers.members = [ "elias" ];
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user