nvme optimizations
This commit is contained in:
parent
84cdbd531d
commit
d1695430b0
@ -3,24 +3,18 @@ let
|
|||||||
VERSION = "22.11";
|
VERSION = "22.11";
|
||||||
# HOME-MANAGER = builtins.fetchTarball
|
# HOME-MANAGER = builtins.fetchTarball
|
||||||
# "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
# "https://github.com/nix-community/home-manager/archive/master.tar.gz";
|
||||||
UNSTABLE_TARBALL = builtins.fetchTarball
|
UNSTABLE_TARBALL =
|
||||||
https://github.com/nixos/nixpkgs/tarball/master;
|
builtins.fetchTarball "https://github.com/nixos/nixpkgs/tarball/master";
|
||||||
unstable = import UNSTABLE_TARBALL {
|
unstable = import UNSTABLE_TARBALL { config = config.nixpkgs.config; };
|
||||||
config = config.nixpkgs.config;
|
nextcloud_scrapsync = pkgs.writeScriptBin "nextcloud_scrapsync"
|
||||||
};
|
(builtins.readFile ./scripts/nextcloud_scrapsync.sh);
|
||||||
nextcloud_scrapsync = pkgs.writeScriptBin
|
manage_library = pkgs.writeScriptBin "manage_library"
|
||||||
"nextcloud_scrapsync" (builtins.readFile ./scripts/nextcloud_scrapsync.sh);
|
(builtins.readFile ./scripts/manage_library.fish);
|
||||||
manage_library = pkgs.writeScriptBin
|
ffmpeg4discord = pkgs.writeScriptBin "ffmpeg4discord"
|
||||||
"manage_library" (builtins.readFile ./scripts/manage_library.fish);
|
(builtins.readFile ./scripts/ffmpeg4discord.py);
|
||||||
ffmpeg4discord = pkgs.writeScriptBin
|
in { # Remember to close this bracket at the end of the document
|
||||||
"ffmpeg4discord" (builtins.readFile ./scripts/ffmpeg4discord.py);
|
|
||||||
in
|
|
||||||
{ # Remember to close this bracket at the end of the document
|
|
||||||
|
|
||||||
imports = [
|
imports = [ ./hardware-configuration.nix <home-manager/nixos> ];
|
||||||
./hardware-configuration.nix
|
|
||||||
<home-manager/nixos>
|
|
||||||
];
|
|
||||||
|
|
||||||
networking.hostName = "workstation";
|
networking.hostName = "workstation";
|
||||||
|
|
||||||
@ -31,9 +25,7 @@ time.timeZone = "America/Mexico_City";
|
|||||||
|
|
||||||
i18n = {
|
i18n = {
|
||||||
defaultLocale = "en_CA.UTF-8";
|
defaultLocale = "en_CA.UTF-8";
|
||||||
extraLocaleSettings = {
|
extraLocaleSettings = { LC_MONETARY = "es_MX.UTF-8"; };
|
||||||
LC_MONETARY = "es_MX.UTF-8";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
@ -62,8 +54,7 @@ environment.gnome.excludePackages = (with pkgs; [
|
|||||||
gnome-connections
|
gnome-connections
|
||||||
# gnome-shell-extensions
|
# gnome-shell-extensions
|
||||||
baobab
|
baobab
|
||||||
])
|
]) ++ (with pkgs.gnome; [
|
||||||
++ (with pkgs.gnome; [
|
|
||||||
# totem
|
# totem
|
||||||
gedit
|
gedit
|
||||||
gnome-music
|
gnome-music
|
||||||
@ -98,9 +89,7 @@ security.sudo = {
|
|||||||
# noPass = true;
|
# noPass = true;
|
||||||
# }];
|
# }];
|
||||||
|
|
||||||
nixpkgs.config = {
|
nixpkgs.config = { allowUnfree = true; };
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.jawz = {
|
users.users.jawz = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
@ -108,7 +97,9 @@ users.users.jawz = {
|
|||||||
initialPassword = "password";
|
initialPassword = "password";
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
openssh = {
|
openssh = {
|
||||||
authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacero\cdreyes@100CDREYES" ];
|
authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB5GaQM4N+yGAByibOFQOBVMV/6TjOfaGIP+NunMiK76 gpodeacerocdreyes@100CDREYES"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
packages = (with pkgs; [
|
packages = (with pkgs; [
|
||||||
|
|
||||||
@ -191,7 +182,6 @@ xdg-ninja # help declutter $HOME
|
|||||||
torrenttools # create torrent files from the terminal!
|
torrenttools # create torrent files from the terminal!
|
||||||
lm_sensors # for extension, displays cpu temp
|
lm_sensors # for extension, displays cpu temp
|
||||||
|
|
||||||
|
|
||||||
# My own scripts
|
# My own scripts
|
||||||
nextcloud_scrapsync
|
nextcloud_scrapsync
|
||||||
ffmpeg4discord
|
ffmpeg4discord
|
||||||
@ -252,12 +242,17 @@ gnome.gnome-tweaks # tweaks for the gnome desktop environment
|
|||||||
|
|
||||||
# Fonts
|
# Fonts
|
||||||
(nerdfonts.override {
|
(nerdfonts.override {
|
||||||
fonts = [ "Agave" "CascadiaCode" "SourceCodePro" "Ubuntu" "FiraCode" "Iosevka" ];
|
fonts = [
|
||||||
|
"Agave"
|
||||||
|
"CascadiaCode"
|
||||||
|
"SourceCodePro"
|
||||||
|
"Ubuntu"
|
||||||
|
"FiraCode"
|
||||||
|
"Iosevka"
|
||||||
|
];
|
||||||
})
|
})
|
||||||
symbola
|
symbola
|
||||||
(papirus-icon-theme.override {
|
(papirus-icon-theme.override { color = "adwaita"; })
|
||||||
color = "adwaita";
|
|
||||||
})
|
|
||||||
|
|
||||||
]) ++ (with pkgs.python310Packages; [
|
]) ++ (with pkgs.python310Packages; [
|
||||||
black # Python code formatter
|
black # Python code formatter
|
||||||
@ -301,7 +296,8 @@ symbola
|
|||||||
markdownlint-cli
|
markdownlint-cli
|
||||||
prettier
|
prettier
|
||||||
pnpm
|
pnpm
|
||||||
]); }; # <--- end of package list
|
]);
|
||||||
|
}; # <--- end of package list
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
@ -318,12 +314,15 @@ programs.fish = {
|
|||||||
enable = true;
|
enable = true;
|
||||||
# useBabelfish = true; This setting doens't work from inside home-manager
|
# useBabelfish = true; This setting doens't work from inside home-manager
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
ls = "exa --icons --group-directories-first --no-permissions --no-user --no-time";
|
ls =
|
||||||
|
"exa --icons --group-directories-first --no-permissions --no-user --no-time";
|
||||||
edit = "emacsclient -t";
|
edit = "emacsclient -t";
|
||||||
comic = "download -u jawz -i (cat $lc | fzf --multi --exact -i)";
|
comic = "download -u jawz -i (cat $lc | fzf --multi --exact -i)";
|
||||||
gallery = "download -u jawz -i (cat $lw | fzf --multi --exact -i)";
|
gallery = "download -u jawz -i (cat $lw | fzf --multi --exact -i)";
|
||||||
open_gallery = "open (find /mnt/disk2/scrapping/JawZ/gallery-dl -type d | fzf)";
|
open_gallery =
|
||||||
unique_extensions = "find . -type f | string match -r '([^.\/]+)\$' | sort -u";
|
"open (find /mnt/disk2/scrapping/JawZ/gallery-dl -type d | fzf)";
|
||||||
|
unique_extensions =
|
||||||
|
"find . -type f | string match -r '([^./]+)$' | sort -u";
|
||||||
cp = "cp -i";
|
cp = "cp -i";
|
||||||
mv = "mv -i";
|
mv = "mv -i";
|
||||||
mkdir = "mkdir -p";
|
mkdir = "mkdir -p";
|
||||||
@ -390,7 +389,8 @@ programs = {
|
|||||||
config = {
|
config = {
|
||||||
# map-syntax = [ "*.jenkinsfile:Groovy" "*.props:Java Properties" ];
|
# map-syntax = [ "*.jenkinsfile:Groovy" "*.props:Java Properties" ];
|
||||||
pager = "less -FR";
|
pager = "less -FR";
|
||||||
theme = "base16"; };
|
theme = "base16";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@ -423,7 +423,8 @@ xdg = {
|
|||||||
};
|
};
|
||||||
configFile = {
|
configFile = {
|
||||||
"wgetrc".source = ./dotfiles/wget/wgetrc;
|
"wgetrc".source = ./dotfiles/wget/wgetrc;
|
||||||
"configstore/update-notifier-npm-check.json".source = ./dotfiles/npm/update-notifier-npm-check.json;
|
"configstore/update-notifier-npm-check.json".source =
|
||||||
|
./dotfiles/npm/update-notifier-npm-check.json;
|
||||||
"npm/npmrc".source = ./dotfiles/npm/npmrc;
|
"npm/npmrc".source = ./dotfiles/npm/npmrc;
|
||||||
"gallery-dl/config.json".source = ./dotfiles/gallery-dl/config.json;
|
"gallery-dl/config.json".source = ./dotfiles/gallery-dl/config.json;
|
||||||
"htop/htoprc".source = ./dotfiles/htop/htoprc;
|
"htop/htoprc".source = ./dotfiles/htop/htoprc;
|
||||||
@ -509,9 +510,7 @@ snapraid = {
|
|||||||
olderThan = 10;
|
olderThan = 10;
|
||||||
interval = "4:00";
|
interval = "4:00";
|
||||||
};
|
};
|
||||||
parityFiles = [
|
parityFiles = [ "/mnt/parity/snapraid.parity" ];
|
||||||
"/mnt/parity/snapraid.parity"
|
|
||||||
];
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
autosave 50
|
autosave 50
|
||||||
'';
|
'';
|
||||||
@ -543,9 +542,7 @@ programs = {
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableSSHSupport = true;
|
enableSSHSupport = true;
|
||||||
};
|
};
|
||||||
geary = {
|
geary = { enable = true; };
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
steam = {
|
steam = {
|
||||||
enable = true;
|
enable = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
@ -564,11 +561,7 @@ services = {
|
|||||||
fstrim.enable = true;
|
fstrim.enable = true;
|
||||||
btrfs.autoScrub = {
|
btrfs.autoScrub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fileSystems = [
|
fileSystems = [ "/" "/mnt/disk1" "/mnt/disk2" ];
|
||||||
"/"
|
|
||||||
"/mnt/disk1"
|
|
||||||
"/mnt/disk2"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
mediatomb.enable = true;
|
mediatomb.enable = true;
|
||||||
openssh = {
|
openssh = {
|
||||||
@ -577,12 +570,10 @@ services = {
|
|||||||
passwordAuthentication = false;
|
passwordAuthentication = false;
|
||||||
kbdInteractiveAuthentication = false;
|
kbdInteractiveAuthentication = false;
|
||||||
startWhenNeeded = true;
|
startWhenNeeded = true;
|
||||||
listenAddresses = [
|
listenAddresses = [{
|
||||||
{
|
|
||||||
addr = "0.0.0.0";
|
addr = "0.0.0.0";
|
||||||
port = 25152;
|
port = 25152;
|
||||||
}
|
}];
|
||||||
];
|
|
||||||
};
|
};
|
||||||
# udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
# udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
|
||||||
emacs = {
|
emacs = {
|
||||||
@ -603,24 +594,20 @@ systemd.services = {
|
|||||||
environment = {
|
environment = {
|
||||||
FILE = "/home/jawz/Development/Docker/docker-compose.yml";
|
FILE = "/home/jawz/Development/Docker/docker-compose.yml";
|
||||||
};
|
};
|
||||||
path = [
|
path = [ pkgs.docker-compose ];
|
||||||
pkgs.docker-compose
|
|
||||||
];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
# Type = "simple";
|
# Type = "simple";
|
||||||
RestartSec = 30;
|
RestartSec = 30;
|
||||||
ExecStart = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans";
|
ExecStart =
|
||||||
|
"${pkgs.docker-compose}/bin/docker-compose -f \${FILE} up --remove-orphans";
|
||||||
ExecStop = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} down";
|
ExecStop = "${pkgs.docker-compose}/bin/docker-compose -f \${FILE} down";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"nextcloud_scrapsync" = {
|
"nextcloud_scrapsync" = {
|
||||||
description = "Sync scrapped files with nextcloud";
|
description = "Sync scrapped files with nextcloud";
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
path = [
|
path = [ pkgs.bash nextcloud_scrapsync ];
|
||||||
pkgs.bash
|
|
||||||
nextcloud_scrapsync
|
|
||||||
];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
RestartSec = 30;
|
RestartSec = 30;
|
||||||
ExecStart = "${nextcloud_scrapsync}/bin/nextcloud_scrapsync";
|
ExecStart = "${nextcloud_scrapsync}/bin/nextcloud_scrapsync";
|
||||||
@ -650,9 +637,7 @@ systemd.user.services = {
|
|||||||
restartIfChanged = true;
|
restartIfChanged = true;
|
||||||
description = "Run hentai@home server";
|
description = "Run hentai@home server";
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
path = [
|
path = [ pkgs.HentaiAtHome ];
|
||||||
pkgs.HentaiAtHome
|
|
||||||
];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 30;
|
RestartSec = 30;
|
||||||
@ -665,10 +650,7 @@ systemd.user.services = {
|
|||||||
restartIfChanged = true;
|
restartIfChanged = true;
|
||||||
description = "Run the manage library fish script";
|
description = "Run the manage library fish script";
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
path = [
|
path = [ pkgs.fish manage_library ];
|
||||||
pkgs.fish
|
|
||||||
manage_library
|
|
||||||
];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 30;
|
RestartSec = 30;
|
||||||
|
|||||||
@ -55,12 +55,13 @@
|
|||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [
|
options = [
|
||||||
"subvol=nix"
|
"subvol=nix"
|
||||||
# "ssd"
|
"ssd"
|
||||||
"compress=zstd:3"
|
"compress=zstd:3"
|
||||||
"x-systemd.device-timeout=0"
|
"x-systemd.device-timeout=0"
|
||||||
"space_cache=v2"
|
"space_cache=v2"
|
||||||
"commit=120"
|
"commit=120"
|
||||||
"datacow"
|
"datacow"
|
||||||
|
"noatime"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -69,7 +70,7 @@
|
|||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [
|
options = [
|
||||||
"subvol=home"
|
"subvol=home"
|
||||||
# "ssd"
|
"ssd"
|
||||||
"compress=zstd:3"
|
"compress=zstd:3"
|
||||||
"x-systemd.device-timeout=0"
|
"x-systemd.device-timeout=0"
|
||||||
"space_cache=v2"
|
"space_cache=v2"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user