Lots of changes.

This commit is contained in:
Nolan Darilek 2024-11-20 14:14:59 -06:00
parent 2b7a304b07
commit 81f1b66878
11 changed files with 103 additions and 32 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.iso

View File

@ -7,7 +7,14 @@
users.mutableUsers = false;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ file vim ];
environment.systemPackages = with pkgs; [
file
vim
curl
wget
git
];
environment.variables.EDITOR = "vim";
services.espeakup.enable = true;
}

41
espeakup.nix Normal file
View File

@ -0,0 +1,41 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.espeakup;
inherit (lib)
mkEnableOption
mkIf
mkPackageOption
mkOption
types
;
in
{
options.services.espeakup = {
enable = mkEnableOption "Espeakup screen reader";
package = mkPackageOption pkgs "espeakup" { };
defaultVoice = mkOption {
type = types.str;
default = "en-gb";
description = "Default voice for espeakup";
};
};
config = mkIf cfg.enable {
boot.kernelModules = [ "speakup_soft" ];
systemd.packages = [ pkgs.espeakup ];
systemd.services.espeakup = {
wantedBy = [ "sound.target" ];
environment = {
default_voice = cfg.defaultVoice;
};
serviceConfig = {
ExecStartPre = "";
};
};
};
}

View File

@ -9,7 +9,6 @@
outputs =
{
self,
nixpkgs,
home-manager,
...
@ -24,14 +23,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
}
./configuration.nix
./users/root.nix
./base.nix
./roles/tailscale.nix
./roles/vscode-remote.nix
./roles/media-pc.nix
./roles/k3s.nix
./users/nolan.nix
./hosts/nixbox/configuration.nix
];
};
};

View File

@ -2,10 +2,17 @@
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ pkgs, ... }:
{
imports = [ ./hardware-configuration.nix ];
imports = [
./hardware-configuration.nix
../../base.nix
../../users/root.nix
../../users/nolan.nix
../../espeakup.nix
../../roles/tailscale.nix
../../roles/vscode-remote.nix
../../roles/media-pc.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
@ -18,12 +25,6 @@
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
environment.systemPackages = with pkgs; [
wget
git
curl
];
# Enable the Flakes feature and the accompanying new nix command-line tool
nix.settings.experimental-features = [
"nix-command"

18
iso.nix Normal file
View File

@ -0,0 +1,18 @@
{ config, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
# Provide an initial copy of the NixOS channel so that the user
# doesn't need to run "nix-channel --update" first.
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./espeakup.nix
];
services.espeakup.enable = true;
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
users.users.root.openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPk6C4eOYzTZ8XOuUA2tErGnSTLS/l9kRDl9+5Ql+m7VtaH/KRFbu6x+C0QAIKOrRcQOjpGYUjL1aIn0HCcoEW2PSihDmOHC+W8cy8ucScy4fPI5KpFFqTZU336Fje+NS4n587gcoaa5LjKcr2KZy/ljgzl4eNSRIqy85khfH4puxsj7LwTIqsZoqDhtD/jSqaKP1C2wuYSsijLF85UnRcT9jErnL757yUv/4xb4Is+gB0zan9GiBXRca4lzb0mY8rmMXmKhc2lm/mu8ogZRdYX5R2JP1AukzYGSdOFs4iUauihgvakuou9AugD2CC+ygYIEbWkUjwKfT9nRN93Qi9 id_rsa"
];
services.avahi.enable = true;
}

3
iso.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=iso.nix

View File

@ -1,6 +1,9 @@
{ pkgs, ... }:
{
imports = [ ./pipewire.nix ];
services = {
xserver = {
enable = true;
@ -12,15 +15,6 @@
gnome.gnome-browser-connector.enable = true;
};
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
environment.systemPackages = with pkgs; [
orca
speechd

11
roles/pipewire.nix Normal file
View File

@ -0,0 +1,11 @@
{
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
systemWide = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

View File

@ -9,8 +9,13 @@
extraGroups = [
"wheel"
"networkmanager"
"pipewire"
];
packages = with pkgs; [
dconf2nix
wget
gh
];
packages = with pkgs; [ dconf2nix];
};
home-manager.users.nolan = {
@ -18,9 +23,7 @@
programs = {
firefox = {
enable = true;
package = pkgs.firefox.override {
nativeMessagingHosts = [ pkgs.gnome-browser-connector ];
};
package = pkgs.firefox.override { nativeMessagingHosts = [ pkgs.gnome-browser-connector ]; };
};
git = {