Compare commits

...

4 Commits

Author SHA1 Message Date
d6db686273 disko: add autodefrag mount optiton
Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-05-11 17:44:48 +03:00
4e2702dfd1 editor/helix: add config for fsharp
Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-05-11 17:44:48 +03:00
487a413bca desktop/niri: change struts
Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-05-11 17:44:48 +03:00
34fe54974c move power saving and home row mods to module
cleanup

Signed-off-by: unexplrd <unexplrd@linerds.us>
2025-05-11 17:44:48 +03:00
24 changed files with 71 additions and 322 deletions

View File

@ -35,6 +35,7 @@
"@nixos-root" = {
mountpoint = "/";
mountOptions = [
"autodefrag"
"compress=zstd"
"noatime"
"noexec"
@ -43,6 +44,7 @@
"@home" = {
mountpoint = "/home";
mountOptions = [
"autodefrag"
"compress=zstd"
"noatime"
];
@ -50,6 +52,7 @@
"@storage" = {
mountpoint = "/storage";
mountOptions = [
"autodefrag"
"compress=zstd"
"noatime"
];
@ -57,6 +60,7 @@
"@nix" = {
mountpoint = "/nix";
mountOptions = [
"autodefrag"
"compress-force=zstd"
"noatime"
];

View File

@ -21,6 +21,8 @@
module = {
config = {
laptop.homeRowMods = true;
powerSave = true;
secureBoot = true;
useIwd = true;
vaapi = "intel-media-driver";

View File

@ -2,8 +2,6 @@
imports = [
./cb-audio-fix.nix
./cb-keyboard.nix
./home-row-mods.nix
./power-saving.nix
./touchscreen-fix.nix
];
}

View File

@ -1,20 +0,0 @@
{
services.keyd = {
enable = true;
keyboards = {
default = {
ids = ["0001:0001"];
settings.main = {
a = "lettermod(alt, a, 200, 150)";
s = "lettermod(meta, s, 200, 150)";
d = "lettermod(control, d, 200, 150)";
f = "lettermod(shift, f, 200, 150)";
j = "lettermod(shift, j, 200, 150)";
k = "lettermod(control, k, 200, 150)";
l = "lettermod(meta, l, 200, 150)";
";" = "lettermod(alt, ;, 200, 150)";
};
};
};
};
}

View File

@ -1,7 +0,0 @@
{
powerManagement.enable = true;
powerManagement.powertop.enable = true;
services.power-profiles-daemon.enable = true;
services.thermald.enable = true;
services.upower.enable = true;
}

View File

@ -1,100 +0,0 @@
{inputs, ...}: {
imports = with inputs; [
nix-flatpak.homeManagerModules.nix-flatpak
];
services.flatpak = {
enable = true;
uninstallUnmanaged = true;
remotes = [
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
}
{
name = "hero-persson";
location = "https://hero-persson.github.io/unmojang-flatpak/index.flatpakrepo";
}
];
packages = [
# misc
"app.zen_browser.zen"
"net.mullvad.MullvadBrowser"
"com.obsproject.Studio"
"com.bitwarden.desktop"
"com.github.tchx84.Flatseal"
"de.haeckerfelix.Fragments"
"org.qbittorrent.qBittorrent"
# "com.transmissionbt.Transmission"
"com.usebottles.bottles"
"com.logseq.Logseq"
# chatting
"org.signal.Signal"
"im.riot.Riot"
"org.telegram.desktop"
"io.github.kukuruzka165.materialgram"
"io.github.spacingbat3.webcord"
"org.mozilla.Thunderbird"
# media
"io.bassi.Amberol"
"io.freetubeapp.FreeTube"
#"io.github.celluloid_player.Celluloid"
# "io.mpv.Mpv"
# gaming
#"com.github._0negal.Viper"
"net.lutris.Lutris"
"com.heroicgameslauncher.hgl"
{
appId = "org.unmojang.FjordLauncher";
origin = "hero-persson";
}
"org.freedesktop.Platform.VulkanLayer.MangoHud//24.08"
"org.freedesktop.Platform.VulkanLayer.gamescope//24.08"
];
overrides = {
"global" = {
# Force Wayland by default
Context = {
sockets = ["wayland" "!x11" "!fallback-x11"];
filesystems = [
"!host"
"!home"
"!~/.ssh"
"xdg-run/pipewire-0"
"xdg-config/gtk-3.0:ro"
"xdg-config/gtk-4.0:ro"
"~/.local/share/icons:ro"
"/nix/store:ro"
];
};
Environment = {
ELECTRON_OZONE_PLATFORM_HINT = "wayland";
};
};
"com.valvesoftware.Steam" = {
Context = {
sockets = ["x11" "wayland"];
filesystems = ["/storage/games/steam"];
};
Environment.STEAM_FORCE_DESKTOPUI_SCALING = "1.3";
};
"org.signal.Signal" = {
Environment.SIGNAL_PASSWORD_STORE = "gnome-libsecret";
};
"net.lutris.Lutris".Context = {
sockets = ["x11" "wayland"];
filesystems = ["/storage/games/lutris" "~/games/lutris"];
};
"com.heroicgameslauncher.hgl".Context = {
sockets = ["x11" "wayland"];
filesystems = ["/storage/games/heroic" "~/games/heroic"];
};
"com.usebottles.Bottles" = {
Context.sockets = ["x11" "wayland"];
};
};
};
}

View File

@ -24,6 +24,8 @@
module = {
config = {
laptop.homeRowMods = true;
powerSave = true;
# secureBoot = true;
# tpmDiskUnlock = true;
vaapi = "nvidia";

View File

@ -35,6 +35,7 @@
"@root-nixos" = {
mountpoint = "/";
mountOptions = [
"autodefrag"
"compress=zstd"
"noatime"
# "noexec"
@ -43,6 +44,7 @@
"@home" = {
mountpoint = "/home";
mountOptions = [
"autodefrag"
"compress=zstd"
"noatime"
];

View File

@ -18,6 +18,7 @@
"@storage" = {
mountpoint = "/storage";
mountOptions = [
"autodefrag"
"compress=zstd"
"noatime"
];

View File

@ -1,45 +0,0 @@
{config, ...}: {
services.xserver.videoDrivers = ["nvidia"];
hardware = {
nvidia-container-toolkit.enable = true;
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = true;
modesetting.enable = true;
nvidiaSettings = false;
dynamicBoost.enable = true;
powerManagement = {
enable = false;
# finegrained = true;
};
prime = {
# sync.enable = true;
# reverseSync.enable = true;
# allowExternalGpu = true;
offload = {
enable = true;
enableOffloadCmd = true;
};
amdgpuBusId = "PCI:6:0:0";
nvidiaBusId = "PCI:1:0:0";
};
};
};
services.keyd = {
enable = true;
keyboards.laptop = {
ids = ["048d:c101"];
settings.main = {
a = "lettermod(alt, a, 200, 150)";
s = "lettermod(meta, s, 200, 150)";
d = "lettermod(control, d, 200, 150)";
f = "lettermod(shift, f, 200, 150)";
j = "lettermod(shift, j, 200, 150)";
k = "lettermod(control, k, 200, 150)";
l = "lettermod(meta, l, 200, 150)";
";" = "lettermod(alt, ;, 200, 150)";
};
};
};
}

View File

@ -1,6 +1,5 @@
{
imports = [
./laptop
./nvidia.nix
];
services = {

View File

@ -1,6 +0,0 @@
{
imports = [
./home-row-mods.nix
./power-saving.nix
];
}

View File

@ -1,20 +0,0 @@
{
services.keyd = {
enable = true;
keyboards = {
internal = {
ids = ["0001:0001" "048d:c101"];
settings.main = {
a = "lettermod(alt, a, 200, 150)";
s = "lettermod(meta, s, 200, 150)";
d = "lettermod(control, d, 200, 150)";
f = "lettermod(shift, f, 200, 150)";
j = "lettermod(shift, j, 200, 150)";
k = "lettermod(control, k, 200, 150)";
l = "lettermod(meta, l, 200, 150)";
";" = "lettermod(alt, ;, 200, 150)";
};
};
};
};
}

View File

@ -1,7 +0,0 @@
{
powerManagement.enable = true;
powerManagement.powertop.enable = true;
services.power-profiles-daemon.enable = true;
services.thermald.enable = true;
services.upower.enable = true;
}

View File

@ -1,13 +0,0 @@
{inputs, ...}: {
imports = with inputs; [
nix-index-database.hmModules.nix-index
self.homeModules.programs
./programs.nix
];
home = {
stateVersion = "25.05";
sessionPath = [
"$HOME/.local/bin"
];
};
}

View File

@ -1,60 +0,0 @@
{pkgs, ...}: {
shell = {
fish.enable = true;
#nushell.enable = true;
oh-my-posh.enable = true;
};
console.yazi.enable = true;
services.ssh-agent.enable = true;
programs = {
bat.enable = true;
btop = {
enable = true;
settings.update_ms = 200;
};
eza.enable = true;
fd.enable = true;
fzf = {
enable = true;
defaultOptions = ["--color=16"];
};
pay-respects.enable = true;
nix-index.enable = true;
nix-index-database.comma.enable = true;
gitui.enable = true;
git = {
enable = true;
delta.enable = true;
signing.format = "ssh";
aliases = {
cl = "clone";
co = "checkout";
pom = "push origin main";
};
};
jujutsu.enable = true;
ripgrep.enable = true;
};
editor = {
helix.enable = true;
};
home.packages = with pkgs; [
alejandra # nix formatter in rust
trashy # trash cli in rust
devenv # programming deps in rust
procs # ps in rust
ouch # archive manager in runt
dust # du in rust
fend # calc in rust
moar # better pager (in go)
just # make in rust
rbw # bitwarden cli in rust
jj-fzf # fuzzy finder jujutsu tui
];
systemd.user.settings.Manager.DefaultEnvironment.PAGER = "moar";
}

View File

@ -23,6 +23,8 @@
module = {
config = {
laptop.homeRowMods = true;
powerSave = true;
useIwd = true;
vaapi = "intel-media-driver";
};

View File

@ -1,7 +1,5 @@
{
imports = [
./home-row-mods.nix
./keyboard-fix.nix
./power-saving.nix
];
}

View File

@ -1,20 +0,0 @@
{
services.keyd = {
enable = true;
keyboards = {
default = {
ids = ["0001:0001"];
settings.main = {
a = "lettermod(alt, a, 200, 150)";
s = "lettermod(meta, s, 200, 150)";
d = "lettermod(control, d, 200, 150)";
f = "lettermod(shift, f, 200, 150)";
j = "lettermod(shift, j, 200, 150)";
k = "lettermod(control, k, 200, 150)";
l = "lettermod(meta, l, 200, 150)";
";" = "lettermod(alt, ;, 200, 150)";
};
};
};
};
}

View File

@ -1,7 +0,0 @@
{
powerManagement.enable = true;
powerManagement.powertop.enable = true;
services.power-profiles-daemon.enable = true;
services.thermald.enable = true;
services.upower.enable = true;
}

View File

@ -194,8 +194,8 @@ in {
inactive-color "#${colors.base03}"
}
struts {
left 24
right 24
left 33
right 33
}
}

View File

@ -17,8 +17,8 @@
position = "bottom";
height = 24;
spacing = 6;
margin-left = 24 + 3;
margin-right = 24 + 3;
margin-left = 33 + 3;
margin-right = 33 + 3;
margin-bottom = 3;
reload_style_on_change = true;
modules-left = [

View File

@ -66,13 +66,22 @@ in {
markdown-oxide.command = getExe pkgs.markdown-oxide;
# nil.command = getExe pkgs.nil;
nixd.command = getExe pkgs.nixd;
pyright.command = getExe pkgs.pyright;
pyright.args = ["-"];
# pyright.command = getExe pkgs.pyright;
# pyright.args = ["-"];
ruff.command = getExe pkgs.ruff;
ruff.args = ["server"];
# rust-analyzer.command = getExe pkgs.rust-analyzer;
# texlab.command = getExe pkgs.texlab;
tinymist.command = getExe pkgs.tinymist;
fsac.command = getExe pkgs.fsautocomplete;
fsac.config = {
# editor.formatOnSave = true;
AutomaticWorkspaceInit = true;
FSharp.ExternalAutocomplete = true;
FSharp.linting.fsharplint.enabled = true;
FSharp.linting.fsharplint.configFile = "fsharplint.json";
FSharp.formatting.fantomas.enabled = true;
};
};
language = [
{
@ -109,6 +118,14 @@ in {
auto-format = true;
formatter.command = "${pkgs.clang-tools}/bin/clang-format";
}
{
name = "fsharp";
auto-format = true;
# formatter.command = getExe pkgs.fantomas;
language-servers = ["fsac"];
scope = "source.fs";
roots = ["fsproj" "sln" ".git"];
}
# {
# name = "rust";
# auto-format = true;
@ -121,12 +138,12 @@ in {
language-servers = [
{
name = "ruff";
only-features = ["format" "diagnostics"];
}
{
name = "pyright";
except-features = ["format" "diagnostics"];
# only-features = ["format" "diagnostics"];
}
# {
# name = "pyright";
# except-features = ["format" "diagnostics"];
# }
];
}
];

View File

@ -21,8 +21,10 @@ in {
];
options = {
module.config = {
tpmDiskUnlock = mkEnableOption "set if luks enrolled in tpm2";
laptop.homeRowMods = mkEnableOption "set to have mods on asdfjkl;";
powerSave = mkEnableOption "set to use various power saving daemons";
secureBoot = mkEnableOption "set if secure boot is configured";
tpmDiskUnlock = mkEnableOption "set if luks enrolled in tpm2";
useIwd = mkEnableOption "set to use iwd instead of wpa-supplicant";
vaapi = lib.mkOption {
type = lib.types.nullOr (lib.types.enum ["intel-media-driver" "nvidia"]);
@ -35,6 +37,33 @@ in {
boot.initrd.systemd.tpm2.enable = mkDefault cfg.tpmDiskUnlock;
boot.loader.systemd-boot.enable = mkDefault (!cfg.secureBoot);
}
(mkIf (cfg.laptop.homeRowMods) {
services.keyd = {
enable = true;
keyboards = {
internal = {
ids = ["0001:0001" "048d:c101"];
settings.main = {
a = "lettermod(alt, a, 200, 150)";
s = "lettermod(meta, s, 200, 150)";
d = "lettermod(control, d, 200, 150)";
f = "lettermod(shift, f, 200, 150)";
j = "lettermod(shift, j, 200, 150)";
k = "lettermod(control, k, 200, 150)";
l = "lettermod(meta, l, 200, 150)";
";" = "lettermod(alt, ;, 200, 150)";
};
};
};
};
})
(mkIf (cfg.powerSave) {
powerManagement.enable = true;
powerManagement.powertop.enable = true;
services.power-profiles-daemon.enable = true;
services.thermald.enable = true;
services.upower.enable = true;
})
(mkIf cfg.useIwd {
networking = {
networkmanager.wifi.backend = "iwd";