update
This commit is contained in:
+161
-14
@@ -9,7 +9,7 @@
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
system.copySystemConfiguration = true;
|
||||
#system.copySystemConfiguration = true;
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
@@ -18,10 +18,18 @@
|
||||
};
|
||||
nixpkgs.system = "x86_64-linux";
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader = {
|
||||
# systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
useOSProber = true;
|
||||
};
|
||||
timeout = 10;
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
networking.hostName = "nixpengames"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
@@ -29,6 +37,20 @@
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
networking.networkmanager.wifi.powersave = false;
|
||||
# Fix Marvell AVASTAR WiFi not resuming after suspend (Surface devices)
|
||||
systemd.services.restart-mwifiex = {
|
||||
description = "Reload mwifiex driver after suspend/resume";
|
||||
wantedBy = [ "post-resume.target" ];
|
||||
after = [ "post-resume.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = ''
|
||||
modprobe -r mwifiex_pcie mwifiex
|
||||
modprobe mwifiex_pcie
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Australia/Sydney";
|
||||
|
||||
@@ -45,9 +67,9 @@
|
||||
# };
|
||||
|
||||
i18n.inputMethod = {
|
||||
# type = "fcitx5";
|
||||
enabled = "fcitx5";
|
||||
fcitx5.waylandFrontend = true;
|
||||
type = "fcitx5";
|
||||
enable = true;
|
||||
# fcitx5.waylandFrontend = true;
|
||||
fcitx5.addons = with pkgs; [
|
||||
fcitx5-mozc
|
||||
fcitx5-gtk
|
||||
@@ -61,6 +83,20 @@
|
||||
environment.sessionVariables = rec {
|
||||
EDITOR="vim";
|
||||
};
|
||||
#printing
|
||||
services.printing.enable = true;
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
services.printing = {
|
||||
drivers = with pkgs; [
|
||||
cups-filters
|
||||
cups-browsed
|
||||
];
|
||||
};
|
||||
# Enable the X11 windowing system.
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
@@ -76,7 +112,22 @@
|
||||
services.displayManager.defaultSession = "plasma";
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
services.xserver.desktopManager.runXdgAutostartIfNone = true;
|
||||
|
||||
|
||||
# lid closed battery power management
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.tlp = {
|
||||
enable = false;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
CPU_MIN_PERF_ON_AC=0;
|
||||
CPU_MAX_PERF_ON_AC=100;
|
||||
CPU_MIN_PERF_ON_BAT = 0;
|
||||
CPU_MAX_PERF_ON_BAT = 20;
|
||||
};
|
||||
};
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
enable = true ;
|
||||
@@ -84,8 +135,6 @@
|
||||
xkb.options = "eurosign:e,caps:escape";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound.
|
||||
# hardware.pulseaudio.enable = true;
|
||||
@@ -103,6 +152,7 @@
|
||||
services.blueman.enable = true;
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
hardware.bluetooth.powerOnBoot = true;
|
||||
hardware.bluetooth.settings = {
|
||||
General = {
|
||||
@@ -118,7 +168,81 @@
|
||||
# "bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
||||
# };
|
||||
#};
|
||||
#services.v2raya.enable = true;
|
||||
# Read the text content of an actual external JSON file
|
||||
services.v2raya.enable = true;
|
||||
services.v2raya.cliPackege = pkgs.xray
|
||||
# services.xray = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# log = {
|
||||
# loglevel = "warning";
|
||||
# };
|
||||
|
||||
# Inbounds: Local ports on your NixOS machine to connect your browser/apps to
|
||||
# inbounds = [
|
||||
# {
|
||||
# listen = "127.0.0.1";
|
||||
# port = 10808; # Local SOCKS5 Proxy Port
|
||||
# protocol = "socks";
|
||||
# settings = {
|
||||
# auth = "noauth";
|
||||
# udp = true;
|
||||
# };
|
||||
# sniffing = {
|
||||
# enabled = true;
|
||||
# destOverride = [ "http" "tls" ];
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# listen = "127.0.0.1";
|
||||
# port = 10809; # Local HTTP Proxy Port
|
||||
# protocol = "http";
|
||||
# settings = {
|
||||
# allowTransparent = false;
|
||||
# };
|
||||
# }
|
||||
# ];
|
||||
|
||||
# Outbounds: The VLESS-REALITY connection to your remote Xray server
|
||||
# outbounds = [
|
||||
# {
|
||||
# protocol = "vless";
|
||||
# tag = "proxy";
|
||||
# settings = {
|
||||
# vnext = [
|
||||
# {
|
||||
# address = "immich.frogguingang.com"; # Replace with your server IP or domain
|
||||
# port = 443;
|
||||
# users = [
|
||||
# {
|
||||
# id = "e76c485e-38f2-44fe-bb74-6550b307741d"; # Replace with your VLESS UUID
|
||||
# encryption = "none";
|
||||
# flow = "xtls-rprx-vision"; # Must use XTLS-Vision flow
|
||||
# }
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# streamSettings = {
|
||||
# network = "tcp";
|
||||
# security = "reality";
|
||||
# realitySettings = {
|
||||
# show = false;
|
||||
# serverName = "immich.frogguingang.com"; # Must match the server config SNI
|
||||
# publicKey = "Qm8GdYV5l78f24ThAglg6ldKdPPeeXh8KGFuC3krTjM"; # Replace with your X25519 Public Key
|
||||
# shortId = "68ce8db33efa2894"; # Must match server shortId
|
||||
# fingerprint = "chrome"; # Camouflages client TLS fingerprint as Chrome
|
||||
# };
|
||||
# };
|
||||
# }
|
||||
# {
|
||||
# protocol = "freedom";
|
||||
# tag = "direct";
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
services.libinput.enable = true;
|
||||
programs.fish.enable = true;
|
||||
@@ -127,6 +251,11 @@
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
};
|
||||
services.displayManager.sddm = {
|
||||
wayland = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.jiemusi = {
|
||||
@@ -143,6 +272,13 @@
|
||||
foot
|
||||
openvpn
|
||||
prismlauncher
|
||||
handbrake
|
||||
musescore
|
||||
kdePackages.kdenlive
|
||||
zoom-us
|
||||
spotify-player
|
||||
shadowsocks-rust
|
||||
# obsidian
|
||||
];
|
||||
};
|
||||
services.iptsd = {
|
||||
@@ -152,12 +288,15 @@
|
||||
Touchscreen.DisableOnStylus = true;
|
||||
};
|
||||
};
|
||||
programs.kdeconnect.enable = true;
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
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
|
||||
wakeonlan
|
||||
iwd
|
||||
lf
|
||||
fd
|
||||
traceroute
|
||||
@@ -170,6 +309,7 @@
|
||||
git
|
||||
htop
|
||||
fastfetch
|
||||
oath-toolkit
|
||||
freshfetch
|
||||
hyfetch
|
||||
foot
|
||||
@@ -178,14 +318,19 @@
|
||||
netflix
|
||||
audacity
|
||||
blender
|
||||
vlc
|
||||
gimp
|
||||
krita
|
||||
pciutils
|
||||
maliit-keyboard
|
||||
maliit-framework
|
||||
pavucontrol
|
||||
fcitx5-configtool
|
||||
R
|
||||
rstudio
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
@@ -198,9 +343,11 @@
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
# services.openvpn.servers = {
|
||||
# homeVPN = { config = '' config /root/nixos/openvpn/James\ Surface.ovpn ''; };
|
||||
# };
|
||||
# services.openvpn.servers = {
|
||||
# homeVPN = { config = '' config /root/nixos/openvpn/James\ Surface.ovpn '';
|
||||
# updateResolvConf = true;}
|
||||
# ;
|
||||
#};
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
|
||||
Reference in New Issue
Block a user