Skip to content

Commit

Permalink
treewide: apply suggestions by nixd
Browse files Browse the repository at this point in the history
  • Loading branch information
inclyc committed Apr 23, 2024
1 parent 598971e commit 0f66425
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 45 deletions.
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
{ self
, nixpkgs
, nur
, home-manager
, flake-utils
, flake-parts
, sops-nix
Expand Down
2 changes: 1 addition & 1 deletion home/lyc/configurations/aplaz/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, config, lib, ... }:
{ config, ... }:
{
services.kdeconnect.enable = true;

Expand Down
2 changes: 1 addition & 1 deletion home/lyc/modules/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ lib, ... }:
{
imports = [
./programs/direnv.nix
Expand Down
2 changes: 1 addition & 1 deletion nixos/configurations/adrastea/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, lib, inputs, ... }:
{ pkgs, lib, ... }:

{
inclyc = {
Expand Down
48 changes: 24 additions & 24 deletions nixos/configurations/adrastea/networking.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, config, ... }:
{ ... }:
let
mkTapDev = name: {
"20-${name}" = {
Expand All @@ -22,29 +22,29 @@ in

services.dante.enable = true;
services.dante.config = ''
internal: 0.0.0.0 port = 20179
external: br0
clientmethod: none
socksmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}
socks pass {
from: 0.0.0.0/0 to: 10.3.2.104/32
command: bind connect udpassociate bindreply udpreply
log: error connect disconnect iooperation
}
socks pass {
from: 0.0.0.0/0 to: 10.3.2.130/32
command: bind connect udpassociate bindreply udpreply
log: error connect disconnect iooperation
}
socks pass {
from: 0.0.0.0/0 to: 10.208.130.239/32
command: bind connect udpassociate bindreply udpreply
log: error connect disconnect iooperation
}
internal: 0.0.0.0 port = 20179
external: br0
clientmethod: none
socksmethod: none
client pass {
from: 0.0.0.0/0 to: 0.0.0.0/0
log: error connect disconnect
}
socks pass {
from: 0.0.0.0/0 to: 10.3.2.104/32
command: bind connect udpassociate bindreply udpreply
log: error connect disconnect iooperation
}
socks pass {
from: 0.0.0.0/0 to: 10.3.2.130/32
command: bind connect udpassociate bindreply udpreply
log: error connect disconnect iooperation
}
socks pass {
from: 0.0.0.0/0 to: 10.208.130.239/32
command: bind connect udpassociate bindreply udpreply
log: error connect disconnect iooperation
}
'';

systemd.network.enable = true;
Expand Down
1 change: 0 additions & 1 deletion nixos/configurations/adrastea/vm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ let
, enableEmulatedGPU ? false
, enableGPUPassthrough ? true
, enableEvdevInputs ? true
, enableUSB ? true
, memory
}:
let
Expand Down
3 changes: 1 addition & 2 deletions nixos/configurations/metis/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ config
, pkgs
{ pkgs
, lib
, inputs
, ...
Expand Down
17 changes: 11 additions & 6 deletions nixos/configurations/metis/hardware-configuration.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ lib, modulesPath, ... }:

{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
[
(modulesPath + "/profiles/qemu-guest.nix")
];

boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
Expand All @@ -16,25 +17,29 @@
zramSwap.enable = true;

fileSystems."/" =
{ device = "/dev/disk/by-uuid/30f213a7-0d61-4053-9e50-e02f43c16d38";
{
device = "/dev/disk/by-uuid/30f213a7-0d61-4053-9e50-e02f43c16d38";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" ];
};

fileSystems."/home" =
{ device = "/dev/disk/by-uuid/30f213a7-0d61-4053-9e50-e02f43c16d38";
{
device = "/dev/disk/by-uuid/30f213a7-0d61-4053-9e50-e02f43c16d38";
fsType = "btrfs";
options = [ "subvol=home" "compress=zstd" ];
};

fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/30f213a7-0d61-4053-9e50-e02f43c16d38";
{
device = "/dev/disk/by-uuid/30f213a7-0d61-4053-9e50-e02f43c16d38";
fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ];
};

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/B094-B461";
{
device = "/dev/disk/by-uuid/B094-B461";
fsType = "vfat";
};

Expand Down
2 changes: 1 addition & 1 deletion nixos/configurations/metis/minecraft/caketower.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ in
after = [ "systemd-networkd-wait-online.service" ];
description = "Minecraft Server (Cake Tower)";
requires = [ "${serviceName}.socket" ];
serviceConfig = rec {
serviceConfig = {
Type = "simple";
DynamicUser = true;
StateDirectory = directory;
Expand Down
2 changes: 1 addition & 1 deletion nixos/configurations/metis/minecraft/construct.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ in
after = [ "systemd-networkd-wait-online.service" ];
description = "Minecraft Server (Constructions)";
requires = [ "${serviceName}.socket" ];
serviceConfig = rec {
serviceConfig = {
Type = "simple";
DynamicUser = true;
StateDirectory = directory;
Expand Down
2 changes: 1 addition & 1 deletion nixos/configurations/metis/minecraft/dawncraft.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ in
after = [ "systemd-networkd-wait-online.service" ];
description = "Minecraft Server (DawnCraft 1.33f)";
requires = [ "${serviceName}.socket" ];
serviceConfig = rec {
serviceConfig = {
Type = "simple";
DynamicUser = true;
StateDirectory = directory;
Expand Down
2 changes: 1 addition & 1 deletion nixos/configurations/metis/minecraft/msd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ in
after = [ "systemd-networkd-wait-online.service" ];
description = "Minecraft Server (Modern Skyblock 3: Departed)";
requires = [ "${serviceName}.socket" ];
serviceConfig = rec {
serviceConfig = {
Type = "simple";
DynamicUser = true;
StateDirectory = directory;
Expand Down
2 changes: 1 addition & 1 deletion nixos/configurations/metis/wireguard.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
{
sops.secrets."wireguard/privkeys/metis" = {
owner = config.users.users.systemd-network.name;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/clash/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "systemd-networkd-wait-online.service" ];
description = "Clash Daemon";
serviceConfig = rec {
serviceConfig = {
Type = "simple";
DynamicUser = "yes";
LoadCredential = "config.yaml:${cfg.configPath}";
Expand Down
3 changes: 1 addition & 2 deletions pkgs/topsap/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
, perl
, dpkg
, libuuid
, buildFHSUserEnvBubblewrap
, autoPatchelfHook
, ...
}:
stdenv.mkDerivation rec {
pname = "topsap";
version = "3.5.2.36.2";
src = fetchurl {
urls = [
urls = [
"https://github.com/inclyc/containerized-topsap/releases/download/topsec-v${version}/TopSAP-${version}-x86_64.deb"
"https://app.topsec.com.cn/vpn/sslvpnclient/TopSAP-${version}-x86_64.deb"
];
Expand Down

0 comments on commit 0f66425

Please sign in to comment.