remove home-manager from server

This commit is contained in:
Kopatz
2025-12-18 20:01:40 +01:00
parent c7162ae9b2
commit 853bd1f77a
11 changed files with 309 additions and 22 deletions

View File

@@ -224,6 +224,7 @@
};
# nixos-rebuild switch --flake .#server-vm --target-host root@192.168.0.21
"server-vm" = mkHost {
minimal = true;
modules = [
./users/anon
./systems/amd-server-vm/configuration.nix

View File

@@ -2,9 +2,10 @@
{
services.easyeffects = {
enable = true;
preset = "mic";
preset = "other_mic";
extraPresets = {
mic = builtins.fromJSON (builtins.readFile ./mic.json);
other_mic = builtins.fromJSON (builtins.readFile ./other_mic.json);
};
};
}

View File

@@ -235,7 +235,7 @@
],
"rnnoise#0": {
"bypass": false,
"enable-vad": false,
"enable-vad": true,
"input-gain": 0.0,
"model-path": "",
"output-gain": 0.0,
@@ -245,9 +245,9 @@
},
"speex#0": {
"bypass": false,
"enable-agc": false,
"enable-denoise": false,
"enable-dereverb": false,
"enable-agc": true,
"enable-denoise": true,
"enable-dereverb": true,
"input-gain": 0.0,
"noise-suppression": -70,
"output-gain": 0.0,

View File

@@ -0,0 +1,277 @@
{
"input": {
"blocklist": [],
"compressor#0": {
"attack": 15.0,
"boost-amount": 0.0,
"boost-threshold": -72.0,
"bypass": false,
"dry": -80.01,
"hpf-frequency": 10.0,
"hpf-mode": "Off",
"input-gain": 0.0,
"input-to-link": 0.0,
"input-to-sidechain": 0.0,
"knee": -6.0,
"link-to-input": 0.0,
"link-to-sidechain": 0.0,
"lpf-frequency": 20000.0,
"lpf-mode": "Off",
"makeup": 3.0,
"mode": "Downward",
"output-gain": 0.0,
"ratio": 3.0,
"release": 200.0,
"release-threshold": -40.0,
"sidechain": {
"lookahead": 0.0,
"mode": "RMS",
"preamp": 0.0,
"reactivity": 10.0,
"source": "Middle",
"stereo-split-source": "Left/Right",
"type": "Feed-forward"
},
"sidechain-to-input": 0.0,
"sidechain-to-link": 0.0,
"stereo-split": false,
"threshold": -18.0,
"wet": 0.0
},
"deepfilternet#0": {
"attenuation-limit": 100.0,
"bypass": false,
"input-gain": 0.0,
"max-df-processing-threshold": 20.0,
"max-erb-processing-threshold": 30.0,
"min-processing-buffer": 0,
"min-processing-threshold": 5.0,
"output-gain": 0.0,
"post-filter-beta": 0.019999999552965164
},
"deesser#0": {
"bypass": false,
"detection": "RMS",
"f1-freq": 4000.0,
"f1-level": -6.0,
"f2-freq": 8000.0,
"f2-level": -6.0,
"f2-q": 1.5,
"input-gain": 0.0,
"laxity": 15,
"makeup": 0.0,
"mode": "Split",
"output-gain": 0.0,
"ratio": 3.0,
"sc-listen": false,
"threshold": -22.0
},
"equalizer#0": {
"balance": 0.1,
"bypass": false,
"input-gain": 0.0,
"left": {
"band0": {
"frequency": 80.0,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 0.7,
"slope": "x2",
"solo": false,
"type": "Hi-pass",
"width": 4.0
},
"band1": {
"frequency": 220.0,
"gain": -2.0,
"mode": "RLC (MT)",
"mute": false,
"q": 0.7,
"slope": "x1",
"solo": false,
"type": "Bell",
"width": 4.0
},
"band2": {
"frequency": 350.0,
"gain": -2.0,
"mode": "BWC (MT)",
"mute": false,
"q": 1.2,
"slope": "x2",
"solo": false,
"type": "Bell",
"width": 4.0
},
"band3": {
"frequency": 3500.0,
"gain": 2.0,
"mode": "BWC (BT)",
"mute": false,
"q": 0.9,
"slope": "x2",
"solo": false,
"type": "Bell",
"width": 4.0
},
"band4": {
"frequency": 10000.0,
"gain": 2.0,
"mode": "LRX (MT)",
"mute": false,
"q": 0.7,
"slope": "x1",
"solo": false,
"type": "Hi-shelf",
"width": 4.0
}
},
"mode": "IIR",
"num-bands": 5,
"output-gain": 0.0,
"pitch-left": 0.0,
"pitch-right": 0.0,
"right": {
"band0": {
"frequency": 80.0,
"gain": 0.0,
"mode": "RLC (BT)",
"mute": false,
"q": 0.7,
"slope": "x2",
"solo": false,
"type": "Hi-pass",
"width": 4.0
},
"band1": {
"frequency": 220.0,
"gain": -2.0,
"mode": "RLC (MT)",
"mute": false,
"q": 0.7,
"slope": "x1",
"solo": false,
"type": "Bell",
"width": 4.0
},
"band2": {
"frequency": 350.0,
"gain": -2.0,
"mode": "BWC (MT)",
"mute": false,
"q": 1.2,
"slope": "x2",
"solo": false,
"type": "Bell",
"width": 4.0
},
"band3": {
"frequency": 3500.0,
"gain": 2.0,
"mode": "BWC (BT)",
"mute": false,
"q": 0.9,
"slope": "x2",
"solo": false,
"type": "Bell",
"width": 4.0
},
"band4": {
"frequency": 10000.0,
"gain": 2.0,
"mode": "LRX (MT)",
"mute": false,
"q": 0.7,
"slope": "x1",
"solo": false,
"type": "Hi-shelf",
"width": 4.0
}
},
"split-channels": false
},
"gate#0": {
"attack": 5.0,
"bypass": false,
"curve-threshold": -50.0,
"curve-zone": -2.0,
"dry": -80.01,
"hpf-frequency": 10.0,
"hpf-mode": "Off",
"hysteresis": true,
"hysteresis-threshold": -3.0,
"hysteresis-zone": -1.0,
"input-gain": 0.0,
"input-to-link": 0.0,
"input-to-sidechain": 0.0,
"link-to-input": 0.0,
"link-to-sidechain": 0.0,
"lpf-frequency": 20000.0,
"lpf-mode": "Off",
"makeup": 1.0,
"output-gain": 0.0,
"reduction": -12.0,
"release": 250.0,
"sidechain": {
"lookahead": 0.0,
"mode": "RMS",
"preamp": 0.0,
"reactivity": 10.0,
"source": "Middle",
"stereo-split-source": "Left/Right",
"type": "Internal"
},
"sidechain-to-input": 0.0,
"sidechain-to-link": 0.0,
"stereo-split": false,
"wet": -1.0
},
"limiter#0": {
"alr": false,
"alr-attack": 5.0,
"alr-knee": 0.0,
"alr-release": 50.0,
"attack": 2.0,
"bypass": false,
"dithering": "16bit",
"gain-boost": false,
"input-gain": 0.0,
"input-to-link": 0.0,
"input-to-sidechain": 0.0,
"link-to-input": 0.0,
"link-to-sidechain": 0.0,
"lookahead": 2.0,
"mode": "Herm Wide",
"output-gain": 0.0,
"oversampling": "None",
"release": 5.0,
"sidechain-preamp": 0.0,
"sidechain-to-input": 0.0,
"sidechain-to-link": 0.0,
"sidechain-type": "Internal",
"stereo-link": 100.0,
"threshold": -1.5
},
"plugins_order": [
"rnnoise#0",
"deepfilternet#0",
"gate#0",
"equalizer#0",
"compressor#0",
"deesser#0",
"limiter#0"
],
"rnnoise#0": {
"bypass": false,
"enable-vad": false,
"input-gain": 0.0,
"model-name": "\"\"",
"output-gain": 0.0,
"release": 20.0,
"use-standard-model": true,
"vad-thres": 70.0,
"wet": 0.0
}
}
}

View File

@@ -56,6 +56,7 @@ in
'';
environment.systemPackages = with pkgs; [
neovim
getTotalPowerUsed
watchCurrentPowerUsed
(if lib.versionOlder lib.version "25.05" then wget else powerjoular) # monitor power usage

View File

@@ -3,8 +3,7 @@
environment.etc."current-system-packages".text =
let
packages = builtins.map (p: "${p.name}") config.environment.systemPackages;
homePackages = builtins.map (p: "${p.name}") config.home-manager.users.${config.mainUser.name}.home.packages;
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique (packages ++ homePackages));
sortedUnique = builtins.sort builtins.lessThan (pkgs.lib.lists.unique packages);
formatted = builtins.concatStringsSep "\n" sortedUnique;
in
formatted;

View File

@@ -11,6 +11,11 @@ in
{
options.custom.services.clamav = {
enable = lib.mkEnableOption "Enables clamav";
enableScanner = lib.mkOption {
type = with lib.types; bool;
default = true;
description = "Enable automatic scanning with clamscan.";
};
scanDirectories = lib.mkOption {
type = with lib.types; listOf str;
default = [
@@ -25,7 +30,7 @@ in
};
config = lib.mkIf cfg.enable {
services.clamav = {
scanner.enable = true;
scanner.enable = cfg.enableScanner;
scanner.scanDirectories = cfg.scanDirectories;
updater.enable = true;
daemon = {

View File

@@ -10,9 +10,9 @@
mainUser.name = "anon";
mainUser.sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeP6qtVqE/gu72ZUZE8cdRi3INiUW9NqDR7SjXIzTw2 kopatz";
home-manager = {
users.${config.mainUser.name} = import ./home.nix;
};
#home-manager = {
# users.${config.mainUser.name} = import ./home.nix;
#};
programs.zsh.enable = true;
users.users.${config.mainUser.name} = {

View File

@@ -8,16 +8,6 @@
{
imports = [ ./option.nix ];
environment.systemPackages = [ pkgs.home-manager ];
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs;
headless = false;
};
useUserPackages = true;
};
users.users.root = {
openssh.authorizedKeys.keys = [ config.mainUser.sshKey ];
};

13
users/home-manager.nix Normal file
View File

@@ -0,0 +1,13 @@
{config, inputs, pkgs, ... }:
{
environment.systemPackages = [ pkgs.home-manager ];
home-manager = {
useGlobalPkgs = true;
extraSpecialArgs = {
inherit inputs;
headless = false;
};
useUserPackages = true;
};
}

View File

@@ -6,7 +6,7 @@
...
}:
{
imports = [ ../default.nix ];
imports = [ ../default.nix ../home-manager.nix ];
mainUser.name = "kopatz";
mainUser.sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeP6qtVqE/gu72ZUZE8cdRi3INiUW9NqDR7SjXIzTw2 kopatz";
environment.sessionVariables = {