初步配置,等 GPD 到货后根据实际情况调整
This commit is contained in:
8
global/default.nix
Normal file
8
global/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
imports = [
|
||||
./system-configuration.nix
|
||||
./software-configuration.nix
|
||||
./user-configuration.nix
|
||||
./font-configuration.nix
|
||||
];
|
||||
}
|
36
global/font-configuration.nix
Normal file
36
global/font-configuration.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{pkgs, ...}: {
|
||||
fonts= {
|
||||
fonts = with pkgs;[
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
liberation_ttf
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
source-han-sans
|
||||
source-han-serif
|
||||
source-code-pro
|
||||
font-awesome_5
|
||||
powerline-fonts
|
||||
powerline-symbols
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||
];
|
||||
|
||||
fontconfig.cache32Bit = true;
|
||||
|
||||
fontconfig.defaultFonts = {
|
||||
serif = [
|
||||
"Source Han Serif"
|
||||
];
|
||||
|
||||
sansSerif = [
|
||||
"Source Han Sans"
|
||||
];
|
||||
|
||||
monospace = [
|
||||
"Fira Code"
|
||||
"Source Han Serif SC"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
51
global/software-configuration.nix
Normal file
51
global/software-configuration.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{pkgs, ...}: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
}
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services = {
|
||||
flatpak.enable = true;
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
user = "user";
|
||||
command = "${pkgs.greetd.greetd}/bin/agreety --cmd Hyprland";
|
||||
};
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
|
||||
xserver = {
|
||||
layout = "cn";
|
||||
xkbVariant = "";
|
||||
libinput = {
|
||||
mouse = {
|
||||
accelProfile = "flat";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
kitty
|
||||
rofi
|
||||
hyprland-protocols
|
||||
hyprland-share-picker
|
||||
xdg-desktop-portal-hyprland
|
||||
];
|
||||
|
||||
programs = {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
hidpi = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
27
global/system-configuration.nix
Normal file
27
global/system-configuration.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
sound.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
hardware = {
|
||||
pulseaudio.enable = true;
|
||||
opengl.enable = true;
|
||||
};
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n = {
|
||||
defaultLocale = "zh_CN.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "zh_CN.UTF-8";
|
||||
LC_IDENTIFICATION = "zh_CN.UTF-8";
|
||||
LC_MEASUREMENT = "zh_CN.UTF-8";
|
||||
LC_MONETARY = "zh_CN.UTF-8";
|
||||
LC_NAME = "zh_CN.UTF-8";
|
||||
LC_NUMERIC = "zh_CN.UTF-8";
|
||||
LC_PAPER = "zh_CN.UTF-8";
|
||||
LC_TELEPHONE = "zh_CN.UTF-8";
|
||||
LC_TIME = "zh_CN.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
16
global/user-configuration.nix
Normal file
16
global/user-configuration.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
users= {
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
user = {
|
||||
isNormalUser = true;
|
||||
description = "Default user";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"input"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user