Add Disco

This commit is contained in:
fruchti 2023-02-26 20:08:39 +01:00
parent 96dbda3ea2
commit 94859a92a3
6 changed files with 253 additions and 0 deletions

150
hosts/Disco.nix Normal file
View file

@ -0,0 +1,150 @@
{ config, lib, pkgs, ... }:
let
definedInPersonalDotNix = lib.mkDefault (throw "Configuration option missing from personal.nix");
in
{
imports = [
./development.nix
./gnome.nix
./x270.nix
./scanner.nix
./printer.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
i18n.defaultLocale = "de_DE.UTF-8";
networking.hostName = "Disco";
networking.networkmanager.enable = true;
services.avahi.enable = true;
networking.firewall.allowedTCPPorts = [ 22 ];
programs.gnupg.agent = {
enable = true;
# enableSSHSupport = true;
};
environment.systemPackages = with pkgs; [
ntfsprogs
direnv nix-direnv
tmux zellij
helix
picocom
wget
texlive.combined.scheme-full
xsel
rsync
ranger nnn w3m
hexyl
git
gnupg
ripgrep
fd
ncdu
rink
htop
ncmpcpp
usbutils # lsusb etc.
file
binwalk
shellcheck
wineWowPackages.stable
winePackages.fonts
pavucontrol
xsensors
kitty
kitty-themes
firefox
ungoogled-chromium
thunderbird
zathura
inkscape
vlc
gthumb
gimp
tenacity
openscad
freecad
solvespace
vscodium
marktext
tor-browser-bundle-bin
libreoffice-fresh
tdesktop
horizon-eda
cura
pulseview
nextcloud-client
];
programs.evolution = {
enable = true;
plugins = [ pkgs.evolution-ews ];
};
system.extraDependencies = with pkgs; [
# For various development environments
gcc-arm-embedded
gnumake
];
services.burp.client = {
enable = true;
password = definedInPersonalDotNix;
server = "rupert";
sslKeyPassword = definedInPersonalDotNix;
includes = [ "/etc/nixos" "/home" ];
extraConfig = ''
working_dir_recovery_method = resume
max_resume_attempts = 5
exclude_regex = /home/.*/\.cache
exclude_regex = /home/.*/\.mozilla
exclude_regex = /home/.*/\.local
exclude_regex = /home/.*/\.cargo
exclude_regex = /home/.*/\.texlive.*
exclude_regex = /home/.*/\.vscode.*
exclude_regex = sync_[0-9a-f]+\.db
'';
};
programs.steam = {
enable = true;
# remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
# dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-runtime"
"steam-run"
];
fileSystems."/windows" = {
device = "/dev/disk/by-uuid/C61C2B5E1C2B492F";
fsType = "ntfs";
options = [
"defaults"
"gid=1010"
"umask=002"
];
};
users.extraGroups = {
windows = {
gid = 1010;
members = [ "fruchti" ];
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "22.05"; # Did you read the comment?
}

60
hosts/gnome.nix Normal file
View file

@ -0,0 +1,60 @@
{ pkgs, ... }:
{
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.libinput.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.xserver.displayManager = {
gdm.enable = true;
gdm.wayland = false;
autoLogin.enable = true;
autoLogin.user = "fruchti";
};
security.pam.services.gdm.enableGnomeKeyring = true;
services.touchegg.enable = true;
services.gnome.gnome-settings-daemon.enable = true;
services.gnome.tracker-miners.enable = false;
services.gnome.tracker.enable = false;
environment.systemPackages = with pkgs; [
gnome.gnome-tweaks gnome.gnome-shell-extensions
gnomeExtensions.caffeine gnomeExtensions.tray-icons-reloaded gnomeExtensions.x11-gestures gnomeExtensions.git
# gnome.nautilus-python nautilus-open-any-terminal
pinentry-curses
(callPackage ../packages/alias.nix {
inputPackage = kitty;
inputName = "kitty";
outputName = "gnome-terminal";
})
# (gnome-console.overrideAttrs (old: {
# phases = [ "installPhase" ];
# installPhase = ''
# mkdir -p $out/bin
# ln -s ${kitty}/bin/kitty $out/bin/gnome-console
# '';
# }))
];
programs.gnupg.agent.pinentryFlavor = "curses";
environment.gnome.excludePackages = (with pkgs; [
gnome-photos
gnome-tour
gnome-console
modemmanager
]) ++ (with pkgs.gnome; [
cheese # webcam tool
gnome-music
gnome-terminal
gedit # text editor
epiphany # web browser
geary # email reader
gnome-characters
totem # video player
tali # poker game
iagno # go game
hitori # sudoku game
atomix # puzzle game
]);
}

7
hosts/printer.nix Normal file
View file

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
services.printing = {
enable = true;
drivers = with pkgs; [ postscript-lexmark ];
};
}

6
hosts/scanner.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
hardware.sane.enable = true;
hardware.sane.disabledDefaultBackends = [ "v4l" ];
users.users.fruchti.extraGroups = [ "scanner" ];
}

20
hosts/x270.nix Normal file
View file

@ -0,0 +1,20 @@
{ ... }:
{
hardware.trackpoint = {
enable = true;
sensitivity = 230;
speed = 170;
};
services.xserver.videoDrivers = [ "modesetting" ];
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
console = {
font = "Lat2-Terminus16";
keyMap = "de";
};
}

10
packages/alias.nix Normal file
View file

@ -0,0 +1,10 @@
{ stdenv, inputPackage, inputName, outputName }:
stdenv.mkDerivation rec {
pname = outputName;
version = "1.0";
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
ln -s ${inputPackage}/bin/${inputName} $out/bin/${outputName}
'';
}