Skip to content

Commit

Permalink
modules/nixos/
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Sep 28, 2024
1 parent 8c2e18b commit 2eeefc9
Show file tree
Hide file tree
Showing 97 changed files with 53 additions and 52 deletions.
2 changes: 1 addition & 1 deletion configurations/darwin/appreciate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ in
{
imports = [
self.darwinModules.default
"${self}/nixos/github-runner.nix"
"${self}/modules/nixos/shared/github-runner.nix"
];

nixpkgs.hostPlatform = "aarch64-darwin";
Expand Down
13 changes: 6 additions & 7 deletions configurations/nixos/immediacy.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ in
imports = [
inputs.disko.nixosModules.disko
self.nixosModules.default
"${self}/nixos/disko/trivial.nix"
"${self}/nixos/common/primary-as-admin.nix"
"${self}/nixos/docker.nix"
"${self}/nixos/actualism-app.nix"
"${self}/nixos/hedgedoc.nix"
"${self}/nixos/github-runner.nix"
"${self}/nixos/server/harden/basics.nix"
"${self}/modules/nixos/linux/disko/trivial.nix"
"${self}/modules/nixos/linux/docker.nix"
"${self}/modules/nixos/linux/actualism-app.nix"
"${self}/modules/nixos/linux/hedgedoc.nix"
"${self}/modules/nixos/linux/server/harden/basics.nix"
"${self}/modules/nixos/shared/github-runner.nix"
];

nixos-flake.sshTarget = "srid@immediacy";
Expand Down
10 changes: 10 additions & 0 deletions flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ in
)
(builtins.readDir "${self}/modules/darwin");

nixosModules = inputs.nixpkgs.lib.mapAttrs'
(fn: _:
let
inherit (inputs.nixpkgs) lib;
name = lib.removeSuffix ".nix" fn;
in
lib.nameValuePair name "${self}/modules/nixos/${fn}"
)
(builtins.readDir "${self}/modules/nixos");

homeModules = inputs.nixpkgs.lib.mapAttrs'
(fn: _:
let
Expand Down
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
[
./flake-module.nix
./users
./nixos
];

perSystem = { self', pkgs, lib, system, ... }: {
Expand Down
8 changes: 8 additions & 0 deletions modules/nixos/common.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Common to Linux & darwin
{
imports = [
./shared/nix.nix
./shared/primary-as-admin.nix
./shared/caches.nix
];
}
23 changes: 23 additions & 0 deletions modules/nixos/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuration common to all Linux systems
{ flake, ... }:

let
inherit (flake) config inputs;
inherit (inputs) self;
in
{
imports = [
{
users.users.${config.people.myself}.isNormalUser = true;
home-manager.users.${config.people.myself} = { };
home-manager.sharedModules = [
self.homeModules.default
self.homeModules.linux-only
];
}
self.nixosModules.common
inputs.ragenix.nixosModules.default # Used in github-runner.nix & hedgedoc.nix
./all/self-ide.nix
./all/current-location.nix
];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions nixos/hedgedoc.nix → modules/nixos/linux/hedgedoc.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{ config, ... }:
{ flake, config, ... }:

let
inherit (flake.inputs) self;
domain = "pad.srid.ca";
port = 9112;
in
{
age.secrets."hedgedoc.env" = {
file = ../secrets/hedgedoc.env.age;
file = self + /secrets/hedgedoc.env.age;
owner = "hedgedoc";
};
services.hedgedoc = {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{ flake, ... }:
let
inherit (flake) inputs;
inherit (inputs) self;
in
{
imports = [
inputs.github-nix-ci.nixosModules.default
];

services.github-nix-ci = {
age.secretsDir = ../secrets;
age.secretsDir = self + /secrets;
personalRunners = {
"srid/srid".num = 1;
};
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions nixos/common/caches/default.nix

This file was deleted.

7 changes: 0 additions & 7 deletions nixos/common/default.nix

This file was deleted.

27 changes: 0 additions & 27 deletions nixos/default.nix

This file was deleted.

0 comments on commit 2eeefc9

Please sign in to comment.