Compare commits

...

5 Commits

9 changed files with 113 additions and 8 deletions

View File

@ -41,7 +41,7 @@
ptw = {
programs = {
alacritty.enable = true;
sway.enable = true;
sway.enable = false;
emacs.enable = true;
firefox.enable = true;
tmux.enable = true;
@ -56,8 +56,9 @@
direnv.enable = true;
};
services = {
yubikey.enable = true;
cups.enable = true;
gnome.enable = true;
gnome.enable = false;
kanshi = let
horizontal = "Samsung Electric Company C27F398 H4ZR101145";
@ -123,12 +124,29 @@
};
};
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
};
};
environment.systemPackages = with pkgs; [
ansible
gnumake
(pkgs.callPackage ./wrapper.nix {
inherit (pkgs) retroarch;
cores = with pkgs.libretro; [
mgba mupen64plus melonds desmume dolphin
];
})
];
programs = {
gnupg.agent.pinentryFlavor = "qt";
gnupg.agent = {
pinentryFlavor = "qt";
};
};
}

37
hosts/wrapper.nix Normal file
View File

@ -0,0 +1,37 @@
{ stdenv, lib, makeWrapper, retroarch, cores ? [ ] }:
stdenv.mkDerivation {
pname = "retroarch";
version = lib.getVersion retroarch;
nativeBuildInputs = [ makeWrapper ];
buildCommand = ''
mkdir -p $out/lib
for coreDir in $cores
do
ln -s $coreDir/* $out/lib/.
done
ln -s -t $out ${retroarch}/share
if [ -d ${retroarch}/Applications ]; then
ln -s -t $out ${retroarch}/Applications
fi
makeWrapper ${retroarch}/bin/retroarch $out/bin/retroarch \
--suffix-each LD_LIBRARY_PATH ':' "$cores" \
--add-flags "-L $out/lib/" \
'';
cores = map (x: x + x.libretroCore) cores;
preferLocalBuild = true;
meta = with retroarch.meta; {
inherit changelog description homepage license maintainers platforms;
longDescription =
"RetroArch is the reference frontend for the libretro API. The following cores are included: "
+ lib.concatStringsSep ", " (map (x: "${x.name}") cores)
+ ".";
};
}

View File

@ -33,7 +33,14 @@ in {
};
networking = {
useDHCP = false; # Done by the network manager
networkmanager.enable = true;
networkmanager = {
enable = true;
plugins = with pkgs; [
networkmanager-vpnc
networkmanager-openvpn
networkmanager-openconnect
];
};
#interfaces.*.useDHCP = false;

View File

@ -36,6 +36,7 @@
./services/greetd
./services/cups
./services/logiops
./services/yubikey
# User
#./users/default.nix

View File

@ -14,7 +14,7 @@ in {
description = "Ignore NixOS 'recommendations' and use the Wayland session by default";
};
};
sddm = {
/*sddm = {
backgroundImage = lib.mkOption {
default = "${pkgs.sddm-sugar-dark}/usr/share/sddm/themes/sugar-dark/Background.jpg";
description = "The background image to use with sddm-sugar-dark";
@ -27,7 +27,7 @@ in {
default = 1080;
description = "Width of the screen";
};
};
};*/
};
config = lib.mkIf cfg.enable {

View File

@ -83,7 +83,7 @@ in {
xdg.portal = {
enable = true;
#extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
gtkUsePortal = true;
#gtkUsePortal = true;
};
qt5 = {

View File

@ -15,6 +15,10 @@ in {
drivers = with pkgs; [ hplip ];
};
services.avahi = {
enable = lib.mkForce true;
nssmdns = true;
};
hardware.sane = {
enable = true;
extraBackends = with pkgs; [ sane-airscan hplip ];

View File

@ -0,0 +1,31 @@
{ lib, config, pkgs, ...}:
let
cfg = config.ptw.services.yubikey;
in {
options.ptw.services.yubikey = {
enable = lib.mkEnableOption "Enable everything for using a YubiKey";
};
config = lib.mkIf cfg.enable {
services = {
# Unprivileged access to the YubiKey
udev.packages = [ pkgs.yubikey-personalization ];
# Allow using the YubiKey as a smart card
pcscd.enable = true;
};
environment.systemPackages = with pkgs; [
# Management
yubikey-manager-qt yubikey-manager yubico-piv-tool
];
programs = {
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
};
}

View File

@ -24,7 +24,7 @@
programs.ssh = {
enable = true;
matchBlocks = let
sshPort = 3434;
sshPort = 1847;
in {
ayame = {
port = sshPort;
@ -33,6 +33,13 @@
identityFile = "~/.ssh/polynom.me_ayame";
identitiesOnly = true;
};
taihou = {
port = sshPort;
hostname = "162.55.43.248";
user = "alexander";
identityFile = "~/.ssh/polynom.me_ayame";
identitiesOnly = true;
};
"git.polynom.me" = {
port = 2222;
user = "gitea";