feat: upgrade system.stateVersion

feat: autologin - hyprland / i3
feat: 256color for console tty
This commit is contained in:
Ryan Yin
2023-12-17 00:26:15 +08:00
parent 1cf34add85
commit 7d03e63bdd
15 changed files with 86 additions and 69 deletions

View File

@@ -209,6 +209,19 @@
};
};
services.kmscon = {
# Use kmscon as the virtual console instead of gettys.
# kmscon is a kms/dri-based userspace virtual terminal implementation.
# It supports a richer feature set than the standard linux console VT,
# including full unicode support, and when the video card supports drm should be much faster.
enable = true;
fonts = [ { name = "Source Code Pro"; package = pkgs.source-code-pro; } ];
extraOptions = "--term xterm-256color";
extraConfig = "font-size=12";
# Whether to use 3D hardware acceleration to render the console.
hwRender = true;
};
environment.variables = {
# fix https://github.com/NixOS/nixpkgs/issues/238025
TZ = "${config.time.timeZone}";

View File

@@ -1,18 +1,12 @@
{pkgs, hyprland, ...}: {
##########################################################################################################
#
# NixOS's Configuration for Hyprland Window Manager
# NixOS's Configuration for Wayland based Window Manager
#
# i3wm: old and stable, only support X11
# sway: compatible with i3wm, support Wayland. do not support Nvidia GPU officially.
# hyprland: project starts from 2022, support Wayland, envolving fast, good looking, support Nvidia GPU.
#
##########################################################################################################
imports = [
# hyprland.nixosModules.default
];
xdg.portal = {
enable = true;
wlr.enable = true;
@@ -46,22 +40,21 @@
programs = {
hyprland = {
enable = true;
xwayland = {
enable = true;
package = hyprland.packages.${pkgs.system}.hyprland.override {
enableXWayland = true; # whether to enable XWayland
legacyRenderer = false; # whether to use the legacy renderer (for old GPUs)
withSystemd = true; # whether to build with systemd support
};
enableNvidiaPatches = true;
};
# monitor backlight control
light.enable = true;
# thunar file manager(part of xfce) related options
thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
};
# List packages installed in system profile. To search, run:
@@ -73,7 +66,7 @@
swaylock # locking the screen
wlogout # logout menu
wl-clipboard # copying and pasting
hyprpicker # color picker
hyprpicker # color picker
wf-recorder # creen recording
grim # taking screenshots
@@ -90,8 +83,6 @@
mpc-cli # command-line mpd client
ncmpcpp # a mpd client with a UI
networkmanagerapplet # provide GUI app: nm-connection-editor
xfce.thunar # xfce4's file manager
];
# fix https://github.com/ryan4yin/nix-config/issues/10

View File

@@ -5,22 +5,38 @@
#
####################################################################
programs = {
# thunar file manager(part of xfce) related options
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
};
# i3 related options
environment.pathsToLink = ["/libexec"]; # links /libexec from derivations to /run/current-system/sw
services = {
gvfs.enable = true; # Mount, trash, and other functionalities
tumbler.enable = true; # Thumbnail support for images
xserver = {
enable = true;
# Configure keymap in X11
xkb.layout = "us";
desktopManager = {
xterm.enable = false;
};
displayManager = {
lightdm.enable = true;
autoLogin = {
enable = true;
user = "ryan";
};
defaultSession = "none+i3";
lightdm.enable = false;
gdm.enable = true;
};
windowManager.i3 = {
@@ -35,7 +51,7 @@
i3-gaps # i3 with gaps
picom # transparency and shadows
feh # set wallpaper
xcolor # color picker
xcolor # color picker
acpi # battery information
arandr # screen layout manager
@@ -46,20 +62,8 @@
scrot # minimal screen capture tool, used by i3 blur lock to take a screenshot
sysstat # get system information
alsa-utils # provides amixer/alsamixer/...
xfce.thunar # xfce4's file manager
];
};
# Configure keymap in X11
layout = "us";
xkbVariant = "";
};
};
# thunar file manager(part of xfce) related options
programs.thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
}