diff --git a/NixOS/configuration.nix b/NixOS/configuration.nix index 5a1006f..5dcc3e1 100644 --- a/NixOS/configuration.nix +++ b/NixOS/configuration.nix @@ -80,14 +80,13 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - vim wget curl git ]; - environment.variables.EDITOR = "vim"; + environment.variables.EDITOR = "neovim"; # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; @@ -99,7 +98,13 @@ # List services that you want to enable: # Enable the OpenSSH daemon. - services.openssh.enable = true; + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; diff --git a/NixOS/flake.nix b/NixOS/flake.nix index 0d24aba..316024b 100644 --- a/NixOS/flake.nix +++ b/NixOS/flake.nix @@ -1,5 +1,5 @@ { - description = "A simple NixOS flake"; + description = "NixOS flake"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -9,11 +9,18 @@ }; }; - outputs = { self, nixpkgs, ... }@inputs: { + outputs = { self, nixpkgs, home-manager, ... }@inputs: { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { inherit inputs; }; # allows access to flake inputs in nixos modules modules = [ ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; # makes hm use nixos's pkgs value + home-manager.extraSpecialArgs = { inherit inputs; }; # allows access to flake inputs in hm modules + home-manager.users.user.imports = [ ./home.nix ]; + } ]; }; }; diff --git a/NixOS/home.nix b/NixOS/home.nix new file mode 100644 index 0000000..e69de29