flake: use nixos-sensible
This commit is contained in:
parent
1d6adde578
commit
0afa535473
9 changed files with 23 additions and 34 deletions
16
flake.lock
16
flake.lock
|
@ -378,6 +378,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixos-sensible": {
|
||||
"locked": {
|
||||
"lastModified": 1711449784,
|
||||
"narHash": "sha256-DEMOWReMJ3gCi/0czu9hCJH716dmofhtDc2FWfbB0ew=",
|
||||
"owner": "Guanran928",
|
||||
"repo": "nixos-sensible",
|
||||
"rev": "f278a4775e668760a6f2da5f9de6bc512f507871",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Guanran928",
|
||||
"repo": "nixos-sensible",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1711106783,
|
||||
|
@ -557,6 +572,7 @@
|
|||
"nix-on-droid": "nix-on-droid",
|
||||
"nixcasks": "nixcasks",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixos-sensible": "nixos-sensible",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nmd": "nmd",
|
||||
|
|
|
@ -59,6 +59,9 @@
|
|||
nixos-hardware = {
|
||||
url = "github:NixOS/nixos-hardware";
|
||||
};
|
||||
nixos-sensible = {
|
||||
url = "github:Guanran928/nixos-sensible";
|
||||
};
|
||||
nix-on-droid = {
|
||||
url = "github:nix-community/nix-on-droid/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
imports = [
|
||||
# OS
|
||||
../../nixos/profiles/laptop
|
||||
../../nixos/profiles/common/opt-in/zram-generator.nix
|
||||
../../nixos/profiles/common/opt-in/clash-meta-client
|
||||
../../nixos/profiles/common/opt-in/gaming
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
inputs.nixpkgs.nixosModules.notDetected
|
||||
inputs.nixos-hardware.nixosModules.lenovo-legion-y530-15ich
|
||||
inputs.nixos-sensible.nixosModules.zram
|
||||
];
|
||||
|
||||
services.hdapsd.enable = false;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
imports = [
|
||||
# OS
|
||||
../../nixos/profiles/laptop
|
||||
../../nixos/profiles/common/opt-in/zram-generator.nix
|
||||
../../nixos/profiles/common/opt-in/clash-meta-client
|
||||
|
||||
# Hardware
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
inputs.nixos-hardware.nixosModules.common-hidpi
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
inputs.nixos-sensible.nixosModules.zram
|
||||
];
|
||||
|
||||
myFlake.hardware.components = {
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
inputs.nur.nixosModules.nur
|
||||
inputs.self.nixosModules.default
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.nixos-sensible.nixosModules.default
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
|
@ -30,7 +31,6 @@
|
|||
### home-manager
|
||||
home-manager.users.guanranwang = import ../../../../home;
|
||||
|
||||
users.mutableUsers = false;
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
@ -38,7 +38,6 @@
|
|||
};
|
||||
|
||||
### Boot
|
||||
boot.initrd.systemd.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = lib.mkDefault true; # mkDefault for Lanzaboote
|
||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_zen; # mkDefault for server
|
||||
|
@ -61,14 +60,6 @@
|
|||
usbutils
|
||||
];
|
||||
|
||||
programs.nano.enable = false;
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true; # important!
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "no";
|
||||
|
@ -85,9 +76,6 @@
|
|||
"[ 5.996722] amdgpu 0000:67:00.0: Fatal error during GPU init"}
|
||||
'';
|
||||
|
||||
# https://archlinux.org/news/making-dbus-broker-our-default-d-bus-daemon/
|
||||
services.dbus.implementation = "broker";
|
||||
|
||||
### WORKAROUND: Use NVIDIA beta version 550.40.07 due to performance issues introduced in version 545.29.06,
|
||||
# this shouldn't affect non-nvidia machines.
|
||||
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# ref: https://github.com/Misterio77/nix-config/blob/main/hosts/common/global/nix.nix
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
|
@ -11,12 +12,10 @@
|
|||
nix.channel.enable = false;
|
||||
|
||||
# Disable flake-registry
|
||||
# https://nixos-and-flakes.thiscute.world/best-practices/nix-path-and-flake-registry
|
||||
nix.settings.flake-registry = "";
|
||||
|
||||
# Add each flake input as a registry
|
||||
# To make nix3 commands consistent with the flake
|
||||
# https://github.com/Misterio77/nix-config/blob/main/hosts/common/global/nix.nix
|
||||
nix.registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
||||
|
||||
# Install Git
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
services.zram-generator = {
|
||||
enable = true;
|
||||
settings.zram0 = {
|
||||
compression-algorithm = "zstd";
|
||||
zram-size = "ram";
|
||||
};
|
||||
};
|
||||
|
||||
# https://wiki.archlinux.org/title/Zram#Optimizing_swap_on_zram
|
||||
boot.kernel.sysctl = {
|
||||
"vm.swappiness" = 180;
|
||||
"vm.watermark_boost_factor" = 0;
|
||||
"vm.watermark_scale_factor" = 125;
|
||||
"vm.page-cluster" = 0;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue