Skip to content

Commit

Permalink
added some tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhmancs committed Jul 7, 2024
1 parent 6ed50c2 commit f9015ec
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 30 deletions.
1 change: 1 addition & 0 deletions flake-parts/lib/secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# overridden, the secret will be owned by root, and have mode 400.
# The file argument is mandatory, and should be relative to
# ${self}/secrets to find the secret.
# ${self} refers to the root directory of the flake.
mkAgenixSecret = enableCondition: {
file,
owner ? "root",
Expand Down
2 changes: 0 additions & 2 deletions homes/shared/programs/git.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
pkgs,
...
}: let
inherit (osConfig) modules;

gitPackage = pkgs.gitFull;
in {
config = {
Expand Down
5 changes: 1 addition & 4 deletions homes/shared/shell/nushell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
osConfig,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (osConfig) modules;
in {
}: {
config = {
programs = {
direnv = {
Expand Down
2 changes: 1 addition & 1 deletion machines/milkyway/modules/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
...
}: {
config = {
boot.loader.grub.enable = true;
boot.loader.systemd-boot.enable = true;
boot.plymouth.enable = true;
# services.seatd.enable = true;
xdg.portal.enable = true;
Expand Down
2 changes: 1 addition & 1 deletion modules/exclusive/nixos/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
imports = [
# ./server
./server
./shared
./workstation
];
Expand Down
14 changes: 14 additions & 0 deletions modules/exclusive/nixos/server/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
imports = [
./bincache
./networking
./social

./elasticsearch.nix
./forgejo-runner.nix
./forgejo.nix
./invidious.nix
./reposilite.nix
./tor.nix
];
}
2 changes: 0 additions & 2 deletions modules/exclusive/nixos/server/forgejo-runner.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
}: let
inherit (lib) mkIf;

cfg = config.modules.system.services;

# construct each runner using the mkRunner function
# you can pass additional configuration options in the instance submodule
# it'll be merged to the below configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
...
}: let
inherit (lib) mkIf;

sys = config.modules.system;
cfg = sys.services;
in {
imports = [
./acls.nix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#
# Wireguard Server Configuration
#
{
config,
lib,
...
}: let
inherit (lib) mkIf;

sys = config.modules.system;
cfg = sys.services;

dev = config.modules.device;
acceptedTypes = ["server" "hybrid"];
in {
Expand Down
3 changes: 0 additions & 3 deletions modules/exclusive/nixos/server/social/mastodon.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
...
}: let
inherit (lib) mkIf;

sys = config.modules.system;
cfg = sys.services.social;
in {
config = mkIf config.services.mastodon.enable {
modules.system.services = {
Expand Down
4 changes: 3 additions & 1 deletion modules/exclusive/nixos/shared/hardware/bluetooth.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
...
}: let
inherit (lib) mkIf;
dev = config.modules.device;
in {
config = mkIf config.hardware.bluetooth.enable {
config = mkIf dev.hasSound {
boot.kernelParams = ["btusb"];

hardware.bluetooth = {
enable = true;
package = pkgs.bluez5-experimental;
#hsphfpd.enable = true;
powerOnBoot = true;
Expand Down
4 changes: 3 additions & 1 deletion modules/exclusive/nixos/shared/hardware/tpm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
...
}: let
inherit (lib) mkIf mkDefault;
dev = config.modules.device;
in {
config = mkIf config.security.tpm2.enable {
config = mkIf dev.hasTPM {
security.tpm2 = {
enable = true;
# enable Trusted Platform Module 2 support

# enable Trusted Platform 2 userspace resource manager daemon
Expand Down
2 changes: 1 addition & 1 deletion modules/exclusive/nixos/workstation/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
imports = [
./gaming
./virtualization
./wayland
./gaming

./encryption.nix
./hyprland.nix
Expand Down
2 changes: 1 addition & 1 deletion modules/roles/laptop/power/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
pkgs,
...
}: let
inherit (lib) mkIf mkDefault;
inherit (lib) mkDefault;
in {
imports = [./monitor.nix];

Expand Down
2 changes: 2 additions & 0 deletions modules/roles/workstation/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@
./services

./fonts.nix
./misc.nix
./tcpcrypt.nix
];
}
4 changes: 1 addition & 3 deletions modules/roles/workstation/tcpcrypt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
pkgs,
lib,
...
}: let
inherit (lib) mkIf;
in {
}: {
# get rid of the tcpcrypt module provided by nixpkgs
# it is unmaintained and I cannot be arsed to PR a fix
disabledModules = ["services/networking/tcpcrypt.nix"];
Expand Down
1 change: 1 addition & 0 deletions modules/shared/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
imports = [
./environment
./networking
./nix
./programs
./secrets
Expand Down
2 changes: 1 addition & 1 deletion modules/shared/networking/network-manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
lib,
...
}: let
inherit (lib.modules) mkIf mkForce;
inherit (lib.modules) mkForce;
in {
# we use networkmanager manage network devices locally
environment.systemPackages = with pkgs; [networkmanagerapplet];
Expand Down
3 changes: 0 additions & 3 deletions modules/shared/security/kernel.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
++ [
"mitigations=off" # Of course we don't want no mitigations
];

sys = config.modules.system;
cfg = sys.security;
in {
config = {
security = {
Expand Down

0 comments on commit f9015ec

Please sign in to comment.