aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdback <tyler@tdback.net>2025-01-17 19:26:25 -0500
committertdback <tyler@tdback.net>2025-01-17 19:26:25 -0500
commit581b132852c492f55a5cc6c657a3d24171708d2e (patch)
tree5135b7cc73380951d8f456bbe2a21b620fb231e6
parenta27cf2977656a40dd1f92ed262104f898a065499 (diff)
feat: add ability to specify system in mkSystem. add loki server
-rw-r--r--flake.nix29
-rw-r--r--hosts/loki/default.nix33
-rw-r--r--modules/default.nix4
3 files changed, 58 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix
index eb80896..48b232d 100644
--- a/flake.nix
+++ b/flake.nix
@@ -24,7 +24,7 @@
in
{
nixosConfigurations = mergeSets [
- (mkSystem "frigg" inputs.nixpkgs [
+ (mkSystem "frigg" "x86_64-linux" inputs.nixpkgs [
{
type = "profiles";
modules = [
@@ -54,7 +54,7 @@
];
}
])
- (mkSystem "heimdall" inputs.nixpkgs [
+ (mkSystem "heimdall" "x86_64-linux" inputs.nixpkgs [
{
type = "profiles";
modules = [
@@ -79,7 +79,24 @@
];
}
])
- (mkSystem "odin" inputs.nixpkgs [
+ (mkSystem "loki" "aarch64-linux" inputs.nixpkgs [
+ {
+ type = "profiles";
+ modules = [
+ "common"
+ "security"
+ "upgrade"
+ ];
+ }
+ {
+ type = "scripts";
+ modules = [
+ "motd"
+ "pushover"
+ ];
+ }
+ ])
+ (mkSystem "odin" "x86_64-linux" inputs.nixpkgs [
{
type = "containers";
modules = [
@@ -120,7 +137,7 @@
];
}
])
- (mkSystem "sparrow" inputs.nixpkgs (
+ (mkSystem "sparrow" "x86_64-linux" inputs.nixpkgs (
inputs.nixpkgs.lib.singleton {
type = "profiles";
modules = [
@@ -132,7 +149,7 @@
];
}
))
- (mkSystem "thor" inputs.nixpkgs [
+ (mkSystem "thor" "x86_64-linux" inputs.nixpkgs [
{
type = "profiles";
modules = [
@@ -159,7 +176,7 @@
];
}
])
- (mkSystem "woodpecker" inputs.nixpkgs (
+ (mkSystem "woodpecker" "x86_64-linux" inputs.nixpkgs (
inputs.nixpkgs.lib.singleton {
type = "profiles";
modules = [
diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix
new file mode 100644
index 0000000..dc461dc
--- /dev/null
+++ b/hosts/loki/default.nix
@@ -0,0 +1,33 @@
+{ inputs, ... }:
+{
+ system.stateVersion = "24.11";
+
+ home-manager = {
+ useGlobalPkgs = true;
+ useUserPackages = true;
+ users = import "${inputs.self}/users";
+ extraSpecialArgs = {
+ inherit inputs;
+ headless = true;
+ };
+ };
+
+ networking = {
+ hostName = "loki";
+ networkmanager.enable = true;
+ };
+
+ time.timeZone = "Europe/Helsinki";
+
+ boot.loader.grub = {
+ enable = true;
+ device = "/dev/sda2";
+ efiSupport = true;
+ };
+
+ programs.motd = {
+ enable = true;
+ networkInterfaces = [ "enp1s0" ];
+ servicesToCheck = [ ];
+ };
+}
diff --git a/modules/default.nix b/modules/default.nix
index a8ac000..21e86fc 100644
--- a/modules/default.nix
+++ b/modules/default.nix
@@ -6,9 +6,9 @@ let
mkModules = moduleAttrList: builtins.concatMap (moduleAttr: genModules moduleAttr) moduleAttrList;
in
{
- mkSystem = hostname: nixpkgsVersion: modules: {
+ mkSystem = hostname: system: nixpkgsVersion: modules: {
${hostname} = nixpkgsVersion.lib.nixosSystem {
- system = "x86_64-linux";
+ system = system;
modules = (mkModules modules) ++ [
"${inputs.self}/hosts/${hostname}"
"${inputs.self}/modules/users"