mirror of
https://github.com/ParkerTenBroeck/dotfiles.git
synced 2026-06-06 21:00:35 -04:00
switch laptop config
This commit is contained in:
parent
079b1eb5d6
commit
3a429b7fe1
10 changed files with 118 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{ pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./common.nix
|
./common.nix
|
||||||
../modules/networking.nix
|
../modules/networking.nix
|
||||||
|
|
@ -9,12 +9,58 @@
|
||||||
../modules/packages.nix
|
../modules/packages.nix
|
||||||
../modules/hyprland
|
../modules/hyprland
|
||||||
../modules/tex.nix
|
../modules/tex.nix
|
||||||
|
../modules/virt.nix
|
||||||
|
../modules/arduino.nix
|
||||||
|
../../perf_mode/perf_mode.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
networking.hostName = "laptop";
|
networking.hostName = "laptop";
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
services.logind.settings.Login.HandlePowerKey = "suspend";
|
||||||
|
|
||||||
|
# stupid ISO keyboards
|
||||||
|
console.useXkbConfig = true;
|
||||||
|
services.xserver.xkb = {
|
||||||
|
variant = "";
|
||||||
|
|
||||||
|
layout = "us-custom";
|
||||||
|
extraLayouts.us-custom = {
|
||||||
|
description = "My custom US layout";
|
||||||
|
languages = [ "eng" ];
|
||||||
|
|
||||||
|
symbolsFile = pkgs.writeText "xkb-layout" ''
|
||||||
|
xkb_symbols "us-custom" {
|
||||||
|
include "us(basic)"
|
||||||
|
include "level3(ralt_switch)"
|
||||||
|
key <LSGT> { [ Shift_L ] };
|
||||||
|
};
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.may.home.packages = with pkgs; [
|
||||||
|
intel-gpu-tools
|
||||||
|
obsidian
|
||||||
|
chromium
|
||||||
|
libreoffice
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
#web
|
||||||
|
8000
|
||||||
|
8080
|
||||||
|
|
||||||
|
42069
|
||||||
|
];
|
||||||
|
|
||||||
|
allowedUDPPorts = [
|
||||||
|
#spotify google cast
|
||||||
|
5353
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
home-manager.users.may.home.stateVersion = "25.11";
|
home-manager.users.may.home.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
modules/arduino.nix
Normal file
6
modules/arduino.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs, ...}: {
|
||||||
|
home-manager.users.may.home.packages = with pkgs; [
|
||||||
|
arduino
|
||||||
|
arduino-ide
|
||||||
|
];
|
||||||
|
}
|
||||||
11
modules/gui.nix
Normal file
11
modules/gui.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, ...}: {
|
||||||
|
home-manager.users.may.home.packages = with pkgs; [
|
||||||
|
firefox # browser
|
||||||
|
nautilus # gui file manager
|
||||||
|
alacritty # terminal
|
||||||
|
imv # image viewer
|
||||||
|
file-roller # archive manager
|
||||||
|
vscode # text editor
|
||||||
|
gnome-disk-utility
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,7 @@ in {
|
||||||
./nwg-panel-conf.nix
|
./nwg-panel-conf.nix
|
||||||
# assume any desktop env will have audio
|
# assume any desktop env will have audio
|
||||||
../audio.nix
|
../audio.nix
|
||||||
|
../gui.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -80,12 +81,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
firefox # browser
|
|
||||||
nautilus # gui file manager
|
|
||||||
alacritty # terminal
|
|
||||||
imv # image viewer
|
|
||||||
file-roller # archive manager
|
|
||||||
|
|
||||||
# notifications
|
# notifications
|
||||||
libnotify
|
libnotify
|
||||||
dunst
|
dunst
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{ lib, ...}: {
|
||||||
time.timeZone = "America/Toronto";
|
time.timeZone = "America/Toronto";
|
||||||
i18n.defaultLocale = "en_CA.UTF-8";
|
i18n.defaultLocale = "en_CA.UTF-8";
|
||||||
|
|
||||||
services.xserver.xkb = {
|
services.xserver.xkb = lib.mkDefault {
|
||||||
layout = "us";
|
layout = "us";
|
||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
openjdk21
|
openjdk21
|
||||||
vlc
|
vlc
|
||||||
spotify
|
spotify
|
||||||
vscode
|
|
||||||
jetbrains.idea
|
jetbrains.idea
|
||||||
obs-studio
|
obs-studio
|
||||||
discord
|
discord
|
||||||
|
|
|
||||||
4
modules/saleae-logic.nix
Normal file
4
modules/saleae-logic.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ...}: {
|
||||||
|
services.udev.packages = [ pkgs.saleae-logic-2 ];
|
||||||
|
home-manager.users.may.home.packages = [ pkgs.saleae-logic-2 ];
|
||||||
|
}
|
||||||
8
modules/virt.nix
Normal file
8
modules/virt.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
users.groups.libvirtd.members = ["may"];
|
||||||
|
virtualisation = {
|
||||||
|
libvirtd.enable = true;
|
||||||
|
spiceUSBRedirection.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
21
modules/wireguard-client.nix
Normal file
21
modules/wireguard-client.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
networking.firewall = {
|
||||||
|
# if packets are still dropped, they will show up in dmesg
|
||||||
|
logReversePathDrops = true;
|
||||||
|
# wireguard trips rpfilter up
|
||||||
|
extraCommands = ''
|
||||||
|
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN
|
||||||
|
ip46tables -t mangle -I nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN
|
||||||
|
'';
|
||||||
|
extraStopCommands = ''
|
||||||
|
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --sport 51820 -j RETURN || true
|
||||||
|
ip46tables -t mangle -D nixos-fw-rpfilter -p udp -m udp --dport 51820 -j RETURN || true
|
||||||
|
'';
|
||||||
|
|
||||||
|
allowedUDPPorts = [ 51820 ];
|
||||||
|
};
|
||||||
|
}
|
||||||
20
secrets.nix
20
secrets.nix
|
|
@ -1,7 +1,21 @@
|
||||||
let
|
let
|
||||||
desktop_may = builtins.readFile ./secrets/ssh/desktop_may_pub;
|
readFileOrNull = path:
|
||||||
desktop_host = builtins.readFile ./secrets/ssh/desktop_host_pub;
|
if builtins.pathExists path
|
||||||
pub_keys = [ desktop_may desktop_host ];
|
then builtins.readFile path
|
||||||
|
else null;
|
||||||
|
|
||||||
|
desktop_may = readFileOrNull ./secrets/ssh/desktop_may_pub;
|
||||||
|
desktop_host = readFileOrNull ./secrets/ssh/desktop_host_pub;
|
||||||
|
|
||||||
|
laptop_may = readFileOrNull ./secrets/ssh/laptop_may_pub;
|
||||||
|
laptop_host = readFileOrNull ./secrets/ssh/laptop_host_pub;
|
||||||
|
|
||||||
|
pub_keys = builtins.filter builtins.isString [
|
||||||
|
desktop_may desktop_host
|
||||||
|
laptop_may laptop_host
|
||||||
|
];
|
||||||
|
|
||||||
|
_ = if builtins.length pub_keys == 0 then abort "pub_keys must have at least one key" else null;
|
||||||
in {
|
in {
|
||||||
"secrets/wireguard/server_priv.age".publicKeys = pub_keys;
|
"secrets/wireguard/server_priv.age".publicKeys = pub_keys;
|
||||||
"secrets/wireguard/home_psk.age".publicKeys = pub_keys;
|
"secrets/wireguard/home_psk.age".publicKeys = pub_keys;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue