Compare commits

...

3 commits

Author SHA1 Message Date
f23686bb4a
Fish: fix 2024-12-15 02:32:33 +02:00
446d0d9f49
Theia: more swap 2024-12-15 02:32:17 +02:00
938cb79a0b
prepare reinstall on zfs 2024-12-15 02:31:35 +02:00
6 changed files with 45 additions and 34 deletions

View file

@ -407,11 +407,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1734129402, "lastModified": 1734219437,
"narHash": "sha256-SSyk9SJ5Uu3/LhaoH2Bsgbx8fDgR6ZYQZG/13aNjL3M=", "narHash": "sha256-NVQIAvfSpBSJaJ4BP1cE1yVGjCuvXs0NN1G1t+f52Ss=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "3cba4ba44e7ba3cc8bb67ac71bc61245b5aca347", "rev": "db249648776875ce3142141d0d3055e43ce606aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -633,11 +633,11 @@
}, },
"nixpkgs-smol": { "nixpkgs-smol": {
"locked": { "locked": {
"lastModified": 1734143535, "lastModified": 1734187240,
"narHash": "sha256-YVchPYuRpCFWqx6EVA1V1CY0NCTI1d3fADjOlB6oYe0=", "narHash": "sha256-I8cMXXWtf/+3DJT3QGm9BAp/b1oOCdKfgvpZ5XAUnp4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6160d771fb09b838abefba72df27c0c32699fe45", "rev": "119bb2941c87b630c56b5e36b9ed63e3daa0e2d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -750,11 +750,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1734172733, "lastModified": 1734221225,
"narHash": "sha256-26j5mCeAIFmrTCbNyQq4H8Ikda+dX9+n6YJhHcZ6m6Y=", "narHash": "sha256-PQtNGbg3B93+MINMe4/mwYWZkVDNzaf+O2Hw7xDznNk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "e06a083e1258845c7c8bcd5f4dcc2aab9964318c", "rev": "12bcdb7c86a2598761a7e2ada1b1e6cd7542197c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -99,6 +99,12 @@
}; };
epimetheus = nixpkgs.lib.nixosSystem { epimetheus = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
pkgs-smol = import nixpkgs-smol {
inherit system;
};
};
modules = modules =
[ ./hosts/epimetheus/configuration.nix disko.nixosModules.disko ]; [ ./hosts/epimetheus/configuration.nix disko.nixosModules.disko ];
}; };

View file

@ -1,9 +1,14 @@
{ pkgs, lib, modulesPath, config, ... }: { { pkgs, pkgs-smol, lib, modulesPath, config, ... }: {
imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" ]; imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" ];
boot = { boot = {
kernelPackages = pkgs.linuxPackages_6_12; supportedFilesystems = [ "zfs" ];
zfs = {
forceImportRoot = false;
package = pkgs-smol.zfs;
};
kernelPackages = pkgs-smol.linuxPackages_6_12;
kernelParams = lib.mkAfter [ "noquiet" "toram" ]; kernelParams = lib.mkAfter [ "noquiet" "toram" ];
enableContainers = false; enableContainers = false;
}; };
@ -18,14 +23,14 @@
git git
nixd nixd
pciutils pciutils
# The installers # The installers
arch-install-scripts # For arch and it's arch-install-scripts # For arch and it's
xbps # Void linux xbps # Void linux
dnf5 # Fedora dnf5 # Fedora
debootstrap # Debin and ubuntu debootstrap # Debin and ubuntu
apt # Ubuntu apt # Ubuntu
]; ];
documentation = { documentation = {
@ -80,7 +85,7 @@
"https://anyrun.cachix.org" "https://anyrun.cachix.org"
"https://wezterm.cachix.org" "https://wezterm.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs=" "nixpkgs-unfree.cachix.org-1:hqvoInulhbV4nJ9yJOEr+4wxhDV4xq2d1DK7S6Nj6rs="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="

View file

@ -18,12 +18,12 @@
}; };
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
#supportedFilesystems = [ "zfs" ]; supportedFilesystems = [ "zfs" ];
#zfs = { zfs = {
# forceImportRoot = false; forceImportRoot = false;
# package = pkgs.zfs; package = pkgs-smol.zfs;
#}; };
kernelPackages = pkgs.linuxPackages_6_12; kernelPackages = pkgs-smol.linuxPackages_6_12;
kernel = { sysctl = { "vm.max_map_count" = 2147483642; }; }; kernel = { sysctl = { "vm.max_map_count" = 2147483642; }; };
}; };

View file

@ -20,6 +20,10 @@
kernel = { kernel = {
sysctl = { sysctl = {
"vm.max_map_count" = 2147483642; "vm.max_map_count" = 2147483642;
"vm.swappiness" = 200;
"vm.watermark_boost_factor" = 0;
"vm.watermark_scale_factor" = 125;
"vm.page-cluster" = 0;
"net.ipv4.ip_forward" = 1; "net.ipv4.ip_forward" = 1;
"net.ipv6.conf.all.forwarding" = 1; "net.ipv6.conf.all.forwarding" = 1;
}; };
@ -57,6 +61,11 @@
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
swapDevices = [{
device = "/var/lib/swapfile";
size = 16 * 1024;
}];
networking = { networking = {
enableIPv6 = false; # Had to disable for now due to problems with resolving enableIPv6 = false; # Had to disable for now due to problems with resolving
firewall = { firewall = {

View file

@ -59,13 +59,10 @@
functions = { functions = {
os-age = '' os-age = ''
function os-age stat / | awk '/Birth: /{print $2 " " substr($3,1,5)}'
stat / | awk '/Birth: /{print $2 " " substr($3,1,5)}'
end
''; '';
build-iso = '' build-iso = ''
function build-iso
cd ~/.config/nixos cd ~/.config/nixos
nix build .#nixosConfigurations.epimetheus.config.system.build.isoImage nix build .#nixosConfigurations.epimetheus.config.system.build.isoImage
''; '';
@ -73,21 +70,15 @@
# Credit for these 3 # Credit for these 3
# https://www.reddit.com/r/linux/comments/1fq0za8/comment/lp1ybdn # https://www.reddit.com/r/linux/comments/1fq0za8/comment/lp1ybdn
disks = '' disks = ''
function disks lsblk -o NAME,MOUNTPOINT,FSTYPE,FSUSE%,SIZE
lsblk -o NAME,MOUNTPOINT,FSTYPE,FSUSE%,SIZE
end
''; '';
gr = '' gr = ''
function gr set GROOT (git rev-parse --show-toplevel 2>/dev/null); and cd $GROOT; or return $argv
set GROOT (git rev-parse --show-toplevel 2>/dev/null); and cd $GROOT; or return $argv
end
''; '';
mkcd = '' mkcd = ''
function mkcd mkdir -p -- $argv[1] && cd $argv; or return $status
mkdir -p -- $argv[1] && cd $argv; or return $status
end
''; '';
}; };