This commit is contained in:
steveej 2023-11-23 17:52:21 +01:00
parent 563ffc4022
commit 93d6e2e39a
19 changed files with 185 additions and 188 deletions

View file

@ -9,7 +9,7 @@
... ...
}: let }: let
# pkgsMaster = nodeFlake.inputs.nixpkgs-master.legacyPackages.${pkgs.system}; # pkgsMaster = nodeFlake.inputs.nixpkgs-master.legacyPackages.${pkgs.system};
pkgsUnstableSmall = import nodeFlake.inputs.nixpkgs-unstable-small { inherit (pkgs) system config; }; pkgsUnstableSmall = import nodeFlake.inputs.nixpkgs-unstable-small {inherit (pkgs) system config;};
pkgs2211 = nodeFlake.inputs.nixpkgs-2211.legacyPackages.${pkgs.system}; pkgs2211 = nodeFlake.inputs.nixpkgs-2211.legacyPackages.${pkgs.system};
in { in {
imports = [ imports = [
@ -300,7 +300,7 @@ in {
# shotcut # shotcut
# openshot-qt # openshot-qt
# introduces python: screenkey # introduces python: screenkey
# avidemux # broken # avidemux # broken
handbrake handbrake

View file

@ -4,7 +4,7 @@
../programs/neovim.nix ../programs/neovim.nix
# ../programs/zsh.nix # ../programs/zsh.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
iperf3 iperf3
inetutils inetutils

View file

@ -9,7 +9,7 @@
pkgsUnstable = pkgs.callPackage nodeFlake.inputs.nixpkgs-unstable.outPath {}; pkgsUnstable = pkgs.callPackage nodeFlake.inputs.nixpkgs-unstable.outPath {};
in { in {
imports = [ imports = [
../profiles/wayland-desktop.nix ../profiles/wayland-desktop.nix
]; ];
home.packages = [ home.packages = [

View file

@ -6,7 +6,7 @@
}: let }: let
in { in {
imports = [ imports = [
../profiles/wayland-desktop.nix ../profiles/wayland-desktop.nix
]; ];
services = { services = {
@ -68,11 +68,12 @@ in {
# disable the builtin <Super>[1-9] functionality # disable the builtin <Super>[1-9] functionality
"org/gnome/shell/keybindings" = builtins.listToAttrs ((builtins.genList "org/gnome/shell/keybindings" = builtins.listToAttrs ((builtins.genList
(i: { (i: {
name = "switch-to-application-${toString (i + 1)}"; name = "switch-to-application-${toString (i + 1)}";
value = []; value = [];
}) })
numWorkspaces) ++ [ numWorkspaces)
++ [
{ {
name = "toggle-overview"; name = "toggle-overview";
value = []; value = [];

View file

@ -31,7 +31,7 @@ in {
# TODO: doesn't work with 2 screens # TODO: doesn't work with 2 screens
# flameshot.enable = true; # flameshot.enable = true;
}; };
services.dunst = { services.dunst = {
enable = true; enable = true;
}; };

View file

@ -3,47 +3,46 @@
lib, lib,
... ...
}: let }: let
extensions = extensions =
[ [
#undetectable adblocker #undetectable adblocker
{id = "gcfcpohokifjldeandkfjoboemihipmb";} {id = "gcfcpohokifjldeandkfjoboemihipmb";}
# ublock origin # ublock origin
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} {id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";}
# # YT ad block # # YT ad block
# {id = "cmedhionkhpnakcndndgjdbohmhepckk";} # {id = "cmedhionkhpnakcndndgjdbohmhepckk";}
# # Adblock Plus # # Adblock Plus
# {id = "cfhdojbkjhnklbpkdaibdccddilifddb";} # {id = "cfhdojbkjhnklbpkdaibdccddilifddb";}
# Cookie Notice Blocker # Cookie Notice Blocker
{id = "odhmfmnoejhihkmfebnolljiibpnednn";} {id = "odhmfmnoejhihkmfebnolljiibpnednn";}
# i don't care about cookies # i don't care about cookies
{id = "fihnjjcciajhdojfnbdddfaoknhalnja";} {id = "fihnjjcciajhdojfnbdddfaoknhalnja";}
# NopeCHA # NopeCHA
{id = "dknlfmjaanfblgfdfebhijalfmhmjjjo";} {id = "dknlfmjaanfblgfdfebhijalfmhmjjjo";}
# h264ify # h264ify
{id = "aleakchihdccplidncghkekgioiakgal";} {id = "aleakchihdccplidncghkekgioiakgal";}
# clippy # clippy
# {id = "honbeilkanbghjimjoniipnnehlmhggk"} # {id = "honbeilkanbghjimjoniipnnehlmhggk"}
{ {
id = "dcpihecpambacapedldabdbpakmachpb"; id = "dcpihecpambacapedldabdbpakmachpb";
updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml"; updateUrl = "https://raw.githubusercontent.com/iamadamdev/bypass-paywalls-chrome/master/updates.xml";
} }
# cookie autodelete
{id = "fhcgjolkccmbidfldomjliifgaodjagh";}
]
++ (lib.lists.optionals ((builtins.match "^steveej.*" name) != null) [
# Vimium C
{id = "hfjbmagddngcpeloejdejnfgbamkjaeg";}
]);
# cookie autodelete
{id = "fhcgjolkccmbidfldomjliifgaodjagh";}
]
++ (lib.lists.optionals ((builtins.match "^steveej.*" name) != null) [
# Vimium C
{id = "hfjbmagddngcpeloejdejnfgbamkjaeg";}
]);
in { in {
programs.chromium = { programs.chromium = {
enable = true; enable = true;

View file

@ -1,70 +1,68 @@
{ {pkgs, ...}: {
pkgs,
...
}: {
services.espanso = { services.espanso = {
# package = pkgs.espanso.overrideAttrs(_: { # package = pkgs.espanso.overrideAttrs(_: {
# # src = # # src =
# }) # })
enable = true; enable = true;
configs = { configs = {
default = { default = {
# backend = "Inject"; # backend = "Inject";
# backend = "Clipboard"; # backend = "Clipboard";
};
}; };
matches = let };
playerctl = '' matches = let
${pkgs.coreutils}/bin/env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(${pkgs.coreutils}/bin/id -u)/bus" ${pkgs.playerctl}/bin/playerctl''; playerctl = ''
in { ${pkgs.coreutils}/bin/env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(${pkgs.coreutils}/bin/id -u)/bus" ${pkgs.playerctl}/bin/playerctl'';
default = { matches = [ in {
{ default = {
trigger = ":vpos"; matches = [
replace = "{{output}}"; {
vars = [ trigger = ":vpos";
{ replace = "{{output}}";
name = "output"; vars = [
type = "script"; {
params = { name = "output";
args = [ type = "script";
(pkgs.writeScript "espanso" '' params = {
#! ${pkgs.python3}/bin/python args = [
import subprocess, os, math, datetime (pkgs.writeScript "espanso" ''
#! ${pkgs.python3}/bin/python
import subprocess, os, math, datetime
id=str(os.getuid()) id=str(os.getuid())
result=subprocess.run(args=["${pkgs.playerctl}/bin/playerctl", "position"], env={"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/"+id+"/bus"},capture_output=True) result=subprocess.run(args=["${pkgs.playerctl}/bin/playerctl", "position"], env={"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/"+id+"/bus"},capture_output=True)
result.check_returncode() result.check_returncode()
position_secs = math.trunc(float(result.stdout)) position_secs = math.trunc(float(result.stdout))
position_human = datetime.timedelta(seconds=position_secs) position_human = datetime.timedelta(seconds=position_secs)
print("%s - %s" % (position_human, position_secs)) print("%s - %s" % (position_human, position_secs))
'') '')
]; ];
}; };
} }
]; ];
} }
{ {
trigger = ":vtit"; trigger = ":vtit";
replace = "{{output}}"; replace = "{{output}}";
vars = [ vars = [
{ {
name = "output"; name = "output";
type = "script"; type = "script";
params = { params = {
args = [ args = [
(pkgs.writeShellScript "espanso" (pkgs.writeShellScript "espanso"
"${playerctl} metadata title") "${playerctl} metadata title")
]; ];
}; };
} }
]; ];
} }
{ {
trigger = ":dunno"; trigger = ":dunno";
replace = "¯\\_()_/¯"; replace = "¯\\_()_/¯";
} }
]; ];
}; };
}; };
}; };

View file

@ -1,11 +1,20 @@
{lib, pkgs, config, ...}: { {
home.packages = [ lib,
pkgs.gcr pkgs,
] ++ config,
(if config.services.gpg-agent.pinentryFlavor == "gtk2" then [pkgs.pinentry-gtk2] ...
else if config.services.gpg-agent.pinentryFlavor == "gnome3" then [pkgs.pinentry-gnome] }: {
else []) home.packages =
; [
pkgs.gcr
]
++ (
if config.services.gpg-agent.pinentryFlavor == "gtk2"
then [pkgs.pinentry-gtk2]
else if config.services.gpg-agent.pinentryFlavor == "gnome3"
then [pkgs.pinentry-gnome]
else []
);
programs.gpg.enable = true; programs.gpg.enable = true;
services.gpg-agent = { services.gpg-agent = {

View file

@ -6,12 +6,12 @@
programs.browserpass.enable = true; programs.browserpass.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
gnupg gnupg
pass pass
# broken on wayland # broken on wayland
# rofi-pass # rofi-pass
prs prs
]; ];
} }

View file

@ -7,11 +7,9 @@
}: }:
# useful testing command: # useful testing command:
# for i in `seq 0 10`; do nix shell nixpkgs#libnotify --command notify-send notifiiiiiii "$i"; sleep 1; done # for i in `seq 0 10`; do nix shell nixpkgs#libnotify --command notify-send notifiiiiiii "$i"; sleep 1; done
let let
inherit (import ../lib.nix {}) mkSimpleTrayService; inherit (import ../lib.nix {}) mkSimpleTrayService;
in in {
{
home.packages = [ home.packages = [
packages'.salut packages'.salut
]; ];

View file

@ -1,8 +1,9 @@
# WARN: this file will get overwritten by $ cachix use <name> # WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }: {
pkgs,
let lib,
...
}: let
folder = ./cachix; folder = ./cachix;
toImport = name: value: folder + ("/" + name); toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key; filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
@ -11,4 +12,3 @@ in {
inherit imports; inherit imports;
nix.settings.substituters = ["https://cache.nixos.org/"]; nix.settings.substituters = ["https://cache.nixos.org/"];
} }

View file

@ -1,4 +1,3 @@
{ {
nix = { nix = {
settings.substituters = [ settings.substituters = [
@ -9,4 +8,3 @@
]; ];
}; };
} }

View file

@ -9,8 +9,7 @@
nodeName, nodeName,
system, system,
... ...
}: let }: {
in {
disabledModules = [ disabledModules = [
# "services/networking/hostapd.nix" # "services/networking/hostapd.nix"
]; ];
@ -34,11 +33,11 @@ in {
}; };
} }
]; ];
nix.nixPath = [ nix.nixPath = [
"nixpkgs=${pkgs.path}" "nixpkgs=${pkgs.path}"
]; ];
nix.registry = { nix.registry = {
nixpkgs.to = { nixpkgs.to = {
type = "path"; type = "path";
@ -46,7 +45,7 @@ in {
}; };
}; };
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = ["nix-command" "flakes"];
boot = { boot = {
kernel = { kernel = {
@ -131,8 +130,7 @@ in {
environment.systemPackages = [ environment.systemPackages = [
pkgs.hdparm pkgs.hdparm
]; ];
# home-manager.users.steveej = _: { # home-manager.users.steveej = _: {
# imports = [ # imports = [
# ../../../home-manager/configuration/text-minimal.nix # ../../../home-manager/configuration/text-minimal.nix

View file

@ -24,40 +24,40 @@ in {
CPU_SCALING_GOVERNOR_ON_BAT = "schedutil"; CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
# CPU_ENERGY_PERF_POLICY_ON_AC="balance_power"; # CPU_ENERGY_PERF_POLICY_ON_AC="balance_power";
CPU_ENERGY_PERF_POLICY_ON_BAT="power"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
# SCHED_POWERSAVE_ON_AC="1"; # SCHED_POWERSAVE_ON_AC="1";
SCHED_POWERSAVE_ON_BAT="1"; SCHED_POWERSAVE_ON_BAT = "1";
CPU_BOOST_ON_AC="0"; CPU_BOOST_ON_AC = "0";
CPU_BOOST_ON_BAT="0"; CPU_BOOST_ON_BAT = "0";
# RADEON_DPM_PERF_LEVEL_ON_AC="auto"; # RADEON_DPM_PERF_LEVEL_ON_AC="auto";
RADEON_DPM_PERF_LEVEL_ON_BAT="low"; RADEON_DPM_PERF_LEVEL_ON_BAT = "low";
# RADEON_DPM_STATE_ON_AC="balanced"; # RADEON_DPM_STATE_ON_AC="balanced";
RADEON_DPM_STATE_ON_BAT="battery"; RADEON_DPM_STATE_ON_BAT = "battery";
# SOUND_POWER_SAVE_ON_AC="1"; # SOUND_POWER_SAVE_ON_AC="1";
SOUND_POWER_SAVE_ON_BAT="1"; SOUND_POWER_SAVE_ON_BAT = "1";
# # PLATFORM_PROFILE_ON_AC="low-power"; # # PLATFORM_PROFILE_ON_AC="low-power";
# # PLATFORM_PROFILE_ON_BAT="low-power"; # # PLATFORM_PROFILE_ON_BAT="low-power";
# PLATFORM_PROFILE_ON_AC="balanced"; # PLATFORM_PROFILE_ON_AC="balanced";
PLATFORM_PROFILE_ON_BAT="low-power"; PLATFORM_PROFILE_ON_BAT = "low-power";
# RUNTIME_PM_ON_AC = "auto"; # RUNTIME_PM_ON_AC = "auto";
RUNTIME_PM_ON_BAT = "auto"; RUNTIME_PM_ON_BAT = "auto";
# PCIE_ASPM_ON_AC="default"; # PCIE_ASPM_ON_AC="default";
PCIE_ASPM_ON_BAT="powersave"; PCIE_ASPM_ON_BAT = "powersave";
START_CHARGE_THRESH_BAT0 = "75"; START_CHARGE_THRESH_BAT0 = "75";
STOP_CHARGE_THRESH_BAT0 = "80"; STOP_CHARGE_THRESH_BAT0 = "80";
WOL_DISABLE="Y"; WOL_DISABLE = "Y";
# WIFI_PWR_ON_AC="on"; # WIFI_PWR_ON_AC="on";
WIFI_PWR_ON_BAT="on"; WIFI_PWR_ON_BAT = "on";
DEVICES_TO_DISABLE_ON_STARTUP="wwan"; DEVICES_TO_DISABLE_ON_STARTUP = "wwan";
# #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"; # #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan";
# #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"; # #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan";
# #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"; # #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi";
@ -67,20 +67,19 @@ in {
services.thinkfan = { services.thinkfan = {
enable = true; enable = true;
levels = [ levels = [
[0 0 55] [0 0 55]
[1 55 65] [1 55 65]
[1 65 75] [1 65 75]
[2 75 78] [2 75 78]
[3 78 80] [3 78 80]
[4 80 82] [4 80 82]
[5 82 84] [5 82 84]
[6 84 86] [6 84 86]
[7 86 88] [7 86 88]
["level full-speed" 88 999] ["level full-speed" 88 999]
]; ];
}; };
# boot.initrd.availableKernelModules = stage1Modules; # boot.initrd.availableKernelModules = stage1Modules;
boot.initrd.kernelModules = stage1Modules; boot.initrd.kernelModules = stage1Modules;
} }

View file

@ -100,8 +100,7 @@ in {
enable = true; enable = true;
package = lib.mkForce pkgs.gnome3.gvfs; package = lib.mkForce pkgs.gnome3.gvfs;
}; };
environment.systemPackages = with pkgs; [ lxqt.lxqt-policykit ]; # provides a default authentification client for policykit environment.systemPackages = with pkgs; [lxqt.lxqt-policykit]; # provides a default authentification client for policykit
security.pki.certificateFiles = ["${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"]; security.pki.certificateFiles = ["${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"];

View file

@ -36,7 +36,6 @@
}; };
}; };
# gnome, most of it is disabled and ideally it could live entirely in the user's home config # gnome, most of it is disabled and ideally it could live entirely in the user's home config
programs.gpaste.enable = false; programs.gpaste.enable = false;
programs.gnome-terminal.enable = false; programs.gnome-terminal.enable = false;

View file

@ -18,7 +18,6 @@
services.resolved.enable = true; services.resolved.enable = true;
# hardware related services # hardware related services
services.illum.enable = true; services.illum.enable = true;
services.pcscd.enable = true; services.pcscd.enable = true;

View file

@ -1,13 +1,13 @@
{ lib {
, src lib,
, rustPlatform src,
, libinput rustPlatform,
, libxkbcommon libinput,
, mesa libxkbcommon,
, pango mesa,
, udev pango,
udev,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "jay"; pname = "jay";
version = src.rev; version = src.rev;
@ -30,7 +30,7 @@ rustPlatform.buildRustPackage rec {
description = "A Wayland compositor written in Rust"; description = "A Wayland compositor written in Rust";
homepage = "https://github.com/mahkoh/jay"; homepage = "https://github.com/mahkoh/jay";
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ dit7ya ]; maintainers = with maintainers; [dit7ya];
}; };
} }

View file

@ -1,20 +1,20 @@
{ lib {
, src lib,
, craneLib src,
craneLib,
, pkg-config pkg-config,
, wayland wayland,
, libseat libseat,
, libinput libinput,
, libxkbcommon libxkbcommon,
, mesa mesa,
, pango pango,
, udev udev,
, dbus dbus,
, libGL libGL,
}: }:
craneLib.buildPackage {
craneLib.buildPackage {inherit src; inherit src;
pname = "magmawm"; pname = "magmawm";
version = src.rev; version = src.rev;
@ -44,7 +44,7 @@ craneLib.buildPackage {inherit src;
description = "A versatile and customizable Window Manager and Wayland Compositor"; description = "A versatile and customizable Window Manager and Wayland Compositor";
homepage = "https://github.com/MagmaWM/MagmaWM"; homepage = "https://github.com/MagmaWM/MagmaWM";
license = licenses.gpl3; license = licenses.gpl3;
platforms = platforms.linux; platforms = platforms.linux;
maintainers = with maintainers; [ ]; maintainers = with maintainers; [];
}; };
} }