update
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{
|
||||
imports = [
|
||||
./system-configuration.nix
|
||||
./software-configuration.nix
|
||||
./user-configuration.nix
|
||||
./font-configuration.nix
|
||||
./stateless-configuration.nix
|
||||
];
|
||||
}
|
||||
imports = [
|
||||
./system-configuration.nix
|
||||
./software-configuration.nix
|
||||
./user-configuration.nix
|
||||
./font-configuration.nix
|
||||
./stateless-configuration.nix
|
||||
];
|
||||
}
|
||||
|
@@ -1,39 +1,39 @@
|
||||
{pkgs, ...}: {
|
||||
fonts= {
|
||||
fontDir.enable = true;
|
||||
|
||||
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-han-mono
|
||||
source-code-pro
|
||||
font-awesome_5
|
||||
powerline-fonts
|
||||
powerline-symbols
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||
];
|
||||
{ pkgs, ... }: {
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
|
||||
fontconfig.cache32Bit = true;
|
||||
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-han-mono
|
||||
source-code-pro
|
||||
font-awesome_5
|
||||
powerline-fonts
|
||||
powerline-symbols
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||
];
|
||||
|
||||
fontconfig.defaultFonts = {
|
||||
serif = [
|
||||
"Source Han Serif SC"
|
||||
];
|
||||
fontconfig.cache32Bit = true;
|
||||
|
||||
sansSerif = [
|
||||
"Source Han Sans SC"
|
||||
];
|
||||
fontconfig.defaultFonts = {
|
||||
serif = [
|
||||
"Source Han Serif SC"
|
||||
];
|
||||
|
||||
monospace = [
|
||||
"Fira Code"
|
||||
"Source Han Mono SC"
|
||||
];
|
||||
};
|
||||
sansSerif = [
|
||||
"Source Han Sans SC"
|
||||
];
|
||||
|
||||
monospace = [
|
||||
"Fira Code"
|
||||
"Source Han Mono SC"
|
||||
];
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -1,116 +1,116 @@
|
||||
{pkgs, ...}: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
#wlr.enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services = {
|
||||
# flatpak dev.deedles.Trayscale
|
||||
# sudo tailscale up --operator=$USER
|
||||
# use https://hs.wetofu.me
|
||||
tailscale.enable = true;
|
||||
blueman.enable = true;
|
||||
logrotate.checkConfig = false;
|
||||
flatpak.enable = true;
|
||||
|
||||
ntp = {
|
||||
enable = true;
|
||||
servers = [
|
||||
"ntp.ntsc.ac.cn" # China
|
||||
];
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
hyprpaper
|
||||
hyprland-protocols
|
||||
hyprland-share-picker
|
||||
{ pkgs, ... }: {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
#wlr.enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-hyprland
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
|
||||
programs = {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
hidpi = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
proxychains = {
|
||||
enable = true;
|
||||
quietMode = true;
|
||||
proxies = {
|
||||
default = {
|
||||
type = "socks5";
|
||||
port = 1089;
|
||||
host = "127.0.0.1";
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
# Enable automatic login for the user.
|
||||
services = {
|
||||
# flatpak dev.deedles.Trayscale
|
||||
# sudo tailscale up --operator=$USER
|
||||
# use https://hs.wetofu.me
|
||||
tailscale.enable = true;
|
||||
blueman.enable = true;
|
||||
logrotate.checkConfig = false;
|
||||
flatpak.enable = true;
|
||||
|
||||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
light.enable = true;
|
||||
dconf.enable = true;
|
||||
ntp = {
|
||||
enable = true;
|
||||
servers = [
|
||||
"ntp.ntsc.ac.cn" # China
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
oci-containers.backend = "podman";
|
||||
oci-containers.containers = {
|
||||
wsproxy = {
|
||||
login.username = "senseab";
|
||||
login.registry = "ghcr.io";
|
||||
login.passwordFile = "/var/lib/secrets/podman/ghcr.io"; # should create it manually.
|
||||
image = "ghcr.io/senseab/wsproxy:master";
|
||||
autoStart = true;
|
||||
|
||||
environment = {
|
||||
CONFIG_NO_TLS_VERIFY = "true";
|
||||
CONFIG_ADDR = "wss://dev.wetofu.me/path";
|
||||
WSPROXY_MODE = "client";
|
||||
};
|
||||
|
||||
ports = [
|
||||
"127.0.0.1:1089:1089"
|
||||
];
|
||||
};
|
||||
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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
hyprpaper
|
||||
hyprland-protocols
|
||||
hyprland-share-picker
|
||||
];
|
||||
|
||||
programs = {
|
||||
hyprland = {
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
hidpi = true;
|
||||
};
|
||||
};
|
||||
|
||||
proxychains = {
|
||||
enable = true;
|
||||
quietMode = true;
|
||||
proxies = {
|
||||
default = {
|
||||
type = "socks5";
|
||||
port = 1089;
|
||||
host = "127.0.0.1";
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
git.enable = true;
|
||||
zsh.enable = true;
|
||||
light.enable = true;
|
||||
dconf.enable = true;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
oci-containers.backend = "podman";
|
||||
oci-containers.containers = {
|
||||
wsproxy = {
|
||||
login.username = "senseab";
|
||||
login.registry = "ghcr.io";
|
||||
login.passwordFile = "/var/lib/secrets/podman/ghcr.io"; # should create it manually.
|
||||
image = "ghcr.io/senseab/wsproxy:master";
|
||||
autoStart = true;
|
||||
|
||||
environment = {
|
||||
CONFIG_NO_TLS_VERIFY = "true";
|
||||
CONFIG_ADDR = "wss://dev.wetofu.me/path";
|
||||
WSPROXY_MODE = "client";
|
||||
};
|
||||
|
||||
ports = [
|
||||
"127.0.0.1:1089:1089"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -1,38 +1,38 @@
|
||||
{
|
||||
# /nix/persistent 是你实际保存文件的地方
|
||||
environment.persistence."/nix/persistent" = {
|
||||
# 不让这些映射的 mount 出现在文件管理器的侧边栏中
|
||||
hideMounts = true;
|
||||
# /nix/persistent 是你实际保存文件的地方
|
||||
environment.persistence."/nix/persistent" = {
|
||||
# 不让这些映射的 mount 出现在文件管理器的侧边栏中
|
||||
hideMounts = true;
|
||||
|
||||
# 你要映射的文件夹
|
||||
directories = [
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/root"
|
||||
"/var"
|
||||
];
|
||||
# 你要映射的文件夹
|
||||
directories = [
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/root"
|
||||
"/var"
|
||||
];
|
||||
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
];
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
];
|
||||
};
|
||||
|
||||
environment.variables.NIX_REMOTE = "daemon";
|
||||
|
||||
systemd.services.nix-daemon = {
|
||||
environment = {
|
||||
# 指定临时文件的位置
|
||||
TMPDIR = "/var/cache/nix";
|
||||
};
|
||||
|
||||
environment.variables.NIX_REMOTE = "daemon";
|
||||
|
||||
systemd.services.nix-daemon = {
|
||||
environment = {
|
||||
# 指定临时文件的位置
|
||||
TMPDIR = "/var/cache/nix";
|
||||
};
|
||||
serviceConfig = {
|
||||
# 在 Nix Daemon 启动时自动创建 /var/cache/nix
|
||||
CacheDirectory = "nix";
|
||||
};
|
||||
serviceConfig = {
|
||||
# 在 Nix Daemon 启动时自动创建 /var/cache/nix
|
||||
CacheDirectory = "nix";
|
||||
};
|
||||
};
|
||||
|
||||
# Stateless rootfs
|
||||
fileSystems."/" = {
|
||||
device = "tmpfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "relatime" "mode=755" "nosuid" "nodev" ];
|
||||
};
|
||||
}
|
||||
# Stateless rootfs
|
||||
fileSystems."/" = {
|
||||
device = "tmpfs";
|
||||
fsType = "tmpfs";
|
||||
options = [ "relatime" "mode=755" "nosuid" "nodev" ];
|
||||
};
|
||||
}
|
||||
|
@@ -1,54 +1,54 @@
|
||||
{
|
||||
sound.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
sound.enable = true;
|
||||
networking.networkmanager.enable = true;
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
hardware = {
|
||||
opengl.enable = true;
|
||||
hardware = {
|
||||
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";
|
||||
};
|
||||
};
|
||||
|
||||
# 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";
|
||||
};
|
||||
};
|
||||
nix.settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
substituters = [
|
||||
"https://mirrors.ustc.edu.cn/nix-channels/store" # 中科大
|
||||
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # 清华
|
||||
"https://mirrors.bfsu.edu.cn/nix-channels/store" # 北外
|
||||
"https://mirror.sjtu.edu.cn/nix-channels/store" # 交大
|
||||
"https://nixos-cn.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
|
||||
substituters = [
|
||||
"https://mirrors.ustc.edu.cn/nix-channels/store" # 中科大
|
||||
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # 清华
|
||||
"https://mirrors.bfsu.edu.cn/nix-channels/store" # 北外
|
||||
"https://mirror.sjtu.edu.cn/nix-channels/store" # 交大
|
||||
"https://nixos-cn.cachix.org"
|
||||
"https://cache.nixos.org/"
|
||||
];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
}
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 1w";
|
||||
};
|
||||
}
|
||||
|
@@ -1,20 +1,20 @@
|
||||
{pkgs, ...}: {
|
||||
users= {
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
user = {
|
||||
isNormalUser = true;
|
||||
description = "Default user";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"input"
|
||||
"video"
|
||||
"kvm"
|
||||
];
|
||||
hashedPassword = ""; # Login directly
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
{ pkgs, ... }: {
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
user = {
|
||||
isNormalUser = true;
|
||||
description = "Default user";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"input"
|
||||
"video"
|
||||
"kvm"
|
||||
];
|
||||
hashedPassword = ""; # Login directly
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user