misc fixes

This commit is contained in:
chayleaf 2024-11-01 01:26:11 +07:00
parent 6d8e1d85ac
commit ff839c3153
Signed by: chayleaf
GPG key ID: 78171AD46227E68E
5 changed files with 22 additions and 19 deletions

View file

@ -46,10 +46,10 @@
ublock-origin
unpaywall
vimium-c
yomitan
youtube-shorts-block
]) ++ (with pkgs.firefoxAddons; [
fastforwardteam
rikaitan
youtube-nonstop
]);
search.default = "search.pavluk.org";

View file

@ -473,7 +473,7 @@
vimdiffAlias = true;
extraConfigLua = compile "main" (
builtins.concatLists (map (x: if x?plugin && x?config then lib.toList x.config else [ ]) plugins) ++ [
builtins.concatLists (map (x: lib.toList (x.config or [ ])) plugins) ++ [
(kmSetNs {
"<C-X>" = {
rhs = DEFUN (vim.fn.system [ "chmod" "+x" (vim.fn.expand "%") ]);

View file

@ -19,7 +19,7 @@ def main():
addr = opts["addresses"][cfg]
build_host = opts["build_host"].get(cfg)
act = args[2]
assert act in ["boot", "switch", "test"]
assert act in ["boot", "switch", "test", "build"]
args = args[3:]
args.extend(
[
@ -66,6 +66,8 @@ def main():
ret = json.loads(ret.stdout)[0]["outputs"]["out"]
print('output', ret)
cmds = []
if act in ["build"]:
return
if act in ["boot", "switch"]:
cmds.append(["nix-env", "-p", "/nix/var/nix/profiles/system", "--set", ret])
cmds.append(

View file

@ -129,7 +129,7 @@
services.printing.drivers = [ pkgs.hplip ];
# from nix-gaming
services.pipewire.lowLatency = {
enable = false;
enable = true;
# 96 is mostly fine but has some xruns
# 128 has xruns every now and then too
quantum = 128;

View file

@ -124,6 +124,22 @@ in {
# nixos-hardware uses mkDefault here, so we use slightly higher priority
services.libinput.enable = mkForceDefault (!cfg.minimal);
programs.fuse.userAllowOther = true;
# registry is used for the new flaky nix command
nix.registry =
builtins.mapAttrs
(_: v: { flake = v; })
(lib.filterAttrs (k: v: (k != "self" || !cfg.minimal) && v?outputs) inputs);
# add import'able flake inputs (like nixpkgs) to nix path
# nix path is used for old nix commands (like nix-build, nix-shell)
environment.etc = lib.mapAttrs'
(name: value: {
name = "nix/inputs/${name}";
value.source = value.outPath or "${value}";
})
(lib.filterAttrs (k: v: (k != "self" || !cfg.minimal) && builtins.pathExists "${v}/default.nix") inputs);
}
(lib.mkIf cfg.gettyAutologin {
@ -183,21 +199,6 @@ in {
})
(lib.mkIf (!cfg.minimal) {
# registry is used for the new flaky nix command
nix.registry =
builtins.mapAttrs
(_: v: { flake = v; })
(lib.filterAttrs (_: v: v?outputs) inputs);
# add import'able flake inputs (like nixpkgs) to nix path
# nix path is used for old nix commands (like nix-build, nix-shell)
environment.etc = lib.mapAttrs'
(name: value: {
name = "nix/inputs/${name}";
value.source = value.outPath or "${value}";
})
(lib.filterAttrs (_: v: builtins.pathExists "${v}/default.nix") inputs);
nix.nixPath = [ "/etc/nix/inputs" ];
hardware.pulseaudio.enable = false;
services.pipewire = {