Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
我的 NixOS 配置文件
deepin Talks
1161
views ·
3
replies ·
To
floor
Go
lookfor
deepin
2020-09-25 20:13
Author
本帖最后由 lookfor 于 2020-10-6 19:25 编辑
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
nix.binaryCaches = [ "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" "https://cache.nixos.org/" ];
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.version = 2;
# boot.loader.grub.efiSupport = true;
# boot.loader.grub.efiInstallAsRemovable = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.grub.useOSProber = true;
# Define on which hard drive you want to install Grub.
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
# networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# 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.enp1s0.useDHCP = true;
# networking.interfaces.wlp2s0.useDHCP = true;
networking.networkmanager.enable = 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 = "zh_CN.UTF-8";
supportedLocales = [ "zh_CN.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" ];
inputMethod.enabled = "fcitx";
inputMethod.fcitx.engines = with pkgs.fcitx-engines; [ rime ];
};
# Set your time zone.
time.timeZone = "Asia/Shanghai";
# List packages installed in system profile. To search, run:
# $ nix search wget
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
wget vim konsole firefox chromium
fcitx fcitx-configtool fcitx-engines.rime
zsh oh-my-zsh git
];
fonts = {
fontconfig.enable = true;
enableFontDir = true;
enableGhostscriptFonts = true;
fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
wqy_microhei
wqy_zenhei
];
};
# Enable zsh
programs.zsh.enable = true;
# Enable Oh-my-zsh
programs.zsh.ohMyZsh = {
enable = true;
plugins = ["z" ];
theme = "robbyrussell";
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# pinentryFlavor = "gnome3";
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable touchpad support.
# services.xserver.libinput.enable = true;
# Enable the KDE Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.her = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
shell = pkgs.zsh;
};
# 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 = "20.03"; # Did you read the comment?
}
Copy the Code
Reply
Like 0
Favorite
View the author
All Replies
lookfor
deepin
2020-09-25 20:16
#1
配置 oh-my-zsh
sudo ln -s /etc/zshrc .zshrc
Copy the Code
Reply
Like 0
View the author
lookfor
deepin
2020-09-25 20:36
#2
kde 平铺方法
https://www.jianshu.com/p/de8e8320ae16
Reply
Like 0
View the author
dororo2020
deepin
2020-09-25 22:01
#3
爱了爱了
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
simple
Popular Events
More