summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock312
-rw-r--r--flake.nix64
-rw-r--r--hosts/common/default.nix10
-rw-r--r--hosts/common/desktop/common.nix4
-rw-r--r--hosts/common/desktop/gnome.nix24
-rw-r--r--hosts/common/documentation.nix11
-rw-r--r--hosts/common/fonts.nix28
-rw-r--r--hosts/common/hardware/default.nix6
-rw-r--r--hosts/common/hardware/nvidia.nix17
-rw-r--r--hosts/common/options.nix14
-rw-r--r--hosts/common/security.nix43
-rw-r--r--hosts/common/systemd.nix19
-rw-r--r--hosts/glados-wsl/default.nix19
-rw-r--r--hosts/glados-wsl/packages.nix9
-rw-r--r--hosts/glados/boot.nix28
-rw-r--r--hosts/glados/default.nix28
-rw-r--r--hosts/glados/network.nix9
-rw-r--r--hosts/glados/packages.nix24
-rw-r--r--hosts/glados/services.nix12
-rw-r--r--util/default.nix3
-rw-r--r--util/host.nix28
21 files changed, 637 insertions, 75 deletions
diff --git a/flake.lock b/flake.lock
index 8cb06a9..b89d5d5 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,8 +1,86 @@
{
"nodes": {
+ "crane": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "flake-utils": [
+ "lanzaboote",
+ "flake-utils"
+ ],
+ "nixpkgs": [
+ "lanzaboote",
+ "nixpkgs"
+ ],
+ "rust-overlay": [
+ "lanzaboote",
+ "rust-overlay"
+ ]
+ },
+ "locked": {
+ "lastModified": 1673056065,
+ "narHash": "sha256-a68tMDTDqdAauxq377ALl4Uwm6oh9MeoY2WbTYRWZoo=",
+ "owner": "ipetkov",
+ "repo": "crane",
+ "rev": "0144134311767fcee80213321f079a8ffa0b9cc1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "ipetkov",
+ "repo": "crane",
+ "type": "github"
+ }
+ },
"flake-compat": {
"flake": false,
"locked": {
+ "lastModified": 1668681692,
+ "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "009399224d5e398d03b22badca40a37ac85412a1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-compat_2": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1668681692,
+ "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "009399224d5e398d03b22badca40a37ac85412a1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-compat_3": {
+ "flake": false,
+ "locked": {
+ "lastModified": 1668681692,
+ "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "009399224d5e398d03b22badca40a37ac85412a1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-compat_4": {
+ "flake": false,
+ "locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
@@ -16,6 +94,24 @@
"type": "github"
}
},
+ "flake-parts": {
+ "inputs": {
+ "nixpkgs-lib": "nixpkgs-lib"
+ },
+ "locked": {
+ "lastModified": 1673047662,
+ "narHash": "sha256-dXYxH/0Ea5oQSkGAWWNy7HzmFutguycDGn2dt6lTYRQ=",
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "rev": "aa1f6ca773b6e740037ebfb35f7010e0c3960638",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "flake-parts",
+ "type": "github"
+ }
+ },
"flake-utils": {
"locked": {
"lastModified": 1667395993,
@@ -31,6 +127,43 @@
"type": "github"
}
},
+ "flake-utils_2": {
+ "locked": {
+ "lastModified": 1667395993,
+ "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "gitignore": {
+ "inputs": {
+ "nixpkgs": [
+ "lanzaboote",
+ "pre-commit-hooks-nix",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1660459072,
+ "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
+ "type": "github"
+ },
+ "original": {
+ "owner": "hercules-ci",
+ "repo": "gitignore.nix",
+ "type": "github"
+ }
+ },
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -52,11 +185,36 @@
"type": "github"
}
},
- "nixos-wsl": {
+ "lanzaboote": {
"inputs": {
- "flake-compat": "flake-compat",
+ "crane": "crane",
+ "flake-compat": "flake-compat_2",
+ "flake-parts": "flake-parts",
"flake-utils": "flake-utils",
- "nixpkgs": "nixpkgs"
+ "nixpkgs": "nixpkgs",
+ "nixpkgs-test": "nixpkgs-test",
+ "pre-commit-hooks-nix": "pre-commit-hooks-nix",
+ "rust-overlay": "rust-overlay"
+ },
+ "locked": {
+ "lastModified": 1674603127,
+ "narHash": "sha256-hlFog8zO2aktIBBgdBddScu95S+8waubHLQAbxEmp2g=",
+ "owner": "nix-community",
+ "repo": "lanzaboote",
+ "rev": "a9bce1464581098f35f09df555f9920e573324e5",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "repo": "lanzaboote",
+ "type": "github"
+ }
+ },
+ "nixos-wsl": {
+ "inputs": {
+ "flake-compat": "flake-compat_4",
+ "flake-utils": "flake-utils_2",
+ "nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1667989099,
@@ -75,6 +233,87 @@
},
"nixpkgs": {
"locked": {
+ "lastModified": 1673039641,
+ "narHash": "sha256-Bc9FVhyLxp2mX2SXr0N4Fj4St7o4yaYEXpd12etSNBY=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "d9f73e41fd3c8e85b266bdb91cb7535600010798",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable-small",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-lib": {
+ "locked": {
+ "dir": "lib",
+ "lastModified": 1672350804,
+ "narHash": "sha256-jo6zkiCabUBn3ObuKXHGqqORUMH27gYDIFFfLq5P4wg=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "677ed08a50931e38382dbef01cba08a8f7eac8f6",
+ "type": "github"
+ },
+ "original": {
+ "dir": "lib",
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-stable": {
+ "locked": {
+ "lastModified": 1671271954,
+ "narHash": "sha256-cSvu+bnvN08sOlTBWbBrKaBHQZq8mvk8bgpt0ZJ2Snc=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "d513b448cc2a6da2c8803e3c197c9fc7e67b19e3",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-22.05",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs-test": {
+ "locked": {
+ "lastModified": 1671812130,
+ "narHash": "sha256-GALBK+qB9rhnB+lVnxdgtMoXCySXughZZ3+qGO1Ke/k=",
+ "owner": "RaitoBezarius",
+ "repo": "nixpkgs",
+ "rev": "e51bf8cc8e2c75192e930ad83ed272938729e7be",
+ "type": "github"
+ },
+ "original": {
+ "owner": "RaitoBezarius",
+ "ref": "simplified-qemu-boot-disks",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgsUnstable": {
+ "locked": {
+ "lastModified": 1674459583,
+ "narHash": "sha256-L0UZl/u2H3HGsrhN+by42c5kNYeKtdmJiPzIRvEVeiM=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "1b1f50645af2a70dc93eae18bfd88d330bfbcf7f",
+ "type": "github"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "ref": "nixos-unstable",
+ "type": "indirect"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
"lastModified": 1667653703,
"narHash": "sha256-Xow4vx52/g5zkhlgZnMEm/TEXsj+13jTPCc2jIhW1xU=",
"owner": "NixOS",
@@ -88,26 +327,81 @@
"type": "indirect"
}
},
- "nixpkgs_2": {
+ "nixpkgs_3": {
"locked": {
- "lastModified": 1668087632,
- "narHash": "sha256-T/cUx44aYDuLMFfaiVpMdTjL4kpG7bh0VkN6JEM78/E=",
+ "lastModified": 1674407282,
+ "narHash": "sha256-2qwc8mrPINSFdWffPK+ji6nQ9aGnnZyHSItVcYDZDlk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "5f588eb4a958f1a526ed8da02d6ea1bea0047b9f",
+ "rev": "ab1254087f4cdf4af74b552d7fc95175d9bdbb49",
"type": "github"
},
"original": {
"id": "nixpkgs",
- "ref": "nixos-unstable",
+ "ref": "nixos-22.11",
"type": "indirect"
}
},
+ "pre-commit-hooks-nix": {
+ "inputs": {
+ "flake-compat": "flake-compat_3",
+ "flake-utils": [
+ "lanzaboote",
+ "flake-utils"
+ ],
+ "gitignore": "gitignore",
+ "nixpkgs": [
+ "lanzaboote",
+ "nixpkgs"
+ ],
+ "nixpkgs-stable": "nixpkgs-stable"
+ },
+ "locked": {
+ "lastModified": 1672912243,
+ "narHash": "sha256-QnQeKUjco2kO9J4rBqIBPp5XcOMblIMnmyhpjeaJBYc=",
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "rev": "a4548c09eac4afb592ab2614f4a150120b29584c",
+ "type": "github"
+ },
+ "original": {
+ "owner": "cachix",
+ "repo": "pre-commit-hooks.nix",
+ "type": "github"
+ }
+ },
"root": {
"inputs": {
"home-manager": "home-manager",
+ "lanzaboote": "lanzaboote",
"nixos-wsl": "nixos-wsl",
- "nixpkgs": "nixpkgs_2"
+ "nixpkgs": "nixpkgs_3",
+ "nixpkgsUnstable": "nixpkgsUnstable"
+ }
+ },
+ "rust-overlay": {
+ "inputs": {
+ "flake-utils": [
+ "lanzaboote",
+ "flake-utils"
+ ],
+ "nixpkgs": [
+ "lanzaboote",
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1673058265,
+ "narHash": "sha256-FFigGHIO9BQeIIKjH5dcpB+ey5CSgfy47wHPGeOhCps=",
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "rev": "802ff3314663ec7114f29a6e8b200dfc892023f8",
+ "type": "github"
+ },
+ "original": {
+ "owner": "oxalica",
+ "repo": "rust-overlay",
+ "type": "github"
}
},
"utils": {
diff --git a/flake.nix b/flake.nix
index f1faa78..f9d0085 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,41 +1,51 @@
{
inputs = {
- nixpkgs.url = "nixpkgs/nixos-unstable";
+ nixpkgs.url = "nixpkgs/nixos-22.11";
+ nixpkgsUnstable.url = "nixpkgs/nixos-unstable";
nixos-wsl.url = "git+https://github.com/nix-community/NixOS-WSL?ref=main";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
+ lanzaboote.url = "github:nix-community/lanzaboote";
};
- outputs = {
+ outputs = inputs @ {
+ self,
nixpkgs,
- nixos-wsl,
- home-manager,
+ nixpkgsUnstable,
...
- }: {
- nixosConfigurations.glados-wsl = nixpkgs.lib.nixosSystem {
- system = "x86_64-linux";
- modules = [
- home-manager.nixosModules.home-manager
- {
- home-manager.useGlobalPkgs = true;
- home-manager.useUserPackages = true;
- }
+ }: let
+ util = import ./util;
+ in {
+ nixosConfigurations = {
+ glados = util.host.mkHost {
+ name = "glados";
+ modules = [
+ self.lanzaboote.nixosModules.lanzaboote
- ./hosts/glados-wsl
+ ./hosts/glados
+ ];
+ pkgs = nixpkgsUnstable;
+ };
+ glados-wsl = util.host.mkHost {
+ name = "glados-wsl";
+ modules = [
+ ./hosts/glados-wsl
- nixos-wsl.nixosModules.wsl
- ({lib, ...}: {
- environment.noXlibs = lib.mkForce false;
- wsl = {
- enable = true;
- defaultUser = "seth";
- nativeSystemd = true;
- wslConf.network.hostname = "glados-wsl";
- startMenuLaunchers = false;
- interop.includePath = false;
- };
- })
- ];
+ self.nixos-wsl.nixosModules.wsl
+ ({lib, ...}: {
+ environment.noXlibs = lib.mkForce false;
+ wsl = {
+ enable = true;
+ defaultUser = "seth";
+ nativeSystemd = true;
+ wslConf.network.hostname = "glados-wsl";
+ startMenuLaunchers = false;
+ interop.includePath = false;
+ };
+ })
+ ];
+ pkgs = nixpkgs;
+ };
};
};
}
diff --git a/hosts/common/default.nix b/hosts/common/default.nix
index 9793191..2923ae0 100644
--- a/hosts/common/default.nix
+++ b/hosts/common/default.nix
@@ -1,7 +1,13 @@
-{
+{lib, ...}: {
imports = [
+ ./options.nix
+ ./documentation.nix
+ ./fonts.nix
+ ./locale.nix
./security.nix
+ ./systemd.nix
./users.nix
- ./locale.nix
];
+
+ config.services.kmscon.enable = true;
}
diff --git a/hosts/common/desktop/common.nix b/hosts/common/desktop/common.nix
new file mode 100644
index 0000000..d0289b1
--- /dev/null
+++ b/hosts/common/desktop/common.nix
@@ -0,0 +1,4 @@
+{config, ...}: {
+ programs.xwayland.enable = true;
+ xdg.portal.enable = true;
+}
diff --git a/hosts/common/desktop/gnome.nix b/hosts/common/desktop/gnome.nix
new file mode 100644
index 0000000..f6d06b4
--- /dev/null
+++ b/hosts/common/desktop/gnome.nix
@@ -0,0 +1,24 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ services =
+ if config.system.gui-stuff
+ then {
+ xserver.enable = true;
+ xserver.displayManager.gdm.enable = true;
+ xserver.desktopManager.gnome.enable = true;
+ }
+ else {};
+
+ environment.gnome.excludePackages = (
+ with pkgs;
+ if config.system.gui-stuff
+ then [
+ epiphany
+ gnome-tour
+ ]
+ else []
+ );
+}
diff --git a/hosts/common/documentation.nix b/hosts/common/documentation.nix
new file mode 100644
index 0000000..6d6b96f
--- /dev/null
+++ b/hosts/common/documentation.nix
@@ -0,0 +1,11 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ environment.systemPackages = with pkgs; [man-pages man-pages-posix nixpkgs-manual];
+ documentation = {
+ dev.enable = true;
+ man.enable = true;
+ };
+}
diff --git a/hosts/common/fonts.nix b/hosts/common/fonts.nix
new file mode 100644
index 0000000..9cec045
--- /dev/null
+++ b/hosts/common/fonts.nix
@@ -0,0 +1,28 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ fonts = {
+ fonts = with pkgs;
+ if config.system.gui-stuff
+ then [
+ noto-fonts
+ noto-fonts-extra
+ noto-fonts-emoji
+ noto-fonts-cjk-sans
+ fira-code
+ (nerdfonts.override {fonts = ["FiraCode"];})
+ ]
+ else [];
+ fontconfig.defaultFonts =
+ if config.system.gui-stuff
+ then {
+ serif = ["Noto Serif"];
+ sansSerif = ["Noto Sans"];
+ emoji = ["Noto Color Emoji"];
+ monospace = ["Fira Code"];
+ }
+ else {};
+ };
+}
diff --git a/hosts/common/hardware/default.nix b/hosts/common/hardware/default.nix
new file mode 100644
index 0000000..e7e6350
--- /dev/null
+++ b/hosts/common/hardware/default.nix
@@ -0,0 +1,6 @@
+_: {
+ imports = [
+ ./nvidia.nix
+ ./zfs.nix
+ ];
+}
diff --git a/hosts/common/hardware/nvidia.nix b/hosts/common/hardware/nvidia.nix
new file mode 100644
index 0000000..4bc445c
--- /dev/null
+++ b/hosts/common/hardware/nvidia.nix
@@ -0,0 +1,17 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ hardware = {
+ nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
+ opengl = {
+ enable = true;
+ extraPackages = with pkgs; [
+ vaapiVdpau
+ ];
+ };
+ };
+
+ services.xserver.videoDrivers = ["nvidia"];
+}
diff --git a/hosts/common/options.nix b/hosts/common/options.nix
new file mode 100644
index 0000000..2d532ed
--- /dev/null
+++ b/hosts/common/options.nix
@@ -0,0 +1,14 @@
+{lib, ...}: {
+ options.system = with lib.types; {
+ devel-packages = lib.mkOption {
+ type = bool;
+ default = false;
+ description = "install development packages for neovim lsp";
+ };
+ gui-stuff = lib.mkOption {
+ type = bool;
+ default = false;
+ description = "install gui-related packages";
+ };
+ };
+}
diff --git a/hosts/common/security.nix b/hosts/common/security.nix
index f0f3bb9..32c2ff5 100644
--- a/hosts/common/security.nix
+++ b/hosts/common/security.nix
@@ -1,21 +1,28 @@
_: {
- security.sudo = {
- configFile = ''
- Defaults env_reset
- Defaults secure_path = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
- Defaults editor = /run/current-system/sw/bin/vim,!env_editor
- '';
- execWheelOnly = true;
- extraRules = [
- {
- users = ["root"];
- groups = ["root"];
- commands = ["ALL"];
- }
- {
- users = ["seth"];
- commands = ["ALL"];
- }
- ];
+ security = {
+ apparmor.enable = true;
+ audit.enable = true;
+ auditd.enable = true;
+ rtkit.enable = true;
+ sudo = {
+ configFile = ''
+ Defaults env_reset
+ Defaults secure_path = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin
+ Defaults editor = /run/current-system/sw/bin/vim,!env_editor
+ '';
+ execWheelOnly = true;
+ extraRules = [
+ {
+ users = ["root"];
+ groups = ["root"];
+ commands = ["ALL"];
+ }
+ {
+ users = ["seth"];
+ commands = ["ALL"];
+ }
+ ];
+ };
+ polkit.enable = true;
};
}
diff --git a/hosts/common/systemd.nix b/hosts/common/systemd.nix
new file mode 100644
index 0000000..42b4042
--- /dev/null
+++ b/hosts/common/systemd.nix
@@ -0,0 +1,19 @@
+{config, ...}: {
+ services = {
+ 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 {};
+ };
+}
diff --git a/hosts/glados-wsl/default.nix b/hosts/glados-wsl/default.nix
index 49db2ae..d77baf6 100644
--- a/hosts/glados-wsl/default.nix
+++ b/hosts/glados-wsl/default.nix
@@ -19,23 +19,4 @@
nix.settings.experimental-features = ["nix-command" "flakes"];
system.stateVersion = "22.11";
-
- # hardware = {
- # nvidia.package = boot.kernelPackages.nvidiaPackages.stable;
- # xserver = {
- # videoDrivers = [ "nvidia" ];
- # };
- # opengl.enable = true;
- # };
-
- networking.hostName = "glados-wsl";
-
- programs = {
- gnupg = {
- agent = {
- enable = true;
- pinentryFlavor = "curses";
- };
- };
- };
}
diff --git a/hosts/glados-wsl/packages.nix b/hosts/glados-wsl/packages.nix
index c6ff472..7066911 100644
--- a/hosts/glados-wsl/packages.nix
+++ b/hosts/glados-wsl/packages.nix
@@ -8,4 +8,13 @@
python310
vim
];
+
+ programs = {
+ gnupg = {
+ agent = {
+ enable = true;
+ pinentryFlavor = "curses";
+ };
+ };
+ };
}
diff --git a/hosts/glados/boot.nix b/hosts/glados/boot.nix
new file mode 100644
index 0000000..13cc84e
--- /dev/null
+++ b/hosts/glados/boot.nix
@@ -0,0 +1,28 @@
+{
+ config,
+ lib,
+ pkgs,
+ ...
+}: {
+ environment.systemPackages = with pkgs; [
+ sbctl
+ ];
+
+ boot = {
+ kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
+ kernelParams = ["nohibernate"];
+
+ loader = {
+ systemd-boot = {
+ enable = lib.mkForce false;
+ };
+ efi.canTouchEfiVariables = true;
+ };
+ lanzaboote = {
+ enable = true;
+ pkiBundle = "/etc/secureboot";
+ };
+
+ supportedFilesystems = ["zfs"];
+ };
+}
diff --git a/hosts/glados/default.nix b/hosts/glados/default.nix
new file mode 100644
index 0000000..96fa381
--- /dev/null
+++ b/hosts/glados/default.nix
@@ -0,0 +1,28 @@
+{
+ config,
+ modulesPath,
+ pkgs,
+ ...
+}: {
+ imports = [
+ (modulesPath + "/profiles/minimal.nix")
+ ../common
+ ../common/desktop/gnome.nix
+ ../common/hardware/nvidia.nix
+ ./boot.nix
+ ./network.nix
+ ./packages.nix
+ ../../users/seth
+ ];
+
+ system.gui-stuff = true;
+
+ # enable non-free packages
+ nixpkgs.config.allowUnfree = true;
+
+ # Enable nix flakes
+ nix.package = pkgs.nixFlakes;
+ nix.settings.experimental-features = ["nix-command" "flakes"];
+
+ system.stateVersion = "23.05";
+}
diff --git a/hosts/glados/network.nix b/hosts/glados/network.nix
new file mode 100644
index 0000000..b80f0ae
--- /dev/null
+++ b/hosts/glados/network.nix
@@ -0,0 +1,9 @@
+{config, ...}: {
+ networking = {
+ hostId = "$(head -c 8 /etc/machine-id)";
+ networkmanager = {
+ enable = true;
+ dns = "systemd-resolved";
+ };
+ };
+}
diff --git a/hosts/glados/packages.nix b/hosts/glados/packages.nix
new file mode 100644
index 0000000..2765f35
--- /dev/null
+++ b/hosts/glados/packages.nix
@@ -0,0 +1,24 @@
+{
+ config,
+ pkgs,
+ ...
+}: {
+ environment.systemPackages = with pkgs; [
+ git
+ gnupg1
+ neofetch
+ nixos-option
+ pinentry-curses
+ python310
+ vim
+ ];
+
+ programs = {
+ gnupg = {
+ agent = {
+ enable = true;
+ pinentryFlavor = "curses";
+ };
+ };
+ };
+}
diff --git a/hosts/glados/services.nix b/hosts/glados/services.nix
new file mode 100644
index 0000000..a71acbd
--- /dev/null
+++ b/hosts/glados/services.nix
@@ -0,0 +1,12 @@
+{config, ...}: {
+ services = {
+ dbus.enable = true;
+ pipewire = {
+ enable = true;
+ wireplumber.enable = true;
+ alsa.enable = true;
+ jack.enable = true;
+ pulse.enable = true;
+ };
+ };
+}
diff --git a/util/default.nix b/util/default.nix
new file mode 100644
index 0000000..adfffd7
--- /dev/null
+++ b/util/default.nix
@@ -0,0 +1,3 @@
+_: {
+ host = import ./host.nix;
+}
diff --git a/util/host.nix b/util/host.nix
new file mode 100644
index 0000000..18e87a9
--- /dev/null
+++ b/util/host.nix
@@ -0,0 +1,28 @@
+{lib, ...}:
+with lib; {
+ mkHost = {
+ name,
+ modules,
+ system ? "x86_64-linux",
+ pkgs,
+ }:
+ nixosSystem {
+ inherit system;
+ modules =
+ [
+ ../hosts/common
+
+ {
+ nixpkgs.pkgs = pkgs;
+ networking.hostName = mkDefault name;
+ }
+
+ home-manager.nixosModules.home-manager
+ {
+ home-manager.useGlobalPkgs = true;
+ home-manager.useUserPackages = true;
+ }
+ ]
+ ++ modules;
+ };
+}