summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2025-02-09 16:53:01 -0600
committerTim Keller <tjkeller.xyz>2025-02-09 16:53:01 -0600
commitfcc3434b1ccaca1c86223d015227858b0a0a2688 (patch)
tree5a5817eabcb77f5be9baac77ad304e6d4cdb97cb /modules
parent3bc77c8dae2a5bf06789ae80cc0356d271660d62 (diff)
downloadnixos-fcc3434b1ccaca1c86223d015227858b0a0a2688.tar.xz
nixos-fcc3434b1ccaca1c86223d015227858b0a0a2688.zip
cleanup and small fixes
Diffstat (limited to 'modules')
-rw-r--r--modules/home/default.nix6
-rw-r--r--modules/hosts/T430/configuration.nix1
-rw-r--r--modules/hosts/T430/home.nix1
-rw-r--r--modules/hosts/T495/configuration.nix8
-rw-r--r--modules/hosts/hp-envy-office/configuration.nix5
-rw-r--r--modules/hosts/libreX60/configuration.nix1
-rw-r--r--modules/hosts/optiplex/configuration.nix20
-rw-r--r--modules/root/bluetooth.nix2
-rw-r--r--modules/root/default.nix2
-rw-r--r--modules/root/hosts.nix4
-rw-r--r--modules/root/suspend.nix16
11 files changed, 29 insertions, 37 deletions
diff --git a/modules/home/default.nix b/modules/home/default.nix
index b44f360..8748fb9 100644
--- a/modules/home/default.nix
+++ b/modules/home/default.nix
@@ -1,12 +1,11 @@
-{ lib, userDetails, ... }: {
+{ lib, userDetails, homeStateVersion, ... }: {
home = {
username = userDetails.username;
homeDirectory = userDetails.home.root;
- stateVersion = "24.05";
+ stateVersion = homeStateVersion;
};
imports = [
- ./alacritty.nix
#./chrome.nix
./firefox.nix
./git.nix
@@ -18,7 +17,6 @@
./wallpapers.nix
];
- alacritty.enable = lib.mkDefault true;
theme.mint.enable = lib.mkDefault true;
wallpapers.enable = lib.mkDefault false;
}
diff --git a/modules/hosts/T430/configuration.nix b/modules/hosts/T430/configuration.nix
index 282515d..7910275 100644
--- a/modules/hosts/T430/configuration.nix
+++ b/modules/hosts/T430/configuration.nix
@@ -1,6 +1,5 @@
{ config, lib, pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
- networking.hostName = "T430";
# TODO this does not function
#boot.initrd.systemd.extraBin = {
diff --git a/modules/hosts/T430/home.nix b/modules/hosts/T430/home.nix
index 9885a06..15df79a 100644
--- a/modules/hosts/T430/home.nix
+++ b/modules/hosts/T430/home.nix
@@ -1,6 +1,5 @@
{ ... }: {
imports = [ ../../home ];
- alacritty.font.size = 9;
wallpapers.enable = true;
}
diff --git a/modules/hosts/T495/configuration.nix b/modules/hosts/T495/configuration.nix
index 526b7bb..6ee62e9 100644
--- a/modules/hosts/T495/configuration.nix
+++ b/modules/hosts/T495/configuration.nix
@@ -2,11 +2,9 @@
imports = [
./hardware-configuration.nix
./games.nix
- ./input-leap.nix
+ #./input-leap.nix
./wg.nix
];
- networking.hostName = "T495";
-
bootloader.mode = "efi";
# Enable extra software pkgs
@@ -27,10 +25,6 @@
nas.office.enable = true;
nas.office.automount = false;
- networking.hosts = {
- "192.168.77.3" = [ "devel" ];
- };
-
# Use amdgpu driver for x11
services.xserver.videoDrivers = [ "amdgpu" ];
diff --git a/modules/hosts/hp-envy-office/configuration.nix b/modules/hosts/hp-envy-office/configuration.nix
index 9a7a43a..fdff4f0 100644
--- a/modules/hosts/hp-envy-office/configuration.nix
+++ b/modules/hosts/hp-envy-office/configuration.nix
@@ -1,8 +1,5 @@
{ config, lib, pkgs, ... }: {
- imports = [
- ./hardware-configuration.nix
- ];
- networking.hostName = "hp-envy-office";
+ imports = [ ./hardware-configuration.nix ];
# Enable extra software pkgs
software.desktop = {
diff --git a/modules/hosts/libreX60/configuration.nix b/modules/hosts/libreX60/configuration.nix
index 942793d..38500a6 100644
--- a/modules/hosts/libreX60/configuration.nix
+++ b/modules/hosts/libreX60/configuration.nix
@@ -1,6 +1,5 @@
{ config, lib, pkgs, ... }: {
imports = [ ./hardware-configuration.nix ];
- networking.hostName = "libreX60";
# Enable extra software pkgs
software.desktop = {
diff --git a/modules/hosts/optiplex/configuration.nix b/modules/hosts/optiplex/configuration.nix
index acda07f..d018c02 100644
--- a/modules/hosts/optiplex/configuration.nix
+++ b/modules/hosts/optiplex/configuration.nix
@@ -1,9 +1,5 @@
{ config, lib, pkgs, ... }: {
- imports = [
- ./hardware-configuration.nix
- ];
- networking.hostName = "optiplex";
-
+ imports = [ ./hardware-configuration.nix ];
bootloader.mode = "efi";
# Allow unfree for nvidia + others
@@ -32,10 +28,6 @@
# Disable wifi
wifi.enable = false;
- networking.hosts = {
- "192.168.77.3" = [ "devel" ];
- };
-
# Use nvidia driver
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
@@ -46,14 +38,8 @@
package = config.boot.kernelPackages.nvidiaPackages.stable; # Still good for 1050
};
- # Disable suspend targets
- systemd.targets = builtins.listToAttrs (map (name: {
- inherit name;
- value = {
- enable = false;
- unitConfig.DefaultDependencies = "no";
- };
- }) ["sleep" "suspend" "hibernate" "hybrid-sleep"]);
+ # Disable suspend
+ suspend.enable = false;
system.stateVersion = "24.11";
}
diff --git a/modules/root/bluetooth.nix b/modules/root/bluetooth.nix
index d55eade..1f41c7e 100644
--- a/modules/root/bluetooth.nix
+++ b/modules/root/bluetooth.nix
@@ -3,7 +3,7 @@
bluetooth.enable = lib.mkEnableOption "enables bluetooth support";
};
- config = {
+ config = lib.mkIf config.bluetooth.enable {
hardware.bluetooth.enable = true;
services.blueman.enable = true;
};
diff --git a/modules/root/default.nix b/modules/root/default.nix
index e108318..5397ec4 100644
--- a/modules/root/default.nix
+++ b/modules/root/default.nix
@@ -17,6 +17,7 @@
./printing.nix
./secrets.nix
./ssh.nix
+ ./suspend.nix
./tlp.nix
./wifi.nix
./x11.nix
@@ -44,6 +45,7 @@
printing.enable = lib.mkDefault true;
tlp.enable = lib.mkDefault true;
scanning.enable = lib.mkDefault true;
+ suspend.enable = lib.mkDefault true;
wifi.enable = lib.mkDefault true;
xserver.enable = lib.mkDefault true;
zsh.enable = lib.mkDefault true;
diff --git a/modules/root/hosts.nix b/modules/root/hosts.nix
index 14daaf1..b9f9d6e 100644
--- a/modules/root/hosts.nix
+++ b/modules/root/hosts.nix
@@ -1,10 +1,12 @@
-{
+{ hostname, ... }: {
+ networking.hostName = hostname; # From flake.nix
networking.hosts = {
"192.168.1.9" = [ "optiplex" ];
"192.168.1.30" = [ "localgit" ];
"192.168.1.11" = [ "truenas-home" ];
"192.168.77.11" = [ "truenas-office" ];
"192.168.77.8" = [ "publicgit" "tjkeller" ];
+ "192.168.77.3" = [ "devel" ];
"173.9.253.3" = [
"git.tjkeller.xyz"
"piped.tjkeller.xyz"
diff --git a/modules/root/suspend.nix b/modules/root/suspend.nix
new file mode 100644
index 0000000..814ae95
--- /dev/null
+++ b/modules/root/suspend.nix
@@ -0,0 +1,16 @@
+{ lib, config, ... }: {
+ options = {
+ suspend.enable = lib.mkEnableOption "enables suspend";
+ };
+
+ config = lib.mkIf (! config.suspend.enable) {
+ # Disable suspend targets
+ systemd.targets = builtins.listToAttrs (map (name: {
+ inherit name;
+ value = {
+ enable = false;
+ unitConfig.DefaultDependencies = "no";
+ };
+ }) ["sleep" "suspend" "hibernate" "hybrid-sleep"]);
+ };
+}