From 95a17b9769f59e8a471774b027574481d5e62cc4 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 12 Aug 2025 10:42:01 -0700 Subject: profiles for doc, fish, and remove unused profiles --- machines/nixos/x86_64-linux/do-rproxy/default.nix | 4 ++- .../nixos/x86_64-linux/synology-vm/default.nix | 4 ++- profiles/core/docs.nix | 5 ++++ profiles/core/users.nix | 4 +++ profiles/default.nix | 32 ---------------------- profiles/nix/nix.nix | 27 ++++++++++++++++++ profiles/programs/fish.nix | 4 +++ profiles/server.nix | 12 -------- 8 files changed, 46 insertions(+), 46 deletions(-) create mode 100644 profiles/core/docs.nix delete mode 100644 profiles/default.nix create mode 100644 profiles/nix/nix.nix create mode 100644 profiles/programs/fish.nix delete mode 100644 profiles/server.nix diff --git a/machines/nixos/x86_64-linux/do-rproxy/default.nix b/machines/nixos/x86_64-linux/do-rproxy/default.nix index f3906a1..cba3ce5 100644 --- a/machines/nixos/x86_64-linux/do-rproxy/default.nix +++ b/machines/nixos/x86_64-linux/do-rproxy/default.nix @@ -22,18 +22,20 @@ "${self}/profiles/home-manager.nix" "${self}/profiles/admin-user/user.nix" "${self}/profiles/admin-user/home-manager.nix" - "${self}/profiles/server.nix" "${self}/profiles/core/boot.nix" "${self}/profiles/core/locale.nix" + "${self}/profiles/core/docs.nix" "${self}/profiles/core/ssh.nix" "${self}/profiles/core/tools.nix" "${self}/profiles/core/security.nix" "${self}/profiles/core/users.nix" "${self}/profiles/core/motd.nix" + "${self}/profiles/nix/nix.nix" "${self}/profiles/nix/gc.nix" "${self}/profiles/network/networkd.nix" "${self}/profiles/network/firewall.nix" "${self}/profiles/services/podman.nix" + "${self}/profiles/programs/fish.nix" ]; # do not use DHCP, as DigitalOcean provisions IPs using cloud-init diff --git a/machines/nixos/x86_64-linux/synology-vm/default.nix b/machines/nixos/x86_64-linux/synology-vm/default.nix index 4019bb0..67dbb56 100644 --- a/machines/nixos/x86_64-linux/synology-vm/default.nix +++ b/machines/nixos/x86_64-linux/synology-vm/default.nix @@ -35,18 +35,20 @@ "${self}/profiles/home-manager.nix" "${self}/profiles/admin-user/user.nix" "${self}/profiles/admin-user/home-manager.nix" - "${self}/profiles/server.nix" "${self}/profiles/core/boot.nix" "${self}/profiles/core/locale.nix" + "${self}/profiles/core/docs.nix" "${self}/profiles/core/ssh.nix" "${self}/profiles/core/tools.nix" "${self}/profiles/core/security.nix" "${self}/profiles/core/users.nix" "${self}/profiles/core/motd.nix" + "${self}/profiles/nix/nix.nix" "${self}/profiles/nix/gc.nix" "${self}/profiles/network/networkd.nix" "${self}/profiles/network/firewall.nix" "${self}/profiles/services/podman.nix" + "${self}/profiles/programs/fish.nix" ./profiles/git-server.nix ]; diff --git a/profiles/core/docs.nix b/profiles/core/docs.nix new file mode 100644 index 0000000..dcf38e6 --- /dev/null +++ b/profiles/core/docs.nix @@ -0,0 +1,5 @@ +{ lib, ... }: +{ + ## disable that slow "building man-cache" step + documentation.man.generateCaches = lib.mkForce false; +} diff --git a/profiles/core/users.nix b/profiles/core/users.nix index e0d8662..da2c8ff 100644 --- a/profiles/core/users.nix +++ b/profiles/core/users.nix @@ -1,4 +1,8 @@ { ... }: { users.mutableUsers = false; + + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBkozy+X96u5ciX766bJ/AyQ3xm1tXZTIr5+4PVFZFi" + ]; } diff --git a/profiles/default.nix b/profiles/default.nix deleted file mode 100644 index 6d0af84..0000000 --- a/profiles/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ pkgs, lib, ... }: -{ - nix = { - extraOptions = '' - tarball-ttl = 900 - ''; - package = pkgs.nixVersions.stable; - settings = { - trusted-substituters = [ - "https://cachix.cachix.org" - "https://nixpkgs.cachix.org" - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM=" - "nixpkgs.cachix.org-1:q91R6hxbwFvDqTSDKwDAV4T5PxqXGxswD8vhONFMeOE=" - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - trusted-users = [ "root" ]; - experimental-features = lib.mkDefault [ - "nix-command" - "flakes" - ]; - }; - }; - - programs.fish.enable = true; - - ## disable that slow "building man-cache" step - documentation.man.generateCaches = lib.mkForce false; -} diff --git a/profiles/nix/nix.nix b/profiles/nix/nix.nix new file mode 100644 index 0000000..f80c808 --- /dev/null +++ b/profiles/nix/nix.nix @@ -0,0 +1,27 @@ +{ pkgs, lib, ... }: +{ + nix = { + extraOptions = '' + tarball-ttl = 900 + ''; + package = pkgs.nixVersions.stable; + settings = { + trusted-substituters = [ + "https://cachix.cachix.org" + "https://nixpkgs.cachix.org" + "https://nix-community.cachix.org" + ]; + trusted-public-keys = [ + "cachix.cachix.org-1:eWNHQldwUO7G2VkjpnjDbWwy4KQ/HNxht7H4SSoMckM=" + "nixpkgs.cachix.org-1:q91R6hxbwFvDqTSDKwDAV4T5PxqXGxswD8vhONFMeOE=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + trusted-users = [ "root" ]; + experimental-features = lib.mkDefault [ + "nix-command" + "flakes" + ]; + }; + }; +} diff --git a/profiles/programs/fish.nix b/profiles/programs/fish.nix new file mode 100644 index 0000000..21fdf98 --- /dev/null +++ b/profiles/programs/fish.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + programs.fish.enable = true; +} diff --git a/profiles/server.nix b/profiles/server.nix deleted file mode 100644 index 37da0cc..0000000 --- a/profiles/server.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - ... -}: -{ - imports = [ - ./default.nix - ]; - - users.users.root.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINBkozy+X96u5ciX766bJ/AyQ3xm1tXZTIr5+4PVFZFi" - ]; -} -- cgit v1.2.3