Compare commits
4 commits
9e638c009f
...
b18e50fd4a
Author | SHA1 | Date | |
---|---|---|---|
|
b18e50fd4a | ||
|
cb6d7f7837 | ||
|
a2cb35148c | ||
|
c5261caa21 |
|
@ -14,5 +14,11 @@ in
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
|
services.libinput.enable = true;
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
corefonts
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
# used for nix config
|
# used for nix config
|
||||||
colmena
|
colmena
|
||||||
agenix
|
agenix
|
||||||
|
rc2nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.wordlist.enable = true;
|
environment.wordlist.enable = true;
|
||||||
|
|
26
flake.lock
26
flake.lock
|
@ -112,13 +112,37 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plasma-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": [
|
||||||
|
"home-manager"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725914634,
|
||||||
|
"narHash": "sha256-U74hu15xSb6JNySMOwyJrsh4uk1DVa182bdHLeHdYMc=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "plasma-manager",
|
||||||
|
"rev": "60becd0e994e25b372c8d0500fc944396f6c1085",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "plasma-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"birdsong": "birdsong",
|
"birdsong": "birdsong",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nur": "nur"
|
"nur": "nur",
|
||||||
|
"plasma-manager": "plasma-manager"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -7,6 +7,12 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plasma-manager = {
|
||||||
|
url = "github:nix-community/plasma-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.home-manager.follows = "home-manager";
|
||||||
|
};
|
||||||
|
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
|
|
||||||
agenix = {
|
agenix = {
|
||||||
|
@ -20,7 +26,7 @@
|
||||||
birdsong.url = "git+https://git.qenya.tel/qenya/birdsong?ref=main";
|
birdsong.url = "git+https://git.qenya.tel/qenya/birdsong?ref=main";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, home-manager, nur, agenix, birdsong, ... }: {
|
outputs = inputs@{ self, nixpkgs, home-manager, plasma-manager, nur, agenix, birdsong, ... }: {
|
||||||
colmena = {
|
colmena = {
|
||||||
meta = {
|
meta = {
|
||||||
nixpkgs = import nixpkgs { system = "x86_64-linux"; };
|
nixpkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||||
|
@ -38,12 +44,14 @@
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
agenix = inputs.agenix.packages.${config.nixpkgs.hostPlatform.system}.default;
|
agenix = inputs.agenix.packages.${config.nixpkgs.hostPlatform.system}.default;
|
||||||
|
rc2nix = inputs.plasma-manager.packages.${config.nixpkgs.hostPlatform.system}.rc2nix;
|
||||||
};
|
};
|
||||||
nixpkgs.overlays = [ inputs.nur.overlay ];
|
nixpkgs.overlays = [ inputs.nur.overlay ];
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./dconf
|
./dconf
|
||||||
|
./plasma
|
||||||
./cli.nix
|
./cli.nix
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
|
|
|
@ -45,6 +45,10 @@
|
||||||
|
|
||||||
"dom.private-attribution.submission.enabled" = false; # disable "Privacy-Preserving Attribution for Advertising"
|
"dom.private-attribution.submission.enabled" = false; # disable "Privacy-Preserving Attribution for Advertising"
|
||||||
"extensions.autoDisableScopes" = 0; # automatically enable extensions installed through nix
|
"extensions.autoDisableScopes" = 0; # automatically enable extensions installed through nix
|
||||||
|
|
||||||
|
# external password manager
|
||||||
|
"signon.rememberSignons" = false;
|
||||||
|
"extensions.formautofill.creditCards.enabled" = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
11
home/qenya/plasma/default.nix
Normal file
11
home/qenya/plasma/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, lib, pkgs, osConfig, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
isPlasma = osConfig.services.desktopManager.plasma6.enable || osConfig.services.xserver.desktopManager.plasma5.enable;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.plasma.enable = isPlasma;
|
||||||
|
programs.plasma.overrideConfig = true;
|
||||||
|
|
||||||
|
imports = [ ];
|
||||||
|
}
|
|
@ -24,7 +24,7 @@
|
||||||
console.keyMap = "uk";
|
console.keyMap = "uk";
|
||||||
services.xserver.xkb.layout = "gb";
|
services.xserver.xkb.layout = "gb";
|
||||||
|
|
||||||
services.printing.enable = true;
|
qenya.services.pipewire.lowLatency.enable = true;
|
||||||
|
|
||||||
age.secrets.user-password-kilgharrah-qenya.file = ../../secrets/user-password-kilgharrah-qenya.age;
|
age.secrets.user-password-kilgharrah-qenya.file = ../../secrets/user-password-kilgharrah-qenya.age;
|
||||||
users.users.qenya.hashedPasswordFile = config.age.secrets.user-password-kilgharrah-qenya.path;
|
users.users.qenya.hashedPasswordFile = config.age.secrets.user-password-kilgharrah-qenya.path;
|
||||||
|
|
|
@ -25,8 +25,6 @@
|
||||||
console.keyMap = "uk";
|
console.keyMap = "uk";
|
||||||
services.xserver.xkb.layout = "gb";
|
services.xserver.xkb.layout = "gb";
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
age.secrets.user-password-tohru-qenya.file = ../../secrets/user-password-tohru-qenya.age;
|
age.secrets.user-password-tohru-qenya.file = ../../secrets/user-password-tohru-qenya.age;
|
||||||
users.users.qenya.hashedPasswordFile = config.age.secrets.user-password-tohru-qenya.path;
|
users.users.qenya.hashedPasswordFile = config.age.secrets.user-password-tohru-qenya.path;
|
||||||
users.users.qenya.extraGroups = [
|
users.users.qenya.extraGroups = [
|
||||||
|
@ -38,7 +36,6 @@
|
||||||
|
|
||||||
programs.evolution.enable = true; # not in home-manager yet; not declaratively configurable yet
|
programs.evolution.enable = true; # not in home-manager yet; not declaratively configurable yet
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
qenya.services.fonts.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./fonts.nix
|
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
|
./pipewire-low-latency.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -1,17 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.qenya.services.fonts;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.qenya.services.fonts = {
|
|
||||||
enable = mkEnableOption "Fonts";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
corefonts
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
58
services/pipewire-low-latency.nix
Normal file
58
services/pipewire-low-latency.nix
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkEnableOption;
|
||||||
|
cfg = config.qenya.services.pipewire.lowLatency;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.qenya.services.pipewire.lowLatency = {
|
||||||
|
enable = mkEnableOption "config to decrease sound latency (increasing CPU load) for e.g. streaming";
|
||||||
|
# TODO: might be an idea to have the numbers be configurable
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# TODO: needs more testing
|
||||||
|
services.pipewire.extraConfig = {
|
||||||
|
pipewire."92-low-latency" = {
|
||||||
|
context.properties = {
|
||||||
|
default.clock.rate = 48000;
|
||||||
|
default.clock.quantum = 32;
|
||||||
|
default.clock.min-quantum = 32;
|
||||||
|
default.clock.max-quantum = 32;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Available from NixOS 24.11. Lifted from https://nixos.wiki/wiki/PipeWire - probably need to adjust numbers
|
||||||
|
# services.pipewire.wireplumber.extraLuaConfig.main."99-alsa-lowlatency" = ''
|
||||||
|
# alsa_monitor.rules = {
|
||||||
|
# {
|
||||||
|
# matches = {{{ "node.name", "matches", "alsa_output.*" }}};
|
||||||
|
# apply_properties = {
|
||||||
|
# ["audio.format"] = "S32LE",
|
||||||
|
# ["audio.rate"] = "96000", -- for USB soundcards it should be twice your desired rate
|
||||||
|
# ["api.alsa.period-size"] = 2, -- defaults to 1024, tweak by trial-and-error
|
||||||
|
# -- ["api.alsa.disable-batch"] = true, -- generally, USB soundcards use the batch mode
|
||||||
|
# },
|
||||||
|
# },
|
||||||
|
# }
|
||||||
|
# '';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue