Generic commit

minor changes to hosts:Satori and home:natto
This commit is contained in:
2021-12-25 08:01:59 +05:30
parent 6130b448e0
commit 8b4212aa27
11 changed files with 237 additions and 188 deletions

View File

@@ -15,7 +15,7 @@
kernelModules = [];
};
kernelParams = [ "intel_pstate=active" "intel_iommu=on" ];
kernelModules = [ "kvm-intel" ];
kernelModules = [ "kvm-intel" "snd-seq" "snd-rawmidi" ];
extraModulePackages = with config.boot.kernelPackages; [ nvidia_x11 v4l2loopback];
loader = {
efi = {

View File

@@ -5,12 +5,11 @@
[
(modulesPath + "/installer/scan/not-detected.nix")
];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/4c02ddf5-d00e-4d84-856f-c327ae44d047";
fsType = "btrfs";
options = ["compress-force=zstd:2"];
options = [ "compress-force=zstd:3" ];
};
fileSystems."/boot/efi" =
@@ -18,31 +17,19 @@
device = "/dev/disk/by-uuid/58B1-4631";
fsType = "vfat";
};
fileSystems."/mnt/Stuff" =
{
device = "/dev/disk/by-uuid/843E68573E6843F0";
fsType = "ntfs";
options = ["uid=natto" "gid=users" "umask=0022" "rw"];
};
fileSystems."/mnt/Extra" =
{
device = "/dev/disk/by-uuid/32EE9F63EE9F1DE3";
fsType = "ntfs";
options = ["uid=natto" "gid=users" "umask=0022" "rw"];
};
fileSystems."/mnt/Games" =
{
device = "/dev/disk/by-uuid/A4CC66B6CC668282";
fsType = "ntfs";
options = ["uid=natto" "gid=users" "umask=0022" "rw"];
};
fileSystems."/mnt/Stuff2" =
fileSystems."/mnt/Games" =
{
device = "/dev/disk/by-uuid/A4CC66B6CC668282";
fsType = "ntfs";
options = [ "uid=natto" "gid=users" "umask=0022" "rw" ];
};
fileSystems."/mnt/Stuff" =
{
device = "/dev/disk/by-uuid/e5be3621-8608-4ffe-bd33-5e6d22fef4ff";
fsType = "btrfs";
options = ["compress-force=zstd:1"];
options = [ "compress-force=zstd:3" ];
};
swapDevices = [ {device = "/dev/nvme0n1p7";} ];
swapDevices = [ ];
zramSwap = {
enable = true;
algorithm = "lz4";

View File

@@ -6,7 +6,7 @@
wireless.enable = true;
wireless.interfaces = [ "wlp0s20f3" ];
firewall = {
allowedTCPPorts = [ 22 18172 6600 ];
allowedTCPPorts = [ 22 18172 6600 8000 ];
allowedUDPPorts = [ 22 17840 18172 ];
};
interfaces = {

View File

@@ -1,7 +1,8 @@
{lib, config, pkgs, ... }:
{ lib, config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
tmux
bc
gnumake
pciutils
@@ -15,11 +16,19 @@
kbd
cachix
gcc
rustc
stable.openjdk
virtmanager
tree-sitter
docker-compose
nodePackages.typescript
rust-bin.nightly.latest.default
#language servers
rust-analyzer
ccls
nodePackages.typescript-language-server
rnix-lsp
python3Packages.python-lsp-server
haskell-language-server
];
programs = {
@@ -34,27 +43,27 @@
zsh = {
enable = true;
promptInit = ''
RPROMPT='%B%F{cyan}%n%f@%F{red}%m%b'
function preexec() {
timer=$(date +%s%3N)
}
function precmd() {
if [ $timer ]; then
now=$(date +%s%3N)
elapsed=$(($now-$timer))
unset timer
unit="ms"
if [ $elapsed -gt 1000 ]; then
elapsed=$(echo "scale=1; $elapsed/1000" | ${pkgs.bc}/bin/bc -l)
unit="s"
RPROMPT='%B%F{cyan}%n%f@%F{red}%m%b'
function preexec() {
timer=$(date +%s%3N)
}
function precmd() {
if [ $timer ]; then
now=$(date +%s%3N)
elapsed=$(($now-$timer))
unset timer
unit="ms"
if [ $elapsed -gt 1000 ]; then
elapsed=$(echo "scale=1; $elapsed/1000" | ${pkgs.bc}/bin/bc -l)
unit="s"
fi
if (($(echo "$elapsed > 60" | bc -l ))); then
elapsed=$(echo "scale=2; $elapsed/60" | ${pkgs.bc}/bin/bc -l)
unit="m"
fi
RPROMPT='%B%F{cyan}%n%f@%F{red}%m %F{yellow}~%f %F{magenta}$elapsed $unit%f%b '
fi
if (($(echo "$elapsed > 60" | bc -l ))); then
elapsed=$(echo "scale=2; $elapsed/60" | ${pkgs.bc}/bin/bc -l)
unit="m"
fi
RPROMPT='%B%F{cyan}%n%f@%F{red}%m %F{yellow}~%f %F{magenta}$elapsed $unit%f%b '
fi
}
}
'';
histSize = 12000;
enableCompletion = true;
@@ -98,7 +107,7 @@
experimental-features = nix-command ca-references flakes
'';
trustedUsers = [ "root" "natto" ];
binaryCaches = [
binaryCaches = [
"https://nix-gaming.cachix.org"
"https://nix-community.cachix.org"
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"