From 7ea8b25d1af6ac8cff510c78e705338bf181ab07 Mon Sep 17 00:00:00 2001 From: lynatic Date: Tue, 3 Sep 2024 21:25:47 +0200 Subject: [PATCH] removed mkLocalModule until it works, hotfixed a few things --- flake.nix | 6 ++---- hosts/forgenite/default.nix | 10 ++++------ users/lyn/default.nix | 9 ++++++--- users/lyn/ssh.nix | 4 ++-- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index 9780666..a09e140 100644 --- a/flake.nix +++ b/flake.nix @@ -5,14 +5,12 @@ sops-nix.url = "github:Mic92/sops-nix"; }; outputs = { self, nixpkgs, sops-nix }@inputs: { + nixosConfigurations = { "forgejo" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - # Import the configuration.nix here, so that the - # old configuration file can still take effect. - # Note: configuration.nix itself is also a Nixpkgs Module, - ./configuration.nix + ./hosts/forgenite/default.nix sops-nix.nixosModules.sops ]; specialArgs = { diff --git a/hosts/forgenite/default.nix b/hosts/forgenite/default.nix index 22e2ff9..6571911 100644 --- a/hosts/forgenite/default.nix +++ b/hosts/forgenite/default.nix @@ -1,14 +1,12 @@ -{ config, pkgs, lib, inputs, ... }: with lib.meta; { +{ config, pkgs, lib, inputs, ... }: { imports = [ + ./../../services/forgejo.nix + ./../../users/lyn ./hardware-configuration.nix ]; - - # will this work? - users.lyn.enable = true; - services.forgejo.enable = true; # Write path for borgbackup repos for backup.nix - _module.args.borgrepolistfile = ./borgrepos; + #_module.args.borgrepolistfile = ./borgrepos; # Enable Flakes and the new command-line tool nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/users/lyn/default.nix b/users/lyn/default.nix index fe21ce0..98dd833 100644 --- a/users/lyn/default.nix +++ b/users/lyn/default.nix @@ -1,8 +1,11 @@ -{lib, config, ...}:{ - users.users.lyn = { +{lib,pkgs, config, ...}:{ + imports = [ + ./ssh.nix + ]; + users.users.lyn = { isNormalUser = true; extraGroups = [ "wheel"]; packages = with pkgs; [ ]; + }; } -} \ No newline at end of file diff --git a/users/lyn/ssh.nix b/users/lyn/ssh.nix index 80ac56f..039fb5c 100644 --- a/users/lyn/ssh.nix +++ b/users/lyn/ssh.nix @@ -1,3 +1,3 @@ -{lib, config, ...}: lib.mkLocalModule ./. "Lyn SSH user config" { +{lib, config, ...}: { users.users.lyn.openssh.authorizedKeys.keys = ["ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC7NUaBJOYgMnT2uUUUSB7gKaqqbgxXDghBkRqSGuZrAZzZYHlHH7nM6Re7+yOYMSoJGLaB4iaUDLSBBnyA6pLI= nixos_gitea@secretive.MacBook-Pro-(2).local"]; -} \ No newline at end of file +}