Hi! I’m not sure if it’s the good place to ask my question. I apologize because I don’t have a lot of information right now, I tried to investigate, but I really don’t know where to start!
Few days ago I tried to migrate to i3, and I get difficulties to make it work. Actually, I didn’t success. I simply followed the documentation from the wiki here and it just or crashed on load, or got trouble with X11. Note that the command nix-shell -p j4-dmenu-desktop --run i3-dmenu-desktop
works well.
I’m still a noob with nix, so I just went back to gnome, I checkout the previous configuration and now, I have that kind of bugs:
- Need to retry to load gnome several times when I start the session
- Reload firefox twice or I get black screen
- Gnome take time to initialize
As I said, I’m a noob and I don’t even know how to check logs. I’m limiting myself to the configuration.nix until I read several documentation about nix. I would appreciate a diagnosis of what’s happening now with gnome, or anything I did wrong.
Ask me if I can do anything to help to diagnose.
Additional information: I’m on the unstable channel.
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "adrien"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Set your time zone.
time.timeZone = "Europe/Madrid";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.wlp0s20f3.useDHCP = true;
nixpkgs.config.allowUnfree = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
i18n.defaultLocale = "fr_FR.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "fr";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# To use Flatpak you must enable XDG Desktop Portals with xdg.portal.enable.
xdg.portal.enable = true;
services.flatpak.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
# todo Enable i3 Desktop Environment too
services.xserver = {
desktopManager = {
gnome.enable = true;
};
#windowManager.i3 = {
# enable = true;
# extraPackages = with pkgs; [
# dmenu #application launcher most people use
# i3status # gives you the default i3 status bar
# i3lock #default i3 screen locker
# i3blocks #if you are planning on using i3blocks over i3status
# ];
#};
};
# Configure keymap in X11
services.xserver.layout = "fr";
services.xserver.xkbOptions = "eurosign:e";
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
# uncomment to get docker
# virtualisation.docker.enable = true;
users.users.adrien = {
isNormalUser = true;
extraGroups = [ "wheel" "docker" ]; # Enable ‘sudo’ for the user.
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# wget
firefox
rustup
cmake
pkg-config
openssl
bintools-unwrapped
discord
git
powertop acpi
direnv nix-direnv
gnupg1 # in user you may want to `add default-cache-ttl 3600` in ~/.gnupg/gpg-agent.conf
pinentry # Don't forget to add the line bellow
pinentry-curses
protobuf # Needed by tokio-console-subscriber
nodejs
yarn
gnumake
gcc
];
programs.neovim = {
enable = true;
configure = {
plug.plugins = with pkgs.vimPlugins; [
vim-nix
nerdtree
vim-monokai
vim-markdown
];
customRC = ''
syntax on
colorscheme monokai
set number
set relativenumber
autocmd BufWritePre * %s/\s\+$//e
'';
};
viAlias = true;
# configure.customRC = builtins.readFile /home/adrien/.config/nvim/init.vim;
};
environment = {
sessionVariables = rec {
RUST_BACKTRACE = "1";
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
pathsToLink = [
"/share/nix-direnv"
];
};
# To use correctly gpg, in the user you should have:
# $ cat ~/.gnupg/gpg-agent.conf
# pinentry-program /run/current-system/sw/bin/pinentry
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "curses";
enableSSHSupport = true;
};
# nix options for derivations to persist garbage collection
nix.extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
# if you also want support for flakes (this makes nix-direnv use the
# unstable version of nix):
nixpkgs.overlays = [
(self: super: { nix-direnv = super.nix-direnv.override { enableFlakes = true; }; } )
];
documentation.dev.enable = true;
environment.extraOutputsToInstall = [ "info" "man" "devman" ];
users.defaultUserShell = pkgs.zsh;
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
promptInit = ''
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
'';
};
# Auto upgrade the system =-)
system.autoUpgrade.enable = true;
# Do the garbage collection & optimisation weekly.
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
nix.optimise.automatic = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 ];
networking.firewall.allowedUDPPorts = [ ];
networking.nameservers = [
"2a07:a8c0::85:4ac4"
"2a07:a8c1::85:4ac4"
"45.90.28.69"
"45.90.30.69"
]; # NextDNS
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# Power management
powerManagement.enable = true;
services.upower.enable = true;
services.thermald.enable = true;
services.tlp.enable = true;
services.power-profiles-daemon.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "21.11"; # Did you read the comment?
}
Thanks everyone!