Merge branch 'master' into add-river

This commit is contained in:
Aly Raffauf 2024-10-14 23:46:25 -04:00 committed by GitHub
commit cc5e4228a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 597 additions and 284 deletions

View file

@ -45,6 +45,12 @@
openFirewall = true;
settings.PasswordAuthentication = false;
};
udev.extraRules = ''
# Disable Fn Lock for ThinkPad Trackpoint USB/Bluetooth Keyboard
SUBSYSTEM=="hid", DRIVER=="lenovo", ATTRS{idVendor}=="17ef", ATTRS{idProduct}=="6047|60ee", ATTR{fn_lock}="0"
SUBSYSTEM=="input", ATTRS{id/vendor}=="17ef", ATTRS{id/product}=="6048|60e1", TEST=="/sys/$devpath/device/fn_lock", RUN+="/bin/sh -c 'echo 0 > \"/sys/$devpath/device/fn_lock\"'"
'';
};
sound.enable = true;

View file

@ -3,7 +3,7 @@
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 3d";
options = "--delete-older-than 14d";
persistent = true;
randomizedDelaySec = "60min";
};

View file

@ -187,11 +187,11 @@
]
},
"locked": {
"lastModified": 1726775926,
"narHash": "sha256-5zShvCy9S4tuISFjNSjb+TWpPtORqPbRZ0XwbLbPLho=",
"lastModified": 1728334376,
"narHash": "sha256-CTKEKPzD/j8FK6H4DO3EjyixZd3HHvgAgfnCwpGFP5c=",
"owner": "nix-community",
"repo": "disko",
"rev": "624fd86460e482017ed9c3c3c55a3758c06a4e7f",
"rev": "d39ee334984fcdae6244f5a8e6ab857479cbaefe",
"type": "github"
},
"original": {
@ -354,11 +354,11 @@
]
},
"locked": {
"lastModified": 1726592409,
"narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=",
"lastModified": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github"
},
"original": {
@ -397,11 +397,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1721829827,
"narHash": "sha256-9tB29tP3ZQ2tU2c+FrWrGqSm70ZrJP8H9WZKzHx55zI=",
"lastModified": 1727632156,
"narHash": "sha256-gfH/jcrmI27OEge8OGPe7JpC0jrQJuX7v9hM/ObjjW8=",
"owner": "JeanSchoeller",
"repo": "iio-hyprland",
"rev": "bbf59e10cbf293e64b765864a324e971fcc06125",
"rev": "bd6be6b7e0fbc8ca1a5ccbf536602838e52c347e",
"type": "github"
},
"original": {
@ -437,33 +437,13 @@
"type": "github"
}
},
"nixhw": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1727183733,
"narHash": "sha256-JyOFDaIHTTpVp1uO/3M4md6KNIXXhcD8ztDlDST0VL8=",
"owner": "alyraffauf",
"repo": "nixhw",
"rev": "42685325fa3ca92404b73221ffc8fae1e1671154",
"type": "github"
},
"original": {
"owner": "alyraffauf",
"repo": "nixhw",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1726969270,
"narHash": "sha256-8fnFlXBgM/uSvBlLWjZ0Z0sOdRBesyNdH0+esxqizGc=",
"lastModified": 1728500571,
"narHash": "sha256-dOymOQ3AfNI4Z337yEwHGohrVQb4yPODCW9MDUyAc4w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "23cbb250f3bf4f516a2d0bf03c51a30900848075",
"rev": "d51c28603def282a24fa034bcb007e2bcb5b5dd0",
"type": "github"
},
"original": {
@ -491,11 +471,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1726463316,
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
"lastModified": 1728492678,
"narHash": "sha256-9UTxR8eukdg+XZeHgxW5hQA9fIKHsKCdOIUycTryeVw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
"rev": "5633bcff0c6162b9e4b5f1264264611e950c8ec7",
"type": "github"
},
"original": {
@ -507,11 +487,11 @@
},
"nur": {
"locked": {
"lastModified": 1726811691,
"narHash": "sha256-QjeSsVQo6q7gmWpAreIebQC4fLv4cIgQiPsJjgHmb6E=",
"lastModified": 1728626853,
"narHash": "sha256-fqL5vpxgPJa8rU8/leTKnhraXFhIytbTgsYd+o0KUgI=",
"owner": "nix-community",
"repo": "NUR",
"rev": "cf02274315ba8e91aa8c4bc5e336760af35f42e5",
"rev": "249b147c8b96ea9bfc873723f82f88f61f685bb0",
"type": "github"
},
"original": {
@ -554,7 +534,6 @@
"home-manager": "home-manager_2",
"iio-hyprland": "iio-hyprland",
"lanzaboote": "lanzaboote",
"nixhw": "nixhw",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur",
@ -666,11 +645,11 @@
"wallpapers": {
"flake": false,
"locked": {
"lastModified": 1727132619,
"narHash": "sha256-1V9LK/0GwsLjAwedYcW5uXq1y8l4W86Ce2DvrlseLcA=",
"lastModified": 1728177558,
"narHash": "sha256-jD8GijFjpcjKb2O0g73utSoNkk/J8XLK4jFqhjboN44=",
"owner": "alyraffauf",
"repo": "wallpapers",
"rev": "b86110d079361e785014fdc22eb3684bccf891c9",
"rev": "767fa4a1faa166ed2f18297c013aefbd062432b8",
"type": "github"
},
"original": {

View file

@ -30,11 +30,6 @@
url = "github:nix-community/lanzaboote/v0.4.1";
};
nixhw = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:alyraffauf/nixhw";
};
nur.url = "github:nix-community/NUR";
stylix = {
@ -130,8 +125,7 @@
homeManagerModules = {
default = import ./homeManagerModules self;
aly = import ./homes/aly/gui.nix self;
aly-nox = import ./homes/aly/nox.nix self;
aly = import ./homes/aly self;
dustin = import ./homes/dustin self;
morgan = import ./homes/morgan self;
};
@ -147,6 +141,20 @@
common-tailscale = import ./common/tailscale.nix;
common-wifi-profiles = import ./common/wifi.nix;
hw-common-amd-cpu = import ./hwModules/common/gpu/amd;
hw-common-amd-gpu = import ./hwModules/common/cpu/amd;
hw-common-bluetooth = import ./hwModules/common/bluetooth;
hw-common-intel-cpu = import ./hwModules/common/cpu/intel;
hw-common-intel-gpu = import ./hwModules/common/gpu/intel;
hw-common-laptop = import ./hwModules/common/laptop;
hw-common-laptop-amd-gpu = import ./hwModules/common/laptop/amd-gpu.nix;
hw-common-laptop-intel-cpu = import ./hwModules/common/laptop/intel-cpu.nix;
hw-common-ssd = import ./hwModules/common/ssd;
hw-framework-13-amd-7000 = import ./hwModules/framework/13/amd-7000;
hw-framework-13-intel-11th = import ./hwModules/framework/13/intel-11th;
hw-lenovo-yoga-9i-intel-13th = import ./hwModules/lenovo/yoga-9i/intel-13th;
hw-thinkpad-t440p = import ./hwModules/thinkpad/t440p;
nixos = import ./nixosModules self;
users = import ./userModules self;
};

View file

@ -1,9 +1,28 @@
{pkgs, ...}: {
self: {pkgs, ...}: {
imports = [
./firefox
./mail
./secrets.nix
./windowManagers
self.homeManagerModules.default
self.inputs.agenix.homeManagerModules.default
self.inputs.nur.hmModules.nur
];
home = {
homeDirectory = "/home/aly";
packages = with pkgs; [
bitwarden-desktop
curl
fractal
nicotine-plus
obsidian
picard
tauon
transmission-remote-gtk
tuba
vesktop
];
stateVersion = "24.05";
@ -34,6 +53,7 @@
base_url = "https://passwords.raffauflabs.com";
email = "alyraffauf@fastmail.com";
lock_timeout = 14400;
pinentry = pkgs.pinentry-gnome3;
};
};
};
@ -42,10 +62,17 @@
ar.home = {
apps = {
chromium.enable = true;
fastfetch.enable = true;
firefox.enable = true;
helix.enable = true;
kitty.enable = true;
shell.enable = true;
vsCodium.enable = true;
yazi.enable = true;
};
defaultApps.enable = true;
theme.enable = true;
};
}

View file

@ -1,55 +0,0 @@
self: {pkgs, ...}: {
imports = [
./common.nix
./firefox
./mail
./secrets.nix
./windowManagers
self.homeManagerModules.default
self.inputs.agenix.homeManagerModules.default
self.inputs.nur.hmModules.nur
];
home = {
homeDirectory = "/home/aly";
packages = with pkgs; [
bitwarden-desktop
fractal
nicotine-plus
obsidian
picard
tauon
transmission-remote-gtk
tuba
vesktop
];
stateVersion = "24.05";
username = "aly";
};
programs.rbw.settings.pinentry = pkgs.pinentry-gnome3;
systemd.user.startServices = "legacy"; # Needed for auto-mounting agenix secrets.
ar.home = {
apps = {
chromium.enable = true;
firefox.enable = true;
kitty.enable = true;
vsCodium.enable = true;
};
defaultApps = {
enable = true;
fileManager = pkgs.xfce.thunar;
};
services.gammastep.enable = true;
theme = {
enable = true;
borders.radius = 0;
};
};
}

View file

@ -1,13 +0,0 @@
self: {pkgs, ...}: {
imports = [
./common.nix
./secrets.nix
self.homeManagerModules.default
self.inputs.agenix.homeManagerModules.default
];
programs = {
helix.defaultEditor = true;
rbw.settings.pinentry = pkgs.pinentry-tty;
};
}

View file

@ -10,7 +10,6 @@
./home.nix
./secrets.nix
./stylix.nix
self.inputs.nixhw.nixosModules.framework-13-intel-11th
self.nixosModules.common-base
self.nixosModules.common-locale
self.nixosModules.common-mauville-share
@ -18,6 +17,7 @@
self.nixosModules.common-overlays
self.nixosModules.common-pkgs
self.nixosModules.common-wifi-profiles
self.nixosModules.hw-framework-13-intel-11th
];
boot.loader = {

View file

@ -1,13 +1,27 @@
{
home-manager.sharedModules = [
{
services.easyeffects = {
enable = true;
preset = "fw13-easy-effects";
};
{self, ...}: {
home-manager = {
sharedModules = [
{
wayland.windowManager.sway.config.output = {"BOE 0x095F Unknown".scale = "1.5";};
wayland.windowManager.sway.config.output = {"BOE 0x095F Unknown".scale = "1.5";};
ar.home.desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
}
];
ar.home = {
desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
services = {
easyeffects = {
enable = true;
preset = "fw13-easy-effects";
};
gammastep.enable = true;
};
};
}
];
users = {
aly = self.homeManagerModules.aly;
dustin = self.homeManagerModules.dustin;
};
};
}

View file

@ -6,15 +6,15 @@ Framework Laptop 13 with AMD 7000 series mainboard. My primary machine used for
## Todo
- \[ \] upgrade to [2.8k 120Hz Framework screen](https://frame.work/products/display-kit?v=FRANJF0001).
- \[x\] upgrade to [2.8k 120Hz Framework screen](https://frame.work/products/display-kit?v=FRANJF0001).
## Specs
| Model | Framework Laptop 13 |
|---------|---------------------------|
| Display | 13.5" 2256x1504 60Hz |
| Display | 13.5" 2880x1920 120Hz |
| CPU | AMD Ryzen 7640U |
| RAM | 32GB 16GBx2) DDR5-5600Mhz |
| RAM | 32GB 16GBx2 DDR5-5600Mhz |
| GPU | AMD Radeon 760M |
| Disks | 1TB Sk hynix P41 |

View file

@ -10,7 +10,6 @@
./secrets.nix
./stylix.nix
(import ./../../disko/luks-btrfs-subvolumes.nix {disks = ["/dev/nvme0n1"];})
self.inputs.nixhw.nixosModules.framework-13-amd-7000
self.nixosModules.common-auto-upgrade
self.nixosModules.common-base
self.nixosModules.common-locale
@ -20,6 +19,7 @@
self.nixosModules.common-pkgs
self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles
self.nixosModules.hw-framework-13-amd-7000
];
boot = {

View file

@ -1,27 +1,27 @@
{lib, ...}: {
home-manager.sharedModules = [
{
wayland.windowManager.sway.config.output = {
"eDP-1" = {
adaptive_sync = "on";
scale = "2.0";
};
};
ar.home = {
desktop.hyprland.laptopMonitors = ["eDP-1,2880x1920@120, 0x0, 2, vrr, 1"];
services = {
easyeffects = {
enable = true;
preset = "fw13-easy-effects";
{self, ...}: {
home-manager = {
sharedModules = [
{
wayland.windowManager.sway.config.output = {
"eDP-1" = {
adaptive_sync = "on";
scale = "2.0";
};
gammastep.enable = lib.mkForce false;
};
theme.borders.radius = lib.mkForce 10;
};
}
];
ar.home = {
desktop.hyprland.laptopMonitors = ["eDP-1,2880x1920@60, 0x0, 2, vrr, 0"];
services = {
easyeffects = {
enable = true;
preset = "fw13-easy-effects";
};
};
};
}
];
users.aly = self.homeManagerModules.aly;
};
}

View file

@ -6,7 +6,7 @@
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
image = "${self.inputs.wallpapers}/wallhaven-mp886k.jpg";
image = "${self.inputs.wallpapers}/wallhaven-3lyrvy.png";
imageScalingMode = "fill";
polarity = "dark";

View file

@ -14,10 +14,6 @@ in {
./raffauflabs.nix
./secrets.nix
./stylix.nix
self.inputs.nixhw.nixosModules.common-amd-cpu
self.inputs.nixhw.nixosModules.common-amd-gpu
self.inputs.nixhw.nixosModules.common-bluetooth
self.inputs.nixhw.nixosModules.common-ssd
self.nixosModules.common-auto-upgrade
self.nixosModules.common-base
self.nixosModules.common-locale
@ -26,6 +22,10 @@ in {
self.nixosModules.common-pkgs
self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles
self.nixosModules.hw-common-amd-cpu
self.nixosModules.hw-common-amd-gpu
self.nixosModules.hw-common-bluetooth
self.nixosModules.hw-common-ssd
];
boot = {

View file

@ -33,69 +33,73 @@
}
];
users.aly = lib.mkForce ({config, ...}: {
imports = [self.homeManagerModules.aly];
users = {
aly = {config, ...}: {
imports = [self.homeManagerModules.aly];
age.secrets = {
backblazeKeyId.file = ../../secrets/aly/backblaze/keyId.age;
backblazeKey.file = ../../secrets/aly/backblaze/key.age;
};
age.secrets = {
backblazeKeyId.file = ../../secrets/aly/backblaze/keyId.age;
backblazeKey.file = ../../secrets/aly/backblaze/key.age;
};
systemd.user = {
services.backblaze-sync = {
Unit.Description = "Backup to Backblaze.";
systemd.user = {
services.backblaze-sync = {
Unit.Description = "Backup to Backblaze.";
Service = {
Environment = [
"PATH=${
lib.makeBinPath (with pkgs; [
coreutils
backblaze-b2
])
}"
];
Service = {
Environment = [
"PATH=${
lib.makeBinPath (with pkgs; [
coreutils
backblaze-b2
])
}"
];
ExecStart = "${pkgs.writeShellScript "backblaze-sync" ''
declare -A backups
backups=(
['/home/aly/pics/camera']="b2://aly-camera"
['/home/aly/sync']="b2://aly-sync"
['/mnt/Media/Audiobooks']="b2://aly-audiobooks"
['/mnt/Media/Music']="b2://aly-music"
['/mnt/Archive/Movies']="b2://aly-movies"
['/mnt/Archive/Shows']="b2://aly-shows"
)
ExecStart = "${pkgs.writeShellScript "backblaze-sync" ''
declare -A backups
backups=(
['/home/aly/pics/camera']="b2://aly-camera"
['/home/aly/sync']="b2://aly-sync"
['/mnt/Media/Audiobooks']="b2://aly-audiobooks"
['/mnt/Media/Music']="b2://aly-music"
['/mnt/Archive/Movies']="b2://aly-movies"
['/mnt/Archive/Shows']="b2://aly-shows"
)
backblaze-b2 authorize_account `cat ${config.age.secrets.backblazeKeyId.path}` `cat ${config.age.secrets.backblazeKey.path}`
backblaze-b2 authorize_account `cat ${config.age.secrets.backblazeKeyId.path}` `cat ${config.age.secrets.backblazeKey.path}`
# Recursively backup folders to B2 with sanity checks.
for folder in "''${!backups[@]}"; do
if [ -d "$folder" ] && [ "$(ls -A "$folder")" ]; then
backblaze-b2 sync --delete $folder ''${backups[$folder]}
else
echo "$folder does not exist or is empty."
exit 1
fi
done
''}";
# Recursively backup folders to B2 with sanity checks.
for folder in "''${!backups[@]}"; do
if [ -d "$folder" ] && [ "$(ls -A "$folder")" ]; then
backblaze-b2 sync --delete $folder ''${backups[$folder]}
else
echo "$folder does not exist or is empty."
exit 1
fi
done
''}";
};
};
timers.backblaze-sync = {
Install.WantedBy = ["timers.target"];
Timer.OnCalendar = "*-*-* 03:00:00";
Unit.Description = "Daily backups to Backblaze.";
};
};
timers.backblaze-sync = {
Install.WantedBy = ["timers.target"];
Timer.OnCalendar = "*-*-* 03:00:00";
Unit.Description = "Daily backups to Backblaze.";
wayland.windowManager.hyprland.settings = {
general.layout = lib.mkForce "master";
master = {
mfact = 0.40;
orientation = "center";
};
};
};
wayland.windowManager.hyprland.settings = {
general.layout = lib.mkForce "master";
master = {
mfact = 0.40;
orientation = "center";
};
};
});
dustin = self.homeManagerModules.dustin;
};
};
}

View file

@ -5,10 +5,10 @@
}: {
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-light-hard.yaml";
image = "${self.inputs.wallpapers}/wallhaven-3lyrvy.png";
imageScalingMode = "fill";
polarity = "dark";
polarity = "light";
cursor = {
name = "Bibata-Modern-Classic";

View file

@ -10,7 +10,6 @@
./secrets.nix
./stylix.nix
(import ./../../disko/luks-btrfs-subvolumes.nix {disks = ["/dev/nvme0n1"];})
self.inputs.nixhw.nixosModules.lenovo-yoga-9i-intel-13th
self.nixosModules.common-auto-upgrade
self.nixosModules.common-base
self.nixosModules.common-locale
@ -20,6 +19,7 @@
self.nixosModules.common-pkgs
self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles
self.nixosModules.hw-lenovo-yoga-9i-intel-13th
];
boot = {

View file

@ -4,51 +4,59 @@
self,
...
}: {
home-manager.sharedModules = [
{
wayland.windowManager = {
hyprland.settings = {
bind = [
",xf86launch2,exec,${lib.getExe pkgs.playerctl} play-pause"
];
home-manager = {
sharedModules = [
{
wayland.windowManager = {
hyprland.settings = {
bind = [
",xf86launch2,exec,${lib.getExe pkgs.playerctl} play-pause"
];
exec-once = [''${
lib.getExe self.inputs.iio-hyprland.packages.${pkgs.system}.default
} "desc:Samsung Display Corp. 0x4152"''];
exec-once = [''${
lib.getExe self.inputs.iio-hyprland.packages.${pkgs.system}.default
} "desc:Samsung Display Corp. 0x4152"''];
input = {
tablet.output = "eDP-1";
touchdevice.output = "eDP-1";
};
};
sway.config = {
input = {
"1386:21186:Wacom_HID_52C2_Finger" = {
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
};
"1386:21186:Wacom_HID_52C2_Pen" = {
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
input = {
tablet.output = "eDP-1";
touchdevice.output = "eDP-1";
};
};
keybindings = {
"XF86Launch2" = "exec ${lib.getExe pkgs.playerctl} play-pause";
sway.config = {
input = {
"1386:21186:Wacom_HID_52C2_Finger" = {
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
};
"1386:21186:Wacom_HID_52C2_Pen" = {
map_to_output = "'Samsung Display Corp. 0x4152 Unknown'";
};
};
keybindings = {
"XF86Launch2" = "exec ${lib.getExe pkgs.playerctl} play-pause";
};
output = {"Samsung Display Corp. 0x4152 Unknown".scale = "2.0";};
};
};
ar.home = {
desktop.hyprland = {
laptopMonitors = ["desc:Samsung Display Corp. 0x4152,preferred,auto,2,transform,0"];
tabletMode = {
enable = true;
switches = ["Lenovo Yoga Tablet Mode Control switch"];
};
};
output = {"Samsung Display Corp. 0x4152 Unknown".scale = "2.0";};
services.gammastep.enable = true;
};
};
}
];
ar.home.desktop.hyprland = {
laptopMonitors = ["desc:Samsung Display Corp. 0x4152,preferred,auto,2,transform,0"];
tabletMode = {
enable = true;
switches = ["Lenovo Yoga Tablet Mode Control switch"];
};
};
}
];
users.aly = self.homeManagerModules.aly;
};
}

View file

@ -6,7 +6,7 @@
stylix = {
enable = true;
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
image = "${self.inputs.wallpapers}/wallhaven-jxp18w.jpg";
image = "${self.inputs.wallpapers}/wallhaven-3lyrvy.png";
imageScalingMode = "fill";
polarity = "dark";

View file

@ -10,7 +10,6 @@
./secrets.nix
./stylix.nix
(import ./../../disko/luks-btrfs-subvolumes.nix {disks = ["/dev/sda"];})
self.inputs.nixhw.nixosModules.thinkpad-t440p
self.nixosModules.common-auto-upgrade
self.nixosModules.common-base
self.nixosModules.common-locale
@ -20,6 +19,7 @@
self.nixosModules.common-pkgs
self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles
self.nixosModules.hw-thinkpad-t440p
];
boot = {
@ -48,10 +48,10 @@
greetd = {
enable = true;
autologin = "aly";
session = lib.getExe config.programs.sway.package;
session = lib.getExe config.programs.hyprland.package;
};
sway.enable = true;
hyprland.enable = true;
};
laptopMode = true;

View file

@ -1,16 +1,24 @@
{
home-manager.sharedModules = [
{
wayland.windowManager.sway.config.output = {"LG Display 0x0569 Unknown".scale = "1.25";};
{self, ...}: {
home-manager = {
sharedModules = [
{
wayland.windowManager.sway.config.output = {"LG Display 0x0569 Unknown".scale = "1.25";};
ar.home = {
desktop.hyprland.laptopMonitors = ["desc:LG Display 0x0569,preferred,auto,1.25"];
ar.home = {
desktop.hyprland.laptopMonitors = ["desc:LG Display 0x0569,preferred,auto,1.25"];
services.easyeffects = {
enable = true;
preset = "LoudnessEqualizer";
services = {
easyeffects = {
enable = true;
preset = "LoudnessEqualizer";
};
gammastep.enable = true;
};
};
};
}
];
}
];
users.aly = self.homeManagerModules.aly;
};
}

View file

@ -8,10 +8,6 @@
./raffauflabs.nix
./secrets.nix
(import ./../../disko/btrfs-subvolumes.nix {disks = ["/dev/sda"];})
self.inputs.nixhw.nixosModules.common-bluetooth
self.inputs.nixhw.nixosModules.common-intel-cpu
self.inputs.nixhw.nixosModules.common-intel-gpu
self.inputs.nixhw.nixosModules.common-ssd
self.nixosModules.common-auto-upgrade
self.nixosModules.common-base
self.nixosModules.common-locale
@ -21,6 +17,10 @@
self.nixosModules.common-pkgs
self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles
self.nixosModules.hw-common-bluetooth
self.nixosModules.hw-common-intel-cpu
self.nixosModules.hw-common-intel-gpu
self.nixosModules.hw-common-ssd
];
boot = {

View file

@ -3,5 +3,32 @@
self,
...
}: {
home-manager.users.aly = lib.mkForce self.homeManagerModules.aly-nox;
home-manager.users.aly = lib.mkForce (
{pkgs, ...}: {
imports = [self.homeManagerModules.default];
home = {
homeDirectory = "/home/aly";
packages = with pkgs; [
curl
];
stateVersion = "24.05";
username = "aly";
};
programs = {
helix.defaultEditor = true;
home-manager.enable = true;
};
ar.home.apps = {
fastfetch.enable = true;
helix.enable = true;
shell.enable = true;
yazi.enable = true;
};
}
);
}

View file

@ -22,6 +22,7 @@ in {
"git.${domain}"
"music.${domain}"
"passwords.${domain}"
"pics.${domain}"
"plex.${domain}"
"podcasts.${domain}"
domain
@ -238,6 +239,26 @@ in {
};
};
"pics.${domain}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${ip}:${toString 3001}";
extraConfig = ''
client_max_body_size 5000M;
proxy_buffering off;
proxy_redirect http:// https://;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
'';
};
};
"plex.${domain}" = {
enableACME = true;
forceSSL = true;

View file

@ -0,0 +1,22 @@
{
lib,
pkgs,
...
}: {
hardware = {
bluetooth.enable = true;
pulseaudio = {
enable = lib.mkForce false;
package = pkgs.pulseaudioFull; # Use extra Bluetooth codecs like aptX
extraConfig = ''
load-module module-bluetooth-discover
load-module module-bluetooth-policy
load-module module-switch-on-connect
'';
support32Bit = true;
};
};
}

View file

@ -0,0 +1,9 @@
{lib, ...}: {
boot = {
kernelModules = ["kvm-amd"];
kernelParams = ["amd_pstate=active"];
};
hardware.cpu.amd.updateMicrocode = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -0,0 +1,5 @@
{lib, ...}: {
boot.kernelModules = ["kvm-intel"];
hardware.cpu.intel.updateMicrocode = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View file

@ -0,0 +1,14 @@
{...}: {
environment.variables.VDPAU_DRIVER = "radeonsi";
hardware.amdgpu = {
initrd.enable = true;
amdvlk = {
enable = true;
support32Bit.enable = true;
};
opencl.enable = true;
};
}

View file

@ -0,0 +1,32 @@
{pkgs, ...}: {
boot.initrd.kernelModules = ["i915"];
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD";
VDPAU_DRIVER = "va_gl";
};
hardware = {
intel-gpu-tools.enable = true;
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = [
pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
(pkgs.intel-vaapi-driver.override {enableHybridCodec = true;})
pkgs.libvdpau-va-gl
];
extraPackages32 = [
pkgs.driversi686Linux.intel-media-driver # LIBVA_DRIVER_NAME=iHD
(pkgs.driversi686Linux.intel-vaapi-driver.override {enableHybridCodec = true;})
pkgs.driversi686Linux.libvdpau-va-gl
];
};
};
services.xserver.videoDrivers = ["modesetting"];
}

View file

@ -0,0 +1,2 @@
{...}: {
}

View file

@ -0,0 +1,27 @@
{
lib,
pkgs,
...
}: {
services = {
pipewire.wireplumber.extraConfig = {
# Pipewire eats battery by never disabling the camera.
"10-disable-camera" = {
"wireplumber.profiles" = {
main = {
"monitor.libcamera" = "disabled";
};
};
};
};
power-profiles-daemon.enable = lib.mkDefault true;
udev.extraRules = ''
SUBSYSTEM=="power_supply", ATTR{online}=="1", ACTION=="change", RUN+="${lib.getExe pkgs.power-profiles-daemon} set balanced"
SUBSYSTEM=="power_supply", ATTR{online}=="0", ACTION=="change", RUN+="${lib.getExe pkgs.power-profiles-daemon} set power-saver"
'';
upower.enable = lib.mkDefault true;
};
}

View file

@ -0,0 +1,4 @@
{...}: {
powerManagement.powertop.enable = true;
services.thermald.enable = true;
}

View file

@ -0,0 +1,3 @@
{...}: {
services.fstrim.enable = true;
}

View file

@ -0,0 +1,30 @@
{
lib,
pkgs,
...
}: {
imports = [
../../../common/bluetooth
../../../common/cpu/amd
../../../common/gpu/amd
../../../common/laptop
../../../common/laptop/amd-gpu.nix
../../../common/ssd
../../common.nix
../common.nix
];
boot = {
initrd.availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
extraModprobeConfig = ''
options snd_hda_intel power_save=1
'';
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
};
networking.networkmanager = {
enable = true;
wifi.powersave = true;
wifi.backend = "iwd";
};
}

View file

@ -0,0 +1,2 @@
{...}: {
}

View file

@ -0,0 +1,28 @@
{
lib,
pkgs,
...
}: {
imports = [
../../../common/bluetooth
../../../common/cpu/intel
../../../common/gpu/intel
../../../common/laptop
../../../common/laptop/intel-cpu.nix
../../../common/ssd
../../common.nix
../common.nix
];
boot = {
blacklistedKernelModules = ["cros-usbpd-charger"];
initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
kernelParams = [
"nvme.noacpi=1" # https://community.frame.work/t/linux-battery-life-tuning/6665/156
];
};
hardware.acpilight.enable = true;
}

View file

@ -0,0 +1,35 @@
{
config,
lib,
pkgs,
...
}: {
boot = {
extraModulePackages = with config.boot.kernelPackages; [
framework-laptop-kmod
];
kernelModules = [
# https://github.com/DHowett/framework-laptop-kmod?tab=readme-ov-file#usage
"cros_ec_lpcs"
"cros_ec"
];
};
environment.systemPackages = [pkgs.framework-tool] ++ lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool;
hardware = {
enableAllFirmware = true;
sensor.iio.enable = true;
};
services = {
fprintd.enable = true;
fwupd.enable = true;
udev.extraRules = ''
# Ethernet expansion card support
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/autosuspend}="20"
'';
};
}

View file

@ -0,0 +1,3 @@
{...}: {
hardware.enableAllFirmware = true;
}

View file

@ -0,0 +1,3 @@
{...}: {
hardware.sensor.iio.enable = true;
}

View file

@ -0,0 +1,21 @@
{
lib,
pkgs,
...
}: {
imports = [
../../../common/bluetooth
../../../common/cpu/intel
../../../common/gpu/intel
../../../common/laptop
../../../common/laptop/intel-cpu.nix
../../../common/ssd
../../common.nix
../common.nix
];
boot = {
initrd.availableKernelModules = ["nvme" "sd_mod" "thunderbolt" "usb_storage" "xhci_pci"];
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
};
}

View file

@ -0,0 +1,10 @@
{...}: {
hardware = {
enableAllFirmware = true;
trackpoint = {
enable = true;
emulateWheel = true;
};
};
}

View file

@ -0,0 +1,32 @@
{...}: {
imports = [
../../common/bluetooth
../../common/cpu/intel
../../common/gpu/intel
../../common/laptop
../../common/laptop/intel-cpu.nix
../../common/ssd
../common.nix
];
boot = {
extraModprobeConfig = ''
options bbswitch use_acpi_to_detect_card_state=1
options thinkpad_acpi force_load=1 fan_control=1
'';
initrd.availableKernelModules = [
"ahci"
"ehci_pci"
"rtsx_pci_sdmmc"
"sd_mod"
"sr_mod"
"usb_storage"
"xhci_pci"
];
};
powerManagement.cpuFreqGovernor = "ondemand";
services.fwupd.enable = true;
}

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOCrKJ8OtS2JxrPUrTM3ZRPpyo8HX++Fuv/gWIsHoXzO achac@mossdeep

View file

@ -2,14 +2,11 @@
config,
lib,
pkgs,
self,
...
}: {
imports = [./syncthing.nix];
config = lib.mkIf config.ar.users.aly.enable {
home-manager.users.aly = self.homeManagerModules.aly;
users.users.aly = {
description = "Aly Raffauf";
extraGroups = config.ar.users.defaultGroups;
@ -25,6 +22,7 @@
keyFiles = [
../../secrets/publicKeys/aly_lavaridge.pub
../../secrets/publicKeys/aly_mauville.pub
../../secrets/publicKeys/aly_mossdeep.pub
../../secrets/publicKeys/aly_petalburg.pub
../../secrets/publicKeys/aly_rustboro.pub
];

View file

@ -11,6 +11,7 @@ in {
services.syncthing = {
enable = true;
cert = cfg.certFile;
configDir = "${config.services.syncthing.dataDir}/.syncthing";
dataDir = "/home/aly";
key = cfg.keyFile;
openDefaultPorts = true;
@ -29,7 +30,7 @@ in {
"iphone12" = {id = "SBQNUXS-H4XDJ3E-RBHJPT5-45WDJJA-2U43M4P-23XGUJ7-E3CNNKZ-BXSGIA3";}; # iPhone 12 Pro Max
"lavaridge" = {id = "TMMSCVA-MDJTDPC-PC47NUA-2VPLAIB-6S6MEU7-KALIGUJ-AWDUOUU-XD73MAY";}; # Framework 13 AMD
"mauville" = {id = "52MTCMC-PKEWSAU-HADMTZU-DY5EKFO-B323P7V-OBXLNTQ-EJY7F7Y-EUWFBQX";}; # Desktop/homelab b
"mossdeep" = {id = "XRIGHMT-54OGBWP-UAAGAJS-LGTRHA2-EMKOMEB-EJEWKZN-GJFK6FO-3O6KQQ4";}; # Steam Deck OLED
"mossdeep" = {id = "3DODR5S-WU6DTH6-Y35QZX7-7OZEOGG-CYVGGCJ-TJ6AOZX-MFDSRCR-NM727A6";}; # Yoga Slim 7x
"petalburg" = {id = "ECTD3LW-YZTJIXX-HLQYXT7-UGZSGST-3DDKF72-DJPMDHE-SUYDWIT-ASTKTAE";}; # Yoga 9i
"rustboro" = {id = "7CXGPQN-7DYDYJN-DKELOR3-RD4HZUW-SSUDGLZ-WVXYFUT-DPT2MGD-6PO5BQF";}; # Thinkpad t440p
"slateport" = {id = "MDJFDUG-UJAXQXI-AMEF2AR-PBMD5QK-Z5ZG6AA-RCJCU3M-GZHQQEA-X2JGOAK";}; # homelab a

View file

@ -1,12 +1,9 @@
{
config,
lib,
self,
...
}: {
config = lib.mkIf config.ar.users.dustin.enable {
home-manager.users.dustin = self.homeManagerModules.dustin;
users.users.dustin = {
description = "Dustin Raffauf";
extraGroups = config.ar.users.defaultGroups;