Skip to content

Commit

Permalink
nixosModules: options -> import modules (#210)
Browse files Browse the repository at this point in the history
* nixos: rename modules

* nixos/gnome: enable tabs in titlebar for gnome

* tree-wide: fmt fix

* nixos: enable home-manager options when relevant
  • Loading branch information
alyraffauf authored Jan 1, 2025
1 parent 3b91570 commit 50146fc
Show file tree
Hide file tree
Showing 39 changed files with 629 additions and 788 deletions.
19 changes: 17 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,23 @@
hw-framework-13-intel-11th = import ./hwModules/framework/13/intel-11th;
hw-thinkpad-t440p = import ./hwModules/thinkpad/t440p;

nixos = import ./nixosModules self;
nixos-desktop-gnome = import ./nixosModules/desktop/gnome.nix;
nixos-desktop-gui = import ./nixosModules/desktop/gui.nix;
nixos-desktop-hyprland = import ./nixosModules/desktop/hyprland.nix;
nixos-desktop-kde = import ./nixosModules/desktop/kde.nix;

nixos-profiles-desktop = import ./nixosModules/profiles/desktop.nix;

nixos-programs-firefox = import ./nixosModules/programs/firefox.nix;
nixos-programs-nicotine-plus = import ./nixosModules/programs/nicotine-plus.nix;
nixos-programs-podman = import ./nixosModules/programs/podman.nix;
nixos-programs-steam = import ./nixosModules/programs/steam.nix;
nixos-programs-virt-manager = import ./nixosModules/programs/virt-manager.nix;

nixos-services-flatpak = import ./nixosModules/services/flatpak.nix;
nixos-services-greetd = import ./nixosModules/services/greetd.nix;
nixos-services-sddm = import ./nixosModules/services/sddm.nix;

users = import ./userModules self;
};

