diff --git a/flake.lock b/flake.lock index 65e9713..0c39c83 100644 --- a/flake.lock +++ b/flake.lock @@ -45,16 +45,16 @@ ] }, "locked": { - "lastModified": 1700392168, - "narHash": "sha256-v5LprEFx3u4+1vmds9K0/i7sHjT0IYGs7u9v54iz/OA=", + "lastModified": 1702538064, + "narHash": "sha256-At5GwJPu2tzvS9dllhBoZmqK6lkkh/sOp2YefWRlaL8=", "owner": "nix-community", "repo": "home-manager", - "rev": "28535c3a34d79071f2ccb68671971ce0c0984d7e", + "rev": "0e2e443ff24f9d75925e91b89d1da44b863734af", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.05", + "ref": "master", "repo": "home-manager", "type": "github" } @@ -125,11 +125,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1701053011, - "narHash": "sha256-8QQ7rFbKFqgKgLoaXVJRh7Ik5LtI3pyBBCfOnNOGkF0=", + "lastModified": 1702350026, + "narHash": "sha256-A+GNZFZdfl4JdDphYKBJ5Ef1HOiFsP18vQe9mqjmUis=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5b528f99f73c4fad127118a8c1126b5e003b01a9", + "rev": "9463103069725474698139ab10f17a9d125da859", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a200fdd..f1e2d07 100644 --- a/flake.nix +++ b/flake.nix @@ -12,7 +12,7 @@ flake = false; }; home-manager = { - url = "github:nix-community/home-manager/release-23.05"; + url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; nur.url = "github:nix-community/NUR"; diff --git a/homes/base.nix b/homes/base.nix index 0c648b8..38ca97c 100644 --- a/homes/base.nix +++ b/homes/base.nix @@ -14,8 +14,8 @@ ./modules/vim ./modules/zsh ./modules/ranger - ./modules/emacs ./modules/tmux + ./modules/emacs # ./modules/nushell ]; diff --git a/homes/modules/emacs/default.nix b/homes/modules/emacs/default.nix index ccd0c85..8b0e9fb 100644 --- a/homes/modules/emacs/default.nix +++ b/homes/modules/emacs/default.nix @@ -5,11 +5,26 @@ my-dotfiles, wrapCmd, ... -}: { - home.packages = [ - pkgs.myEmacs - (pkgs.aspellWithDicts (d: [d.fr d.en])) - ]; - home.file.".aspell.conf".text = "data-dir ${pkgs.aspell}/lib/aspell"; - home.file.".emacs".text = builtins.readFile "${my-dotfiles}/files/emacs_conf"; +}: +let + cfg = config.my-programs.emacs; +in { + options = { + my-programs.emacs = { + enable = lib.mkOption { + default = false; + description = '' + Whether to enable emacs module. + ''; + }; + }; + }; + config = lib.mkIf cfg.enable { + home.packages = [ + pkgs.myEmacs + (pkgs.aspellWithDicts (d: [d.fr d.en])) + ]; + home.file.".aspell.conf".text = "data-dir ${pkgs.aspell}/lib/aspell"; + home.file.".emacs".text = builtins.readFile "${my-dotfiles}/files/emacs_conf"; + }; } diff --git a/homes/wsl.nix b/homes/wsl.nix index 62729bb..d365d81 100644 --- a/homes/wsl.nix +++ b/homes/wsl.nix @@ -11,9 +11,7 @@ }: { imports = [ ./base.nix - # GUI (disabled for experiment) - # ./modules/emacs ./modules/vim ]; @@ -27,6 +25,14 @@ ''; }; + my-programs.emacs.enable = false; + + services.gpg-agent = { + enable = true; + defaultCacheTtl = 1800; + enableSshSupport = true; + }; + # First we activate home-manager programs.home-manager.enable = true; home.file.".config/sakura/sakura.conf".text = @@ -36,21 +42,14 @@ bat # cat with colors for code cloc pass - taskwarrior - timewarrior nitrokey-app jq cgvg tree - manpages - gcc + pinentry + # manpages wget - gdb direnv - entr - - # Nix file formating - nixfmt ]; }; }