diff --git a/flake.nix b/flake.nix index 59dd57b..5e5a055 100644 --- a/flake.nix +++ b/flake.nix @@ -303,6 +303,19 @@ auto-cpufreq.nixosModules.default ./hosts/tyr/configuration.nix ./modules/linux/nixos + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.extraSpecialArgs = {inherit inputs;}; + home-manager.backupFileExtension = "backup"; + home-manager.users.crony = { + imports = [ + ./modules/linux/home-manager + ./modules/cross-platform/home-manager + ./hosts/tyr/home.nix + ]; + }; + } ]; }; diff --git a/hosts/tyr/configuration.nix b/hosts/tyr/configuration.nix index 3ddfe70..369f2d6 100644 --- a/hosts/tyr/configuration.nix +++ b/hosts/tyr/configuration.nix @@ -1,4 +1,5 @@ { + config, inputs, pkgs, ... @@ -67,16 +68,16 @@ users.users.crony = { isNormalUser = true; description = "Crony"; - # hashedPasswordFile = "${config.age.secrets.crony-passwd.path}"; + hashedPasswordFile = "${config.age.secrets.crony-passwd.path}"; extraGroups = ["networkmanager" "wheel" "video" "input" "audio" "gamemode" "seat" "realtime"]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBJLduAXHWJiglmfRfkBGKffzVWkJP6porxIzw6+Zz3W crony@cronyakatsuki.xyz" ]; }; - # users.users.root.hashedPasswordFile = "${config.age.secrets.root-passwd.path}"; + users.users.root.hashedPasswordFile = "${config.age.secrets.root-passwd.path}"; - # users.mutableUsers = false; + users.mutableUsers = false; # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -126,11 +127,9 @@ services.fail2ban = { enable = true; - ignoreIP = [ - "65.21.241.194" - ]; }; + # Enable my specific settings crony.secrets.enable = true; # Enable nixd to see nixpkgs path diff --git a/hosts/tyr/home.nix b/hosts/tyr/home.nix new file mode 100644 index 0000000..12fa4d5 --- /dev/null +++ b/hosts/tyr/home.nix @@ -0,0 +1,18 @@ +{inputs, ...}: { + imports = [ + inputs.nvf.homeManagerModules.default + inputs.nix-index-database.homeModules.nix-index + inputs.nix-flatpak.homeManagerModules.nix-flatpak + inputs.agenix.homeManagerModules.default + ]; + + # Some info + home.username = "crony"; + home.homeDirectory = "/home/crony"; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + + # DO NOT CHANGE + home.stateVersion = "24.11"; # Please read the comment before changing. +}