feat: make use of cachyos settings modules to set some settings.
This commit is contained in:
parent
b8aebd054f
commit
280d9e4696
9 changed files with 48 additions and 36 deletions
21
flake.lock
generated
21
flake.lock
generated
|
|
@ -198,6 +198,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"cachyos-settings-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772570303,
|
||||
"narHash": "sha256-6Ln0SnXvNIL7vko8ZpLkegajsfbdVbkuoT0jLMDefYA=",
|
||||
"owner": "Daaboulex",
|
||||
"repo": "cachyos-settings-nix",
|
||||
"rev": "e0d227d4394dc59bf5ced7ef7fc128685370c592",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Daaboulex",
|
||||
"repo": "cachyos-settings-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"locked": {
|
||||
"lastModified": 1765145449,
|
||||
|
|
@ -2215,6 +2235,7 @@
|
|||
"aagl": "aagl",
|
||||
"agenix": "agenix",
|
||||
"auto-cpufreq": "auto-cpufreq",
|
||||
"cachyos-settings-nix": "cachyos-settings-nix",
|
||||
"deploy-rs": "deploy-rs",
|
||||
"disko": "disko",
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
|
|
|
|||
|
|
@ -155,6 +155,12 @@
|
|||
|
||||
# Proton cachyos
|
||||
proton-cachyos.url = "github:powerofthe69/proton-cachyos-nix";
|
||||
|
||||
# Cachyos settings
|
||||
cachyos-settings-nix = {
|
||||
url = "github:Daaboulex/cachyos-settings-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
inputs.auto-cpufreq.nixosModules.default
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
inputs.cachyos-settings-nix.nixosModules.default
|
||||
]
|
||||
else [];
|
||||
homeManagerModules =
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@
|
|||
crony.flatpak.enable = true;
|
||||
crony.qemu.enable = true;
|
||||
crony.pc-services.enable = true;
|
||||
crony.cachyos.settings.enable = true;
|
||||
|
||||
# # Try out greetd with tuigreet
|
||||
# services.greetd = {
|
||||
|
|
|
|||
|
|
@ -8,19 +8,6 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.crony.boot.enable {
|
||||
boot.kernel.sysctl = {
|
||||
# Cachy os adopted values
|
||||
"vm.swappiness" = 100;
|
||||
"vm.vfs_cache_pressure" = 50;
|
||||
"vm.dirty_bytes" = 268435456;
|
||||
"vm.page-cluster" = 1;
|
||||
"vm.dirty_background_bytes" = 67108864;
|
||||
"vm.dirty_writeback_centisecs" = 1500;
|
||||
"net.core.netdev_max_backlog" = 4096;
|
||||
"fs.file-max" = 2097152;
|
||||
# Disable watchdog
|
||||
"kernel.nmi_watchdog" = 0;
|
||||
};
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.kernelParams = ["quiet" "udev.log_priority=3"];
|
||||
};
|
||||
|
|
|
|||
17
modules/linux/nixos/cachyos-settings.nix
Normal file
17
modules/linux/nixos/cachyos-settings.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
crony.cachyos.settings.enable = lib.mkEnableOption "Enable and setup cachyos settings.";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.crony.cachyos.settings.enable {
|
||||
cachyos.settings = {
|
||||
enable = true;
|
||||
nvidia.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -33,6 +33,7 @@
|
|||
./flatpak.nix
|
||||
./pc-services.nix
|
||||
./pipewire.nix
|
||||
./cachyos-settings.nix
|
||||
];
|
||||
|
||||
crony.bluetooth.enable = lib.mkDefault true;
|
||||
|
|
@ -67,4 +68,5 @@
|
|||
crony.flatpak.enable = lib.mkDefault false;
|
||||
crony.pc-services.enable = lib.mkDefault false;
|
||||
crony.pipewire.enable = lib.mkDefault false;
|
||||
crony.cachyos.settings.enable = lib.mkDefault false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,9 +9,6 @@
|
|||
crony.gaming.enable = lib.mkEnableOption "enable gaming related stuff, like steam and gamemode";
|
||||
};
|
||||
config = lib.mkIf config.crony.gaming.enable {
|
||||
# Setup ntsync
|
||||
boot.kernelModules = ["ntsync"];
|
||||
|
||||
# Install steam
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
|
|
@ -46,9 +43,6 @@
|
|||
};
|
||||
|
||||
# Setup esync
|
||||
systemd.settings.Manager = {
|
||||
DefaultLimitNOFILE = 1048576;
|
||||
};
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "*";
|
||||
|
|
|
|||
|
|
@ -15,23 +15,6 @@
|
|||
# Enable firmware updater
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Enable zram swap device
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 60;
|
||||
};
|
||||
|
||||
# Setup swapfile
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 32 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
# Setup ntp
|
||||
services.timesyncd.enable = true;
|
||||
|
||||
# Setup fstrim
|
||||
services.fstrim.enable = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue