1
1
Fork 0
nixos-configs/machine/unfolder/default.nix

119 lines
2.9 KiB
Nix
Raw Permalink Normal View History

2023-08-04 04:52:49 +00:00
{ config, pkgs, lib, ... }:
{
imports =
[
./hardware-configuration.nix
];
beatific.hostName = "unfolder";
2024-01-17 22:57:41 +00:00
beatific.extraPrograms = true;
2023-08-04 04:52:49 +00:00
# Bootloader.
boot.loader.grub = {
enable = true;
device = "/dev/sda";
};
networking.networkmanager.enable = true;
2024-04-23 05:22:03 +00:00
fileSystems."/mnt/backyard" = {
device = "//backyard.home/tvb";
fsType = "cifs";
options = [
"x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,credentials=/home/tvb/.local/state/smb/backyard"
];
};
2023-08-04 04:52:49 +00:00
# Override time zone to PST
time.timeZone = "America/Los_Angeles";
# Enable Gnome because it has a virtual keyboard for tablet mode
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
# keymap configuration
2024-06-03 04:40:02 +00:00
xkb.layout = "us";
xkb.variant = "";
2023-08-04 04:52:49 +00:00
};
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
systemd.user.services.yoga-rotate = {
enable = false; # TODO
description = "ThinkPad Yoga display rotation";
#wantedBy = ["multi-user.target"];
wantedBy = [ "graphical-session.target" ];
#requires = ["display-manager.service"];
partOf = [ "graphical-session.target" ];
#after = ["display-manager.service"];
path = [ pkgs.gnome-randr ];
serviceConfig = {
#Type = "simple";
ExecStart = "${pkgs.python3}/bin/python /home/tvb/rotate.py";
#KillMode = "process";
#User = "tvb";
Restart = "on-failure";
RestartSec = 5;
};
#environment = {
# DISPLAY = ":0";
# XAUTHORITY = "/home/tvb/.Xauthority";
#};
};
users.users.tvb = {
2024-08-17 03:00:14 +00:00
extraGroups = [ "networkmanager" "docker" ];
2023-08-04 04:52:49 +00:00
packages = with pkgs; [
gnome-randr
python3
(writeShellScriptBin "single-file" ''
exec ${single-file-cli}/bin/single-file --browser-executable-path ${chromium}/bin/chromium "$@"
'')
2023-08-04 04:52:49 +00:00
];
};
2024-01-09 08:00:52 +00:00
nixpkgs.config.allowUnfree = true;
2023-08-04 04:52:49 +00:00
environment.systemPackages = with pkgs; [
2024-06-26 03:30:27 +00:00
bitwarden-cli
bitwarden-desktop
comic-mono
2023-08-04 04:52:49 +00:00
firefox
gnome.gnome-terminal
libreoffice
2024-01-09 08:00:52 +00:00
obsidian
mpv
2024-08-28 19:33:41 +00:00
qutebrowser
2023-08-04 04:52:49 +00:00
];
networking.firewall = {
enable = true;
};
2024-02-06 16:22:25 +00:00
# This seems to be sufficient to autodetect the printing functionality of HP OfficeJet 6950
services.printing.enable = true;
services.printing.drivers = [ pkgs.hplip ];
services.avahi = {
enable = true;
2024-06-03 04:40:02 +00:00
nssmdns4 = true;
2024-02-06 16:22:25 +00:00
openFirewall = true;
};
2023-08-04 04:52:49 +00:00
# This value governs how some stateful data, like databases, are handled
# across different versions of NixOS. This should not be changed to a new
# release unless the sysadmin has determined that no services would be
# adversely affected by changing this.
system.stateVersion = "22.11";
}