meta: reorganize nix-os and hosts to single directory nixos
This commit is contained in:
parent
be46e02c61
commit
cb05ce5b44
76 changed files with 54 additions and 52 deletions
98
nixos/hosts/main/default.nix
Normal file
98
nixos/hosts/main/default.nix
Normal file
|
@ -0,0 +1,98 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/core.nix
|
||||
../../modules/core-desktop.nix
|
||||
../../modules/nvidia.nix
|
||||
../../modules/docker.nix
|
||||
../../modules/razer.nix
|
||||
../../modules/desktopManagers/cosmic.nix
|
||||
../../modules/displayManagers/cosmic-greeter.nix
|
||||
../../modules/shell.nix
|
||||
../../modules/virtualization.nix
|
||||
../../modules/polkit/disable-shutdown.nix
|
||||
../../modules/locale.nix
|
||||
../../modules/adb.nix
|
||||
../../modules/account.nix
|
||||
../../modules/services/nix-binary-cache.nix
|
||||
../../modules/udev.nix
|
||||
../../modules/gnupg.nix
|
||||
|
||||
"${inputs.nixos-vscode-server}"
|
||||
|
||||
./cryptocurrency.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "wroclaw-main";
|
||||
|
||||
services.printing.drivers = with pkgs; [
|
||||
hplip
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
self.overlays.cosmicPackages
|
||||
];
|
||||
nixpkgs.config = {
|
||||
cudaSupport = true;
|
||||
};
|
||||
|
||||
# nixos-vscode-server module needs this
|
||||
programs.nix-ld.enable = true;
|
||||
services.vscode-server = {
|
||||
enable = true;
|
||||
extraRuntimeDependencies = with pkgs; [
|
||||
docker
|
||||
];
|
||||
};
|
||||
|
||||
services.pipewire.wireplumber.configPackages = [(
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "wireplumber-config";
|
||||
src = ./wireplumber;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/wireplumber/wireplumber.conf.d
|
||||
cp -r $src/* $out/share/wireplumber/wireplumber.conf.d
|
||||
'';
|
||||
}
|
||||
)];
|
||||
|
||||
services.printing.startWhenNeeded = false;
|
||||
|
||||
# rgb control for razer, graphics card and motherboard
|
||||
hardware.i2c.enable = true;
|
||||
services.hardware.openrgb.enable = true;
|
||||
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
port = 1434;
|
||||
acceleration = "cuda";
|
||||
package = pkgs.unstable.ollama;
|
||||
host = "0.0.0.0";
|
||||
};
|
||||
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb;
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
OLLAMA_HOST = "127.0.0.1:${builtins.toString config.services.ollama.port}";
|
||||
};
|
||||
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue