aboutsummaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/flake/hosts.nix16
-rw-r--r--nix/machines/darwin/aarch64-darwin/hq-kwny2vh41p.nix61
-rw-r--r--nix/machines/darwin/aarch64-darwin/mba-m2.nix65
-rw-r--r--nix/machines/nixos/x86_64-linux/vm-synology.nix53
4 files changed, 8 insertions, 187 deletions
diff --git a/nix/flake/hosts.nix b/nix/flake/hosts.nix
index 3ce8c6b..d3454bf 100644
--- a/nix/flake/hosts.nix
+++ b/nix/flake/hosts.nix
@@ -42,10 +42,10 @@ let
inherit name;
value = {
inherit system;
- hostconf = ../machines/nixos + "/${system}/${filename}";
+ hostconf = "${self}/machines/nixos/${system}/${filename}";
};
}
- ) (builtins.readDir ../machines/nixos/${system}))
+ ) (builtins.readDir "${self}/machines/nixos/${system}"))
) { };
mapMacs = foldl' (
@@ -60,10 +60,10 @@ let
inherit name;
value = {
inherit system;
- hostconf = ../machines/darwin + "/${system}/${filename}";
+ hostconf = "${self}/machines/darwin/${system}/${filename}";
};
}
- ) (builtins.readDir ../machines/darwin/${system}))
+ ) (builtins.readDir "${self}/machines/darwin/${system}"))
) { };
defaultModules = [
@@ -71,14 +71,14 @@ let
inputs.agenix.nixosModules.age
inputs.disko.nixosModules.disko
inputs.home-manager.nixosModules.home-manager
- ../modules/default.nix
+ "${self}/nix/modules/default.nix"
];
darwinDefaultModules = [
nixSettings
inputs.agenix.darwinModules.age
inputs.home-manager.darwinModules.home-manager
- ../modules/default-darwin.nix
+ "${self}/nix/modules/default-darwin.nix"
];
darwinConfigurations = mapAttrs' (
@@ -124,7 +124,7 @@ let
}
);
}
- ) (mapMacs (mapSystems ../machines/darwin));
+ ) (mapMacs (mapSystems "${self}/machines/darwin"));
nixosConfigurations = mapAttrs' (
name: conf:
@@ -175,7 +175,7 @@ let
}
);
}
- ) (mapHosts (mapSystems ../machines/nixos));
+ ) (mapHosts (mapSystems "${self}/machines/nixos"));
in
{
flake = {
diff --git a/nix/machines/darwin/aarch64-darwin/hq-kwny2vh41p.nix b/nix/machines/darwin/aarch64-darwin/hq-kwny2vh41p.nix
deleted file mode 100644
index dd38c6f..0000000
--- a/nix/machines/darwin/aarch64-darwin/hq-kwny2vh41p.nix
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- adminUser,
- pkgs,
- self,
- ...
-}:
-{
-
- imports = [
- "${self}/nix/profiles/home-manager.nix"
- "${self}/nix/profiles/darwin.nix"
- "${self}/nix/profiles/nix.nix"
- ];
-
- system.primaryUser = adminUser.name;
-
- # https://github.com/nix-darwin/nix-darwin/issues/1339
- ids.gids.nixbld = 30000;
-
- fonts.packages = with pkgs; [
- source-code-pro
- ];
-
- # The user should already exist, but we need to set this up so Nix knows
- # what our home directory is (https://github.com/LnL7/nix-darwin/issues/423).
- users = {
- users.${adminUser.name} = {
- home = "/Users/${adminUser.name}";
- shell = pkgs.fish;
- };
- };
-
- environment.shells = [ pkgs.fish ];
-
- programs.fish.enable = true;
- programs.fish.shellInit = ''
- # Nix
- if test -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'
- source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'
- end
- # End Nix
- '';
-
- programs.ssh.knownHosts = {
- "github.com".publicKey =
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
- };
-
- home-manager.users.${adminUser.name} = {
- home.stateVersion = "23.05";
- home.username = "${adminUser.name}";
- home.homeDirectory = "/Users/${adminUser.name}";
- home.packages = with pkgs; [ grpcurl ];
- imports = [
- "${self}/nix/users/profiles/mac.nix"
- "${self}/nix/users/profiles/work.nix"
- ];
- inherit (adminUser) userinfo;
- programs.git.userEmail = "fcuny@roblox.com";
- };
-}
diff --git a/nix/machines/darwin/aarch64-darwin/mba-m2.nix b/nix/machines/darwin/aarch64-darwin/mba-m2.nix
deleted file mode 100644
index a97327b..0000000
--- a/nix/machines/darwin/aarch64-darwin/mba-m2.nix
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- adminUser,
- pkgs,
- self,
- ...
-}:
-{
- imports = [
- "${self}/nix/profiles/home-manager.nix"
- "${self}/nix/profiles/darwin.nix"
- "${self}/nix/profiles/nix.nix"
- ];
-
- system.primaryUser = adminUser.name;
-
- # https://github.com/nix-darwin/nix-darwin/issues/1339
- ids.gids.nixbld = 30000;
-
- networking.hostName = "mba-m2";
-
- fonts.packages = with pkgs; [
- source-code-pro
- ];
-
- # The user should already exist, but we need to set this up so Nix knows
- # what our home directory is (https://github.com/LnL7/nix-darwin/issues/423).
- users = {
- users.${adminUser.name} = {
- home = "/Users/${adminUser.name}";
- shell = pkgs.fish;
- };
- };
-
- environment.shells = [ pkgs.fish ];
-
- programs.fish.enable = true;
- programs.fish.shellInit = ''
- # Nix
- if test -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'
- source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish'
- end
- # End Nix
- '';
-
- programs.ssh.knownHosts = {
- "github.com".publicKey =
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl";
- };
-
- home-manager.users.${adminUser.name} = {
- home.stateVersion = "23.05";
- home.username = "${adminUser.name}";
- home.homeDirectory = "/Users/${adminUser.name}";
- home.packages = with pkgs; [
- element-desktop
- vlc-bin
- zoom-us
- ];
- imports = [
- "${self}/nix/users/profiles/mac.nix"
- "${self}/nix/users/profiles/media.nix"
- ];
- inherit (adminUser) userinfo;
- };
-}
diff --git a/nix/machines/nixos/x86_64-linux/vm-synology.nix b/nix/machines/nixos/x86_64-linux/vm-synology.nix
deleted file mode 100644
index 9896ebb..0000000
--- a/nix/machines/nixos/x86_64-linux/vm-synology.nix
+++ /dev/null
@@ -1,53 +0,0 @@
-{ self, ... }:
-{
- age = {
- secrets = {
- restic_gcs_credentials = {
- file = "${self}/secrets/restic_gcs_credentials.age";
- };
- restic_password = {
- file = "${self}/secrets/restic_password.age";
- };
- cloudflared-tunnel = {
- file = "${self}/secrets/cloudflared_cragmont.age";
- };
- cloudflared-cert = {
- file = "${self}/secrets/cloudflared_cert.age";
- };
- };
- };
-
- imports = [
- "${self}/nix/profiles/git-server.nix"
- "${self}/nix/profiles/hardware/synology.nix"
- "${self}/nix/profiles/disk/vm.nix"
- "${self}/nix/profiles/server.nix"
- # ./backups.nix
- # ./ingress.nix
- # ./nginx.nix
- ];
-
- # Use the systemd-boot EFI boot loader.
- boot.loader.efi.canTouchEfiVariables = true;
- networking.hostName = "vm-synology";
-
- # Define a user account. Don't forget to set a password with ‘passwd’.
- users.mutableUsers = false;
-
- # Enable the OpenSSH daemon.
- services.openssh.enable = true;
- services.openssh.settings.PasswordAuthentication = true;
- services.openssh.settings.PermitRootLogin = "no";
-
- users.users.root.openssh.authorizedKeys.keys = [
- "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBkozy+X96u5ciX766bJ/AyQ3xm1tXZTIr5+4PVFZFi"
- ];
-
- # This value determines the NixOS release from which the default
- # settings for stateful data, like file locations and database versions
- # on your system were taken. It‘s perfectly fine and recommended to leave
- # this value at the release version of the first install of this system.
- # Before changing this value read the documentation for this option
- # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
- system.stateVersion = "23.11"; # Did you read the comment?
-}