From 979cdb26da49030b54f77b9883ff7ae127e552e0 Mon Sep 17 00:00:00 2001 From: Sokhibjon Orzikulov Date: Tue, 2 Jul 2024 04:09:10 +0500 Subject: [PATCH] added muzaffar user --- home/muzaffar.nix | 36 +++++++++++++++++++++++++++++++ modules/home/topgrade/default.nix | 7 ++---- modules/home/zsh/default.nix | 2 +- modules/nixos/users/default.nix | 1 + modules/nixos/users/muzaffar.nix | 31 ++++++++++++++++++++++++++ modules/nixos/users/sakhib.nix | 2 -- 6 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 home/muzaffar.nix create mode 100644 modules/nixos/users/muzaffar.nix diff --git a/home/muzaffar.nix b/home/muzaffar.nix new file mode 100644 index 0000000..558fdeb --- /dev/null +++ b/home/muzaffar.nix @@ -0,0 +1,36 @@ +{ + inputs, + lib, + pkgs, + config, + outputs, + packages, + self, + ... +}: { + imports = [ + outputs.homeManagerModules.zsh + outputs.homeManagerModules.nixpkgs + outputs.homeManagerModules.packages + ]; + + # This is required information for home-manager to do its job + home = { + stateVersion = "24.05"; + username = "muzaffar"; + homeDirectory = "/home/muzaffar"; + + # Don't check if home manager is same as nixpkgs + enableNixpkgsReleaseCheck = false; + }; + + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + }; + + # Let's enable home-manager + programs.home-manager.enable = true; +} diff --git a/modules/home/topgrade/default.nix b/modules/home/topgrade/default.nix index 9117f10..ad8a634 100644 --- a/modules/home/topgrade/default.nix +++ b/modules/home/topgrade/default.nix @@ -18,11 +18,8 @@ }; commands = {}; linux = { - nix_arguments = "--flake github:orzklv/nix"; - home_manager_arguments = ["--flake" "github:orzklv/nix"]; - }; - brew = { - autoremove = true; + nix_arguments = "--flake github:kolyma-labs/instances"; + home_manager_arguments = ["--flake" "github:kolyma-labs/instances"]; }; }; }; diff --git a/modules/home/zsh/default.nix b/modules/home/zsh/default.nix index 8296de3..c6440fa 100644 --- a/modules/home/zsh/default.nix +++ b/modules/home/zsh/default.nix @@ -28,7 +28,7 @@ "...." = "cd ../.."; "celar" = "clear"; ":q" = "exit"; - neofetch = "neofetch --source ~/.config/neofetch/logo.ascii"; + neofetch = "fastfetch"; ssh-hosts = "grep -P \"^Host ([^*]+)$\" $HOME/.ssh/config | sed 's/Host //'"; # Polite motherfucker! diff --git a/modules/nixos/users/default.nix b/modules/nixos/users/default.nix index 653010e..3ea2615 100644 --- a/modules/nixos/users/default.nix +++ b/modules/nixos/users/default.nix @@ -2,4 +2,5 @@ { # List your users here sakhib = import ./sakhib.nix; + muzaffar = import ./muzaffar.nix; } diff --git a/modules/nixos/users/muzaffar.nix b/modules/nixos/users/muzaffar.nix new file mode 100644 index 0000000..e0d7e64 --- /dev/null +++ b/modules/nixos/users/muzaffar.nix @@ -0,0 +1,31 @@ +{ + pkgs, + inputs, + outputs, + lib, + config, + packages, + ... +}: { + config = { + users.users = { + muzaffar = { + isNormalUser = true; + description = "Muzaffar Anasbekov"; + initialPassword = "2ReTpN1XG2VOR4aR"; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJHDSH+E/7791S2x2QF3WsQU1nnr7WNLyK1BubDmOeib muzaffar.gaming7@gmail.com" + ]; + extraGroups = ["networkmanager" "wheel" "docker" "admins"]; + }; + }; + + home-manager = { + extraSpecialArgs = {inherit inputs outputs;}; + users = { + # Import your home-manager configuration + muzaffar = import ../../../home/muzaffar.nix; + }; + }; + }; +} diff --git a/modules/nixos/users/sakhib.nix b/modules/nixos/users/sakhib.nix index 4ba36d4..75610cf 100644 --- a/modules/nixos/users/sakhib.nix +++ b/modules/nixos/users/sakhib.nix @@ -17,8 +17,6 @@ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDAGqU+JleLM0T44P2quirtLPrhFExOi6EOe0GYXkTFcTSjhw9LqiuX1/FbqNdKTaP9k6CdV3xc/8Z5wxbNOhpcPi9XLoupv9oNyIew7QYl+ZoAck6/qPsM7uptGYCwo0/ErzPNLd3ERD3KT1axCqrI6rWJ+JFOMAPtGeAZZxIedksViZ5SuNhpzXCIzS2PACqDTxFj7JwXK/pQ200h9ZS0MSh7iLKggXQfRVDndJxRnVY69NmbRa4MqkjgyxqWSDbqrDAXuTHpqKJ5kpXJ6p2a82EIHcCwXXpEmLwKxatxWJWJb9nurm3aS74BYmT3pRVVSPC6n5a2LWN9GxzvVh3AXXZtWGvjXSqBxHdSyUoDPuZnDneycdRC5vs6I1jSGTyDFdc4Etq1M5uUYb6SqCjJIBvTNqVnOf8nzFwl/ENvc8sbIVtILgAbBdwDiiQSu8xppqWMZfkQJy+uI5Ok7TZ8o5rGIblzfKyTiljCQb7RO7Klg3TwysetREn8ZEykBx0= This world soon will cherish into my darkness of my madness" ]; extraGroups = ["networkmanager" "wheel" "docker" "admins"]; - # packages = - # (with pkgs; []) ++ (with pkgs.unstable; []); }; };