Compare commits

...

8 Commits

23 changed files with 89 additions and 108 deletions

View File

@ -31,6 +31,10 @@
programs = { programs = {
chezmoi.apply = true; chezmoi.apply = true;
kitty.enable = true; kitty.enable = true;
};
services = {
samba-client.enable = true;
ssh.enable = true;
syncthing = { syncthing = {
enable = true; enable = true;
keyPath = ../../secrets/syncthing/bulwark/key.pem.age; keyPath = ../../secrets/syncthing/bulwark/key.pem.age;
@ -40,12 +44,5 @@
}; };
}; };
}; };
services = {
samba-client.enable = true;
};
system = {
ssh.enable = true;
terminal.enable = true;
};
}; };
} }

View File

@ -36,6 +36,7 @@
desktop = { desktop = {
enable = true; enable = true;
gnome.enable = true; gnome.enable = true;
peripherals.enable = true;
}; };
devel = { devel = {
engineering.enable = true; engineering.enable = true;
@ -48,8 +49,14 @@
}; };
programs = { programs = {
beancount.enable = true; beancount.enable = true;
borg.enable = true;
chezmoi.apply = true; chezmoi.apply = true;
kitty.enable = true; kitty.enable = true;
virt-manager.enable = true;
};
services = {
samba-client.enable = true;
ssh.enable = true;
syncthing = { syncthing = {
enable = true; enable = true;
keyPath = ../../secrets/syncthing/kestrel/key.pem.age; keyPath = ../../secrets/syncthing/kestrel/key.pem.age;
@ -59,15 +66,5 @@
}; };
}; };
}; };
services = {
peripherals.enable = true;
samba-client.enable = true;
virt-manager.enable = true;
};
system = {
backup.enable = true;
ssh.enable = true;
terminal.enable = true;
};
}; };
} }

View File

