mirror of
https://github.com/eliasrenman/nixos-config.git
synced 2026-03-17 01:06:05 +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
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# 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, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
@@ -10,28 +10,21 @@
|
|||||||
<nixos-hardware/huawei/machc-wa>
|
<nixos-hardware/huawei/machc-wa>
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
|
# Uncomment the relevant desktop environment:
|
||||||
|
# ./hyprland.nix
|
||||||
|
# ./gnome.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.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/sda";
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
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
|
# bluetooth support
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
|
||||||
# VBox only
|
# VBox only
|
||||||
# fsck will fail under vbox and cause a boot to hang, so turn it off
|
# fsck will fail under vbox and cause a boot to hang, so turn it off
|
||||||
boot.initrd.checkJournalingFS = false;
|
boot.initrd.checkJournalingFS = false;
|
||||||
@@ -43,29 +36,23 @@
|
|||||||
i18n.defaultLocale = "sv_SE.UTF-8";
|
i18n.defaultLocale = "sv_SE.UTF-8";
|
||||||
|
|
||||||
time.timeZone = "Europe/Stockholm";
|
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 = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ohMyZsh.enable = true;
|
ohMyZsh.enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
vi = "nvim";
|
vi = "nvim";
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
programs.neovim.enable = true;
|
programs.neovim.enable = true;
|
||||||
programs.neovim.vimAlias = true;
|
programs.neovim.vimAlias = true;
|
||||||
programs.neovim.defaultEditor = true;
|
programs.neovim.defaultEditor = true;
|
||||||
#programs.nylas-mail.enable = true;
|
|
||||||
programs.npm.enable = true;
|
programs.npm.enable = true;
|
||||||
#programs.nm-applet.enable = true;
|
|
||||||
programs.less.enable = true;
|
programs.less.enable = true;
|
||||||
#programs.iotop.enable = true;
|
|
||||||
programs.iftop.enable = true;
|
programs.iftop.enable = true;
|
||||||
programs.java.enable = true;
|
programs.java.enable = true;
|
||||||
|
|
||||||
services.mpd = {
|
services.mpd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
startWhenNeeded = true;
|
startWhenNeeded = true;
|
||||||
@@ -82,10 +69,10 @@
|
|||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
|
# Spotify ports for Chromecasts and mobile phones
|
||||||
|
networking.firewall.allowedTCPPorts = [ 57621 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 5353 ];
|
||||||
|
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
@@ -100,22 +87,15 @@
|
|||||||
support32Bit = true;
|
support32Bit = true;
|
||||||
};
|
};
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.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.libinput.enable = true;
|
||||||
services.xserver.layout = "se";
|
services.xserver.layout = "se";
|
||||||
services.xserver.xkbVariant = "mac";
|
services.xserver.xkbVariant = "mac";
|
||||||
|
|
||||||
# Enable the Hyprland Desktop Environment.
|
security.polkit.enable = true;
|
||||||
programs.hyprland.enable = true;
|
|
||||||
programs.hyprland.xwayland.enable = true;
|
|
||||||
# Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.elias = {
|
users.users.elias = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Elias Renman";
|
description = "Elias Renman";
|
||||||
@@ -123,89 +103,43 @@
|
|||||||
uid = 1000;
|
uid = 1000;
|
||||||
extraGroups = [ "wheel" "networkmanager" "docker" ];
|
extraGroups = [ "wheel" "networkmanager" "docker" ];
|
||||||
};
|
};
|
||||||
# Login configuration
|
|
||||||
security.pam.services.swaylock = {};
|
system.stateVersion = "18.09";
|
||||||
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" ];
|
|
||||||
});
|
|
||||||
})
|
|
||||||
];
|
|
||||||
services.logind.extraConfig = ''
|
services.logind.extraConfig = ''
|
||||||
# don’t shutdown when power button is short-pressed
|
# don't shutdown when power button is short-pressed
|
||||||
HandlePowerKey=ignore
|
HandlePowerKey=ignore
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
|
|
||||||
#Spotify ports for google chromecasts and mobile phones
|
environment.variables = {
|
||||||
networking.firewall.allowedTCPPorts = [ 57621 ];
|
PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig";
|
||||||
networking.firewall.allowedUDPPorts = [ 5353 ];
|
};
|
||||||
|
|
||||||
# Nvidia driver configuration
|
# Nvidia driver configuration
|
||||||
# Enable OpenGL
|
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Load nvidia driver for Xorg and Wayland
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
hardware.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;
|
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;
|
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;
|
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;
|
open = false;
|
||||||
|
|
||||||
# Enable the Nvidia settings menu,
|
|
||||||
# accessible via `nvidia-settings`.
|
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
|
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
};
|
};
|
||||||
programs.hyprland.enableNvidiaPatches = true;
|
|
||||||
|
|
||||||
environment.variables = {
|
|
||||||
PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
virtualisation.docker.rootless = {
|
virtualisation.docker.rootless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
setSocketVariable = true;
|
setSocketVariable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
virtualisation.virtualbox.host.enable = true;
|
virtualisation.virtualbox.host.enable = true;
|
||||||
users.extraGroups.vboxusers.members = [ "elias" ];
|
users.extraGroups.vboxusers.members = [ "elias" ];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
23
gnome.nix
Normal file
23
gnome.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
services.xserver.displayManager.gdm = {
|
||||||
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Remove GNOME bloat you probably don't want
|
||||||
|
environment.gnome.excludePackages = with pkgs.gnome; [
|
||||||
|
gnome-music
|
||||||
|
gnome-weather
|
||||||
|
gnome-maps
|
||||||
|
epiphany # GNOME browser, you already have Firefox
|
||||||
|
totem # video player, you have vlc
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnome.gnome-tweaks
|
||||||
|
gnome-extension-manager
|
||||||
|
];
|
||||||
|
}
|
||||||
75
hyprland.nix
Normal file
75
hyprland.nix
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# Enable the Hyprland Desktop Environment.
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
programs.hyprland.xwayland.enable = true;
|
||||||
|
programs.hyprland.enableNvidiaPatches = true;
|
||||||
|
|
||||||
|
# SDDM with Hyprland/ricing theme
|
||||||
|
services.xserver.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
theme = "chili";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Swaylock PAM support
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
|
|
||||||
|
# Waybar with experimental features (needed for Hyprland workspaces)
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(self: super: {
|
||||||
|
waybar = super.waybar.overrideAttrs (oldAttrs: {
|
||||||
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||||
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Hyprland ecosystem
|
||||||
|
hyprland
|
||||||
|
hyprpaper
|
||||||
|
hyprpicker
|
||||||
|
wlogout
|
||||||
|
wofi
|
||||||
|
waybar
|
||||||
|
wlsunset
|
||||||
|
slurp
|
||||||
|
grim
|
||||||
|
wl-clipboard
|
||||||
|
xwaylandvideobridge
|
||||||
|
swaylock-effects
|
||||||
|
|
||||||
|
# SDDM theme
|
||||||
|
sddm-chili-theme
|
||||||
|
libsForQt5.sddm
|
||||||
|
libsForQt5.polkit-kde-agent
|
||||||
|
|
||||||
|
# Ricing tools & themes
|
||||||
|
cava
|
||||||
|
nwg-look
|
||||||
|
tokyo-night-gtk
|
||||||
|
material-icons
|
||||||
|
|
||||||
|
# Ricing deps
|
||||||
|
glib
|
||||||
|
polkit
|
||||||
|
xorg.xmodmap
|
||||||
|
xorg.xset
|
||||||
|
xorg.xsetroot
|
||||||
|
|
||||||
|
# Plymouth boot theme (ricing)
|
||||||
|
plymouth
|
||||||
|
];
|
||||||
|
|
||||||
|
# Plymouth ricing theme
|
||||||
|
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";
|
||||||
|
}
|
||||||
36
packages.nix
36
packages.nix
@@ -4,8 +4,6 @@
|
|||||||
# Allow proprietary packages
|
# Allow proprietary packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
git
|
git
|
||||||
@@ -54,59 +52,31 @@
|
|||||||
pavucontrol
|
pavucontrol
|
||||||
discord
|
discord
|
||||||
spotify
|
spotify
|
||||||
nwg-look
|
|
||||||
jetbrains-toolbox
|
jetbrains-toolbox
|
||||||
aseprite
|
aseprite
|
||||||
godot_4
|
godot_4
|
||||||
alsa-tools
|
alsa-tools
|
||||||
insomnia
|
insomnia
|
||||||
|
|
||||||
# CLI Tools
|
# CLI Tools
|
||||||
neofetch
|
neofetch
|
||||||
bat
|
bat
|
||||||
eza
|
eza
|
||||||
gh
|
gh
|
||||||
brightnessctl
|
brightnessctl
|
||||||
hyprpaper
|
|
||||||
killall
|
killall
|
||||||
pamixer
|
pamixer
|
||||||
glances
|
glances
|
||||||
spotify-tui
|
spotify-tui
|
||||||
spotifyd
|
spotifyd
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
ffmpeg-full
|
ffmpeg-full
|
||||||
playerctl
|
playerctl
|
||||||
|
|
||||||
# IDEs
|
# IDEs
|
||||||
neovim
|
neovim
|
||||||
vscode
|
vscode
|
||||||
swaylock-effects
|
|
||||||
sddm-chili-theme
|
|
||||||
libsForQt5.sddm
|
|
||||||
libsForQt5.polkit-kde-agent
|
|
||||||
|
|
||||||
# Ricing apps
|
|
||||||
cava
|
|
||||||
plymouth
|
|
||||||
# Ricing Themes
|
|
||||||
tokyo-night-gtk
|
|
||||||
# Desktop
|
|
||||||
material-icons
|
|
||||||
xorg.xmodmap
|
|
||||||
xorg.xset
|
|
||||||
xorg.xsetroot
|
|
||||||
# Hyprland deps
|
|
||||||
glib
|
|
||||||
polkit
|
|
||||||
wlogout
|
|
||||||
wofi
|
|
||||||
waybar
|
|
||||||
wlsunset
|
|
||||||
hyprland
|
|
||||||
slurp
|
|
||||||
grim
|
|
||||||
wl-clipboard
|
|
||||||
hyprpicker
|
|
||||||
xwaylandvideobridge
|
|
||||||
|
|
||||||
# FPV related
|
# FPV related
|
||||||
betaflight-configurator
|
betaflight-configurator
|
||||||
|
|||||||
Reference in New Issue
Block a user