Add project to repo
This commit is contained in:
55
modules/i3.nix
Normal file
55
modules/i3.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
|
||||
{
|
||||
|
||||
# i3 related options
|
||||
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
};
|
||||
|
||||
displayManager = {
|
||||
defaultSession = "none+i3";
|
||||
lightdm.enable = false;
|
||||
gdm.enable = true;
|
||||
};
|
||||
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
rofi # application launcher, the same as dmenu
|
||||
dunst # notification daemon
|
||||
i3blocks # status bar
|
||||
i3lock # default i3 screen locker
|
||||
xautolock # lock screen after some time
|
||||
i3status # provide information to i3bar
|
||||
i3-gaps # i3 with gaps
|
||||
picom # transparency and shadows
|
||||
feh # set wallpaper
|
||||
acpi # battery information
|
||||
arandr # screen layout manager
|
||||
dex # autostart applications
|
||||
xbindkeys # bind keys to commands
|
||||
xorg.xbacklight # control screen brightness
|
||||
xorg.xdpyinfo # get screen information
|
||||
sysstat # get system information
|
||||
];
|
||||
};
|
||||
|
||||
# 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
|
||||
];
|
||||
services.gvfs.enable = true; # Mount, trash, and other functionalities
|
||||
services.tumbler.enable = true; # Thumbnail support for images
|
||||
}
|
||||
130
modules/system.nix
Normal file
130
modules/system.nix
Normal file
@@ -0,0 +1,130 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Set your time zone.
|
||||
time.timeZone = "Asia/Shanghai";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.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";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
|
||||
fonts = {
|
||||
fonts = with pkgs; [
|
||||
# icon fonts
|
||||
material-design-icons
|
||||
|
||||
# normal fonts
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
|
||||
# nerdfonts
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "JetBrainsMono" ]; })
|
||||
];
|
||||
|
||||
# use fonts specified by user rather than default ones
|
||||
enableDefaultFonts = false;
|
||||
|
||||
# user defined fonts
|
||||
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
|
||||
# B&W emojis that would sometimes show instead of some Color emojis
|
||||
fontconfig.defaultFonts = {
|
||||
serif = [ "Noto Serif" "Noto Color Emoji" ];
|
||||
sansSerif = [ "Noto Sans" "Noto Color Emoji" ];
|
||||
monospace = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
X11Forwarding = true;
|
||||
PermitRootLogin = "no"; # disable root login
|
||||
PasswordAuthentication = false; # disable password login
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
curl
|
||||
git
|
||||
sysstat
|
||||
lm_sensors # for `sensors` command
|
||||
# minimal screen capture tool, used by i3 blur lock to take a screenshot
|
||||
# print screen key is also bound to this tool in i3 config
|
||||
scrot
|
||||
neofetch
|
||||
xfce.thunar # xfce4's file manager
|
||||
nnn # terminal file manager
|
||||
];
|
||||
|
||||
# Enable sound with pipewire.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.power-profiles-daemon = {
|
||||
enable = true;
|
||||
};
|
||||
security.polkit.enable = true;
|
||||
|
||||
services = {
|
||||
dbus.packages = [ pkgs.gcr ];
|
||||
|
||||
geoclue2.enable = true;
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.panotaka = {
|
||||
isNormalUser = true;
|
||||
description = "panotaka";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJx3Sk20pLL1b2PPKZey2oTyioODrErq83xG78YpFBoj admin@ryan-MBP"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user