build please?

This commit is contained in:
2024-10-18 07:40:46 -05:00
parent 57732d6d8c
commit 20b5622296
65 changed files with 2388 additions and 1416 deletions

View File

@@ -3,15 +3,17 @@
inputs = {
ollama.url = "./ollama";
sddm.url = "./sddm";
};
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, ... }: {
imports = [
inputs.ollama.module
inputs.sddm.module
./openssh
./ollama
./pipewire
];
};

View File

@@ -0,0 +1,16 @@
{ config, lib, ... }: {
options = {
sysconfig.opts.ollama.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.sysconfig.opts.ollama.enable {
services.ollama = {
enable = true;
acceleration = "cuda";
};
};
}

View File

@@ -1,12 +0,0 @@
{
description = "ollama config";
inputs = {
};
outputs = { self, ... }: {
module = import ./ollama.nix;
};
}

View File

@@ -1,7 +0,0 @@
{ config, lib, pkgs, ... }: {
services.ollama = {
enable = true;
acceleration = "cuda";
};
}

View File

@@ -0,0 +1,21 @@
{ config, lib, ... }: {
options = {
sysconfig.opts.openssh.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.sysconfig.opts.openssh.enable {
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
};
}

View File

@@ -0,0 +1,51 @@
{ config, lib, pkgs, ... }: {
options = {
sysconfig.opts.pipewire.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
};
config = lib.mkIf config.sysconfig.opts.pipewire.enable {
# Enable sound with pipewire.
sound.enable = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
package = pkgs.pipewire;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
extraConfig.pipewire-pulse."92-low-latency" = {
context.modules = [
{
name = "libpipewire-module-protocol-pulse";
args = {
pulse.min.req = "32/48000";
pulse.default.req = "32/48000";
pulse.max.req = "32/48000";
pulse.min.quantum = "32/48000";
pulse.max.quantum = "32/48000";
};
}
];
stream.properties = {
node.latency = "32/48000";
resample.quality = 1;
};
};
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
wireplumber.enable = true;
};
};
}

View File

@@ -0,0 +1,40 @@
{
description = "sddm config";
inputs = {
theme.url = "./themes/tokyo-night";
};
outputs = { self, ... }@inputs: {
module = { config, lib, pkgs, ... }: {
options.sysconfig.opts.sddm.enable = lib.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.sysconfig.opts.sddm.enable {
imports = [];
qt.enable = true;
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
autoNumlock = true;
theme = "${inputs.theme.theme { inherit pkgs; }}";
enableHidpi = true;
extraPackages = with pkgs; [
libsForQt5.qtsvg
libsForQt5.qtquickcontrols2
libsForQt5.qtgraphicaleffects
];
};
};
};
};
}

View File

@@ -0,0 +1,29 @@
{
description = "Package Sugar Dark SDDM theme";
inputs = {
repo = {
url = "github:MarianArlt/sddm-sugar-dark";
flake = false;
};
};
outputs = { self, repo, ... }: {
theme = { pkgs }: pkgs.stdenv.mkDerivation {
name = "sugar-dark";
src = repo;
installPhase = ''
mkdir -p $out
cp -R $src/* $out/
'';
};
};
}

View File

@@ -0,0 +1,29 @@
{
description = "Package Tokyo Night SDDM theme";
inputs = {
repo = {
url = "github:siddrs/tokyo-night-sddm";
flake = false;
};
};
outputs = { self, repo, ... }: {
theme = { pkgs }: pkgs.stdenv.mkDerivation {
name = "tokyo-night";
src = repo;
installPhase = ''
mkdir -p $out
cp -R $src/* $out/
'';
};
};
}