build please?
This commit is contained in:
@@ -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
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
16
system/services/ollama/default.nix
Normal file
16
system/services/ollama/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
description = "ollama config";
|
||||
|
||||
inputs = {
|
||||
};
|
||||
|
||||
outputs = { self, ... }: {
|
||||
|
||||
module = import ./ollama.nix;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
};
|
||||
}
|
||||
21
system/services/openssh/default.nix
Normal file
21
system/services/openssh/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
51
system/services/pipewire/default.nix
Normal file
51
system/services/pipewire/default.nix
Normal 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;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
40
system/services/sddm/flake.nix
Normal file
40
system/services/sddm/flake.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
29
system/services/sddm/themes/sugar-dark/flake.nix
Normal file
29
system/services/sddm/themes/sugar-dark/flake.nix
Normal 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/
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
29
system/services/sddm/themes/tokyo-night/flake.nix
Normal file
29
system/services/sddm/themes/tokyo-night/flake.nix
Normal 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/
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user