.
This commit is contained in:
parent
6eade157b3
commit
7e402167b4
8 changed files with 32 additions and 46 deletions
|
@ -10,6 +10,7 @@ in
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
(mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
|
(mkAliasOptionModule ["hm"] ["home-manager" "users" config.user.name])
|
||||||
|
(mkAliasOptionModule ["home"] ["hm" "home"])
|
||||||
]
|
]
|
||||||
++ (mapModulesRec' (toString ./modules) import);
|
++ (mapModulesRec' (toString ./modules) import);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib.modules) mkDefault;
|
inherit (lib.modules) mkDefault;
|
||||||
inherir (lib.attrsets) attrValues;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
@ -29,10 +28,10 @@ in
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
power-profiles-deamon-enable = false;
|
power-profiles-deamon-enable = false;
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib.modules) mkDefault;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
@ -23,10 +26,10 @@
|
||||||
extraModulePackages = [ ];
|
extraModulePackages = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
power-profiles-deamon-enable = false;
|
power-profiles-deamon-enable = false;
|
||||||
|
|
17
modules/desktop/default.nix
Normal file
17
modules/desktop/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (builtins) isAttrs;
|
||||||
|
inherit (lib.attrsets) attrValues;
|
||||||
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.my) anyAttrs countAttrs value;
|
||||||
|
|
||||||
|
cfg = config.modules.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.desktop = let
|
||||||
|
inherit (lib.types) either str;
|
||||||
|
inherit (lib.my) mkOpt;
|
||||||
|
in {
|
||||||
|
type = mkOpt (either str null) null;
|
||||||
|
};
|
||||||
|
}
|
|
@ -17,12 +17,9 @@ in
|
||||||
|
|
||||||
kaas = {
|
kaas = {
|
||||||
dir = mkOpt path (findFirst pathExists (toString ../.) [
|
dir = mkOpt path (findFirst pathExists (toString ../.) [
|
||||||
"${config.user.home}/Workspace/public/kaas"
|
"${config.user.home}/Github/.files"
|
||||||
"/etc/kaas"
|
|
||||||
]);
|
]);
|
||||||
homeDir = mkOpt path "${config.kaas.dir}/hosts/${config.networking.hostName}";
|
hostDir = mkOpt path "${config.kaas.dir}/hosts/${config.networking.hostName}";
|
||||||
binDir = mkOpt path "${config.kaas.dir}/bin";
|
|
||||||
configDir = mkOpt path "${config.kaas.dir}/config";
|
|
||||||
modulesDir = mkOpt path "${config.kaas.dir}/modules";
|
modulesDir = mkOpt path "${config.kaas.dir}/modules";
|
||||||
themesDir = mkOpt path "${config.kaas.modulesDir}/themes";
|
themesDir = mkOpt path "${config.kaas.modulesDir}/themes";
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,7 +21,7 @@ in
|
||||||
# Prevent x11 askPass prompt on git push:
|
# Prevent x11 askPass prompt on git push:
|
||||||
programs.ssh.askPassword = "";
|
programs.ssh.askPassword = "";
|
||||||
|
|
||||||
home.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)";
|
environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)";
|
||||||
|
|
||||||
hm.programs = {
|
hm.programs = {
|
||||||
zsh.initExtra = ''
|
zsh.initExtra = ''
|
||||||
|
|
|
@ -31,36 +31,5 @@ in
|
||||||
support32Bit = true;
|
support32Bit = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.configFile = mkIf config.modules.hardware.bluetooth.enable {
|
|
||||||
wireplumber-bluetooth = {
|
|
||||||
target = "wireplumber/bluetooth.lua.d/51-bluez-config.lua";
|
|
||||||
text = ''
|
|
||||||
bluez_monitor.properties = {
|
|
||||||
["bluez5.enable-sbc-xq"] = true,
|
|
||||||
["bluez5.enable-msbc"] = true,
|
|
||||||
["bluez5.enable-hw-volume"] = true,
|
|
||||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
wireplumber-disable-suspension = {
|
|
||||||
target = "wireplumber/main.lua.d/51-disable-suspension.lua";
|
|
||||||
text = ''
|
|
||||||
table.insert(alsa_monitor.rules, {
|
|
||||||
matches = {
|
|
||||||
{ -- Matches all sources.
|
|
||||||
{ "node.name", "matches", "alsa_input.*" },
|
|
||||||
},
|
|
||||||
{ -- Matches all sinks.
|
|
||||||
{ "node.name", "matches", "alsa_output.*" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
apply_properties = { ["session.suspend-timeout-seconds"] = 0 },
|
|
||||||
})
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
configurationLimit = 50;
|
configurationLimit = 50;
|
||||||
};
|
};
|
||||||
|
|
||||||
kernalModules = [ "tcp_bbr" ];
|
kernelModules = [ "tcp_bbr" ];
|
||||||
kernal.sysctl = {
|
kernel.sysctl = {
|
||||||
## TCP hardening
|
## TCP hardening
|
||||||
# Prevent bogus ICMP errors from filling up logs.
|
# Prevent bogus ICMP errors from filling up logs.
|
||||||
"net.ipv4.icmp_ignore_bogus_error_responses" = 1;
|
"net.ipv4.icmp_ignore_bogus_error_responses" = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue