nix-v0/src/hosts/pickwick/default.nix
2024-10-26 21:06:24 -05:00

181 lines
4.2 KiB
Nix

{ config, lib, pkgs, inputs, ... }:
{
imports = [];
networking.hostName = "pickwick";
networking.hostId = builtins.substring 0 8 (builtins.hashString "md5" config.networking.hostName);
networking.networkmanager.enable = true;
time.timeZone = "America/Chicago";
i18n.defaultLocale = "en_US.UTF-8";
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.xkb.layout = "us";
security.pam.services.login.fprintAuth = false;
security.pam.services.sudo.fprintAuth = false;
# framework setting
services.fwupd.enable = true;
# services.fwupd.package = (import (builtins.fetchTarball {
# url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz";
# sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk";
# }) {
# inherit (pkgs) system;
# }).fwupd;
hardware.framework.amd-7040.preventWakeOnAC = true;
services.pipewire = {
enable = true;
pulse.enable = true;
jack.enable = true;
};
services.libinput.enable = true;
# users.users.root.hashedPasswordFile = "/persist/passwords/root";
# users.users.rayandrew = {
# isNormalUser = true;
# # initialPassword = "12345";
# hashedPasswordFile = "/persist/passwords/rayandrew";
# extraGroups = [ "wheel" "audio" "keyd" ];
# packages = with pkgs; [
# firefox
# tree
# ];
# };
users.groups.keyd = {};
environment.systemPackages = with pkgs; [
vim
wget
htop-vim
keyd
];
environment.gnome.excludePackages = with pkgs; [
baobab
cheese
epiphany
simple-scan
yelp
evince
file-roller
geary
gnome-tour
gnome-initial-setup
gnome-music
gnome-maps
gnome-disk-utility
];
programs._1password.enable = true;
programs._1password-gui = {
enable = true;
polkitPolicyOwners = [ "rayandrew" ];
};
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
firefox
'';
mode = "0755";
};
};
programs.dconf.enable = true;
# environment.persistence."/persist/system" = {
# hideMounts = true;
# directories = [
# "/var/log"
# "/var/lib/fprint"
# "/var/lib/nixos"
# "/var/lib/bluetooth"
# "/var/lib/systemd/coredump"
# "/etc/NetworkManager/system-connections"
# { directory = "/var/lib/colord"; user = "colord"; group = "colord"; mode = "u=rwx,g=rx,o="; }
# ];
# files = [
# "/etc/machine-id"
# ];
# };
programs.fuse.userAllowOther = true;
# home-manager = {
# extraSpecialArgs = {inherit inputs pkgs;};
# users = {
# "rayandrew" = import ./home.nix;
# };
# useGlobalPkgs = true;
# useUserPackages = true;
# };
services.keyd = {
enable = true;
keyboards = {
default = {
ids = [ "*" ];
settings = {
main = {
capslock = "layer(capslock)";
insert = "S-insert";
};
meta = {
w = "macro(C-w)";
a = "macro(C-a)";
};
"capslock:C" = { };
};
};
framework = {
ids = [ "0001:0001:a38e6885" ];
settings = {
main = {
leftalt = "layer(meta)";
leftmeta = "layer(alt)";
};
};
};
normal = {
ids = [ "413c:2107:eb8bfad1" ];
settings = {
main = {
leftalt = "layer(meta)";
leftmeta = "layer(alt)";
};
};
};
};
};
systemd.services.keyd.serviceConfig.CapabilityBoundingSet = [
"CAP_SETGID"
];
# swapDevices = [
# { device = "/swap/swapfile"; }
# ];
systemd.services = {
# https://github.com/openzfs/zfs/issues/10891
systemd-udev-settle.enable = false;
# snapshot dirs sometimes not accessible
# https://github.com/NixOS/nixpkgs/issues/257505#issuecomment-2348313665
zfs-mount = {
serviceConfig = {
ExecStart = [ "${lib.getExe' pkgs.util-linux "mount"} -t zfs zroot/persist -o remount" ];
};
};
};
system.stateVersion = "24.11";
}