summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-01-25 23:55:57 -0500
committerseth <[email protected]>2023-01-26 03:50:11 -0500
commitbfa889aef9f82eb853a5b37ebe7fdbd8d5ecdc34 (patch)
treec684c7a090b1f42f2623639f1967d6494ac05bef
parent6b126efdb4cf0b88f085c3f325fc6fd362268f19 (diff)
finish up refactor + add glados host
thanks replaycoding uwu
-rw-r--r--flake.nix4
-rw-r--r--hosts/common/desktop/common.nix4
-rw-r--r--hosts/common/desktop/default.nix9
-rw-r--r--hosts/common/desktop/gnome.nix30
-rw-r--r--hosts/common/documentation.nix2
-rw-r--r--hosts/common/systemd.nix21
-rw-r--r--hosts/glados/boot.nix9
-rw-r--r--hosts/glados/default.nix2
-rw-r--r--hosts/glados/network.nix2
-rw-r--r--util/host.nix39
10 files changed, 60 insertions, 62 deletions
diff --git a/flake.nix b/flake.nix
index 046969c..386dbce 100644
--- a/flake.nix
+++ b/flake.nix
@@ -12,8 +12,8 @@
self,
nixpkgs,
nixpkgsUnstable,
- lanzaboote,
- nixos-wsl,
+ lanzaboote,
+ nixos-wsl,
...
}: let
util = import ./util/host.nix inputs;
diff --git a/hosts/common/desktop/common.nix b/hosts/common/desktop/common.nix
deleted file mode 100644
index d0289b1..0000000
--- a/hosts/common/desktop/common.nix
+++ /dev/null
@@ -1,4 +0,0 @@
-{config, ...}: {
- programs.xwayland.enable = true;
- xdg.portal.enable = true;
-}
diff --git a/hosts/common/desktop/default.nix b/hosts/common/desktop/default.nix
new file mode 100644
index 0000000..d5cc99f
--- /dev/null
+++ b/hosts/common/desktop/default.nix
@@ -0,0 +1,9 @@
+{
+ config,
+ lib,
+ ...
+}: {
+ programs.xwayland.enable = true;
+ xdg.portal.enable = true;
+ environment.noXlibs = lib.mkForce false;
+}
diff --git a/hosts/common/desktop/gnome.nix b/hosts/common/desktop/gnome.nix
index f6d06b4..76e02cb 100644
--- a/hosts/common/desktop/gnome.nix
+++ b/hosts/common/desktop/gnome.nix
@@ -3,22 +3,18 @@
pkgs,
...
}: {
- services =
- if config.system.gui-stuff
- then {
- xserver.enable = true;
- xserver.displayManager.gdm.enable = true;
- xserver.desktopManager.gnome.enable = true;
- }
- else {};
+ imports = [
+ ./.
+ ];
- environment.gnome.excludePackages = (
- with pkgs;
- if config.system.gui-stuff
- then [
- epiphany
- gnome-tour
- ]
- else []
- );
+ services.xserver = {
+ enable = true;
+ displayManager.gdm.enable = true;
+ desktopManager.gnome.enable = true;
+ };
+
+ environment.gnome.excludePackages = with pkgs; [
+ epiphany
+ gnome-tour
+ ];
}
diff --git a/hosts/common/documentation.nix b/hosts/common/documentation.nix
index 6d6b96f..85de6f9 100644
--- a/hosts/common/documentation.nix
+++ b/hosts/common/documentation.nix
@@ -3,7 +3,7 @@
pkgs,
...
}: {
- environment.systemPackages = with pkgs; [man-pages man-pages-posix nixpkgs-manual];
+ environment.systemPackages = with pkgs; [man-pages man-pages-posix];
documentation = {
dev.enable = true;
man.enable = true;
diff --git a/hosts/common/systemd.nix b/hosts/common/systemd.nix
index 42b4042..1c71cfc 100644
--- a/hosts/common/systemd.nix
+++ b/hosts/common/systemd.nix
@@ -3,17 +3,14 @@
journald.extraConfig = ''
MaxRetentionSec=1w
'';
- resolved =
- if config.system.gui-stuff
- then {
- enable = true;
- dnssec = "allow-downgrade";
- extraConfig = ''
- [Resolve]
- DNS=1.1.1.1 1.0.0.1
- DNSOverTLS=yes
- '';
- }
- else {};
+ resolved = {
+ enable = true;
+ dnssec = "allow-downgrade";
+ extraConfig = ''
+ [Resolve]
+ DNS=1.1.1.1 1.0.0.1
+ DNSOverTLS=yes
+ '';
+ };
};
}
diff --git a/hosts/glados/boot.nix b/hosts/glados/boot.nix
index 13cc84e..d0f0b22 100644
--- a/hosts/glados/boot.nix
+++ b/hosts/glados/boot.nix
@@ -12,12 +12,9 @@
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
kernelParams = ["nohibernate"];
- loader = {
- systemd-boot = {
- enable = lib.mkForce false;
- };
- efi.canTouchEfiVariables = true;
- };
+ bootspec.enable = true;
+ loader.systemd-boot.enable = lib.mkForce false;
+
lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
diff --git a/hosts/glados/default.nix b/hosts/glados/default.nix
index 96fa381..39687a2 100644
--- a/hosts/glados/default.nix
+++ b/hosts/glados/default.nix
@@ -5,7 +5,7 @@
...
}: {
imports = [
- (modulesPath + "/profiles/minimal.nix")
+ (modulesPath + "/profiles/base.nix")
../common
../common/desktop/gnome.nix
../common/hardware/nvidia.nix
diff --git a/hosts/glados/network.nix b/hosts/glados/network.nix
index b80f0ae..e55a0a2 100644
--- a/hosts/glados/network.nix
+++ b/hosts/glados/network.nix
@@ -1,6 +1,6 @@
{config, ...}: {
networking = {
- hostId = "$(head -c 8 /etc/machine-id)";
+ hostId = "replace_me";
networkmanager = {
enable = true;
dns = "systemd-resolved";
diff --git a/util/host.nix b/util/host.nix
index 6a58370..330edb6 100644
--- a/util/host.nix
+++ b/util/host.nix
@@ -1,28 +1,31 @@
-{nixpkgs, home-manager, ...}:
-
{
+ nixpkgs,
+ home-manager,
+ ...
+}: {
mkHost = {
name,
modules,
system ? "x86_64-linux",
pkgs,
}:
- pkgs.lib.nixosSystem {
- inherit system;
- modules =
- [
- ../hosts/common
+ with pkgs.lib;
+ nixosSystem {
+ inherit system;
+ modules =
+ [
+ ../hosts/common
- {
- networking.hostName = nixpkgs.lib.mkDefault name;
- }
+ {
+ networking.hostName = mkDefault name;
+ }
- home-manager.nixosModules.home-manager
- {
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- }
- ]
- ++ modules;
- };
+ home-manager.nixosModules.home-manager
+ {
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ }
+ ]
+ ++ modules;
+ };
}