Skip to content

Commit

Permalink
Add initial base module
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonjenkins committed Jan 16, 2025
1 parent 94a2772 commit de86697
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 55 deletions.
56 changes: 1 addition & 55 deletions hosts/ali-desktop/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@
}: {
imports = [
# inputs.nix-gaming.nixosModules.pipewireLowLatency
(import ../../modules/base { })
(import ../../modules/locale { })
../../app-profiles/desktop
./hardware-configuration.nix
];

console.keyMap = "us";
hardware.pulseaudio.enable = false;
time.timeZone = "Europe/London";

boot = {
consoleLogLevel = 0;
initrd.verbose = false;
Expand Down Expand Up @@ -117,13 +114,6 @@
};
};

chaotic = {
mesa-git = {
enable = false;
# method = "GBM_BACKENDS_PATH";
};
};

environment = {
pathsToLink = [ "/share/zsh" ];

Expand Down Expand Up @@ -357,20 +347,7 @@
};
};

security = {
rtkit.enable = true;

sudo = {
enable = true;
wheelNeedsPassword = true;
};
};

services = {
fstrim.enable = true;
irqbalance.enable = true;
resolved.enable = true;

# beesd = {
# filesystems = {
# persistence = {
Expand All @@ -397,33 +374,6 @@
};
};

earlyoom = {
enable = true;
enableNotifications = true;
};

openssh = {
enable = true;

hostKeys = [
{
bits = 4096;
path = "/etc/ssh/ssh_host_rsa_key";
type = "rsa";
}
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];

settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};

pipewire = {
enable = true;
alsa.enable = true;
Expand Down Expand Up @@ -655,8 +605,4 @@
enable = true;
xdgOpenUsePortal = true;
};

zramSwap = {
enable = true;
};
}
61 changes: 61 additions & 0 deletions modules/base/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{ consoleKeyMap ? "us"
, timezone ? "Europe/London"
, enableMesaGit ? false
,
}: {
console.keyMap = consoleKeyMap;
hardware.pulseaudio.enable = false;
time.timeZone = timezone;

chaotic = {
mesa-git = {
enable = enableMesaGit;
};
};

security = {
rtkit.enable = true;

sudo = {
enable = true;
wheelNeedsPassword = true;
};
};

services = {
fstrim.enable = true;
irqbalance.enable = true;
resolved.enable = true;

earlyoom = {
enable = true;
enableNotifications = true;
};

openssh = {
enable = true;

hostKeys = [
{
bits = 4096;
path = "/etc/ssh/ssh_host_rsa_key";
type = "rsa";
}
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
];

settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
};
};

zramSwap = {
enable = true;
};
}

0 comments on commit de86697

Please sign in to comment.