diff options
author | Linnnus <[email protected]> | 2023-10-01 21:48:51 +0200 |
---|---|---|
committer | Linnnus <[email protected]> | 2023-10-01 21:48:51 +0200 |
commit | 6d22256a85df7228a356a802dbc513c8abeeb2b7 (patch) | |
tree | eddc506e9cb0aa49c79c261a2995dd8de41135b7 | |
parent | 877db4137c34216fc2623570bc155d73e4b27f0b (diff) |
Export modules
-rw-r--r-- | flake.nix | 15 | ||||
-rw-r--r-- | hosts/ahmed/configuration.nix | 3 | ||||
-rw-r--r-- | hosts/ahmed/graphics.nix (renamed from modules/graphics/default.nix) | 0 | ||||
-rw-r--r-- | hosts/ahmed/linus.onl.nix (renamed from modules/linus.onl/default.nix) | 0 | ||||
-rw-r--r-- | hosts/ahmed/notifications.linus.onl.nix (renamed from modules/notifications.linus.onl/default.nix) | 0 | ||||
-rw-r--r-- | modules/darwin/default.nix | 4 | ||||
-rw-r--r-- | modules/darwin/still-awake/default.nix (renamed from services/still-awake/default.nix) | 0 | ||||
-rw-r--r-- | modules/default.nix | 11 | ||||
-rw-r--r-- | modules/nixos/cloudflare-proxy/default.nix (renamed from modules/cloudflare-proxy/default.nix) | 0 | ||||
-rw-r--r-- | modules/nixos/default.nix | 10 | ||||
-rw-r--r-- | modules/nixos/duksebot/default.nix (renamed from services/duksebot/default.nix) | 2 | ||||
-rw-r--r-- | modules/nixos/on-demand-minecraft/default.nix (renamed from services/on-demand-minecraft/default.nix) | 0 |
12 files changed, 26 insertions, 19 deletions
@@ -29,6 +29,9 @@ metadata = nixpkgs.lib.importTOML ./metadata.toml; }; + darwinModules = builtins.attrValues (import ./modules/darwin); + nixosModules = builtins.attrValues (import ./modules/nixos); + # This is a function that generates an attribute by calling a function # you pass to it, with each system as an argument. `systems` lists all # supported systems. @@ -52,10 +55,7 @@ ./hosts/muhammed/configuration.nix ./hosts/common.nix ./home - # FIXME: Get the following to work without nix-darwin bithcing about unused NixOS options. - # ./modules - # ./services - ]; + ] ++ darwinModules; }; }; @@ -70,14 +70,15 @@ ./hosts/ahmed/configuration.nix ./hosts/common.nix ./home - ./modules - ./services - ]; + ] ++ nixosModules; }; }; packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system}); overlays = import ./overlays; + + darwinModules = import ./modules/darwin; + nixosModules = import ./modules/nixos; }; } diff --git a/hosts/ahmed/configuration.nix b/hosts/ahmed/configuration.nix index fc1cc9c..d92c639 100644 --- a/hosts/ahmed/configuration.nix +++ b/hosts/ahmed/configuration.nix @@ -9,6 +9,9 @@ ./hardware-configuration.nix ./ssh.nix ./disable-screen.nix + ./linus.onl.nix + ./notifications.linus.onl.nix + ./graphics.nix ]; # Create the main user. diff --git a/modules/graphics/default.nix b/hosts/ahmed/graphics.nix index e2b7a86..e2b7a86 100644 --- a/modules/graphics/default.nix +++ b/hosts/ahmed/graphics.nix diff --git a/modules/linus.onl/default.nix b/hosts/ahmed/linus.onl.nix index 617865c..617865c 100644 --- a/modules/linus.onl/default.nix +++ b/hosts/ahmed/linus.onl.nix diff --git a/modules/notifications.linus.onl/default.nix b/hosts/ahmed/notifications.linus.onl.nix index 443853f..443853f 100644 --- a/modules/notifications.linus.onl/default.nix +++ b/hosts/ahmed/notifications.linus.onl.nix diff --git a/modules/darwin/default.nix b/modules/darwin/default.nix new file mode 100644 index 0000000..2419e48 --- /dev/null +++ b/modules/darwin/default.nix @@ -0,0 +1,4 @@ + +{ + still-awake = import ./still-awake; +} diff --git a/services/still-awake/default.nix b/modules/darwin/still-awake/default.nix index 9221359..9221359 100644 --- a/services/still-awake/default.nix +++ b/modules/darwin/still-awake/default.nix diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index 3015d59..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ ... }: - -{ - imports = - [ - ./linus.onl - ./notifications.linus.onl - ./cloudflare-proxy - ./graphics - ]; -} diff --git a/modules/cloudflare-proxy/default.nix b/modules/nixos/cloudflare-proxy/default.nix index 73d8893..73d8893 100644 --- a/modules/cloudflare-proxy/default.nix +++ b/modules/nixos/cloudflare-proxy/default.nix diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix new file mode 100644 index 0000000..9ad08e5 --- /dev/null +++ b/modules/nixos/default.nix @@ -0,0 +1,10 @@ +{ + ## Reusable services. + + on-demand-minecraft = import ./on-demand-minecraft; + duksebot = import ./duksebot; + + ## Other miscellaneous configuration bits. These may be useful to other you. + + cloudflare-proxy = import ./cloudflare-proxy; +} diff --git a/services/duksebot/default.nix b/modules/nixos/duksebot/default.nix index 5130497..c1dc5cf 100644 --- a/services/duksebot/default.nix +++ b/modules/nixos/duksebot/default.nix @@ -31,7 +31,7 @@ in users.groups.duksebot = { }; age.secrets.duksebot-env = { - file = ../../secrets/duksebot.env.age; + file = ../../../secrets/duksebot.env.age; owner = config.users.users.duksebot.name; group = config.users.users.duksebot.group; mode = "0440"; diff --git a/services/on-demand-minecraft/default.nix b/modules/nixos/on-demand-minecraft/default.nix index 541a624..541a624 100644 --- a/services/on-demand-minecraft/default.nix +++ b/modules/nixos/on-demand-minecraft/default.nix |