clean up and refactor more into OS snippets; bluetooth works on x13s

This commit is contained in:
steveej 2024-01-24 00:24:04 +00:00
parent 5921ad1df0
commit ffdf25c117
27 changed files with 367 additions and 461 deletions

View file

@ -1,15 +0,0 @@
{pkgs, ...}: {
boot.kernelPackages = pkgs.linuxPackages;
boot.loader.grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = false;
};
boot.loader.systemd-boot.enable = false;
boot.loader.efi.canTouchEfiVariables = true;
boot.tmp.useTmpfs = true;
# Workaround for nm-pptp to enforce module load
boot.kernelModules = ["nf_conntrack_proto_gre" "nf_conntrack_pptp"];
}

View file

@ -1,18 +1,38 @@
{
config,
pkgs,
repoFlake,
...
{ config
, pkgs
, repoFlake
, nodeFlake
, repoFlakeInputs'
, packages'
, ...
}: {
imports = [
./boot.nix
./pkg.nix
./system.nix
../../snippets/nix-settings.nix
./hw.nix
./user.nix
repoFlake.inputs.sops-nix.nixosModules.sops
../../snippets/nix-settings.nix
../../snippets/home-manager-with-zsh.nix
./system.nix
./hw.nix
./user.nix
];
boot.kernelPackages = pkgs.linuxPackages;
boot.loader.grub = {
enable = true;
efiSupport = true;
efiInstallAsRemovable = false;
};
boot.loader.systemd-boot.enable = false;
boot.loader.efi.canTouchEfiVariables = true;
boot.tmp.useTmpfs = true;
# Workaround for nm-pptp to enforce module load
boot.kernelModules = [ "nf_conntrack_proto_gre" "nf_conntrack_pptp" ];
nixpkgs.config = {
allowBroken = false;
allowUnfree = true;
};
}

View file

@ -1,34 +0,0 @@
{ config
, pkgs
, # these come in via nodeSpecialArgs and are expected to be defined for every node
repoFlake
, repoFlakeInputs'
, nodeFlake
, packages'
, ...
}: {
imports = [
];
nix.registry.nixpkgs.flake = nodeFlake.inputs.nixpkgs;
home-manager.useGlobalPkgs = false;
home-manager.useUserPackages = true;
home-manager.users.root = import ../../../home-manager/configuration/text-minimal.nix;
# TODO: investigate an issue with the "name" arg contained here, which causes problems with home-manager
# home-manager.extraSpecialArgs = specialArgs;
# hence, opt for passing the arguments selectively instead
home-manager.extraSpecialArgs = {
inherit
repoFlake
repoFlakeInputs'
packages'
nodeFlake
;
};
nixpkgs.config = {
allowBroken = false;
allowUnfree = true;
};
}

View file

@ -42,15 +42,12 @@
# mv -Tf /etc/X11/.sessions /etc/X11/sessions
# '';
# TODO: adapt this to be arch agnostic
system.activationScripts.lib64 = ''
echo "setting up /lib64..."
mkdir -p /lib64
ln -sfT ${pkgs.glibc}/lib/ld-linux-x86-64.so.2 /lib64/.ld-linux-x86-64.so.2
mv -Tf /lib64/.ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
'';
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
environment.pathsToLink = [ "/share/zsh" ];
programs.fuse.userAllowOther = true;
}

View file

@ -1,8 +1,11 @@
{
pkgs,
lib,
...
{ pkgs
, lib
, ...
}: {
imports = [
../../snippets/bluetooth.nix
];
networking.networkmanager = {
enable = true;
dns = "systemd-resolved";
@ -22,12 +25,8 @@
services.illum.enable = true;
services.pcscd.enable = true;
hardware.opengl.enable = true;
hardware.bluetooth.enable = true;
# required for running blueman-applet in user sessions
services.dbus.packages = with pkgs; [blueman];
services.blueman.enable = true;
services.udev.packages = [pkgs.libu2f-host pkgs.yubikey-personalization pkgs.android-udev-rules];
services.udev.packages = [ pkgs.libu2f-host pkgs.yubikey-personalization pkgs.android-udev-rules ];
services.udev.extraRules = ''
# OnePlusOne
ATTR{idVendor}=="05c6", ATTR{idProduct}=="6764", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
@ -54,6 +53,6 @@
services.printing = {
enable = true;
drivers = with pkgs; [mfcl3770cdwlpr mfcl3770cdwcupswrapper];
drivers = with pkgs; [ mfcl3770cdwlpr mfcl3770cdwcupswrapper ];
};
}