Expand All @@ -203,7 +219,6 @@
self.inputs.home-manager.nixosModules.home-manager
self.inputs.lanzaboote.nixosModules.lanzaboote
self.inputs.stylix.nixosModules.stylix
self.nixosModules.nixos
self.nixosModules.users
{
home-manager = {
Expand Down
25 changes: 4 additions & 21 deletions homeManagerModules/options.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
config,
lib,
osConfig,
pkgs,
...
}: let
Expand Down Expand Up @@ -100,18 +99,10 @@ in {
type = lib.types.bool;
};

gnome.enable = lib.mkOption {
description = "GNOME with sane defaults.";
default = osConfig.ar.desktop.gnome.enable or false;
type = lib.types.bool;
};
gnome.enable = lib.mkEnableOption "GNOME with sane defaults.";

hyprland = {
enable = lib.mkOption {
description = "Hyprland with full desktop session components.";
default = osConfig.ar.desktop.hyprland.enable or false;
type = lib.types.bool;
};
enable = lib.mkEnableOption "Hyprland with full desktop session components.";

laptopMonitors = lib.mkOption {
description = "List of internal laptop monitors.";
Expand All @@ -136,11 +127,7 @@ in {
};
};

kde.enable = lib.mkOption {
description = "KDE Plasma with sane defaults.";
default = osConfig.ar.desktop.kde.enable or false;
type = lib.types.bool;
};
kde.enable = lib.mkEnableOption "KDE Plasma with sane defaults.";

windowManagerBinds = lib.mkOption {
description = "Default binds for window management.";
Expand All @@ -160,11 +147,7 @@ in {
};
};

laptopMode = lib.mkOption {
description = "Enable laptop configuration.";
default = osConfig.ar.laptopMode or false;
type = lib.types.bool;
};
laptopMode = lib.mkEnableOption "Enable laptop configuration.";

services = {
easyeffects = {
Expand Down
43 changes: 16 additions & 27 deletions hosts/fallarbor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,32 @@
self.nixosModules.common-systemd-boot
self.nixosModules.common-wifi-profiles
self.nixosModules.hw-framework-13-intel-11th
self.nixosModules.nixos-desktop-kde
self.nixosModules.nixos-profiles-desktop
self.nixosModules.nixos-programs-firefox
self.nixosModules.nixos-programs-steam
self.nixosModules.nixos-services-sddm
];

environment.variables.GDK_SCALE = "1.5";
networking.hostName = "fallarbor";
system.stateVersion = "24.05";

ar = {
apps = {
firefox.enable = true;
steam.enable = true;
};

desktop = {
desktopOptimizations.enable = true;
kde.enable = true;
sddm.enable = true;
};

laptopMode = true;
services.flatpak.enable = true;
ar.users = {
aly = {
enable = true;
password = "$y$j9T$0p6rc4p5sn0LJ/6XyAGP7.$.wmTafwMMscdW1o8kqqoHJP7U8kF.4WBmzzcPYielR3";

users = {
aly = {
syncthing = {
enable = true;
password = "$y$j9T$0p6rc4p5sn0LJ/6XyAGP7.$.wmTafwMMscdW1o8kqqoHJP7U8kF.4WBmzzcPYielR3";

syncthing = {
enable = true;
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
};
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
};
};

dustin = {
enable = true;
password = "$y$j9T$OXQYhj4IWjRJWWYsSwcqf.$lCcdq9S7m0EAdej9KMHWj9flH8K2pUb2gitNhLTlLG/";
};
dustin = {
enable = true;
password = "$y$j9T$OXQYhj4IWjRJWWYsSwcqf.$lCcdq9S7m0EAdej9KMHWj9flH8K2pUb2gitNhLTlLG/";
};
};
}
1 change: 1 addition & 0 deletions hosts/fallarbor/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{
ar.home = {
desktop.hyprland.laptopMonitors = ["desc:BOE 0x095F,preferred,auto,1.566667"];
laptopMode = true;

services = {
easyeffects = {
Expand Down
37 changes: 13 additions & 24 deletions hosts/lavaridge/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
self.nixosModules.common-pkgs
self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles
# self.nixosModules.hw-common-gaming
self.nixosModules.hw-framework-13-amd-7000
self.nixosModules.nixos-desktop-gnome
self.nixosModules.nixos-profiles-desktop
self.nixosModules.nixos-programs-firefox
self.nixosModules.nixos-programs-podman
self.nixosModules.nixos-programs-steam
];

environment.variables.GDK_SCALE = "2";
Expand Down Expand Up @@ -53,31 +57,16 @@

system.stateVersion = "24.05";

ar = {
apps = {
firefox.enable = true;
podman.enable = true;
steam.enable = true;
};

desktop = {
desktopOptimizations.enable = true;
gnome.enable = true;
};
ar.users.aly = {
enable = true;
password = "$y$j9T$NSS7QcEtN4yiigPyofwlI/$nxdgz0lpySa0heDMjGlHe1gX3BWf48jK6Tkfg4xMEs6";

laptopMode = true;

users.aly = {
syncthing = {
enable = true;
password = "$y$j9T$NSS7QcEtN4yiigPyofwlI/$nxdgz0lpySa0heDMjGlHe1gX3BWf48jK6Tkfg4xMEs6";

syncthing = {
enable = true;
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
syncMusic = true;
syncROMs = true;
};
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
syncMusic = true;
syncROMs = true;
};
};
}
1 change: 1 addition & 0 deletions hosts/lavaridge/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{
ar.home = {
desktop.hyprland.laptopMonitors = ["desc:BOE NE135A1M-NY1,2880x1920@60, 0x0, 2, vrr, 0"];
laptopMode = true;

services = {
easyeffects = {
Expand Down
54 changes: 22 additions & 32 deletions hosts/mauville/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,20 @@ in {
self.nixosModules.hw-common-amd-gpu
self.nixosModules.hw-common-bluetooth
self.nixosModules.hw-common-ssd
self.nixosModules.nixos-desktop-kde
self.nixosModules.nixos-profiles-desktop
self.nixosModules.nixos-programs-firefox
self.nixosModules.nixos-programs-nicotine-plus
self.nixosModules.nixos-programs-podman
self.nixosModules.nixos-programs-steam
self.nixosModules.nixos-services-sddm
];

boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "r8169"];
networking.hostName = "mauville";

sddm.autologin = "aly";

services = {
samba = {
enable = true;
Expand Down Expand Up @@ -88,43 +97,24 @@ in {

system.stateVersion = "24.05";

ar = {
apps = {
firefox.enable = true;
nicotine-plus.enable = true;
podman.enable = true;
steam.enable = true;
};

desktop = {
desktopOptimizations.enable = true;
kde.enable = true;
ar.users = {
aly = {
enable = true;
password = "$y$j9T$SHPShqI2IpRE101Ey2ry/0$0mhW1f9LbVY02ifhJlP9XVImge9HOpf23s9i1JFLIt9";

sddm = {
syncthing = {
enable = true;
autologin = "aly";
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
musicPath = "${mediaDirectory}/Music";
syncMusic = true;
syncROMs = true;
};
};

users = {
aly = {
enable = true;
password = "$y$j9T$SHPShqI2IpRE101Ey2ry/0$0mhW1f9LbVY02ifhJlP9XVImge9HOpf23s9i1JFLIt9";

syncthing = {
enable = true;
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
musicPath = "${mediaDirectory}/Music";
syncMusic = true;
syncROMs = true;
};
};

dustin = {
enable = false;
password = "$y$j9T$3mMCBnUQ.xjuPIbSof7w0.$fPtRGblPRSwRLj7TFqk1nzuNQk2oVlgvb/bE47sghl.";
};
dustin = {
enable = false;
password = "$y$j9T$3mMCBnUQ.xjuPIbSof7w0.$fPtRGblPRSwRLj7TFqk1nzuNQk2oVlgvb/bE47sghl.";
};
};
}
42 changes: 17 additions & 25 deletions hosts/rustboro/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,30 @@
self.nixosModules.common-tailscale
self.nixosModules.common-wifi-profiles
self.nixosModules.hw-thinkpad-t440p
self.nixosModules.nixos-desktop-hyprland
self.nixosModules.nixos-profiles-desktop
self.nixosModules.nixos-programs-firefox
self.nixosModules.nixos-services-greetd
];

environment.variables.GDK_SCALE = "1.25";
networking.hostName = "rustboro";
system.stateVersion = "24.05";

ar = {
apps.firefox.enable = true;

desktop = {
desktopOptimizations.enable = true;

greetd = {
enable = true;
autologin = "aly";
session = lib.getExe config.programs.hyprland.package;
};

hyprland.enable = true;
};
greetd = {
autologin = "aly";
session = lib.getExe config.programs.hyprland.package;
};

laptopMode = true;
networking.hostName = "rustboro";
system.stateVersion = "24.05";

users.aly = {
ar.users.aly = {
enable = true;
password = "$y$j9T$VMCXwk0X5m6xW6FGLc39F/$r9gmyeB70RCq3k4oLPHFZyy7wng6WyX2xYMKLO/A.rB";
syncthing = {
enable = true;
password = "$y$j9T$VMCXwk0X5m6xW6FGLc39F/$r9gmyeB70RCq3k4oLPHFZyy7wng6WyX2xYMKLO/A.rB";
syncthing = {
enable = true;
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
syncMusic = true;
};
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
syncMusic = true;
};
};
}
2 changes: 2 additions & 0 deletions hosts/rustboro/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
ar.home = {
desktop.hyprland.laptopMonitors = ["desc:LG Display 0x0569,preferred,auto,1.25"];

laptopMode = true;

services = {
easyeffects = {
enable = true;
Expand Down
17 changes: 7 additions & 10 deletions hosts/slateport/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
self.nixosModules.hw-common-intel-cpu
self.nixosModules.hw-common-intel-gpu
self.nixosModules.hw-common-ssd
self.nixosModules.nixos-programs-podman
];

boot = {
Expand All @@ -46,18 +47,14 @@

system.stateVersion = "24.05";

ar = {
apps.podman.enable = true;
ar.users.aly = {
enable = true;
password = "$y$j9T$Lit66g43.Zn60mwGig7cx1$L.aLzGvy0q.b1E40/XSIkhj2tkJbigpXFrxR/D/FVB4";

users.aly = {
syncthing = {
enable = true;
password = "$y$j9T$Lit66g43.Zn60mwGig7cx1$L.aLzGvy0q.b1E40/XSIkhj2tkJbigpXFrxR/D/FVB4";

syncthing = {
enable = true;
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
};
certFile = config.age.secrets.syncthingCert.path;
keyFile = config.age.secrets.syncthingKey.path;
};
};
}
Loading

0 comments on commit 50146fc

Please sign in to comment.