初步配置,等 GPD 到货后根据实际情况调整

This commit is contained in:
Sense T
2023-06-21 13:29:28 +08:00
parent 5c2b9a3cfa
commit d1f1cb7715
13 changed files with 316 additions and 1 deletions

8
global/default.nix Normal file
View File

@@ -0,0 +1,8 @@
{
imports = [
./system-configuration.nix
./software-configuration.nix
./user-configuration.nix
./font-configuration.nix
];
}

View 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"
];
};
};
}

View 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;
};
};
};
}

View 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";
};
};
}

View File

@@ -0,0 +1,16 @@
{
users= {
mutableUsers = false;
users = {
user = {
isNormalUser = true;
description = "Default user";
extraGroups = [
"networkmanager"
"wheel"
"input"
];
};
};
};
}