@ -33,15 +33,15 @@
desktop = { desktop = {
enable = true; enable = true;
gnome.enable = true; gnome.enable = true;
peripherals.enable = true;
}; };
programs = { programs = {
chezmoi.apply = true; chezmoi.apply = true;
kitty.enable = true; kitty.enable = true;
virt-manager.enable = true;
}; };
services = { services = {
peripherals.enable = true;
samba-client.enable = true; samba-client.enable = true;
virt-manager.enable = true;
}; };
system = { system = {
ssh.enable = true; ssh.enable = true;

View File

@ -23,6 +23,7 @@
desktop = { desktop = {
enable = true; enable = true;
gnome.enable = true; gnome.enable = true;
peripherals.enable = true;
}; };
devel = { devel = {
engineering.enable = true; engineering.enable = true;
@ -31,11 +32,10 @@
programs = { programs = {
kitty.enable = true; kitty.enable = true;
chezmoi.apply = true; chezmoi.apply = true;
virt-manager.enable = false;
}; };
services = { services = {
peripherals.enable = true;
samba-client.enable = true; samba-client.enable = true;
virt-manager.enable = false;
}; };
system = { system = {
ssh.enable = true; ssh.enable = true;

View File

@ -1,4 +1,10 @@
{ ... }: { ... }:
{ {
imports = [ ./desktop ./devel ./gaming ./programs ./system ./services ]; imports = [
./desktop
./devel
./gaming
./programs
./services
];
} }

View File

@ -6,6 +6,7 @@ in {
./kde-connect.nix ./kde-connect.nix
./keyd.nix ./keyd.nix
./gnome.nix ./gnome.nix
./peripherals.nix
]; ];
options.modules.desktop.enable = lib.mkEnableOption "desktop"; options.modules.desktop.enable = lib.mkEnableOption "desktop";

View File

@ -0,0 +1,17 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.desktop.peripherals;
in {
options.modules.desktop.peripherals.enable = lib.mkEnableOption "peripherals";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
libimobiledevice # Library to support iPhone, iPod Touch and iPad devices on Linux
ifuse # fuse filesystem implementation to access the contents of iOS devices
pySVS # control SVS subwoofers from the command-line
opensc # Open source smart card tools and middleware
pcsc-tools # Tools are used to test a PC/SC drivers
pkcs11helper # Library that simplifies the interaction with PKCS#11
];
services.usbmuxd.enable = true; # for iOS mounting as storage
};
}

View File

@ -5,9 +5,9 @@ in {
options.modules.gaming.steam.enable = lib.mkEnableOption "steam"; options.modules.gaming.steam.enable = lib.mkEnableOption "steam";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
steamtinkerlaunch # Launcher and optimization tool for Steam games.
gamescope # Utility for running games using Valve's Steam Play compatibility layer with improved performance and compatibility. gamescope # Utility for running games using Valve's Steam Play compatibility layer with improved performance and compatibility.
mangohud # Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more. mangohud # Vulkan and OpenGL overlay for monitoring FPS, temperatures, CPU/GPU load and more.
steamtinkerlaunch # Launcher and optimization tool for Steam games.
]; ];
hardware.graphics.enable = true; # this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932 hardware.graphics.enable = true; # this fixes the "glXChooseVisual failed" bug, context: https://github.com/NixOS/nixpkgs/issues/47932

View File

@ -1,10 +1,15 @@
{ config, lib, pkgs, user, ... }: { config, lib, pkgs, user, ... }:
let cfg = config.modules.system.terminal; let cfg = config.modules.programs.base-terminal;
in { in {
options.modules.system.terminal.enable = lib.mkEnableOption "terminal"; options.modules.programs.base-terminal = with lib; {
config = lib.mkIf cfg.enable { enable = lib.mkOption {
type = with types; bool;
default = true;
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
killall # Command-line utility to terminate processes by name. killall # Command-line utility to terminate processes by name.
pciutils # Utilities for inspecting and manipulating devices connected to the PCI bus. pciutils # Utilities for inspecting and manipulating devices connected to the PCI bus.

View File

@ -1,10 +1,9 @@
{ config, pkgs, user, lib, ... }: { config, pkgs, user, lib, ... }:
let cfg = config.modules.system.backup; let cfg = config.modules.programs.borg;
in { in {
options.modules.system.backup.enable = lib.mkEnableOption "backup"; options.modules.programs.borg.enable = lib.mkEnableOption "borg";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.borgmatic.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
borgbackup # Deduplicating backup program borgbackup # Deduplicating backup program
tree tree
@ -22,5 +21,6 @@ in {
rm /tmp/docker_images rm /tmp/docker_images
'') '')
]; ];
services.borgmatic.enable = true;
}; };
} }

View File

@ -1,5 +1,3 @@
# Chrome bookmarks
[ [
{ "toplevel_name" = "Bookmarks"; } { "toplevel_name" = "Bookmarks"; }
{ "name" = "Daily"; "children" = [ { "name" = "Daily"; "children" = [

View File

@ -1,14 +1,16 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./base-terminal.nix
./beancount.nix ./beancount.nix
./borg.nix
./chrome ./chrome
./firefox ./firefox
./git.nix ./git.nix
./chezmoi.nix ./chezmoi.nix
./kitty.nix ./kitty.nix
./nvim.nix ./nvim.nix
./syncthing.nix ./virt-manager.nix
./yt-dlp.nix ./yt-dlp.nix
]; ];
} }

View File

@ -1,5 +1,3 @@
# Firefox bookmarks
[ [
{ name = "Managed Bookmarks"; toolbar = true; bookmarks = [ { name = "Managed Bookmarks"; toolbar = true; bookmarks = [
{ name = "Bookmarks"; bookmarks = [ { name = "Bookmarks"; bookmarks = [

View File

@ -11,13 +11,6 @@ in {
}; };
config = lib.mkIf (cfg1.enable && cfg2.enable) { config = lib.mkIf (cfg1.enable && cfg2.enable) {
# Applications for CAC usage
environment.systemPackages = with pkgs; [
opensc
pcsc-tools
pkcs11helper
];
home-manager.users.${user} = { home-manager.users.${user} = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;

View File

@ -1,13 +1,13 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let cfg = config.modules.services.virt-manager; let cfg = config.modules.programs.virt-manager;
in { in {
options.modules.services.virt-manager.enable = lib.mkEnableOption "virt-manager"; options.modules.programs.virt-manager.enable = lib.mkEnableOption "virt-manager";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
virt-manager # Desktop application for managing virtual machines through libvirt. virt-manager # Desktop application for managing virtual machines through libvirt.
]; ];
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
}; };
} }

View File

@ -1,4 +1,8 @@
{ ... }: { ... }:
{ {
imports = [ ./peripherals.nix ./samba-client.nix ./virt-manager.nix ]; imports = [
./samba-client.nix
./ssh.nix
./syncthing.nix
];
} }

View File

@ -1,26 +0,0 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.services.peripherals;
in {
options.modules.services.peripherals.enable = lib.mkEnableOption "peripherals";
config = lib.mkIf cfg.enable {
services.usbmuxd.enable = true; # for iOS mounting as storage
environment.systemPackages = with pkgs; [
pulseaudio # Sound server for Linux and other Unix-like operating systems.
pavucontrol # Simple GTK based mixer for the PulseAudio sound server
libimobiledevice # Library to support iPhone, iPod Touch and iPad devices on Linux
ifuse # fuse filesystem implementation to access the contents of iOS devices
usbtop
pySVS # control SVS subwoofers from the command-line
];
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}

View File

@ -4,14 +4,11 @@ let cfg = config.modules.services.samba-client;
in { in {
options.modules.services.samba-client.enable = lib.mkEnableOption "samba-client"; options.modules.services.samba-client.enable = lib.mkEnableOption "samba-client";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# the needed ports in the firewall.
networking.firewall.allowedTCPPorts = [ 445 139 ];
networking.firewall.allowedUDPPorts = [ 137 138 ];
# To make SMB mounting easier on the command line
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cifs-utils # Utilities for mounting and managing CIFS (Common Internet File System) shares. cifs-utils # Utilities for mounting and managing CIFS (Common Internet File System) shares.
]; ];
networking.firewall.allowedTCPPorts = [ 445 139 ];
networking.firewall.allowedUDPPorts = [ 137 138 ];
}; };
} }

View File

@ -0,0 +1,15 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.services.ssh;
in {
options.modules.services.ssh.enable = lib.mkEnableOption "ssh";
config = lib.mkIf cfg.enable {
services.openssh.enable = true;
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-curses;
enableSSHSupport = true;
};
};
}

View File

@ -1,8 +1,8 @@
{ config, lib, pkgs, user, ... }: { config, lib, pkgs, user, ... }:
let cfg = config.modules.programs.syncthing; let cfg = config.modules.services.syncthing;
in { in {
options.modules.programs.syncthing = with lib; { options.modules.services.syncthing = with lib; {
enable = lib.mkOption { enable = lib.mkOption {
type = types.bool; type = types.bool;
default = false; default = false;

View File

@ -1,4 +0,0 @@
{ ... }:
{
imports = [ ./backup.nix ./ssh.nix ./terminal.nix ];
}

View File

@ -1,16 +0,0 @@
{ config, lib, pkgs, user, ... }:
let cfg = config.modules.system.ssh;
in {
options.modules.system.ssh.enable = lib.mkEnableOption "ssh";
config = lib.mkIf cfg.enable {
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-curses;
enableSSHSupport = true;
};
};
}

View File

@ -1,14 +1,11 @@
/* This contains various packages we want to overlay. Note that the
* other ".nix" files in this directory are automatically loaded.
*/
final: prev: { final: prev: {
advcpmv = final.callPackage ../pkgs/advcpmv.nix {}; advcpmv = final.callPackage ../pkgs/advcpmv.nix {};
ftw = final.callPackage ../pkgs/ftw.nix {};
gnome-fullscreen-to-empty-workspace = final.callPackage ../pkgs/gnome-fullscreen-to-empty-workspace.nix {};
gnome-set-panel-monitor = final.callPackage ../pkgs/gnome-set-panel-monitor.nix {};
nx_tzdb = final.callPackage ../pkgs/nx_tzdb.nix {}; nx_tzdb = final.callPackage ../pkgs/nx_tzdb.nix {};
pySVS = final.callPackage ../pkgs/pySVS.nix {};
ryujinx = final.callPackage ../pkgs/ryujinx/default.nix {};
sudachi = final.qt6.callPackage ../pkgs/sudachi/default.nix {}; sudachi = final.qt6.callPackage ../pkgs/sudachi/default.nix {};
yuzu = final.libsForQt5.callPackage ../pkgs/yuzu.nix {}; yuzu = final.libsForQt5.callPackage ../pkgs/yuzu.nix {};
gnome-set-panel-monitor = final.callPackage ../pkgs/gnome-set-panel-monitor.nix {};
gnome-fullscreen-to-empty-workspace = final.callPackage ../pkgs/gnome-fullscreen-to-empty-workspace.nix {};
ryujinx = final.callPackage ../pkgs/ryujinx/default.nix {};
pySVS = final.callPackage ../pkgs/pySVS.nix {};
ftw = final.callPackage ../pkgs/ftw.nix {};
} }