mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 12:29:19 -08:00
feat: work on laptop and shell stuff
This commit is contained in:
parent
a4b63004fb
commit
1071288f6e
21 changed files with 165 additions and 38 deletions
36
flake.lock
generated
36
flake.lock
generated
|
|
@ -223,6 +223,23 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"cpu-microcodes": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1759588812,
|
||||||
|
"narHash": "sha256-HMq/XjTY/Dmjzufho8dw8bL/2iMlcIZEUcJI84o6/no=",
|
||||||
|
"owner": "platomav",
|
||||||
|
"repo": "CPUMicrocodes",
|
||||||
|
"rev": "ae2c33ecd7a5855a743b360a05bc984911d16957",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "platomav",
|
||||||
|
"repo": "CPUMicrocodes",
|
||||||
|
"rev": "ae2c33ecd7a5855a743b360a05bc984911d16957",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"crane": {
|
"crane": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731098351,
|
"lastModified": 1731098351,
|
||||||
|
|
@ -1575,6 +1592,7 @@
|
||||||
"systems": "systems_3",
|
"systems": "systems_3",
|
||||||
"tree": "tree",
|
"tree": "tree",
|
||||||
"treefmt-nix": "treefmt-nix",
|
"treefmt-nix": "treefmt-nix",
|
||||||
|
"ucodenix": "ucodenix",
|
||||||
"wezterm": "wezterm"
|
"wezterm": "wezterm"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -2012,6 +2030,24 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ucodenix": {
|
||||||
|
"inputs": {
|
||||||
|
"cpu-microcodes": "cpu-microcodes"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1759935526,
|
||||||
|
"narHash": "sha256-ul9G+RlFA1OdfNY2s/qD2ANOagXktbvKpjtWaH8SiVk=",
|
||||||
|
"owner": "e-tho",
|
||||||
|
"repo": "ucodenix",
|
||||||
|
"rev": "ae546711cdd5dbbd284fe9a47bd4f6ae9bbc7449",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "e-tho",
|
||||||
|
"repo": "ucodenix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"wezterm": {
|
"wezterm": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,7 @@
|
||||||
flake-compat.follows = "flake-compat";
|
flake-compat.follows = "flake-compat";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
ucodenix.url = "github:e-tho/ucodenix";
|
||||||
nh = {
|
nh = {
|
||||||
url = "github:nix-community/nh";
|
url = "github:nix-community/nh";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
{lib, ...}: let
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
inherit (lib.modules) mkDefault mkMerge;
|
inherit (lib.modules) mkDefault mkMerge;
|
||||||
in {
|
in {
|
||||||
|
home.packages = [
|
||||||
|
pkgs.gpg-tui
|
||||||
|
];
|
||||||
services.gpg-agent = {
|
services.gpg-agent = {
|
||||||
enable = mkDefault true;
|
enable = mkDefault true;
|
||||||
enableExtraSocket = true;
|
enableExtraSocket = true;
|
||||||
|
|
|
||||||
6
home/profiles/shell/bottom.nix
Normal file
6
home/profiles/shell/bottom.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.bottom = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.bottom;
|
||||||
|
};
|
||||||
|
}
|
||||||
19
home/profiles/shell/data.nix
Normal file
19
home/profiles/shell/data.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.jq = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
programs.jqp = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
htmlq # JQ for HTML
|
||||||
|
gron # Make JSON greppable
|
||||||
|
jless # Command-line JSON viewer
|
||||||
|
jo # Interface for creating JSON objects in shell
|
||||||
|
jc # Turn output of common/popular packages into JSON
|
||||||
|
dasel # JSON, YAML, TOML, XML, and CSV multitool
|
||||||
|
yj # Convert between YAML, TOML, JSON, and HCL. Preserves map order.
|
||||||
|
csview # CSV viewer
|
||||||
|
glow # Markdown viewer
|
||||||
|
];
|
||||||
|
}
|
||||||
5
home/profiles/shell/htop.nix
Normal file
5
home/profiles/shell/htop.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
programs.htop = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
watchexec
|
watchexec
|
||||||
htop
|
|
||||||
btop
|
|
||||||
gdu
|
gdu
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
file
|
file
|
||||||
|
|
@ -10,7 +8,6 @@
|
||||||
sd
|
sd
|
||||||
sops
|
sops
|
||||||
fd
|
fd
|
||||||
ripgrep
|
|
||||||
rename
|
rename
|
||||||
tmate
|
tmate
|
||||||
socat
|
socat
|
||||||
|
|
@ -21,5 +18,26 @@
|
||||||
hyperfine
|
hyperfine
|
||||||
poop
|
poop
|
||||||
nix-search-cli
|
nix-search-cli
|
||||||
|
pandoc
|
||||||
|
slides
|
||||||
|
sc-im
|
||||||
|
asciinema
|
||||||
|
bandwhich
|
||||||
|
pciutils
|
||||||
|
bingrep
|
||||||
|
chafa
|
||||||
|
dust
|
||||||
|
eva
|
||||||
|
gfold
|
||||||
|
kmon
|
||||||
|
lemmeknow
|
||||||
|
lnav
|
||||||
|
pastel
|
||||||
|
pipe-rename
|
||||||
|
procs
|
||||||
|
tz
|
||||||
|
tre
|
||||||
|
tmpmail
|
||||||
|
wikit
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
home/profiles/shell/ripgrep.nix
Normal file
10
home/profiles/shell/ripgrep.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
_: {
|
||||||
|
programs = {
|
||||||
|
ripgrep = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
ripgrep-all = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
5
home/profiles/shell/xplr.nix
Normal file
5
home/profiles/shell/xplr.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
_: {
|
||||||
|
programs.xplr = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,21 +1,6 @@
|
||||||
{
|
_: {
|
||||||
config,
|
programs.zoxide = {
|
||||||
pkgs,
|
enable = true;
|
||||||
...
|
enableZshIntegration = true;
|
||||||
}: {
|
|
||||||
# ensure .local/share/z is created
|
|
||||||
xdg.dataFile."z/.keep".text = "";
|
|
||||||
|
|
||||||
programs.zsh = {
|
|
||||||
localVariables = {
|
|
||||||
_Z_DATA = "${config.xdg.dataHome}/z/data";
|
|
||||||
};
|
|
||||||
plugins =
|
|
||||||
map (plugin: (with pkgs.${plugin}; {
|
|
||||||
name = pname;
|
|
||||||
inherit src;
|
|
||||||
})) [
|
|
||||||
"zsh-z"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,8 @@ in {
|
||||||
'';
|
'';
|
||||||
shellAliases = mkMerge [
|
shellAliases = mkMerge [
|
||||||
{
|
{
|
||||||
nixdirfmt = "nixpkgs-fmt $(fd -e nix)";
|
cat = "bat";
|
||||||
|
top = "btm";
|
||||||
dmesg = "dmesg -HP";
|
dmesg = "dmesg -HP";
|
||||||
hg = "history 0 | rg";
|
hg = "history 0 | rg";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
8
nixos/hardware/amd.nix
Normal file
8
nixos/hardware/amd.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{config, ...}: {
|
||||||
|
boot = {
|
||||||
|
blacklistedKernelModules = ["k10temp"];
|
||||||
|
extraModulePackages = [config.boot.kernelPackages.zenpower];
|
||||||
|
kernelModules = ["zenpower"];
|
||||||
|
};
|
||||||
|
services.ucodenix.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,15 @@
|
||||||
_: {
|
{config, ...}: {
|
||||||
|
# https://github.com/NixOS/nixos-hardware/issues/1581
|
||||||
|
hardware.framework.enableKmod = false;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
|
availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
|
||||||
};
|
};
|
||||||
|
kernelModules = ["cros_ec" "cros_ec_lpcs"];
|
||||||
|
extraModprobeConfig = "options snd_hda_intel power_save=0";
|
||||||
|
extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
framework-laptop-kmod
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
4
nixos/hardware/framework/general.nix
Normal file
4
nixos/hardware/framework/general.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
_: {
|
||||||
|
hardware.framework.laptop13.audioEnhancement.enable = true;
|
||||||
|
services.ucodenix.cpuModelId = "00A70F41";
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,9 @@
|
||||||
(with tree.nixos.profiles; [
|
(with tree.nixos.profiles; [
|
||||||
uefi
|
uefi
|
||||||
])
|
])
|
||||||
|
++ (with tree.nixos.hardware; [
|
||||||
|
amd
|
||||||
|
])
|
||||||
++ [
|
++ [
|
||||||
inputs.nixos-hardware.outputs.nixosModules.framework-13-7040-amd
|
inputs.nixos-hardware.outputs.nixosModules.framework-13-7040-amd
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,10 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
ida-pro-kat
|
ida-pro-kat
|
||||||
android-studio
|
android-studio
|
||||||
|
bingrep
|
||||||
|
hexyl
|
||||||
|
jwt-cli
|
||||||
|
silicon
|
||||||
|
tokei
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
v4l2loopback
|
||||||
|
];
|
||||||
programs.obs-studio = {
|
programs.obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableVirtualCamera = true;
|
enableVirtualCamera = true;
|
||||||
|
|
|
||||||
8
nixos/profiles/graphical/upower.nix
Normal file
8
nixos/profiles/graphical/upower.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
services.upower = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.acpi
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -184,9 +184,6 @@ _: let
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
extraModulePackages = with config.boot.kernelPackages; [
|
|
||||||
config.boot.kernelPackages.v4l2loopback.out
|
|
||||||
];
|
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ _: let
|
||||||
hostConfig = {
|
hostConfig = {
|
||||||
tree,
|
tree,
|
||||||
lib,
|
lib,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.attrsets) nameValuePair listToAttrs;
|
inherit (lib.attrsets) nameValuePair listToAttrs;
|
||||||
|
|
@ -97,23 +96,17 @@ _: let
|
||||||
|
|
||||||
powerManagement.enable = true;
|
powerManagement.enable = true;
|
||||||
|
|
||||||
hardware.framework.enableKmod = false;
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
grub.useOSProber = true;
|
grub.useOSProber = true;
|
||||||
systemd-boot.enable = lib.mkForce false;
|
#systemd-boot.enable = lib.mkForce false;
|
||||||
|
systemd-boot.enable = true;
|
||||||
};
|
};
|
||||||
zfs = {
|
zfs = {
|
||||||
forceImportRoot = false;
|
forceImportRoot = false;
|
||||||
allowHibernation = true;
|
allowHibernation = true;
|
||||||
};
|
};
|
||||||
kernelModules = ["cros_ec" "cros_ec_lpcs"];
|
kernelModules = ["cros_ec" "cros_ec_lpcs"];
|
||||||
extraModprobeConfig = "options snd_hda_intel power_save=0";
|
|
||||||
extraModulePackages = with config.boot.kernelPackages; [
|
|
||||||
config.boot.kernelPackages.v4l2loopback.out
|
|
||||||
framework-laptop-kmod
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# optional, useful when the builder has a faster internet connection than yours
|
# optional, useful when the builder has a faster internet connection than yours
|
||||||
|
|
|
||||||
1
tree.nix
1
tree.nix
|
|
@ -94,6 +94,7 @@
|
||||||
microvm.nixosModules.host
|
microvm.nixosModules.host
|
||||||
mewtris.nixosModules.mewtris
|
mewtris.nixosModules.mewtris
|
||||||
noctalia.nixosModules.default
|
noctalia.nixosModules.default
|
||||||
|
ucodenix.nixosModules.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue